summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-10-21 12:56:52 -0400
committerAndras Timar <andras.timar@collabora.com>2019-03-01 17:20:19 +0100
commitc85840642f11f11a5325c09c044bc16e8acd2833 (patch)
tree9aa01409bbd20e7c0f6b6e89464fd702e5b6d233 /sfx2
parentb1f17d8345597aa24e637cefdbc2951be2dacacb (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>
Diffstat (limited to 'sfx2')
-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 c5cd05f5e3cd..c4d908fbd285 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1468,7 +1468,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)
@@ -1487,6 +1487,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()