tdf#129514 sw: DOCX export: write separator for CH_TXT_ATR_FORMELEMENT
... fieldmarks; the input DOC file has no separators, like:
^S FORMCHECKBOX ^A^U
but adding the separator doesn't appear to hurt and the
DocxAttributeOutput gets confused by the lack of it and puts the run
that should be after the field into the field.
(regression from 94e0b8407b02d76b27324b8b08012eb024aca9e9)
Change-Id: Ibeb1bb2ad3a4ed9c0ac9c3e90cc193debf7ad5db
Reviewed-on: https://gerrit.libreoffice.org/85753
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx
index da84bc2..f0d6135 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -1230,10 +1230,7 @@
IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
// We have two check box form fields
if(rFilterName == "Office Open XML Text")
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), sal_Int32(4), pMarkAccess->getAllMarksCount());
else
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), sal_Int32(2), pMarkAccess->getAllMarksCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), sal_Int32(2), pMarkAccess->getAllMarksCount());
int nIndex = 0;
for(auto aIter = pMarkAccess->getAllMarksBegin(); aIter != pMarkAccess->getAllMarksEnd(); ++aIter)
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index d85b3750..9d20bff 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2441,7 +2441,9 @@
FieldFlags::Start | FieldFlags::CmdStart );
if ( isDropdownOrCheckbox )
WriteFormData( *pFieldmark );
OutputField( nullptr, lcl_getFieldId( pFieldmark ), OUString(), FieldFlags::Close );
// tdf#129514 need CmdEnd for docx
OutputField(nullptr, lcl_getFieldId(pFieldmark), OUString(),
FieldFlags::CmdEnd | FieldFlags::Close);
if ( isDropdownOrCheckbox )
AppendBookmark( pFieldmark->GetName() );
}