[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sfx2/source

Jan Holesovsky kendy at collabora.com
Sun Nov 23 08:44:35 PST 2014


 sfx2/source/sidebar/SidebarChildWindow.cxx |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit a96be6ac1be2e9ced1c63dbb817d8f959a61c8c3
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Sat Nov 22 16:56:45 2014 +0100

    Default to collapsed sidebars everywhere but in Impress.
    
    Change-Id: I2fe092189c922ddf36efc8dd8d0fba14f91fc0b0

diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx
index f6aa2fd..fbba48b 100644
--- a/sfx2/source/sidebar/SidebarChildWindow.cxx
+++ b/sfx2/source/sidebar/SidebarChildWindow.cxx
@@ -52,7 +52,20 @@ SidebarChildWindow::SidebarChildWindow (
 
     SfxDockingWindow* pDockingParent = dynamic_cast<SfxDockingWindow*>(this->pWindow);
     if (pDockingParent != NULL)
+    {
+        if (pInfo && pInfo->aExtraString.isEmpty() && pInfo->aModule != "simpress")
+        {
+            // When this is the first start (never had the sidebar open yet),
+            // default to non-expanded sidebars in Writer, Calc, and Draw
+            //
+            // HACK: unfortunately I haven't found a clean solution to do
+            // this, so do it this way:
+            //
+            pDockingParent->SetSizePixel(Size(TabBar::GetDefaultWidth() * pWindow->GetDPIScaleFactor(),
+                        pDockingParent->GetSizePixel().Height()));
+        }
         pDockingParent->Initialize(pInfo);
+    }
     SetHideNotDelete(true);
 
     this->pWindow->Show();


More information about the Libreoffice-commits mailing list