sfx2/source/sidebar/SidebarDockingWindow.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 367369c6f93521da562c5e72e54264eb29ff8432 Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Tue Dec 29 08:59:54 2020 +0100 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Fri Jan 1 12:31:55 2021 +0100 lok: send sidebar dialog update to the right view. SfxViewShell::Current() might point to wrong client, not the actual owner of the sidebar. Better to use the LOKNotifier which points to the correct view. Change-Id: I2a3f18eaf51e4bf9a9f811595ec4fc02ce86fa7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108444 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108456 Tested-by: Tamás Zolnai <tamas.zol...@collabora.com> diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index 46b62f51ad93..9958e7943aee 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -60,13 +60,13 @@ public: void Invoke() override { auto pNotifier = m_rSidebarDockingWin.GetLOKNotifier(); - auto pMobileNotifier = SfxViewShell::Current(); - if (!pNotifier || (!pMobileNotifier && !comphelper::LibreOfficeKit::isActive())) + if (!pNotifier || !comphelper::LibreOfficeKit::isActive()) return; try { - if (pMobileNotifier && pMobileNotifier->isLOKMobilePhone()) + const SfxViewShell* pOwnerView = dynamic_cast<const SfxViewShell*>(pNotifier); + if (pOwnerView && pOwnerView->isLOKMobilePhone()) { // Mobile phone. tools::JsonWriter aJsonWriter; @@ -77,7 +77,7 @@ public: if (message != m_LastNotificationMessage) { m_LastNotificationMessage = message; - pMobileNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, m_LastNotificationMessage.c_str()); + pOwnerView->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, m_LastNotificationMessage.c_str()); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits