sw/qa/extras/ooxmlexport/data/tdf161631.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport21.cxx | 11 +++++++++++ 2 files changed, 11 insertions(+)
New commits: commit a820696263e62ffc7ebe0a9f6d51bec2e1354926 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Jun 21 17:07:39 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Jun 21 19:37:49 2024 +0200 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 <xiscofa...@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 000000000000..a1e91c05633c Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf161631.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx index 81a5703b9ced..43dff8ae68cf 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)