sw/qa/extras/ooxmlexport/ooxmlexport15.cxx | 35 ++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-)
New commits: commit cef295be5804c228349bbe91c99af9b68f2f6f58 Author: Xisco Fauli <[email protected]> AuthorDate: Fri Nov 21 15:41:06 2025 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Nov 21 21:05:01 2025 +0100 sw_ooxmlexport15: do not skip DOCX export validation Change-Id: I64c8ce26f38959b01cd742c10d2a83a2be63ea71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194336 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx index 1886365dd0d5..1db5d94ef6af 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx @@ -24,7 +24,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) {} }; CPPUNIT_TEST_FIXTURE(Test, testTdf123621) @@ -40,6 +40,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123621) CPPUNIT_TEST_FIXTURE(Test, testTdf131540) { createSwDoc("tdf131540.odt"); + + //FIXME: validation error in OOXML export: Errors: 4 + skipValidation(); + saveAndReload(TestFilter::DOCX); CPPUNIT_ASSERT_EQUAL(2, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); @@ -656,6 +660,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf135343_columnSectionBreak_c14v2, "tdf135343_colu DECLARE_OOXMLEXPORT_TEST(testTdf135343_columnSectionBreak_c12v3, "tdf135343_columnSectionBreak_c12v3.docx") { + //FIXME: validation error in OOXML export: Errors: 1 + skipValidation(); + // In this Word 20-3 v3, section one and two have different number of columns. It acts like a page break. uno::Reference<beans::XPropertySet> xTextSection = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(1, u"Four columns,"_ustr), u"TextSection"_ustr); uno::Reference<text::XTextColumns> xTextColumns = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, u"TextColumns"_ustr); @@ -669,6 +676,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf135343_columnSectionBreak_c12v3, "tdf135343_colu DECLARE_OOXMLEXPORT_TEST(testTdf135343_columnSectionBreak_c15, "tdf135343_columnSectionBreak_c15.docx") { + //FIXME: validation error in OOXML export: Errors: 1 + skipValidation(); + // Word 2013+ version - nextColumn breaks inside column sections are always handled like nextPage breaks. uno::Reference<beans::XPropertySet> xTextSection = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(12, u"RTL 2"_ustr), u"TextSection"_ustr); uno::Reference<text::XTextColumns> xTextColumns = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, u"TextColumns"_ustr); @@ -826,6 +836,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf131561_necessaryBorder, "tdf131561_necessaryBord CPPUNIT_TEST_FIXTURE(Test, testTdf135655) { createSwDoc("tdf135655.odt"); + + //FIXME: validation error in OOXML export: Errors: 2 + skipValidation(); + save(TestFilter::DOCX); const xmlDocUniquePtr pExpDoc = parseExport(u"word/document.xml"_ustr); const OUString sXFillColVal = getXPath(pExpDoc, "/w:document/w:body/w:p/w:r/w:object/v:shape", "fillcolor"); @@ -933,6 +947,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf138345_numberingHighlight) DECLARE_OOXMLEXPORT_TEST(testTdf134063, "tdf134063.docx") { + //FIXME: validation error in OOXML export: Errors: 8 + skipValidation(); + CPPUNIT_ASSERT_EQUAL(2, getPages()); xmlDocUniquePtr pDump = parseLayoutDump(); @@ -945,6 +962,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf134063, "tdf134063.docx") DECLARE_OOXMLEXPORT_TEST(TestTdf135653, "tdf135653.docx") { + //FIXME: validation error in OOXML export: Errors: 2 + skipValidation(); + uno::Reference<beans::XPropertySet> xOLEProps(getShape(1), uno::UNO_QUERY_THROW); drawing::FillStyle nFillStyle = static_cast<drawing::FillStyle>(-1); xOLEProps->getPropertyValue(u"FillStyle"_ustr) >>= nFillStyle; @@ -962,6 +982,9 @@ DECLARE_OOXMLEXPORT_TEST(TestTdf135653, "tdf135653.docx") DECLARE_OOXMLEXPORT_TEST(testTdf135665, "tdf135665.docx") { + //FIXME: validation error in OOXML export: Errors: 4 + skipValidation(); + uno::Reference<beans::XPropertySet> xOLEProps1(getShape(1), uno::UNO_QUERY_THROW); uno::Reference<beans::XPropertySet> xOLEProps2(getShape(2), uno::UNO_QUERY_THROW); bool bSurroundContour1 = false; @@ -1037,6 +1060,9 @@ CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorHeightFromBottomMarginHasFooter) DECLARE_OOXMLEXPORT_TEST(TestTdf132483, "tdf132483.docx") { + //FIXME: validation error in OOXML export: Errors: 2 + skipValidation(); + uno::Reference<beans::XPropertySet> xOLEProps(getShape(1), uno::UNO_QUERY_THROW); sal_Int16 nVRelPos = -1; sal_Int16 nHRelPos = -1; @@ -1084,6 +1110,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133702) CPPUNIT_TEST_FIXTURE(Test, testTdf135667) { createSwDoc("tdf135667.odt"); + + //FIXME: validation error in OOXML export: Errors: 2 + skipValidation(); + save(TestFilter::DOCX); xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr); @@ -1126,6 +1156,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf137295) DECLARE_OOXMLEXPORT_TEST(testTdf135660, "tdf135660.docx") { + //FIXME: validation error in OOXML export: Errors: 2 + skipValidation(); + CPPUNIT_ASSERT_EQUAL(1, getShapes()); const uno::Reference<drawing::XShape> xShape = getShape(1); const uno::Reference<beans::XPropertySet> xOLEProps(xShape, uno::UNO_QUERY_THROW);
