tdf#161631: sw_ooxmlexport21: Add unittest

Change-Id: I1496b82e67c5f408bd682b4998e3afaf74c37318
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169339
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf161631.docx b/sw/qa/extras/ooxmlexport/data/tdf161631.docx
new file mode 100644
index 0000000..a1e91c0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf161631.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
index 81a5703..43dff8a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
@@ -38,6 +38,17 @@ public:
    }
};

DECLARE_OOXMLEXPORT_TEST(testTdf161631, "tdf161631.docx")
{
    CPPUNIT_ASSERT_EQUAL(1, getPages());
    CPPUNIT_ASSERT_EQUAL(1, getParagraphs());

    // Without the fix in place, this test would have failed with
    // - Expected: Some text
    // - Actual  :
    CPPUNIT_ASSERT_EQUAL(u"Some text"_ustr, getParagraph(1)->getString());
}

DECLARE_OOXMLEXPORT_TEST(testTdf158597, "tdf158597.docx")
{
    // test with 2 properties: font size, italic (toggle)