From 2cc955f9109c0fc8443c9f93c1bf6bd317043cb5 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Tue, 28 Jun 2022 09:42:17 +0200 Subject: lok: make sure flushPendingLOKInvalidateTiles() is called MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 32cbd1c57dbaf7cff2325c126b3adfcf2150bc23) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136532 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna --- sfx2/source/view/viewsh.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sfx2') diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 2098e05a283f..0e9279dedeb3 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1546,6 +1546,16 @@ void SfxViewShell::libreOfficeKitViewUpdatedCallbackPerViewId(int nType, int nVi << lokCallbackTypeToString(nType)); } +void SfxViewShell::libreOfficeKitViewAddPendingInvalidateTiles() +{ + if (pImpl->m_pLibreOfficeKitViewCallback) + pImpl->m_pLibreOfficeKitViewCallback->libreOfficeKitViewAddPendingInvalidateTiles(); + else + SAL_INFO( + "sfx.view", + "SfxViewShell::libreOfficeKitViewAddPendingInvalidateTiles no callback set!"); +} + void SfxViewShell::afterCallbackRegistered() { } -- cgit