summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-09-27 12:51:42 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-09-27 12:51:42 +0200
commit308a1f75c2cbb85c463bb8d2d3bf2747f99f5231 (patch)
tree31aa01e9e4f055efb94945b955b8b9440c6ffb09 /include
parentdde083386429aaf13d72870fc543d28d9b3a5ddb (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. 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> (cherry picked from commit cd7ff1797d754018db1d47888781c9d7ecb24dcf) Change-Id: Id0a8991016dbe8d13891071e2d5b4c9250720da9 Reviewed-on: https://gerrit.libreoffice.org/79617 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h4
-rw-r--r--include/sfx2/lokhelper.hxx3
2 files changed, 7 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 850e544c690e..8a003e35ff6a 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -222,6 +222,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 5ef2b3f7d182..8a5503d85c2c 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 <sfx2/dllapi.h>
#include <sfx2/viewsh.hxx>
#include <cstddef>
@@ -48,6 +49,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.