[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - desktop/source include/sfx2
Mert Tumer (via logerrit)
logerrit at kemper.freedesktop.org
Sun May 10 14:39:33 UTC 2020
desktop/source/lib/init.cxx | 20 ++++++++++++++++----
include/sfx2/sidebar/SidebarController.hxx | 1 +
2 files changed, 17 insertions(+), 4 deletions(-)
New commits:
commit 3ea23d3b13e08f2ac9d83446acc588bbf1d4ad74
Author: Mert Tumer <mert.tumer at collabora.com>
AuthorDate: Fri May 8 17:23:12 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sun May 10 16:38:58 2020 +0200
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 at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 40c19ca439fd..203ece44ef51 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1147,10 +1147,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
@@ -3661,7 +3675,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));
@@ -3795,13 +3808,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 e65bbae42537..92a063c9f403 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -140,6 +140,7 @@ public:
FocusManager& GetFocusManager() { return maFocusManager;}
ResourceManager* GetResourceManager() { return mpResourceManager.get();}
+ auto& GetCurrentDeckId() const { return msCurrentDeckId; }
// std::unique_ptr<ResourceManager> GetResourceManager() { return mpResourceManager;}
More information about the Libreoffice-commits
mailing list