summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-05-17 11:13:52 +0000
committerAndre Fischer <af@apache.org>2013-05-17 11:13:52 +0000
commita30912ea805a74f2ef47e10511d6e85ed4600b73 (patch)
treefa16d09f194be43e70926a137105de11206e44c8
parentee4c4e4fe15a3ec3af8e7d75cc314025793726c1 (diff)
122082: React to changes read-only <-> read-write more realiably.
Notes
-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 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);