You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by af...@apache.org on 2013/05/17 13:13:53 UTC

svn commit: r1483739 - in /openoffice/trunk/main/sfx2/source/sidebar: SidebarController.cxx SidebarController.hxx

Author: af
Date: Fri May 17 11:13:52 2013
New Revision: 1483739

URL: http://svn.apache.org/r1483739
Log:
122082: React to changes read-only <-> read-write more realiably.

Modified:
    openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx
    openoffice/trunk/main/sfx2/source/sidebar/SidebarController.hxx

Modified: openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx?rev=1483739&r1=1483738&r2=1483739&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx Fri May 17 11:13:52 2013
@@ -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::statusC
         mbIsDocumentReadOnly = !bIsReadWrite;
 
         // Force the current deck to update its panel list.
-        SwitchToDeck(msCurrentDeckId);
+        if ( ! mbIsDocumentReadOnly)
+            msCurrentDeckId = gsDefaultDeckId;
+        maCurrentContext = Context();
+        maContextChangeUpdate.RequestCall();
     }
 }
 

Modified: openoffice/trunk/main/sfx2/source/sidebar/SidebarController.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/SidebarController.hxx?rev=1483739&r1=1483738&r2=1483739&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/SidebarController.hxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/SidebarController.hxx Fri May 17 11:13:52 2013
@@ -163,6 +163,7 @@ private:
     /** Make maRequestedContext the current context.
     */
     void UpdateConfigurations (void);
+    
     bool ArePanelSetsEqual (
         const SharedPanelContainer& rCurrentPanels,
         const ResourceManager::PanelContextDescriptorContainer& rRequestedPanels);