From e9260633df07b6796b19bc92523671cb345597a1 Mon Sep 17 00:00:00 2001 From: Tamás Zolnai Date: Sun, 22 Sep 2019 13:20:49 +0200 Subject: lok: deduplicate code related to notifyDocumentSizeChanged() call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia4cef7b23fc682ec32aeb9be4dcdd582464c64e9 co-author: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/79498 Tested-by: Jenkins Reviewed-by: Tamás Zolnai --- sfx2/source/view/lokhelper.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sfx2') diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 60ff1e0fba1e..5aa3316c4c3f 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -242,6 +242,19 @@ void SfxLokHelper::notifyDocumentSizeChanged(SfxViewShell const* pThisView, cons pThisView->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, rPayload.getStr()); } +void SfxLokHelper::notifyDocumentSizeChangedAllViews(vcl::ITiledRenderable* pDoc, bool bInvalidateAll) +{ + if (!comphelper::LibreOfficeKit::isActive()) + return; + + SfxViewShell* pViewShell = SfxViewShell::GetFirst(); + while (pViewShell) + { + SfxLokHelper::notifyDocumentSizeChanged(pViewShell, "", pDoc, bInvalidateAll); + pViewShell = SfxViewShell::GetNext(*pViewShell); + } +} + void SfxLokHelper::notifyVisCursorInvalidation(OutlinerViewShell const* pThisView, const OString& rRectangle) { OString sPayload; -- cgit