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/source/uibase/shells/textsh.cxx | |
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/source/uibase/shells/textsh.cxx')
-rw-r--r-- | sw/source/uibase/shells/textsh.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 667f7503bcea..280e667eaf2c 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -91,6 +91,7 @@ using namespace ::com::sun::star; #include <com/sun/star/ui/dialogs/DialogClosedEvent.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <IDocumentUndoRedo.hxx> +#include <formatcontentcontrol.hxx> SFX_IMPL_INTERFACE(SwTextShell, SwBaseShell) @@ -219,7 +220,12 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) break; case FN_INSERT_CONTENT_CONTROL: - rSh.InsertContentControl(); + rSh.InsertContentControl(SwContentControlType::RICH_TEXT); + rReq.Done(); + break; + + case FN_INSERT_CHECKBOX_CONTENT_CONTROL: + rSh.InsertContentControl(SwContentControlType::CHECKBOX); rReq.Done(); break; |