[Libreoffice-commits] core.git: include/sfx2 sfx2/source

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 26 13:31:00 UTC 2019


 include/sfx2/dockwin.hxx                  |    2 +-
 sfx2/source/sidebar/SidebarController.cxx |   14 +++++++++-----
 2 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit eef4898f463c552a1e378e7ca7426fbec91d6873
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sat Dec 8 11:50:28 2018 -0500
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jul 26 15:29:47 2019 +0200

    sfx: LOK: no sidebar tabbar
    
    Change-Id: I210df42fec4404ed9629c9b1c24c78b680212214
    Reviewed-on: https://gerrit.libreoffice.org/73517
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx
index 95be9d6444dc..c57d171e7e03 100644
--- a/include/sfx2/dockwin.hxx
+++ b/include/sfx2/dockwin.hxx
@@ -90,7 +90,7 @@ public:
     const tools::Rectangle&    GetInnerRect() const                    { return aInnerRect; }
     const tools::Rectangle&    GetOuterRect() const                    { return aOuterRect; }
     SfxBindings&        GetBindings() const                     { return *pBindings; }
-    sal_uInt16              GetType() const                         { return pMgr->GetType(); }
+    sal_uInt16          GetType() const                         { return pMgr->GetType(); }
     SfxChildAlignment   GetAlignment() const                    { return pMgr->GetAlignment(); }
     void                SetAlignment(SfxChildAlignment eAlign)  { pMgr->SetAlignment(eAlign); }
     const Size&         GetFloatingSize() const                 { return aFloatSize; }
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index b2094e04631b..7261b12eeb82 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -340,7 +340,7 @@ void SidebarController::NotifyResize()
     }
 
     vcl::Window* pParentWindow = mpTabBar->GetParent();
-    sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth() * mpTabBar->GetDPIScaleFactor();
+    const sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth() * mpTabBar->GetDPIScaleFactor();
 
     const sal_Int32 nWidth (pParentWindow->GetSizePixel().Width());
     const sal_Int32 nHeight (pParentWindow->GetSizePixel().Height());
@@ -372,13 +372,17 @@ void SidebarController::NotifyResize()
         else   // attach the Sidebar towards the right-side of screen
         {
             nDeckX = 0;
-            nTabX = nWidth-nTabBarDefaultWidth;
+            nTabX = nWidth - nTabBarDefaultWidth;
         }
 
         // Place the deck first.
         if (bIsDeckVisible)
         {
-            mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth - nTabBarDefaultWidth, nHeight);
+            // No TabBar in LOK.
+            if (comphelper::LibreOfficeKit::isActive())
+                mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth, nHeight);
+            else
+                mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth - nTabBarDefaultWidth, nHeight);
             mpCurrentDeck->Show();
             mpCurrentDeck->RequestLayout();
         }
@@ -387,8 +391,8 @@ void SidebarController::NotifyResize()
 
         // Now place the tab bar.
         mpTabBar->setPosSizePixel(nTabX, 0, nTabBarDefaultWidth, nHeight);
-        mpTabBar->Show();
-
+        if (!comphelper::LibreOfficeKit::isActive())
+            mpTabBar->Show(); // Don't show TabBar in LOK.
     }
 
     // Determine if the closer of the deck can be shown.


More information about the Libreoffice-commits mailing list