From f510f6a0b339522b0146d26630b139e0421a3657 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 16 Jul 2020 00:08:58 +0200 Subject: 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 --- sw/qa/extras/ooxmlexport/data/tdf134618.doc | Bin 0 -> 23552 bytes sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 12 ++++++++++++ 2 files changed, 12 insertions(+) create mode 100644 sw/qa/extras/ooxmlexport/data/tdf134618.doc 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 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf134618.doc 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"); -- cgit