summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-07-16 00:08:58 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-07-16 10:47:08 +0200
commitf510f6a0b339522b0146d26630b139e0421a3657 (patch)
tree3a0d82b13abb2de6f7f92420e460bb90f7751b63
parent1762e6819b0d9f10b701728b8e183e87c1400137 (diff)
tdf#134618: sw_ooxmlexport12: Add unittest
Change-Id: I0b4559e19758475143175d571687884403e6f09b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98867 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134618.docbin0 -> 23552 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport12.cxx12
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134618.doc b/sw/qa/extras/ooxmlexport/data/tdf134618.doc
new file mode 100644
index 000000000000..693ab87e21dd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134618.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 340aff5aa055..fd0976601c44 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -911,6 +911,18 @@ DECLARE_OOXMLEXPORT_TEST(testTdf117137, "tdf117137.docx")
CPPUNIT_ASSERT(xPara3->getPropertyValue("NumberingRules").hasValue());
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf134618, "tdf134618.doc")
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ //Without the fix it in place, it would have failed with
+ //- Expected: 1
+ //- Actual : 9
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r", 1);
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent", 2);
+}
+
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf99631, "tdf99631.docx")
{
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");