diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-05-23 08:39:34 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-05-24 13:14:45 +0200 |
commit | 3e4e9a7776422bbb1ab4d3b54025204787864f02 (patch) | |
tree | dc958cb91bd28d9c4ceb94e5e12aeef39c0830b3 /include | |
parent | c18db3c86257974770cd9e7c5aea221222c78667 (diff) |
sw content controls, picture: add LOK API
- send a LOK_CALLBACK_CONTENT_CONTROL callback with
action=change-picture when a file picker should be shown
- extend lok::Document::sendContentControlEvent() to be able to replace
the placeholder with the selected URL
- update gtktiledviewer to work with these
(cherry picked from commit 9a76be53dfb801b754bf55f9d4b8c5f82991a62f)
Conflicts:
sw/source/uibase/uno/unotxdoc.cxx
Change-Id: Ifb3750803885fc09fc82905b0cf85b2b8ca06e77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134850
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 10 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKitEnums.h | 23 |
2 files changed, 25 insertions, 8 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 3140e121151d..827856c3ebeb 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -812,14 +812,18 @@ public: * * @param pArguments arguments of the event. * - * Example argument string: - * + * Examples: + * To select the 3rd list item of the drop-down: * { * "type": "drop-down", * "selected": "2" * } * - * selects the 3rd list item of the drop-down. + * To change a picture place-holder: + * { + * "type": "picture", + * "changed": "file:///path/to/test.png" + * } */ void sendContentControlEvent(const char* pArguments) { diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h index 1af91bbee22b..c578582d2726 100644 --- a/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -799,15 +799,28 @@ typedef enum /** * Sends all information for displaying metadata for a text based content control. * - * The payload example: + * Examples: + * Entered a rich text content control: * { - * "action": "show", - * "rectangles": "1418, 1694, 720, 551; 10291, 1418, 1099, 275" + * "action": "show", + * "rectangles": "1418, 1694, 720, 551; 10291, 1418, 1099, 275" * } * - * or + * Left a rich text content control: + * { + * "action": "hide" + * } + * + * Entered a dropdown content control: + * { + * "action": "show", + * "rectangles": "...", + * "items": ["red", "green", "blue"] + * } + * + * Clicked on a picture content control's placeholder: * { - * "action": "hide" + * "action": "change-picture" * } */ LOK_CALLBACK_CONTENT_CONTROL = 55, |