summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2020-02-16 23:46:57 +0100
committerAron Budea <aron.budea@collabora.com>2020-02-17 05:05:40 +0100
commit99751473531c6d022c2089bf162901b41a616895 (patch)
treefe5fa0dab8b5fd4b1db581ed79eb4bd6ce2800c2
parent4caa7b790cf99eebbe47fc2e6a56124c42f1f3fc (diff)
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@gmail.com>
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index c56c6ed9e2c2..20dcdae1cdfb 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -71,13 +71,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";
@@ -236,7 +236,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());
@@ -754,13 +754,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());
@@ -1310,7 +1310,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());
@@ -1348,7 +1348,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());