summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar/SidebarController.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-04-07 15:29:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-04-07 18:34:52 +0200
commitcb1795332c28dee6dcbee9fd760471fedbc9c97f (patch)
tree723b27b6f7ee80165795648d82ac5b9dfbb8c764 /sfx2/source/sidebar/SidebarController.cxx
parent07d858f63b4e3f5a23eab4eef9b0e7edf30250ba (diff)
pViewShell and pMobileNotifier both set to the same thing
they are both set to SfxViewShell::Current(), just fetch that onece Change-Id: I06cd483d8cb179ae43b1becd14da75d1f2271681 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113741 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/sidebar/SidebarController.cxx')
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index dded59176dd3..d57e22249c79 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -1230,9 +1230,8 @@ void SidebarController::RequestCloseDeck()
if (comphelper::LibreOfficeKit::isActive() && mpCurrentDeck)
{
const vcl::ILibreOfficeKitNotifier* pNotifier = mpCurrentDeck->GetLOKNotifier();
- auto pMobileNotifier = SfxViewShell::Current();
const SfxViewShell* pViewShell = SfxViewShell::Current();
- if (pMobileNotifier && pViewShell && pViewShell->isLOKMobilePhone())
+ if (pViewShell && pViewShell->isLOKMobilePhone())
{
// Mobile phone.
std::stringstream aStream;
@@ -1243,7 +1242,7 @@ void SidebarController::RequestCloseDeck()
aTree.put("enabled", false);
boost::property_tree::write_json(aStream, aTree);
const std::string message = aStream.str();
- pMobileNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, message.c_str());
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, message.c_str());
}
else if (pNotifier)
pNotifier->notifyWindow(mpCurrentDeck->GetLOKWindowId(), "close");