sw/source/core/view/viewsh.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 1558d572bd04e4bcf6dfb7c723bd2387aa65d553 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Thu Oct 21 15:07:27 2021 +0200 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Fri Oct 22 15:54:44 2021 +0200 ignore invalidations in Writer when doing tiled painting That's done by ignoreLibreOfficeKitViewCallback() called from SfxViewShell::libreOfficeKitViewInvalidateTilesCallback(), but in case Writer delays invalidations to compress them, the tiled painting flag may be already reset by the time flushPendingLOKInvalidateTiles() gets called, so handle that explicitly. SwTiledRenderingTest::testTablePaintInvalidate() would otherwise fail with my follow-up commit that makes TestLokCallbackWrapper flush the invalidations. Change-Id: I915ae4e40bc7a82b3e48498f7e5513420dd64522 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124006 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index e9f863e50e13..42ae60123c71 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -551,6 +551,12 @@ void SwViewShell::InvalidateWindows( const SwRect &rRect ) if(comphelper::LibreOfficeKit::isActive()) { + // If we are inside tiled painting, invalidations are ignored. + // Ignore them right now to save work, but also to avoid the problem + // that this state could be reset before FlushPendingLOKInvalidateTiles() + // gets called. + if(comphelper::LibreOfficeKit::isTiledPainting()) + return; // First collect all invalidations and perform them only later, // otherwise the number of Invalidate() calls would be at least // O(n^2) if not worse. The problem is that if any change in a document