summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-12-23 13:00:19 +0100
committerMichael Stahl <michael.stahl@cib.de>2019-12-23 14:59:39 +0100
commitb03fefcc4dbdfee3b9eeb5fa0e586dd12ddcd3d2 (patch)
treed39dd129b49ff6ea4e82486aef4ef412e49aed75
parentc2b364d3bbe86ad9ee84c989600758641cc193ee (diff)
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>
-rw-r--r--sw/qa/extras/globalfilter/globalfilter.cxx5
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx4
2 files changed, 4 insertions, 5 deletions
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx
index da84bc21f494..f0d61355ea86 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -1230,10 +1230,7 @@ void Test::testCheckBoxFormField()
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 d85b3750453c..9d20bff30617 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2441,7 +2441,9 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
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() );
}