summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/sidebar')
-rw-r--r--sfx2/source/sidebar/SidebarDockingWindow.cxx8
1 files changed, 4 insertions, 4 deletions
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());
}
}