sw/qa/extras/ooxmlexport/ooxmlexport.cxx  |   22 ++++++++++++++++++++--
 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx |   21 +++++++++++++++------
 2 files changed, 35 insertions(+), 8 deletions(-)

New commits:
commit 98cfb30e6279216ca4d0352c5fd352aab47b24a8
Author:     Xisco Fauli <[email protected]>
AuthorDate: Thu Nov 20 13:41:53 2025 +0100
Commit:     Xisco Fauli <[email protected]>
CommitDate: Thu Nov 20 20:20:56 2025 +0100

    sw_ooxmlexport: do not skip DOCX export validation
    
    Change-Id: I107d4c07f3d03077f9587dcb944508bd1215c319
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194269
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index a8290f4942a6..571230360b75 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -37,12 +37,16 @@
 class Test : public SwModelTestBase
 {
 public:
-    Test() : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr, 
/*bSkipValidation*/ true) {}
+    Test() : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr) {}
 };
 
 CPPUNIT_TEST_FIXTURE(Test, testfdo81381)
 {
     createSwDoc("fdo81381.docx");
+
+    // FIXME: validation error in OOXML export: Errors: 2
+    skipValidation();
+
     save(TestFilter::DOCX);
     xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
     assertXPath(pXmlDoc, 
"/w:document/w:body/w:p[1]/w:r[1]/w:object[1]/o:OLEObject[1]", "DrawAspect", 
u"Icon");
@@ -438,6 +442,9 @@ DECLARE_OOXMLEXPORT_TEST(testWpsCharColor, 
"wps-char-color.docx")
 
 DECLARE_OOXMLEXPORT_TEST(testTableStyleCellBackColor, 
"table-style-cell-back-color.docx")
 {
+    // FIXME: validation error in OOXML export: Errors: 1
+    skipValidation();
+
     // The problem was that cell background was white, not green.
     uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
     uno::Reference<container::XIndexAccess> 
xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
@@ -449,6 +456,9 @@ DECLARE_OOXMLEXPORT_TEST(testTableStyleCellBackColor, 
"table-style-cell-back-col
 
 DECLARE_OOXMLEXPORT_TEST(testTableStyleBorder, "table-style-border.docx")
 {
+    // FIXME: validation error in OOXML export: Errors: 1
+    skipValidation();
+
     uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
     uno::Reference<container::XIndexAccess> 
xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
     uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), 
uno::UNO_QUERY);
@@ -464,6 +474,9 @@ DECLARE_OOXMLEXPORT_TEST(testTableStyleBorder, 
"table-style-border.docx")
 
 DECLARE_OOXMLEXPORT_TEST(testTableStyleBorderExport, 
"table-style-border-export.docx")
 {
+    // FIXME: validation error in OOXML export: Errors: 1
+    skipValidation();
+
     uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
     uno::Reference<container::XIndexAccess> 
xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
     uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), 
uno::UNO_QUERY);
@@ -569,6 +582,9 @@ DECLARE_OOXMLEXPORT_TEST(testAfterlines, "afterlines.docx")
 
 DECLARE_OOXMLEXPORT_TEST(testParagraphMark, "paragraph-mark.docx")
 {
+    // FIXME: validation error in OOXML export: Errors: 1
+    skipValidation();
+
     // The problem was that we didn't handle the situation when an empty 
paragraph's marker had both a char style and some direct formatting.
 
     // This was 11.
@@ -591,7 +607,6 @@ CPPUNIT_TEST_FIXTURE(Test, testParagraphMarkNonempty)
 {
     createSwDoc("paragraph-mark-nonempty.odt");
     save(TestFilter::DOCX);
-    validate(maTempFile.GetFileName(), u"Office Open XML Text");
     CPPUNIT_ASSERT_EQUAL(1, getPages());
     xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
     // There were two <w:sz> elements, make sure the 40 one is dropped and the 
20 one is kept.
@@ -808,6 +823,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf88583)
 
 DECLARE_OOXMLEXPORT_TEST(testTdf97090, "tdf97090.docx")
 {
+    // FIXME: validation error in OOXML export: Errors: 39
+    skipValidation();
+
     uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, 
uno::UNO_QUERY);
     uno::Reference<container::XIndexAccess> 
xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
     uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), 
uno::UNO_QUERY);
commit ac29f41114033e0584b3ef9240a7406c507c67fe
Author:     Xisco Fauli <[email protected]>
AuthorDate: Thu Nov 20 13:29:49 2025 +0100
Commit:     Xisco Fauli <[email protected]>
CommitDate: Thu Nov 20 20:20:52 2025 +0100

    sw_ooxmlexport2: do not skip DOCX export validation
    
    Change-Id: Ia67a968e075e532dcc26689ae56d9c146b2f862f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194268
    Reviewed-by: Xisco Fauli <[email protected]>
    Tested-by: Jenkins

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
index 1398834b0659..b9cb46325755 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
@@ -38,14 +38,13 @@
 class Test : public SwModelTestBase
 {
 public:
-    Test() : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr, 
/*bSkipValidation*/ true) {}
+    Test() : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr) {}
 };
 
 CPPUNIT_TEST_FIXTURE(Test, testPageGraphicBackground)
 {
     createSwDoc("page-graphic-background.odt");
     saveAndReload(TestFilter::DOCX);
-    validate(maTempFile.GetFileName(), u"Office Open XML Text");
     CPPUNIT_ASSERT_EQUAL(1, getPages());
     // No idea how the graphic background should be exported (seems there is no
     // way to do a non-tiling export to OOXML), but at least the background
@@ -167,7 +166,6 @@ CPPUNIT_TEST_FIXTURE(Test, testZoom)
     verify();
 
     // Validation test: order of elements were wrong.
-    validate(maTempFile.GetFileName(), u"Office Open XML Text");
     xmlDocUniquePtr pXmlDoc = parseExport(u"word/styles.xml"_ustr);
     // Order was: rsid, next.
     int nNext = getXPathPosition(pXmlDoc, "/w:styles/w:style[3]", "next");
@@ -184,7 +182,6 @@ CPPUNIT_TEST_FIXTURE(Test, defaultTabStopNotInStyles)
 {
     createSwDoc("empty.odt");
     saveAndReload(TestFilter::DOCX);
-    validate(maTempFile.GetFileName(), u"Office Open XML Text");
     CPPUNIT_ASSERT_EQUAL(1, getPages());
 // The default tab stop was mistakenly exported to a style.
 // xray ThisComponent.StyleFamilies(1)(0).ParaTabStop
@@ -256,14 +253,12 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo38244)
     verify();
     saveAndReload(TestFilter::DOCX);
     verify();
-    validate(maTempFile.GetFileName(), u"Office Open XML Text");
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testCommentsNested)
 {
     createSwDoc("comments-nested.odt");
     saveAndReload(TestFilter::DOCX);
-    validate(maTempFile.GetFileName(), u"Office Open XML Text");
     CPPUNIT_ASSERT_EQUAL(1, getPages());
     uno::Reference<beans::XPropertySet> xOuter = getProperty< 
uno::Reference<beans::XPropertySet> >(getRun(getParagraph(1), 2), 
u"TextField"_ustr);
     CPPUNIT_ASSERT_EQUAL(u"Outer"_ustr, getProperty<OUString>(xOuter, 
u"Content"_ustr));
@@ -283,6 +278,10 @@ CPPUNIT_TEST_FIXTURE(Test, testMathEscape)
 CPPUNIT_TEST_FIXTURE(Test, testTdf158023Export)
 {
     createSwDoc("tdf158023_export.docx");
+
+    // FIXME: validation error in OOXML export: Errors: 3
+    skipValidation();
+
     saveAndReload(TestFilter::DOCX);
     CPPUNIT_ASSERT_EQUAL(u"left [ right ] left ( right ) left lbrace  right 
rbrace"_ustr, getFormula(getRun(getParagraph(1), 1)));
 }
@@ -527,6 +526,10 @@ DECLARE_OOXMLEXPORT_TEST(testTableBorders, 
"table-borders.docx")
 CPPUNIT_TEST_FIXTURE(Test, testFdo51550)
 {
     createSwDoc("fdo51550.odt");
+
+    // FIXME: validation error in OOXML export: Errors: 2
+    skipValidation();
+
     saveAndReload(TestFilter::DOCX);
     CPPUNIT_ASSERT_EQUAL(1, getShapes());
     CPPUNIT_ASSERT_EQUAL(1, getPages());
@@ -611,6 +614,9 @@ DECLARE_OOXMLEXPORT_TEST(testTextFrameBorders, 
"textframe-borders.docx")
 
 DECLARE_OOXMLEXPORT_TEST(testTextframeGradient, "textframe-gradient.docx")
 {
+    // FIXME: validation error in OOXML export: Errors: 1
+    skipValidation();
+
     CPPUNIT_ASSERT_EQUAL(2, getShapes());
 
     uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
@@ -735,6 +741,9 @@ DECLARE_OOXMLEXPORT_TEST(testPageBackground, 
"page-background.docx")
 
 DECLARE_OOXMLEXPORT_TEST(testFdo65265, "fdo65265.docx")
 {
+    // FIXME: validation error in OOXML export: Errors: 2
+    skipValidation();
+
     // Redline (tracked changes) of text formatting were not exported
     uno::Reference<text::XTextRange> xParagraph1 = getParagraph(1);
     uno::Reference<text::XTextRange> xParagraph2 = getParagraph(2);

Reply via email to