diff options
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index beb35b4e5fcc..35a518d701ad 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -883,19 +883,16 @@ void ExecuteOrientationChange() mxUndoManager->leaveUndoContext(); } -void setupSidebar(bool bShow, const OUString& sidebarDeckId = "") +void setupSidebar(const OUString& sidebarDeckId = "") { SfxViewShell* pViewShell = SfxViewShell::Current(); SfxViewFrame* pViewFrame = pViewShell ? pViewShell->GetViewFrame() : nullptr; if (pViewFrame) { - if (bShow && !pViewFrame->GetChildWindow(SID_SIDEBAR)) + if (!pViewFrame->GetChildWindow(SID_SIDEBAR)) pViewFrame->SetChildWindow(SID_SIDEBAR, false /* create it */, true /* focus */); - pViewFrame->ShowChildWindow(SID_SIDEBAR, bShow); - - if (!bShow) - return; + pViewFrame->ShowChildWindow(SID_SIDEBAR, true); // Force synchronous population of panels SfxChildWindow *pChild = pViewFrame->GetChildWindow(SID_SIDEBAR); @@ -944,7 +941,7 @@ VclPtr<Window> getSidebarWindow() { VclPtr<Window> xRet; - setupSidebar(true); + setupSidebar(); SfxViewShell* pViewShell = SfxViewShell::Current(); SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr; if (!pViewFrame) @@ -3945,12 +3942,12 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma } else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage") { - setupSidebar(true, "WriterPageDeck"); + setupSidebar("WriterPageDeck"); return; } else if (gImpl && aCommand == ".uno:SidebarShow") { - setupSidebar(true); + setupSidebar(); return; } else if (gImpl && aCommand == ".uno:SidebarHide") |