summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2022-08-29 09:07:33 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2022-11-10 10:15:46 +0100
commit3f4e11bd40f60510272df7a285d8a78181af0ccb (patch)
treed3f2ad594143dad546a12d6b5d4e18a360157115 /sfx2
parent652df8c733f381cac4e22286acd12a2ec72d41ae (diff)
lok: masterpage: use EditMode as parameter in invalidation callback
Change-Id: I3905fc9e6376ca1cef3e438e7a5f229d3720b1f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138961 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142501 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/lokhelper.cxx5
-rw-r--r--sfx2/source/view/viewsh.cxx4
2 files changed, 5 insertions, 4 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index c631aa8d6257..b6b5a7895744 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -551,7 +551,8 @@ void SfxLokHelper::notifyInvalidation(SfxViewShell const* pThisView, tools::Rect
return;
const int nPart = comphelper::LibreOfficeKit::isPartInInvalidation() ? pThisView->getPart() : INT_MIN;
- pThisView->libreOfficeKitViewInvalidateTilesCallback(pRect, nPart);
+ const int nMode = comphelper::LibreOfficeKit::isPartInInvalidation() ? pThisView->getEditMode() : 0;
+ pThisView->libreOfficeKitViewInvalidateTilesCallback(pRect, nPart, nMode);
}
void SfxLokHelper::notifyDocumentSizeChanged(SfxViewShell const* pThisView, const OString& rPayload, vcl::ITiledRenderable* pDoc, bool bInvalidateAll)
@@ -564,7 +565,7 @@ void SfxLokHelper::notifyDocumentSizeChanged(SfxViewShell const* pThisView, cons
for (int i = 0; i < pDoc->getParts(); ++i)
{
tools::Rectangle aRectangle(0, 0, 1000000000, 1000000000);
- pThisView->libreOfficeKitViewInvalidateTilesCallback(&aRectangle, i);
+ pThisView->libreOfficeKitViewInvalidateTilesCallback(&aRectangle, i, 0);
}
}
pThisView->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, rPayload.getStr());
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index c21790aa9be5..108574d410e2 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1482,12 +1482,12 @@ static bool ignoreLibreOfficeKitViewCallback(int nType, const SfxViewShell_Impl*
return false;
}
-void SfxViewShell::libreOfficeKitViewInvalidateTilesCallback(const tools::Rectangle* pRect, int nPart) const
+void SfxViewShell::libreOfficeKitViewInvalidateTilesCallback(const tools::Rectangle* pRect, int nPart, int nMode) const
{
if (ignoreLibreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, pImpl.get()))
return;
if (pImpl->m_pLibreOfficeKitViewCallback)
- pImpl->m_pLibreOfficeKitViewCallback->libreOfficeKitViewInvalidateTilesCallback(pRect, nPart);
+ pImpl->m_pLibreOfficeKitViewCallback->libreOfficeKitViewInvalidateTilesCallback(pRect, nPart, nMode);
else
SAL_INFO(
"sfx.view",