sw/qa/extras/ooxmlexport/data/tdf148035.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport20.cxx   |   18 ++++++++++++++++++
 2 files changed, 18 insertions(+)

New commits:
commit f544dfeaf4c9cab5c626a4fdf285586f43a06b0c
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue Dec 12 12:13:38 2023 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Dec 12 15:25:44 2023 +0100

    tdf#148035: sw_ooxmlexport20: Add unittest
    
    Change-Id: I33168ef9a1526782471ddda8f1acda94b3c4a626
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160613
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf148035.docx 
b/sw/qa/extras/ooxmlexport/data/tdf148035.docx
new file mode 100644
index 000000000000..64d6c640c357
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf148035.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
index 263e769297d7..fb780b983bb2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
@@ -495,6 +495,24 @@ DECLARE_OOXMLEXPORT_TEST(test2colHeader, 
"2col-header.docx")
     CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPageStyle, "HeaderIsOn"));
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTdf148035)
+{
+    loadAndSave("tdf148035.docx");
+    xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+    assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r[2]/w:t"_ostr,
+                       "headline");
+    assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r[2]/w:rPr/w:sz"_ostr,
+                "val"_ostr, "72");
+    assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r[2]/w:rPr/w:szCs"_ostr,
+                "val"_ostr, "72");
+    assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r[2]/w:rPr/w:u"_ostr,
+                "val"_ostr, "single");
+    assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r[2]/w:rPr/w:b"_ostr);
+    assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r[2]/w:rPr/w:i"_ostr);
+    assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r[2]/w:rPr/w:iCs"_ostr);
+}
+
 CPPUNIT_TEST_FIXTURE(Test, testfdo83048)
 {
     loadAndSave("fdo83048.docx");

Reply via email to