diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-05-02 08:43:19 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-05-02 12:54:27 +0200 |
commit | 02a5bd2e6c4eee50cbd8cb4ed009731c409711a5 (patch) | |
tree | 1a9e8ac3ca2ddd2d2bf0b54521bb695139fc137d /sw/inc | |
parent | b294a94861289c322a26edb6b83f0d329575639d (diff) |
sw content controls, checkbox: add insert UI
- extend SwWrtShell::InsertContentControl() to be able to create
multiple content control types
- a new checkbox content control's content is always a non-checked
checkbox
- expose this as a new .uno:InsertCheckboxContentControl uno command
- add this new command to the bottom of the form menu -- now that we
have two types of content controls, have that in a sub-menu
Change-Id: I058659600b3face69b89262feb0979fff32521c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133685
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/cmdid.h | 1 | ||||
-rw-r--r-- | sw/inc/formatcontentcontrol.hxx | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 29adc6a580d6..355d607a5bc5 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -218,6 +218,7 @@ class SwUINumRuleItem; #define FN_INSERT_LINEBREAK (FN_INSERT + 18) /* Newline */ #define FN_INSERT_FIELD_DATA_ONLY (FN_INSERT + 19) /* Field dialog for mail merge*/ #define FN_INSERT_CONTENT_CONTROL (FN_INSERT + 20) /* Content control */ +#define FN_INSERT_CHECKBOX_CONTENT_CONTROL (FN_INSERT + 21) /* Checkbox content control */ #define FN_INSERT_OBJECT_DLG (FN_INSERT + 22) /* Object */ #define FN_INSERT_PAGEBREAK (FN_INSERT + 23) /* Page break*/ #define FN_POSTIT (FN_INSERT + 29) /* Insert/edit PostIt */ diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx index 368720a0cb76..8419446f59c0 100644 --- a/sw/inc/formatcontentcontrol.hxx +++ b/sw/inc/formatcontentcontrol.hxx @@ -32,6 +32,12 @@ class SwTextContentControl; class SwTextNode; class SwXContentControl; +enum class SwContentControlType +{ + RICH_TEXT, + CHECKBOX, +}; + /// SfxPoolItem subclass that wraps an SwContentControl. class SAL_DLLPUBLIC_RTTI SwFormatContentControl final : public SfxPoolItem { |