sw/source/filter/ww8/docxattributeoutput.cxx | 6 ------ 1 file changed, 6 deletions(-)
New commits: commit 01aa8caffcab9b0a0a553c659c139ce8a8c2fda0 Author: Justin Luth <[email protected]> AuthorDate: Thu Jan 22 12:05:39 2026 -0500 Commit: Justin Luth <[email protected]> CommitDate: Fri Jan 23 16:27:33 2026 +0100 NFC docx export: unused listItem aValue No Functional Change: the calculated OString was never used. Since the entire reason for avoiding a non-empty w:value was incorrect, just remove the unused variable. listItem w:value is allowed to be empty (as long as there is a non-empty displayText defined). Change-Id: I52012fc6fbcf09c29dc2a996f3c24fbf2d70b780 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197865 Reviewed-by: Justin Luth <[email protected]> Tested-by: Jenkins diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index c9a136b3402c..493ee69c5a5e 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2776,12 +2776,6 @@ void DocxAttributeOutput::WriteContentControlStart() xAttributes->add(FSNS(XML_w, XML_displayText), rItem.m_aDisplayText); } - OUString aValue = rItem.m_aValue; - if (aValue.isEmpty()) - { - // Empty value would be invalid DOCX, default to the display text. - aValue = rItem.m_aDisplayText; - } xAttributes->add(FSNS(XML_w, XML_value), rItem.m_aValue); m_pSerializer->singleElementNS(XML_w, XML_listItem, xAttributes); }
