diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-20 12:16:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-20 13:41:30 +0200 |
commit | 6274fbe13c8fa556916b5aed695c6921ef6ff84f (patch) | |
tree | 50b4d8d0ff45e4eb36d8cd1babe47d1ecd559d3e /desktop | |
parent | dd7caf3cfd3de636c8bf37c8347c1b72b3772aeb (diff) |
loplugin:constantparam
Change-Id: I59a37e1d37fa749cba5159daa23fe663bcc55435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101045
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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") |