diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2022-08-29 09:07:33 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2022-11-10 10:15:46 +0100 |
commit | 3f4e11bd40f60510272df7a285d8a78181af0ccb (patch) | |
tree | d3f2ad594143dad546a12d6b5d4e18a360157115 /desktop/inc/lib/init.hxx | |
parent | 652df8c733f381cac4e22286acd12a2ec72d41ae (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 'desktop/inc/lib/init.hxx')
-rw-r--r-- | desktop/inc/lib/init.hxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx index 6abf4bebd852..cd6636ac2242 100644 --- a/desktop/inc/lib/init.hxx +++ b/desktop/inc/lib/init.hxx @@ -43,6 +43,7 @@ namespace desktop { { tools::Rectangle m_aRectangle; int m_nPart; + int m_nMode; // This is the "EMPTY" rectangle, which somewhat confusingly actually means // to drop all rectangles (see LOK_CALLBACK_INVALIDATE_TILES documentation), @@ -51,12 +52,14 @@ namespace desktop { RectangleAndPart() : m_nPart(INT_MIN) // -1 is reserved to mean "all parts". + , m_nMode(0) { } - RectangleAndPart(const tools::Rectangle* pRect, int nPart) + RectangleAndPart(const tools::Rectangle* pRect, int nPart, int nMode) : m_aRectangle( pRect ? SanitizedRectangle(*pRect) : emptyAllRectangle) , m_nPart(nPart) + , m_nMode(nMode) { } @@ -64,7 +67,7 @@ namespace desktop { { if (m_nPart >= -1) return (isInfinite() ? "EMPTY" : m_aRectangle.toString()) - + ", " + OString::number(m_nPart); + + ", " + OString::number(m_nPart) + ", " + OString::number(m_nMode); else return (isInfinite() ? "EMPTY" : m_aRectangle.toString()); } @@ -116,7 +119,7 @@ namespace desktop { // SfxLockCallbackInterface virtual void libreOfficeKitViewCallback(int nType, const char* pPayload) override; virtual void libreOfficeKitViewCallbackWithViewId(int nType, const char* pPayload, int nViewId) override; - virtual void libreOfficeKitViewInvalidateTilesCallback(const tools::Rectangle* pRect, int nPart) override; + virtual void libreOfficeKitViewInvalidateTilesCallback(const tools::Rectangle* pRect, int nPart, int nMode) override; virtual void libreOfficeKitViewUpdatedCallback(int nType) override; virtual void libreOfficeKitViewUpdatedCallbackPerViewId(int nType, int nViewId, int nSourceViewId) override; virtual void libreOfficeKitViewAddPendingInvalidateTiles() override; @@ -137,7 +140,12 @@ namespace desktop { } CallbackData(const tools::Rectangle* pRect, int viewId) - : PayloadObject(RectangleAndPart(pRect, viewId)) + : PayloadObject(RectangleAndPart(pRect, viewId, 0)) + { // PayloadString will be done on demand + } + + CallbackData(const tools::Rectangle* pRect, int part, int mode) + : PayloadObject(RectangleAndPart(pRect, part, mode)) { // PayloadString will be done on demand } |