diff options
-rw-r--r-- | sd/source/ui/framework/module/ResourceManager.cxx | 37 | ||||
-rw-r--r-- | sd/source/ui/framework/module/ResourceManager.hxx | 1 |
2 files changed, 16 insertions, 22 deletions
diff --git a/sd/source/ui/framework/module/ResourceManager.cxx b/sd/source/ui/framework/module/ResourceManager.cxx index 49a40be984d0..c0b07c71bfeb 100644 --- a/sd/source/ui/framework/module/ResourceManager.cxx +++ b/sd/source/ui/framework/module/ResourceManager.cxx @@ -65,8 +65,7 @@ ResourceManager::ResourceManager ( mxResourceId(rxResourceId), mxMainViewAnchorId(FrameworkHelper::Instance(rxController)->CreateResourceId( FrameworkHelper::msCenterPaneURL)), - msCurrentMainViewURL(), - mbIsEnabled(true) + msCurrentMainViewURL() { Reference<XControllerManager> xControllerManager (rxController, UNO_QUERY); if (xControllerManager.is()) @@ -190,8 +189,7 @@ void ResourceManager::UpdateForMainViewShell (void) { ConfigurationController::Lock aLock (mxConfigurationController); - if (mbIsEnabled - && mpActiveMainViewContainer->find(msCurrentMainViewURL) + if (mpActiveMainViewContainer->find(msCurrentMainViewURL) != mpActiveMainViewContainer->end()) { // Activate resource. @@ -232,25 +230,22 @@ void ResourceManager::HandleResourceRequest( bool bActivation, const Reference<XConfiguration>& rxConfiguration) { - if (mbIsEnabled) + Sequence<Reference<XResourceId> > aCenterViews = rxConfiguration->getResources( + FrameworkHelper::CreateResourceId(FrameworkHelper::msCenterPaneURL), + FrameworkHelper::msViewURLPrefix, + AnchorBindingMode_DIRECT); + if (aCenterViews.getLength() == 1) { - Sequence<Reference<XResourceId> > aCenterViews = rxConfiguration->getResources( - FrameworkHelper::CreateResourceId(FrameworkHelper::msCenterPaneURL), - FrameworkHelper::msViewURLPrefix, - AnchorBindingMode_DIRECT); - if (aCenterViews.getLength() == 1) + if (bActivation) { - if (bActivation) - { - mpActiveMainViewContainer->insert(aCenterViews[0]->getResourceURL()); - } - else - { - MainViewContainer::iterator iElement ( - mpActiveMainViewContainer->find(aCenterViews[0]->getResourceURL())); - if (iElement != mpActiveMainViewContainer->end()) - mpActiveMainViewContainer->erase(iElement); - } + mpActiveMainViewContainer->insert(aCenterViews[0]->getResourceURL()); + } + else + { + MainViewContainer::iterator iElement ( + mpActiveMainViewContainer->find(aCenterViews[0]->getResourceURL())); + if (iElement != mpActiveMainViewContainer->end()) + mpActiveMainViewContainer->erase(iElement); } } } diff --git a/sd/source/ui/framework/module/ResourceManager.hxx b/sd/source/ui/framework/module/ResourceManager.hxx index c206877454cf..60da4dd1609d 100644 --- a/sd/source/ui/framework/module/ResourceManager.hxx +++ b/sd/source/ui/framework/module/ResourceManager.hxx @@ -94,7 +94,6 @@ private: css::uno::Reference<css::drawing::framework::XResourceId> mxMainViewAnchorId; ::rtl::OUString msCurrentMainViewURL; - bool mbIsEnabled; void HandleMainViewSwitch ( const ::rtl::OUString& rsViewURL, |