summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-10-05 10:13:46 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-10-05 12:40:30 +0200
commit98771c4a6da0e760b10983e66885fafcfe918d16 (patch)
tree66711c8a30f301349bf9584c6cce0569c9e123cb
parentc47038d1248340a4e0347a06707ab317da787b3b (diff)
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 <xiscofauli@libreoffice.org>
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf157598.docxbin0 -> 15043 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport18.cxx12
2 files changed, 12 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf157598.docx
Binary files 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.