diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-05-12 08:17:02 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-05-12 17:48:51 +0200 |
commit | 9f37840b0d7778ab4fc3294c44f62198ea932e3f (patch) | |
tree | 5178fd0927ce62bb5edebcff87a76ea55f49c0fe /sw/sdi | |
parent | e98a68b23e14580dfa236536254b6ff80cd10df7 (diff) |
sw content controls, dropdown: add insert UI
- introduce a SwContentControlListItem::ToString() that tries to use the
display text of the list item, otherwise falls back to its value and use it
while building the dropdown widget and when inserting selected list item
- handle the dropdown case in SwWrtShell::InsertContentControl()
- expose this as a new .uno:InsertDropdownContentControl command
- mention the new and all previous content control commands in the
MS-compatible forms menu as well
Change-Id: I075f77933c1466b5258357d5a661e173c34de34f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134215
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/sdi')
-rw-r--r-- | sw/sdi/_textsh.sdi | 6 | ||||
-rw-r--r-- | sw/sdi/swriter.sdi | 17 |
2 files changed, 23 insertions, 0 deletions
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index 21b56b6c1a60..1995156b79ae 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -284,6 +284,12 @@ interface BaseText StateMethod = NoState ; DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; ] + FN_INSERT_DROPDOWN_CONTENT_CONTROL // status(final|play) + [ + ExecMethod = ExecInsert ; + StateMethod = NoState ; + DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; + ] FN_INSERT_COLUMN_BREAK // status(final|play) [ ExecMethod = ExecInsert ; diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index 0b808255e588..123404e32c36 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -3066,6 +3066,23 @@ SfxVoidItem InsertCheckboxContentControl FN_INSERT_CHECKBOX_CONTENT_CONTROL GroupId = SfxGroupId::Insert; ] +SfxVoidItem InsertDropdownContentControl FN_INSERT_DROPDOWN_CONTENT_CONTROL +() +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::Insert; +] + SfxVoidItem InsertMultiIndex FN_INSERT_MULTI_TOX () [ |