diff options
author | Andre Fischer <af@apache.org> | 2013-05-17 11:13:52 +0000 |
---|---|---|
committer | Andre Fischer <af@apache.org> | 2013-05-17 11:13:52 +0000 |
commit | a30912ea805a74f2ef47e10511d6e85ed4600b73 (patch) | |
tree | fa16d09f194be43e70926a137105de11206e44c8 | |
parent | ee4c4e4fe15a3ec3af8e7d75cc314025793726c1 (diff) |
122082: React to changes read-only <-> read-write more realiably.
Notes
merged as: adb2d846e0912918708f2242997665dae5ed7478
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.hxx | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 8e230c1f4f31..fd0a1af52b79 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -93,6 +93,10 @@ namespace { MID_FIRST_PANEL, MID_FIRST_HIDE = 1000 }; + + /** When in doubt, show this deck. + */ + static const ::rtl::OUString gsDefaultDeckId(A2S("PropertyDeck")); } @@ -110,7 +114,7 @@ SidebarController::SidebarController ( mxFrame(rxFrame), maCurrentContext(OUString(), OUString()), maRequestedContext(), - msCurrentDeckId(A2S("PropertyDeck")), + msCurrentDeckId(gsDefaultDeckId), msCurrentDeckTitle(), maPropertyChangeForwarder(::boost::bind(&SidebarController::BroadcastPropertyChange, this)), maContextChangeUpdate(::boost::bind(&SidebarController::UpdateConfigurations, this)), @@ -260,7 +264,10 @@ void SAL_CALL SidebarController::statusChanged (const css::frame::FeatureStateEv mbIsDocumentReadOnly = !bIsReadWrite; // Force the current deck to update its panel list. - SwitchToDeck(msCurrentDeckId); + if ( ! mbIsDocumentReadOnly) + msCurrentDeckId = gsDefaultDeckId; + maCurrentContext = Context(); + maContextChangeUpdate.RequestCall(); } } diff --git a/sfx2/source/sidebar/SidebarController.hxx b/sfx2/source/sidebar/SidebarController.hxx index dfa588ccba26..e940974f015b 100644 --- a/sfx2/source/sidebar/SidebarController.hxx +++ b/sfx2/source/sidebar/SidebarController.hxx @@ -163,6 +163,7 @@ private: /** Make maRequestedContext the current context. */ void UpdateConfigurations (void); + bool ArePanelSetsEqual ( const SharedPanelContainer& rCurrentPanels, const ResourceManager::PanelContextDescriptorContainer& rRequestedPanels); |