From d5263c2c564c88e3dafe4c1ab8d3d9c1c48ede73 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 29 Sep 2016 12:49:23 +0200 Subject: LOK: conditionally include part number in invalidation payload Since desktop/ code queues, compresses and only emits callbacks on idle, it's possible that two invalidations are in the queue, and there was a setPart() call between them. In this case it's impossible to tell what part the invalidation was sent for. Fix this by conditionally including the part number in the invalidation payload. It's off by default, a new feature flag is added to request this behavior. gtktiledviewer enables this feature flag by default, though just to show the part number in the debug output. Android doesn't enable it. Change-Id: I73e6def848c0eb61d64e71026002c7a0e750aab4 --- include/LibreOfficeKit/LibreOfficeKitEnums.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/LibreOfficeKit') diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h index 8aef838db039..187fa9812e60 100644 --- a/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -63,6 +63,12 @@ typedef enum * @see lok::Office::setDocumentPassword(). */ LOK_FEATURE_DOCUMENT_PASSWORD_TO_MODIFY = (1ULL << 1), + + /** + * Request to have the part number as an 5th value in the + * LOK_CALLBACK_INVALIDATE_TILES payload. + */ + LOK_FEATURE_PART_IN_INVALIDATION_CALLBACK = (1ULL << 2), } LibreOfficeKitOptionalFeatures; @@ -84,6 +90,8 @@ typedef enum * Rectangle format: "x, y, width, height", where all numbers are document * coordinates, in twips. When all tiles are supposed to be dropped, the * format is the "EMPTY" string. + * + * @see LOK_FEATURE_PART_IN_INVALIDATION_CALLBACK. */ LOK_CALLBACK_INVALIDATE_TILES, /** -- cgit