sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 49 +++++++++++++++++++++++++++++- sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 35 ++++++++++++++++++++- 2 files changed, 82 insertions(+), 2 deletions(-)
New commits: commit dad2a97f1d3c59b2b020df1304c3272d3b356ffd Author: Xisco Fauli <[email protected]> AuthorDate: Fri Nov 21 13:27:33 2025 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Nov 21 22:33:29 2025 +0100 sw_ooxmlexport5: do not skip DOCX export validation Change-Id: Ia789e1b4040b09aa24d5f58f8ddbc76632bacdd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194322 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index 3cc270121327..eda09dcc49ce 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -23,12 +23,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, testFDO76248) { createSwDoc("FDO76248.docx"); + + //FIXME: validation error in OOXML export: Errors: 6 + skipValidation(); + save(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // In two cases the a:graphicData elements had no children, which is invalid. @@ -204,6 +208,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFDO76586) CPPUNIT_TEST_FIXTURE(Test, testFDO76587 ) { createSwDoc("fdo76587.docx"); + + //FIXME: validation error in OOXML export: Errors: 1 + skipValidation(); + save(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/styles.xml"_ustr); assertXPath(pXmlDoc, "/w:styles/w:style[8]/w:pPr/w:spacing", "line", u"240"); @@ -226,6 +234,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFDO77890 ) CPPUNIT_TEST_FIXTURE(Test, testNumberedList) { createSwDoc("NumberedList.docx"); + + //FIXME: validation error in OOXML export: Errors: 8 + skipValidation(); + saveAndReload(TestFilter::DOCX); //fdo74150:In document.xml, for pStyle = "NumberedList1", iLvl and numId was not preserved xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -241,6 +253,10 @@ CPPUNIT_TEST_FIXTURE(Test, testNumberedList) CPPUNIT_TEST_FIXTURE(Test, testTdf131819) { createSwDoc("NumberedList.docx"); + + //FIXME: validation error in OOXML export: Errors: 8 + skipValidation(); + save(TestFilter::DOCX); // keep width of fixed size cells in the nested table xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -252,6 +268,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf131819) CPPUNIT_TEST_FIXTURE(Test, testTdf131959) { createSwDoc("NumberedList.docx"); + + //FIXME: validation error in OOXML export: Errors: 8 + skipValidation(); + save(TestFilter::DOCX); // import tblInd from table style xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -290,6 +310,9 @@ CPPUNIT_TEST_FIXTURE(Test, testContentTypeTIF) DECLARE_OOXMLEXPORT_TEST(testFDO77117, "fdo77117.docx") { + //FIXME: validation error in OOXML export: Errors: 6 + skipValidation(); + uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY); uno::Reference<text::XTextRange> xShape(xGroup->getByIndex(0), uno::UNO_QUERY); // This checks textbox textrun size of font which is in group shape. @@ -340,6 +363,10 @@ CPPUNIT_TEST_FIXTURE(Test, testOldComplexMergeleft) CPPUNIT_TEST_FIXTURE(Test, testOldComplexMergeTableInTable) { createSwDoc("ooo96040-2.odt"); + + //FIXME: validation error in OOXML export: Errors: 3 + skipValidation(); + save(TestFilter::DOCX); parseExport(u"word/document.xml"_ustr); @@ -467,6 +494,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFDO77812) CPPUNIT_TEST_FIXTURE(Test, testContentTypeOLE) { createSwDoc("fdo77759.docx"); + + //FIXME: validation error in OOXML export: Errors: 2 + skipValidation(); + save(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"[Content_Types].xml"_ustr); @@ -492,6 +523,10 @@ CPPUNIT_TEST_FIXTURE(Test, testContentTypeOLE) CPPUNIT_TEST_FIXTURE(Test, testfdo78420) { createSwDoc("fdo78420.docx"); + + //FIXME: validation error in OOXML export: Errors: 10 + skipValidation(); + save(TestFilter::DOCX); xmlDocUniquePtr pXmlHeader = parseExport(u"word/header2.xml"_ustr); @@ -620,6 +655,10 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo79540) CPPUNIT_TEST_FIXTURE(Test, testFDO79062) { createSwDoc("fdo79062.docx"); + + //FIXME: validation error in OOXML export: Errors: 2 + skipValidation(); + save(TestFilter::DOCX); xmlDocUniquePtr pXmlFootNotes = parseExport(u"word/footnotes.xml"_ustr); assertXPath(pXmlFootNotes, "/w:footnotes", "Ignorable", u"w14 wp14 w15"); @@ -667,6 +706,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123262_textFootnoteSeparators, "tdf123262_textFo CPPUNIT_TEST_FIXTURE(Test, testfdo79668) { createSwDoc("fdo79668.docx"); + + //FIXME: validation error in OOXML export: Errors: 12 + skipValidation(); + saveAndReload(TestFilter::DOCX); // fdo#79668: Document was Crashing on DebugUtil build while Saving // because of repeated attribute value in same element. @@ -730,6 +773,10 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo79817) CPPUNIT_TEST_FIXTURE(Test, testfdo79968_sldx) { createSwDoc("fdo79968.docx"); + + //FIXME: validation error in OOXML export: Errors: 2 + skipValidation(); + save(TestFilter::DOCX); // This UT for DOCX embedded with powerpoint slide xmlDocUniquePtr pXmlDoc = parseExport(u"[Content_Types].xml"_ustr); commit eff3c65555392e08fcfb35c7c6ebea716f722862 Author: Xisco Fauli <[email protected]> AuthorDate: Fri Nov 21 13:56:07 2025 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Nov 21 22:33:24 2025 +0100 sw_ooxmlexport7: do not skip DOCX export validation Change-Id: I619428847dda6dc8269195efd2d66f0c0e785cfd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194325 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx index 0b37bb335116..564b0a5fe2c9 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx @@ -28,7 +28,7 @@ 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) {} protected: // We import OOXML's EMUs into integral mm100 internal representation, then export back into @@ -167,6 +167,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf104539) CPPUNIT_TEST_FIXTURE(Test, testShapeEffectPreservation) { createSwDoc("shape-effect-preservation.docx"); + + //FIXME: validation error in OOXML export: Errors: 7 + skipValidation(); + save(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -303,6 +307,10 @@ CPPUNIT_TEST_FIXTURE(Test, testShapeEffectPreservation) CPPUNIT_TEST_FIXTURE(Test, testShape3DEffectPreservation) { createSwDoc("shape-3d-effect-preservation.docx"); + + //FIXME: validation error in OOXML export: Errors: 4 + skipValidation(); + save(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -662,6 +670,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf77219_backgroundShape, "tdf77219_backgroundShape DECLARE_OOXMLEXPORT_TEST(testTdf126533_axialAngle, "tdf126533_axialAngle.docx") { + //FIXME: validation error in OOXML export: Errors: 1 + skipValidation(); + // axial gradient is purple foreground/lime background in the middle (top-left to bottom-right) uno::Reference<beans::XPropertySet> xPageStyle(getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY); @@ -677,6 +688,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf126533_axialAngle, "tdf126533_axialAngle.docx") DECLARE_OOXMLEXPORT_TEST(testTdf126533_axialAngle2, "tdf126533_axialAngle2.docx") { + //FIXME: validation error in OOXML export: Errors: 1 + skipValidation(); + // axial gradient is purple foreground/lime background in the middle (top-right to bottom-left) uno::Reference<beans::XPropertySet> xPageStyle(getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY); @@ -739,6 +753,10 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtAndShapeOverlapping) CPPUNIT_TEST_FIXTURE(Test, testLockedCanvas) { createSwDoc("fdo78658.docx"); + + //FIXME: validation error in OOXML export: Errors: 40 + skipValidation(); + save(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // Checking for lockedCanvas tag @@ -786,6 +804,10 @@ CPPUNIT_TEST_FIXTURE(Test, testAbsolutePositionOffsetValue) CPPUNIT_TEST_FIXTURE(Test, testRubyHyperlink) { createSwDoc("rubyhyperlink.fodt"); + + //FIXME: validation error in OOXML export: Errors: 4 + skipValidation(); + saveAndReload(TestFilter::DOCX); // test that export doesn't assert with overlapping ruby / hyperlink attr } @@ -922,6 +944,9 @@ CPPUNIT_TEST_FIXTURE(Test, testCommentInitials) DECLARE_OOXMLEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.docx") { + //FIXME: validation error in OOXML export: Errors: 1 + skipValidation(); + uno::Reference<drawing::XShape> xShape = getShape(1); comphelper::SequenceAsHashMap aCustomShapeGeometry(getProperty< uno::Sequence<beans::PropertyValue> >(xShape, u"CustomShapeGeometry"_ustr)); @@ -975,6 +1000,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo80894) CPPUNIT_TEST_FIXTURE(Test, testfdo80895) { createSwDoc("fdo80895.docx"); + + //FIXME: validation error in OOXML export: Errors: 2 + skipValidation(); + save(TestFilter::DOCX); // DML shapes in header and footer were not getting rendered in LO and the same were not preserved after RT. // In actual there was a shape but because of fetching wrong theme for header.xml or footer.xml @@ -993,6 +1022,10 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo80895) CPPUNIT_TEST_FIXTURE(Test, testTdf118242) { createSwDoc("tdf118242.odt"); + + //FIXME: validation error in OOXML export: Errors: 1 + skipValidation(); + save(TestFilter::DOCX); CPPUNIT_ASSERT_EQUAL(3, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages());
