diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-09-14 13:22:45 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-09-25 12:31:49 +0200 |
commit | cd7ff1797d754018db1d47888781c9d7ecb24dcf (patch) | |
tree | fd58ae3cd52d376cfb1cd930ea2297e8882c752a /include | |
parent | 630d5915819c664aaee5f17066c61939f7ceaefe (diff) |
lok: send an invalidation by document size change
It was sent by the kit code earlier. Now we move it
to the LO core code, so we can optimize it later.
Change-Id: Id0a8991016dbe8d13891071e2d5b4c9250720da9
co-author: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/79491
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKitEnums.h | 4 | ||||
-rw-r--r-- | include/sfx2/lokhelper.hxx | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h index e7ba66fe7f14..bf8f9a4ee5ea 100644 --- a/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -262,6 +262,10 @@ typedef enum * * Payload format is "width, height", i.e. clients get the new size without * having to do an explicit lok::Document::getDocumentSize() call. + * + * A size change is always preceeded by a series of + * LOK_CALLBACK_INVALIDATE_TILES events invalidating any areas + * need re-rendering to adapt. */ LOK_CALLBACK_DOCUMENT_SIZE_CHANGED = 13, diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx index b45a06b95766..cae234e6a164 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -11,6 +11,7 @@ #define INCLUDED_SFX2_LOKHELPER_HXX #include <vcl/IDialogRenderable.hxx> +#include <vcl/ITiledRenderable.hxx> #include <vcl/event.hxx> #include <sfx2/dllapi.h> #include <sfx2/viewsh.hxx> @@ -46,6 +47,8 @@ public: vcl::LOKWindowId nWindowId, const OUString& rAction, const std::vector<vcl::LOKPayloadItem>& rPayload = std::vector<vcl::LOKPayloadItem>()); + /// Emits a LOK_CALLBACK_DOCUMENT_SIZE_CHANGED - if @bInvalidateAll - first invalidates all parts + static void notifyDocumentSizeChanged(SfxViewShell const* pThisView, const OString& rPayload, vcl::ITiledRenderable* pDoc, bool bInvalidateAll = true); /// Emits a LOK_CALLBACK_INVALIDATE_TILES, but tweaks it according to setOptionalFeatures() if needed. static void notifyInvalidation(SfxViewShell const* pThisView, const OString& rPayload); /// Emits a LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, but tweaks it according to setOptionalFeatures() if needed. |