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

Miklos Vajna vmiklos at collabora.co.uk
Thu Jun 9 14:28:02 UTC 2016


 svx/source/svdraw/svdmodel.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 5fd43512c37ed5c3937b94d0a8d53d7e9c2ac0d1
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jun 9 15:19:14 2016 +0200

    svx lok: assert that per-view callbacks don't invoke the model callback
    
    They should invoke SfxViewShell::libreOfficeKitViewCallback() instead.
    
    Change-Id: Ie7150e9decb40de917a5257aa4090595bdc5e387
    Reviewed-on: https://gerrit.libreoffice.org/26108
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index acef3ac..1483a0f 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -91,6 +91,7 @@
 #include <memory>
 #include <libxml/xmlwriter.h>
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <comphelper/lok.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -814,6 +815,9 @@ void SdrModel::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback,
 
 void SdrModel::libreOfficeKitCallback(int nType, const char* pPayload) const
 {
+    // Per-view callbacks should always invoke SfxViewShell::libreOfficeKitViewCallback().
+    assert(!comphelper::LibreOfficeKit::isViewCallback());
+
     if (mbTiledSearching)
     {
         switch (nType)


More information about the Libreoffice-commits mailing list