summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source')
-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 e844243207d8..dc1b6b1664fc 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -911,6 +911,16 @@ void setupSidebar(bool bShow)
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;
@@ -3894,7 +3904,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma
}
else if (gImpl && aCommand == ".uno:SidebarHide")
{
- setupSidebar(false);
+ hideSidebar();
return;
}