diff options
author | Andre Fischer <af@apache.org> | 2013-05-17 11:13:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-21 17:01:21 +0100 |
commit | adb2d846e0912918708f2242997665dae5ed7478 (patch) | |
tree | be43e7cfc6a08c9905848d4709df58b71b04e2f3 /sfx2 | |
parent | 8a8fee316a565c050ef1a8531ded130ff9959bfd (diff) |
Resolvs: #i122082# React to changes read-only <-> read-write more reliably
(cherry picked from commit a30912ea805a74f2ef47e10511d6e85ed4600b73)
Change-Id: I735ea32a498413f663efaf0e22051ab4d2d92ef5
Diffstat (limited to 'sfx2')
-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 d831cee05977..4447bedef66c 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -85,6 +85,10 @@ namespace { MID_FIRST_PANEL, MID_FIRST_HIDE = 1000 }; + + /** When in doubt, show this deck. + */ + static const ::rtl::OUString gsDefaultDeckId(A2S("PropertyDeck")); } @@ -102,7 +106,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)), @@ -252,7 +256,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 df288bf9ac88..dc62f7af1b04 100644 --- a/sfx2/source/sidebar/SidebarController.hxx +++ b/sfx2/source/sidebar/SidebarController.hxx @@ -159,6 +159,7 @@ private: /** Make maRequestedContext the current context. */ void UpdateConfigurations (void); + bool ArePanelSetsEqual ( const SharedPanelContainer& rCurrentPanels, const ResourceManager::PanelContextDescriptorContainer& rRequestedPanels); |