diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-11-09 15:50:01 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-11-09 17:00:00 +0100 |
commit | 56db6406b0b63a2d2d99024e7c311ebd874f3893 (patch) | |
tree | b7096b526b5bfd5f5a474f467761f7065f8e81c2 /schema | |
parent | cb8a05bfccf77d5217f4f2e20b5898d6a24f990d (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 'schema')
-rw-r--r-- | schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng index d475e90319b4..3b2e0d4b2bbc 100644 --- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng +++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng @@ -2993,6 +2993,12 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1. </rng:attribute> </rng:optional> <rng:optional> + <!-- default value: false --> + <rng:attribute name="loext:dropdown"> + <rng:ref name="boolean"/> + </rng:attribute> + </rng:optional> + <rng:optional> <rng:attribute name="loext:alias"> <rng:ref name="string"/> </rng:attribute> |