135360
From c5aac6c349e0d227f5594005948012088045bf3f Mon Sep 17 00:00:00 2001
135360
From: Miklos Vajna <vmiklos@collabora.co.uk>
135360
Date: Thu, 19 Nov 2015 15:09:05 +0100
135360
Subject: [PATCH 347/398] editeng lok: invalidate on scroll
135360
135360
E.g. when a Witer comment has long enough contents to get scrolled, the
135360
desktop case repaints its contents by vcl::Window::Scroll(), followed by
135360
a vcl::Window::Update(), i.e. vcl::Window::Invalidate() is not called.
135360
135360
The result of this in case of tiled rendering is that no tile is
135360
repainted, so call vcl::Window::Invalidate() after scrolling manually.
135360
135360
A generic VCL-level invalidate-after-scroll is not wanted, as the
135360
scrolling of the document contents and the main document window is not
135360
in sync when tiled rendering.
135360
135360
(cherry picked from commit 162ae47a046b0c501e09d611a9834e875db884b8)
135360
135360
Change-Id: I74296a0f0e52c92cf3db6aefa73f28bb2b202871
135360
---
135360
 editeng/source/editeng/impedit.cxx | 7 +++++++
135360
 1 file changed, 7 insertions(+)
135360
135360
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
135360
index 0207155e4d75..54ce4b06188f 100644
135360
--- a/editeng/source/editeng/impedit.cxx
135360
+++ b/editeng/source/editeng/impedit.cxx
135360
@@ -47,6 +47,8 @@
135360
 #include <sot/exchange.hxx>
135360
 #include <sot/formats.hxx>
135360
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
135360
+#include <comphelper/string.hxx>
135360
+#include <comphelper/lok.hxx>
135360
 
135360
 using namespace ::com::sun::star;
135360
 using namespace ::com::sun::star::uno;
135360
@@ -1085,6 +1087,11 @@ Pair ImpEditView::Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck )
135360
         aVisDocStartPos = pOutWin->PixelToLogic( aVisDocStartPos );
135360
         Rectangle aRect( aOutArea );
135360
         pOutWin->Scroll( nRealDiffX, nRealDiffY, aRect, SCROLL_CLIP );
135360
+
135360
+        if (comphelper::LibreOfficeKit::isActive())
135360
+            // Need to invalidate the window, otherwise no tile will be re-painted.
135360
+            pOutWin->Invalidate();
135360
+
135360
         pOutWin->Update();
135360
         pCrsr->SetPos( pCrsr->GetPos() + Point( nRealDiffX, nRealDiffY ) );
135360
         if ( bVisCursor )
135360
-- 
135360
2.12.0
135360