[Libreoffice-commits] core.git: sfx2/source

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 6 12:35:31 UTC 2019


 sfx2/source/view/viewsh.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit a2f4bdb191d8d11824a0292880377dd4a20ac145
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Oct 21 12:56:52 2018 -0400
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Jun 6 14:34:16 2019 +0200

    sfx2: warn when invoking LOK callback before setup
    
    Change-Id: I2c845c357f73dbce71b1e420979aecf2cff38827
    Reviewed-on: https://gerrit.libreoffice.org/68255
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/73482
    Tested-by: Jenkins
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

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()


More information about the Libreoffice-commits mailing list