sfx2/source/sidebar/SidebarChildWindow.cxx   |    8 ++++++--
 sfx2/source/sidebar/SidebarController.cxx    |    4 ++++
 sfx2/source/sidebar/SidebarDockingWindow.cxx |    2 +-
 vcl/source/window/window.cxx                 |    2 ++
 4 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit e6c62ff1361ac5b9b430ddd5dae729a8b10aadff
Author:     Ashod Nakashian <ashod.nakash...@collabora.co.uk>
AuthorDate: Tue Nov 20 12:04:58 2018 -0500
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Jul 26 11:46:26 2019 +0200

    LOK: sidebar: start collapsed
    
    Change-Id: I589fce5ee207da0e0ac113b7ccc1ed1edd06c5da
    Reviewed-on: https://gerrit.libreoffice.org/73513
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx 
b/sfx2/source/sidebar/SidebarChildWindow.cxx
index e84d2fb4b379..ac0a68852ea9 100644
--- a/sfx2/source/sidebar/SidebarChildWindow.cxx
+++ b/sfx2/source/sidebar/SidebarChildWindow.cxx
@@ -62,8 +62,12 @@ SidebarChildWindow::SidebarChildWindow (vcl::Window* 
pParentWindow, sal_uInt16 n
 
         if (comphelper::LibreOfficeKit::isActive())
         {
-            // Undock for Lok.
-            pDockingParent->SetFloatingSize(Size(400, 600));
+            // Undock sidebar in LOK to allow for resizing freely
+            // (i.e. when the client window is resized) and collapse
+            // it so the client can open it on demand.
+            pDockingParent->SetFloatingSize(
+                Size(TabBar::GetDefaultWidth() * 
GetWindow()->GetDPIScaleFactor(),
+                     pDockingParent->GetSizePixel().Height()));
             pDockingParent->SetFloatingMode(true);
         }
     }
commit a1b718044dadc46388bff0e20a7e50bf9d514596
Author:     Ashod Nakashian <ashod.nakash...@collabora.co.uk>
AuthorDate: Sun Nov 11 16:51:05 2018 -0500
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Jul 26 11:46:14 2019 +0200

    LOK: sidebar: release LOKNotifier on destruction
    
    And enable sidebar routing only while we have a
    valid SidebarController instance (i.e. not disposed).
    
    Change-Id: I665f934f762c0ce9efdce5489ec9babe006376a8
    Reviewed-on: https://gerrit.libreoffice.org/73512
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 6b3bcc025e0d..bbdb1a4c8c67 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -205,6 +205,10 @@ void 
SidebarController::unregisterSidebarForFrame(SidebarController* pController
 void SidebarController::disposeDecks()
 {
     SolarMutexGuard aSolarMutexGuard;
+
+    if (comphelper::LibreOfficeKit::isActive())
+        mpParentWindow->ReleaseLOKNotifier();
+
     mpCurrentDeck.clear();
     maFocusManager.Clear();
     mpResourceManager->disposeDecks();
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx 
b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index 834bb59f26bb..a12bb6f4d12e 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -113,7 +113,7 @@ void SidebarDockingWindow::NotifyResize()
 {
     if (comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() && 
mbSidebarVisibleInLOK)
     {
-        if (!GetLOKNotifier())
+        if (mpSidebarController.is() && !GetLOKNotifier())
             SetLOKNotifier(SfxViewShell::Current());
 
         if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 3b26f70d7040..2ac475725996 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3173,6 +3173,8 @@ void Window::SetLOKNotifier(const 
vcl::ILibreOfficeKitNotifier* pNotifier, bool
     // don't allow setting this twice
     assert(mpWindowImpl->mpLOKNotifier == nullptr);
     assert(pNotifier);
+    // never use this in the desktop case
+    assert(comphelper::LibreOfficeKit::isActive());
 
     if (!bParent)
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to