summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-05-17 11:13:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-22 11:34:40 +0100
commitcbd8e0fef6968244861b76a3aff212bc39746aa2 (patch)
tree71cf8612147ac30708d4cc9f7a50dd439b8489a5
parent7c531c48b78d4d03082ea5a9f054d69b91a8758a (diff)
Resolvs: #i122082# React to changes read-only <-> read-write more reliably
(cherry picked from commit a30912ea805a74f2ef47e10511d6e85ed4600b73) Change-Id: I735ea32a498413f663efaf0e22051ab4d2d92ef5 (cherry picked from commit adb2d846e0912918708f2242997665dae5ed7478)
-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);