sfx2/source/sidebar/SidebarController.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
New commits: commit cb1795332c28dee6dcbee9fd760471fedbc9c97f Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Apr 7 15:29:27 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Apr 7 18:34:52 2021 +0200 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 <caol...@redhat.com> 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"); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits