summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx11
-rw-r--r--sfx2/source/sidebar/SidebarController.hxx1
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);