summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-05-12 08:17:02 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-05-12 17:48:51 +0200
commit9f37840b0d7778ab4fc3294c44f62198ea932e3f (patch)
tree5178fd0927ce62bb5edebcff87a76ea55f49c0fe /xmloff
parente98a68b23e14580dfa236536254b6ff80cd10df7 (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 'xmloff')
-rw-r--r--xmloff/source/text/txtparae.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index ac566ace391d..5c37dc7a865b 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -3946,7 +3946,7 @@ void XMLTextParagraphExport::ExportContentControl(
comphelper::SequenceAsHashMap aMap(rListItem);
auto it = aMap.find("DisplayText");
OUString aValue;
- if (it != aMap.end() && (it->second >>= aValue))
+ if (it != aMap.end() && (it->second >>= aValue) && !aValue.isEmpty())
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_DISPLAY_TEXT, aValue);
}