summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-10-21 12:56:52 -0400
committerJan Holesovsky <kendy@collabora.com>2019-06-06 14:34:16 +0200
commita2f4bdb191d8d11824a0292880377dd4a20ac145 (patch)
tree2f5d9632c1cf77809b297dca67f491c16faa1b8d
parent905e6bd3ae0ca5c5ac7083430d7aa126c6526fd7 (diff)
sfx2: warn when invoking LOK callback before setup
Change-Id: I2c845c357f73dbce71b1e420979aecf2cff38827 Reviewed-on: https://gerrit.libreoffice.org/68255 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/73482 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--sfx2/source/view/viewsh.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index eeafd198cb5e..3727f254a7fe 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1472,7 +1472,7 @@ void SfxViewShell::registerLibreOfficeKitViewCallback(LibreOfficeKitCallback pCa
void SfxViewShell::libreOfficeKitViewCallback(int nType, const char* pPayload) const
{
- if (comphelper::LibreOfficeKit::isTiledPainting())
+ if (!comphelper::LibreOfficeKit::isActive() || comphelper::LibreOfficeKit::isTiledPainting())
return;
if (pImpl->m_bTiledSearching)
@@ -1491,6 +1491,11 @@ void SfxViewShell::libreOfficeKitViewCallback(int nType, const char* pPayload) c
if (pImpl->m_pLibreOfficeKitViewCallback)
pImpl->m_pLibreOfficeKitViewCallback(nType, pPayload, pImpl->m_pLibreOfficeKitViewData);
+ else
+ SAL_WARN(
+ "sfx.view",
+ "SfxViewShell::libreOfficeKitViewCallback no callback set! Dropped payload of type "
+ << nType << ": [" << pPayload << ']');
}
void SfxViewShell::afterCallbackRegistered()