summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-11-09 15:50:01 +0100
committerMiklos Vajna <vmiklos@collabora.com>2022-11-09 17:00:00 +0100
commit56db6406b0b63a2d2d99024e7c311ebd874f3893 (patch)
treeb7096b526b5bfd5f5a474f467761f7065f8e81c2 /offapi
parentcb8a05bfccf77d5217f4f2e20b5898d6a24f990d (diff)
sw content controls: allow no list items in a dropdown
- Replace SwContentControl::HasListItems(), which assumed that the type is dropdown if we have list items. This is not valid, it's OK to have a dropdown with no list items. Add a GetDropDown() instead to check for the type, explicitly. - UNO API sets the dropdown bit when list items are set and the type is not expilcitly combo box or drop down, to keep backwards compatibility with existing documents. - No change to the edit shell, SwDropDownContentControlButton already checked if items are empty and used STR_DROP_DOWN_EMPTY_LIST in that case, but that was dead code previously. - ODT & DOCX filters are now updated, ODF has a new <loext:content-control loext:dropdown="..."> attribute to specify that the type is a dropdown, explicitly. Change-Id: Id577ba9639151549a8f953aab31685a73a898504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142491 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'offapi')
-rw-r--r--offapi/com/sun/star/text/ContentControl.idl8
1 files changed, 6 insertions, 2 deletions
diff --git a/offapi/com/sun/star/text/ContentControl.idl b/offapi/com/sun/star/text/ContentControl.idl
index ae8a0e1a9396..7bdb39fa5101 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -43,8 +43,6 @@ service ContentControl
[optional, property] string UncheckedState;
/** List items of a dropdown: DisplayText + Value pairs with string values for each item.
-
- If the list is non-empty, a dropdown control is provided on the UI.
*/
[optional, property] sequence< sequence< com::sun::star::beans::PropertyValue > > ListItems;
@@ -100,6 +98,12 @@ service ContentControl
*/
[optional, property] boolean ComboBox;
+ /** Drop-down that does not allow free-form text, i.e. not combo box.
+
+ @since LibreOffice 7.5
+ */
+ [optional, property] boolean DropDown;
+
/** The alias: kind of a human-readable title / description, show up on the UI.
@since LibreOffice 7.5