Blame SOURCES/0149-sw-implement-per-view-LOK_CALLBACK_INVALIDATE_TILES.patch

135360
From 3b8231a0656c7bddb2159bf494dd25074c0755b2 Mon Sep 17 00:00:00 2001
135360
From: Miklos Vajna <vmiklos@collabora.co.uk>
135360
Date: Thu, 17 Sep 2015 11:44:53 +0200
135360
Subject: [PATCH 149/398] sw: implement per-view LOK_CALLBACK_INVALIDATE_TILES
135360
135360
Change-Id: Id839dc076824e69fe07386c83bf21fc4c7ce2b8e
135360
(cherry picked from commit b0f04d1ba273cc94989a5079f957117433076a9b)
135360
---
135360
 sw/source/uibase/docvw/edtwin.cxx | 10 ++++++++--
135360
 1 file changed, 8 insertions(+), 2 deletions(-)
135360
135360
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
135360
index a76f68755b30..f392010fb6b1 100644
135360
--- a/sw/source/uibase/docvw/edtwin.cxx
135360
+++ b/sw/source/uibase/docvw/edtwin.cxx
135360
@@ -69,6 +69,7 @@
135360
 #include <basegfx/polygon/b2dpolygon.hxx>
135360
 
135360
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
135360
+#include <comphelper/lok.hxx>
135360
 
135360
 #include <editeng/acorrcfg.hxx>
135360
 #include <SwSmartTagMgr.hxx>
135360
@@ -6217,8 +6218,13 @@ void SwEditWin::LogicInvalidate(const Rectangle* pRectangle)
135360
     else
135360
         sRectangle = pRectangle->toString();
135360
 
135360
-    if ( m_rView.GetWrtShellPtr() )
135360
-        m_rView.GetWrtShell().libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
135360
+    if (comphelper::LibreOfficeKit::isViewCallback())
135360
+        m_rView.libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
135360
+    else
135360
+    {
135360
+        if (m_rView.GetWrtShellPtr())
135360
+            m_rView.GetWrtShell().libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
135360
+    }
135360
 }
135360
 
135360
 void SwEditWin::LogicMouseButtonDown(const MouseEvent& rMouseEvent)
135360
-- 
135360
2.12.0
135360