diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-10-21 15:07:27 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-10-22 15:53:47 +0200 |
commit | 9037e42ab3c3793341b583b181617185aefcbde5 (patch) | |
tree | ab16158a3b62e08db11dd8a150a93d28ae2c423b /sw | |
parent | 31b1e23e2d806f847fce21b8827f015384f20916 (diff) |
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/+/124002
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 5b372141f48a..20b4d0ac13a6 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -553,6 +553,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 |