sw content controls, dropdown: add insert UI

Desktop / LibreOffice - Miklos Vajna [collabora.com] - 12 May 2022 15:48 UTC

- 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

9f37840b0d77 sw content controls, dropdown: add insert UI
.../org/openoffice/Office/UI/WriterCommands.xcu | 8 ++++++++
sw/inc/cmdid.h | 3 ++-
sw/inc/formatcontentcontrol.hxx | 2 ++
sw/inc/strings.hrc | 1 +
sw/qa/uibase/wrtsh/wrtsh.cxx | 23 ++++++++++++++++++++++
sw/sdi/_textsh.sdi | 6 ++++++
sw/sdi/swriter.sdi | 17 ++++++++++++++++
.../core/crsr/dropdowncontentcontrolbutton.cxx | 4 +++-
sw/source/core/txtnode/attrcontentcontrol.cxx | 10 ++++++++++
sw/source/uibase/shells/textsh.cxx | 5 +++++
sw/source/uibase/uiview/view.cxx | 1 +
sw/source/uibase/wrtsh/wrtsh1.cxx | 13 +++++++++++-
sw/source/uibase/wrtsh/wrtsh3.cxx | 2 +-
sw/uiconfig/swriter/menubar/menubar.xml | 1 +
.../swriter/menubar/mscompatibleformsmenu.xml | 3 +++
xmloff/source/text/txtparae.cxx | 2 +-
16 files changed, 96 insertions(+), 5 deletions(-)

Upstream: cgit.freedesktop.org


  • Share