summaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2020-06-10 14:41:41 +0300
committerJan Holesovsky <kendy@collabora.com>2020-06-24 13:31:30 +0200
commitd046bad4fad89b1afeed78703afa695528338299 (patch)
tree9014af67812ca1f443f0e940267bc6447d0dcc80 /desktop
parenttdf#128502: Try to support multiple documents in LibreOfficeKit-using process (diff)
downloadcore-d046bad4fad89b1afeed78703afa695528338299.tar.gz
core-d046bad4fad89b1afeed78703afa695528338299.zip
Fix .uno:SidebarHide command works for online
Change-Id: I03743d15300687b1da947d3c44be6a42aab83107 Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96618 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx12
1 files changed, 11 insertions, 1 deletions
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;
}