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

Mert Tumer (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 24 11:32:09 UTC 2020


 desktop/source/lib/init.cxx |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit d046bad4fad89b1afeed78703afa695528338299
Author:     Mert Tumer <mert.tumer at collabora.com>
AuthorDate: Wed Jun 10 14:41:41 2020 +0300
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Wed Jun 24 13:31:30 2020 +0200

    Fix .uno:SidebarHide command works for online
    
    Change-Id: I03743d15300687b1da947d3c44be6a42aab83107
    Signed-off-by: Mert Tumer <mert.tumer at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96618
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b34f814ff472..568363fea289 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1172,6 +1172,16 @@ void setupSidebar(bool bShow, OUString sidebarDeckId = "")
         SetLastExceptionMsg("No view shell or sidebar");
 }
 
+void hideSidebar()
+{
+    SfxViewShell* pViewShell = SfxViewShell::Current();
+    SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr;
+    if (pViewFrame)
+        pViewFrame->SetChildWindow(SID_SIDEBAR, false, false);
+    else
+        SetLastExceptionMsg("No view shell or sidebar");
+}
+
 VclPtr<Window> getSidebarWindow()
 {
     VclPtr<Window> xRet;
@@ -3921,7 +3931,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma
     }
     else if (gImpl && aCommand == ".uno:SidebarHide")
     {
-        setupSidebar(false);
+        hideSidebar();
         return;
     }
 


More information about the Libreoffice-commits mailing list