[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source
Aron Budea (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 1 21:58:25 UTC 2020
sfx2/source/sidebar/SidebarController.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 0e9f41e24abcba5fe1fefc9cdee17bc0ca05057d
Author: Aron Budea <aron.budea at collabora.com>
AuthorDate: Sun Feb 16 23:46:57 2020 +0100
Commit: Aron Budea <aron.budea at collabora.com>
CommitDate: Fri May 1 23:57:54 2020 +0200
sidebar: Distinguish between Impress and the rest for LOK
The parameter introduced in 26bcfbe48b30e0a525a0f25b73ddcacdd158256b
was unused.
Change-Id: Iee928520bb1a4033cf10f0ca60c687b73d09aaf4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88829
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
(cherry picked from commit 99751473531c6d022c2089bf162901b41a616895)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93141
Tested-by: Aron Budea <aron.budea at collabora.com>
Reviewed-by: Aron Budea <aron.budea at collabora.com>
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 5c69f97d0b59..081835fd6f91 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -74,13 +74,13 @@ namespace
const static sal_Int32 gnWidthCloseThreshold (70);
const static sal_Int32 gnWidthOpenThreshold (40);
- std::string UnoNameFromDeckId(const OUString& rsDeckId)
+ std::string UnoNameFromDeckId(const OUString& rsDeckId, bool isImpress = false)
{
if (rsDeckId == "SdCustomAnimationDeck")
return ".uno:CustomAnimation";
if (rsDeckId == "PropertyDeck")
- return ".uno:Sidebar";
+ return isImpress ? ".uno:ModifyPage" : ".uno:Sidebar";
if (rsDeckId == "SdLayoutsDeck")
return ".uno:ModifyPage";
@@ -240,7 +240,7 @@ void SidebarController::disposeDecks()
{
if (const SfxViewShell* pViewShell = mpViewFrame->GetViewShell())
{
- const std::string hide = UnoNameFromDeckId(msCurrentDeckId);
+ const std::string hide = UnoNameFromDeckId(msCurrentDeckId, vcl::EnumContext::Application::Impress == vcl::EnumContext::GetApplicationEnum(GetCurrentContext().msApplication));
if (!hide.empty())
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
(hide + "=false").c_str());
@@ -757,13 +757,13 @@ void SidebarController::SwitchToDeck (
{
if (msCurrentDeckId != rDeckDescriptor.msId)
{
- const std::string hide = UnoNameFromDeckId(msCurrentDeckId);
+ const std::string hide = UnoNameFromDeckId(msCurrentDeckId, vcl::EnumContext::Application::Impress == vcl::EnumContext::GetApplicationEnum(GetCurrentContext().msApplication));
if (!hide.empty())
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
(hide + "=false").c_str());
}
- const std::string show = UnoNameFromDeckId(rDeckDescriptor.msId);
+ const std::string show = UnoNameFromDeckId(rDeckDescriptor.msId, vcl::EnumContext::Application::Impress == vcl::EnumContext::GetApplicationEnum(GetCurrentContext().msApplication));
if (!show.empty())
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
(show + "=true").c_str());
@@ -1287,7 +1287,7 @@ void SidebarController::UpdateDeckOpenState()
if (const SfxViewShell* pViewShell = mpViewFrame->GetViewShell())
{
- const std::string uno = UnoNameFromDeckId(msCurrentDeckId);
+ const std::string uno = UnoNameFromDeckId(msCurrentDeckId, vcl::EnumContext::Application::Impress == vcl::EnumContext::GetApplicationEnum(GetCurrentContext().msApplication));
if (!uno.empty())
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
(uno + "=true").c_str());
@@ -1325,7 +1325,7 @@ void SidebarController::UpdateDeckOpenState()
if (const SfxViewShell* pViewShell = mpViewFrame->GetViewShell())
{
- const std::string uno = UnoNameFromDeckId(msCurrentDeckId);
+ const std::string uno = UnoNameFromDeckId(msCurrentDeckId, vcl::EnumContext::Application::Impress == vcl::EnumContext::GetApplicationEnum(GetCurrentContext().msApplication));
if (!uno.empty())
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
(uno + "=false").c_str());
More information about the Libreoffice-commits
mailing list