summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2022-05-12 13:13:35 +0530
committerPranam Lashkari <lpranam@collabora.com>2022-05-17 15:17:41 +0200
commit172bc7a8f4eeab907adac077407186fbbd046a77 (patch)
tree634720716e36534c7c055b97b14ebfea6f09be2e /include/LibreOfficeKit
parent7260b8724fafd41294761382f69ece7fe09588c4 (diff)
lok-calc: new callback for print ranges
With this callback the lok clients can read and draw the print ranges on each sheet of the Calc document. Change-Id: Ie19351d4420e0f3d4191f6a354ce99ab830aede2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134375 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index e00968a86dc8..0f085d5385a8 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -783,6 +783,35 @@ typedef enum
* When a user tries to use command which is restricted for that user
*/
LOK_COMMAND_BLOCKED = 53,
+
+ /**
+ * This is Calc specific. The payload contains print ranges of all
+ * sheets in the document.
+ *
+ * Payload example:
+ * {
+ * "printranges" : [
+ * {
+ * "sheet": 0,
+ * "ranges": [
+ * [0, 0, 4, 5],
+ * [5, 100, 8, 150]
+ * ]
+ * },
+ * {
+ * "sheet": 3,
+ * "ranges": [
+ * [1, 0, 6, 10],
+ * [3, 200, 6, 230]
+ * ]
+ * }
+ * ]
+ * }
+ *
+ * The format of the inner "ranges" array for each sheet is
+ * [<startColumn>, <startRow>, <endColumn>, <endRow>]
+ */
+ LOK_CALLBACK_PRINT_RANGES = 54,
}
LibreOfficeKitCallbackType;
@@ -919,6 +948,8 @@ static inline const char* lokCallbackTypeToString(int nType)
return "LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR";
case LOK_COMMAND_BLOCKED:
return "LOK_COMMAND_BLOCKED";
+ case LOK_CALLBACK_PRINT_RANGES:
+ return "LOK_CALLBACK_PRINT_RANGES";
}
assert(!"Unknown LibreOfficeKitCallbackType type.");