[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sfx2/source

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Mon May 6 13:18:31 UTC 2019


 sfx2/source/sidebar/SidebarController.cxx |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 60c048e665c7e8dc32c378f0364931b6e26a9ca2
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun May 5 11:51:30 2019 -0400
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Mon May 6 15:17:34 2019 +0200

    Notify the client when we close the sidebar
    
    Change-Id: I4879d65285e01cf2fd99233d226f4201997b4dd7
    Reviewed-on: https://gerrit.libreoffice.org/71844
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 876cae106319..1bf43c7bac40 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -65,13 +65,13 @@ namespace
     const static sal_Int32 gnWidthCloseThreshold (70);
     const static sal_Int32 gnWidthOpenThreshold (40);
 
-    static std::string UnoNameFromDeckId(const OUString& rsDeckId)
+    static std::string UnoNameFromDeckId(const OUString& rsDeckId, bool isDraw=false)
     {
         if (rsDeckId == "SdCustomAnimationDeck")
             return ".uno:CustomAnimation";
 
         if (rsDeckId == "PropertyDeck")
-            return ".uno:ModifyPage";
+            return isDraw ? ".uno:ModifyPage" : ".uno:Sidebar";
 
         if (rsDeckId == "SdLayoutsDeck")
             return ".uno:ModifyPage";
@@ -224,7 +224,17 @@ void SidebarController::disposeDecks()
     SolarMutexGuard aSolarMutexGuard;
 
     if (comphelper::LibreOfficeKit::isActive())
+    {
+        if (const SfxViewShell* pViewShell = mpViewFrame->GetViewShell())
+        {
+            const std::string hide = UnoNameFromDeckId(msCurrentDeckId);
+            if (!hide.empty())
+                pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
+                                                       (hide + "=false").c_str());
+        }
+
         mpParentWindow->ReleaseLOKNotifier();
+    }
 
     mpCurrentDeck.clear();
     maFocusManager.Clear();


More information about the Libreoffice-commits mailing list