diff options
author | Darshan-upadhyay1110 <darshan.upadhyay@collabora.com> | 2024-05-10 20:04:01 +0530 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2024-06-17 10:23:27 +0200 |
commit | 40ddb619cfc88d161cb74a1f516dd39196658d50 (patch) | |
tree | 96f62d1f0e7eb658f14328e74bdf43ecee79f905 /include/LibreOfficeKit/LibreOfficeKitEnums.h | |
parent | 4f74afd4cdfce405933e155e8fb9937e42fe30c0 (diff) |
Add new LOK CALLBACK for vertical ruler
- We're adding a new LOK callback LOK_CALLBACK_VERTICAL_RULER_UPDATE.
- The reason is that we currently override the existing callback.
- Using the same callback for both vertical and horizontal rulers causes an issue.
- override will create problem like it will only send any one of the ruler orientation update.
- It results in online updates being limited to just one ruler orientation.
- By introducing a new callback, we ensure updates for both vertical and horizontal rulers both are captured correctly in online.
Change-Id: I02d0e3e7e4ac8a07a83644460aa0ba36e0f3c013
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167481
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 11b936629dd4ef9308d63b312900b8b7c8ff19b4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167464
Tested-by: Jenkins
Diffstat (limited to 'include/LibreOfficeKit/LibreOfficeKitEnums.h')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKitEnums.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h index 9a6f34bbd846..516622722bb9 100644 --- a/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -581,7 +581,7 @@ typedef enum */ LOK_CALLBACK_CELL_ADDRESS = 34, /** - * The key ruler related properties on change are reported by this. + * The key horizontal ruler related properties on change are reported by this. * * The payload format is: * @@ -1051,6 +1051,23 @@ typedef enum * Payload contains the rectangle details */ LOK_CALLBACK_SHAPE_INNER_TEXT = 72, + /** + * The key vertical ruler related properties on change are reported by this. + * + * The payload format is: + * + * { + * "margin1": "...", + * "margin2": "...", + * "leftOffset": "...", + * "pageOffset": "...", + * "pageWidth": "...", + * "unit": "..." + * } + * + * Here all aproperties are same as described in svxruler. + */ + LOK_CALLBACK_VERTICAL_RULER_UPDATE = 73 } LibreOfficeKitCallbackType; @@ -1152,6 +1169,8 @@ static inline const char* lokCallbackTypeToString(int nType) return "LOK_CALLBACK_COMMENT"; case LOK_CALLBACK_RULER_UPDATE: return "LOK_CALLBACK_RULER_UPDATE"; + case LOK_CALLBACK_VERTICAL_RULER_UPDATE: + return "LOK_CALLBACK_VERTICAL_RULER_UPDATE"; case LOK_CALLBACK_WINDOW: return "LOK_CALLBACK_WINDOW"; case LOK_CALLBACK_VALIDITY_LIST_BUTTON: |