summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-11-24 17:26:32 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-11-24 23:05:13 +0100
commit0f65b4b6f33891a724bee5356aa5549c76fa0ce3 (patch)
tree829fc2a08a296b2475b4c4455d936e8e927005f4 /sfx2
parent48d052a9f1bdbd34e1819b45ab83f51b84911702 (diff)
sw tiled rendering: fix paint->invalidation loop when paint is started by vcl
SwViewShell::PaintTile() already calls comphelper::LibreOfficeKit::setTiledPainting(), so by the time it would rearch SwViewShell::Paint(), callbacks (e.g. invalidations) are ignored during paint. Do the same for SwEditWin::Paint(), where we processed invalidations during paint, potentially leading to paint->invalidation loops. Change-Id: I8280f5c2571beeae6c0f2986d275dde3c2d33161 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106542 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewsh.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index d35253d1342a..2da4bc1e81bd 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1463,8 +1463,18 @@ void SfxViewShell::libreOfficeKitViewCallback(int nType, const char* pPayload) c
if (!comphelper::LibreOfficeKit::isActive())
return;
- if (comphelper::LibreOfficeKit::isTiledPainting() && nType != LOK_CALLBACK_FORM_FIELD_BUTTON)
- return;
+ if (comphelper::LibreOfficeKit::isTiledPainting())
+ {
+ switch (nType)
+ {
+ case LOK_CALLBACK_FORM_FIELD_BUTTON:
+ case LOK_CALLBACK_TEXT_SELECTION:
+ break;
+ default:
+ // Reject e.g. invalidate during paint.
+ return;
+ }
+ }
if (pImpl->m_bTiledSearching)
{