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-25 09:13:35 +0100
commit2d18f5e3fb0ea44b538db9ccea3c87a16693e6b2 (patch)
tree81f9ff5ba2f8454b154ec44ec73e7f2f72c3118d /sfx2
parent7e21086c2903d19ec0981d09d63d8f7c4e078242 (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. Conflicts: sw/qa/extras/tiledrendering/tiledrendering.cxx sw/source/uibase/docvw/edtwin2.cxx Change-Id: I8280f5c2571beeae6c0f2986d275dde3c2d33161 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106543 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
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 14cbd2c10a08..d7790fcdb6f5 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1474,8 +1474,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)
{