[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sw/qa sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jan 17 12:37:17 UTC 2019
sw/qa/extras/ooxmlexport/data/tdf122186_input_list.odt |binary
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 10 ++++++++++
sw/source/filter/ww8/docxattributeoutput.cxx | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 38ef8e9eba55b55a64488c7e452ec24a7a360a05
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Mon Jan 14 15:12:16 2019 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jan 17 13:36:48 2019 +0100
tdf#122186: Fix broken Input list after RT in DOCX format
We should not write out the text of the field, because it
confuses the import code and it's unneeded anyway.
Reviewed-on: https://gerrit.libreoffice.org/66338
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
(cherry picked from commit 35ea8fc24ae749b8a87b7ddb5df22ecc4f58cfd3)
Change-Id: Id114f74c5d135e9fe6cb059e25ebf324464c8362
Reviewed-on: https://gerrit.libreoffice.org/66378
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf122186_input_list.odt b/sw/qa/extras/ooxmlexport/data/tdf122186_input_list.odt
new file mode 100755
index 000000000000..76a6289f7045
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf122186_input_list.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 9216e4369dd6..4163921e073f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -403,6 +403,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf58944RepeatingTableHeader, "tdf58944-repeating-t
parseDump("/root/page[2]/body/tab/row[2]/cell[1]/txt/text()"));
}
+DECLARE_OOXMLEXPORT_TEST(testInputListExport, "tdf122186_input_list.odt")
+{
+ // We need to make sure we don't export the text itself next to the input list field
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r", 5);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:t", 0);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 67846f34f73a..04f491205700 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1921,7 +1921,7 @@ void DocxAttributeOutput::EndField_Impl( const SwTextNode* pNode, sal_Int32 nPos
sExpand = static_cast<SwAuthorityField const*>(rInfos.pField.get())
->ExpandCitation(AUTH_FIELD_TITLE);
}
- else
+ else if(rInfos.eType != ww::eFORMDROPDOWN)
{
sExpand = rInfos.pField->ExpandField( true );
}
More information about the Libreoffice-commits
mailing list