summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2020-05-08 17:23:12 +0300
committerJan Holesovsky <kendy@collabora.com>2020-06-26 11:30:31 +0200
commit3e8917702642595526a43f3d6866ba9b0446e50b (patch)
tree4c4cb338e8f23ebdae0a65edcf7dea3333386b6f
parente80c47b42dd1c9ae869d241c327def8b4a0b1ad4 (diff)
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 <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97061 Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--desktop/source/lib/init.cxx20
-rw-r--r--include/sfx2/sidebar/SidebarController.hxx1
2 files changed, 17 insertions, 4 deletions
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<LibLODocument_Impl*>(pThis);
- OUString sidebarDeckId = "PropertyDeck";
std::vector<beans::PropertyValue> 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")
diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx
index eb459b1a708f..440ff55b7bfc 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -134,6 +134,7 @@ public:
FocusManager& GetFocusManager() { return maFocusManager;}
ResourceManager* GetResourceManager() { return mpResourceManager.get();}
+ auto& GetCurrentDeckId() const { return msCurrentDeckId; }
// std::unique_ptr<ResourceManager> GetResourceManager() { return mpResourceManager;}