summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-10-14 12:46:28 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2012-10-19 13:25:42 +0200
commit891b770e42455ad7c2ea1a4137e67d4e7906a533 (patch)
tree759e7c91c2b4d367990cbc52846c6a9af47a7f62 /sd
parent936ac94d08572fbdcdfb0a18611a387af8b30c5f (diff)
mbIsEnabled is always true
Change-Id: I473db13d6df401fffc6e161314202446ad4d1333
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/framework/module/ResourceManager.cxx37
-rw-r--r--sd/source/ui/framework/module/ResourceManager.hxx1
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,