/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
if (officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::ImpressView::get().value_or(true)
&& (!o3tl::IsRunningUnitTest() || !comphelper::LibreOfficeKit::isActive()))
AddActiveMainView(FrameworkHelper::msImpressViewURL); if (officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::OutlineView::get().value_or(true))
AddActiveMainView(FrameworkHelper::msOutlineViewURL); if (officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::NotesView::get().value_or(true))
AddActiveMainView(FrameworkHelper::msNotesViewURL); if (officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::HandoutView::get().value_or(false))
AddActiveMainView(FrameworkHelper::msHandoutViewURL); if (officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::SlideSorterView::get().value_or(false)
&& !comphelper::LibreOfficeKit::isActive())
AddActiveMainView(FrameworkHelper::msSlideSorterURL); if (officecfg::Office::Impress::MultiPaneGUI::SlideSorterBar::Visible::DrawView::get().value_or(true))
AddActiveMainView(FrameworkHelper::msDrawViewURL);
void SAL_CALL SlideSorterModule::notifyConfigurationChange ( const ConfigurationChangeEvent& rEvent)
{ if (rEvent.Type == FrameworkHelper::msResourceActivationEvent)
{ if (rEvent.ResourceId->compareTo(mxViewTabBarId) == 0)
{ // Update the view tab bar because the view tab bar has just // become active.
UpdateViewTabBar(Reference<XTabBar>(rEvent.ResourceObject,UNO_QUERY));
} elseif (rEvent.ResourceId->getResourceTypePrefix() ==
FrameworkHelper::msViewURLPrefix
&& rEvent.ResourceId->isBoundTo(
FrameworkHelper::CreateResourceId(FrameworkHelper::msCenterPaneURL),
AnchorBindingMode_DIRECT))
{ // Update the view tab bar because the view in the center pane // has changed.
UpdateViewTabBar(nullptr);
} return;
}
OSL_ASSERT(rEvent.ResourceId.is());
sal_Int32 nEventType = 0;
rEvent.UserData >>= nEventType; switch (nEventType)
{ case ResourceActivationRequestEvent: if (rEvent.ResourceId->isBoundToURL(
FrameworkHelper::msCenterPaneURL,
AnchorBindingMode_DIRECT))
{ // A resource directly bound to the center pane has been // requested. if (rEvent.ResourceId->getResourceTypePrefix() ==
FrameworkHelper::msViewURLPrefix)
{ // The requested resource is a view. Show or hide the // resource managed by this ResourceManager accordingly.
HandleMainViewSwitch(
rEvent.ResourceId->getResourceURL(), true);
}
} elseif (rEvent.ResourceId->compareTo(mxResourceId) == 0)
{ // The resource managed by this ResourceManager has been // explicitly been requested (maybe by us). Remember this // setting.
HandleResourceRequest(true, rEvent.Configuration);
} break;
case ResourceDeactivationRequestEvent: if (rEvent.ResourceId->compareTo(mxMainViewAnchorId) == 0)
{
HandleMainViewSwitch(
OUString(), false);
} elseif (rEvent.ResourceId->compareTo(mxResourceId) == 0)
{ // The resource managed by this ResourceManager has been // explicitly been requested to be hidden (maybe by us). // Remember this setting.
HandleResourceRequest(false, rEvent.Configuration);
} break;
}
}
void SAL_CALL SlideSorterModule::disposing ( const lang::EventObject& rEvent)
{ if (mxConfigurationController.is()
&& rEvent.Source == mxConfigurationController)
{
SaveResourceState(); // Without the configuration controller this class can do nothing.
mxConfigurationController = nullptr;
dispose();
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.