summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-06-28 09:42:17 +0200
committerLuboš Luňák <l.lunak@collabora.com>2022-08-25 10:28:35 +0200
commit32cbd1c57dbaf7cff2325c126b3adfcf2150bc23 (patch)
tree8c9c6576bacb181fe49cca5560d9541cb94e4d69 /desktop
parent38a29acd7e305ec99c4eb1871b9f31f75a3ab80c (diff)
lok: make sure flushPendingLOKInvalidateTiles() is called
SwViewShellImp::AddPendingLOKInvalidation() collects invalidations, but this was relying on something eventually calling flushPendingLOKInvalidateTiles(), which wasn't guaranteed. If e.g. a spellchecker caused an invalidation from in idle callback and nothing else changed, then the LOK callback handling code didn't know there was something pending. So add an explicit call to ensure to notify about these pending invalidations. Change-Id: I0a9cb0d5aba2fdbbac126cd8a4a3412bef1cab25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136531 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/inc/lib/init.hxx1
-rw-r--r--desktop/source/lib/init.cxx6
2 files changed, 7 insertions, 0 deletions
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index 78c74c753063..2b21f6a6d30a 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -118,6 +118,7 @@ namespace desktop {
virtual void libreOfficeKitViewInvalidateTilesCallback(const tools::Rectangle* pRect, int nPart) override;
virtual void libreOfficeKitViewUpdatedCallback(int nType) override;
virtual void libreOfficeKitViewUpdatedCallbackPerViewId(int nType, int nViewId, int nSourceViewId) override;
+ virtual void libreOfficeKitViewAddPendingInvalidateTiles() override;
virtual void dumpState(rtl::OStringBuffer &rState) override;
private:
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 91f6b771a8f1..54b72d7ef88f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1486,6 +1486,12 @@ void CallbackFlushHandler::dumpState(rtl::OStringBuffer &rState)
}
}
+void CallbackFlushHandler::libreOfficeKitViewAddPendingInvalidateTiles()
+{
+ // Invoke() will call flushPendingLOKInvalidateTiles(), so just make sure the timer is active.
+ startTimer();
+}
+
void CallbackFlushHandler::queue(const int type, const char* data)
{
CallbackData callbackData(data);