From 3e8917702642595526a43f3d6866ba9b0446e50b Mon Sep 17 00:00:00 2001 From: Mert Tumer Date: Fri, 8 May 2020 17:23:12 +0300 Subject: mobile: fix calc chart wizard properties is not shown Change-Id: I2fd98ddbdb529c3f224299c6824b4743797925be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93747 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97061 Reviewed-by: Jan Holesovsky --- desktop/source/lib/init.cxx | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'desktop') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 2190c7d49e6a..69e8073b0bd0 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -886,10 +886,24 @@ void setupSidebar(bool bShow, OUString sidebarDeckId = "") if (!pDockingWin) return; + OUString currentDeckId = pDockingWin->GetSidebarController()->GetCurrentDeckId(); + + // check if it is the chart deck id, if it is, don't switch to default deck + bool switchToDefault = true; + + if (currentDeckId == "ChartDeck") + switchToDefault = false; + if (!sidebarDeckId.isEmpty()) { pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId); } + else + { + if (switchToDefault) + pDockingWin->GetSidebarController()->SwitchToDefaultDeck(); + } + pDockingWin->SyncUpdate(); } else @@ -3801,7 +3815,6 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma SfxObjectShell* pDocSh = SfxObjectShell::Current(); OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8); LibLODocument_Impl* pDocument = static_cast(pThis); - OUString sidebarDeckId = "PropertyDeck"; std::vector aPropertyValuesVector(jsonToPropertyValuesVector(pArguments)); @@ -3934,13 +3947,12 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma } else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage") { - sidebarDeckId = "WriterPageDeck"; - setupSidebar(true, sidebarDeckId); + setupSidebar(true, "WriterPageDeck"); return; } else if (gImpl && aCommand == ".uno:SidebarShow") { - setupSidebar(true, sidebarDeckId); + setupSidebar(true); return; } else if (gImpl && aCommand == ".uno:SidebarHide") -- cgit v1.2.3