From 98771c4a6da0e760b10983e66885fafcfe918d16 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 5 Oct 2023 10:13:46 +0200 Subject: tdf#157598: sw_ooxmlexport18: Add unittest Change-Id: If17054cfc56c57dfe9eab5461973fb4c3035f218 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157584 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/qa/extras/ooxmlexport/data/tdf157598.docx | Bin 0 -> 15043 bytes sw/qa/extras/ooxmlexport/ooxmlexport18.cxx | 12 ++++++++++++ 2 files changed, 12 insertions(+) create mode 100644 sw/qa/extras/ooxmlexport/data/tdf157598.docx (limited to 'sw') diff --git a/sw/qa/extras/ooxmlexport/data/tdf157598.docx b/sw/qa/extras/ooxmlexport/data/tdf157598.docx new file mode 100644 index 000000000000..7a5a2b15999b Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf157598.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx index bf7eb22eb270..066eb3647cb5 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx @@ -531,6 +531,18 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148834_lineNumbering) "//w:style[@w:styleId='0NUMBERED']/w:pPr/w:suppressLineNumbers", "val", "0"); } +CPPUNIT_TEST_FIXTURE(Test, testTdf157598) +{ + loadAndSave("tdf157598.docx"); + + xmlDocUniquePtr pStylesXml = parseExport("word/styles.xml"); + + // Without the fix in place, this test would have failed with + // - Expected: 0 + // - Actual : 1 + assertXPath(pStylesXml, "//w:style[@w:styleId='Normal']/w:rPr/w:rtl", 0); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf76022_textboxWrap) { // Granted, this is an ODT with a bit of an anomaly - tables ignore fly wrapping. -- cgit