sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 35 ++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-)
New commits: commit 815bc7a6931cd4fc3c9ea9b0b26cab50318856d4 Author: Xisco Fauli <[email protected]> AuthorDate: Fri Nov 21 14:29:41 2025 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Nov 21 23:00:18 2025 +0100 sw_ooxmlexport11: do not skip DOCX export validation Change-Id: Iad2af8d526705dae401289b9b3cb1506e17b7887 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194330 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 9066053c9f6d..4f23f1127db9 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -31,11 +31,14 @@ 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) {} }; DECLARE_OOXMLEXPORT_TEST(testTdf57589_hashColor, "tdf57589_hashColor.docx") { + // FIXME: validation error in OOXML export: Errors: 51 + skipValidation(); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(getParagraph(1), u"FillStyle"_ustr)); CPPUNIT_ASSERT_EQUAL(COL_LIGHTMAGENTA, getProperty<Color>(getParagraph(1), u"ParaBackColor"_ustr)); CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(getParagraph(2), u"FillStyle"_ustr)); @@ -85,6 +88,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf92524_autoColor) CPPUNIT_TEST_FIXTURE(Test, testTdf116436_rowFill) { createSwDoc("tdf116436_rowFill.odt"); + + // FIXME: validation error in OOXML export: Errors: 8 + skipValidation(); + saveAndReload(TestFilter::DOCX); CPPUNIT_ASSERT_EQUAL(1, getPages()); uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY); @@ -177,6 +184,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121561_tocTitle) CPPUNIT_TEST_FIXTURE(Test, testTdf129525) { createSwDoc("tdf129525.rtf"); + + // FIXME: validation error in OOXML export: Errors: 1 + skipValidation(); + save(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[4]/w:t", u"Overview"); @@ -352,6 +363,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf117988, "tdf117988.docx") DECLARE_OOXMLEXPORT_TEST(testTdf94801, "tdf94801.docx") { + // FIXME: validation error in OOXML export: Errors: 81 + skipValidation(); + // This was a 2-page document with unwanted line breaking in table cells, because // the table was narrower, than defined (< 1/100 mm loss during twip to 1/100 mm conversion) CPPUNIT_ASSERT_EQUAL(1, getPages()); @@ -381,6 +395,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf44832_testSectionWithDifferentHeader) DECLARE_OOXMLEXPORT_TEST(testSignatureLineShape, "signature-line-all-props-set.docx") { + // FIXME: validation error in OOXML export: Errors: 1 + skipValidation(); + uno::Reference<drawing::XShape> xSignatureLineShape = getShape(1); uno::Reference<beans::XPropertySet> xPropSet(xSignatureLineShape, uno::UNO_QUERY); @@ -522,6 +539,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf114703, "tdf114703.docx") DECLARE_OOXMLEXPORT_TEST(testTdf113258, "tdf113258.docx") { + // FIXME: validation error in OOXML export: Errors: 1 + skipValidation(); + uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY); // This was 494, i.e. automatic spacing resulted in non-zero paragraph top // margin for the first paragraph in a shape. @@ -531,6 +551,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113258, "tdf113258.docx") DECLARE_OOXMLEXPORT_TEST(testTdf113258_noBeforeAutospacing, "tdf113258_noBeforeAutospacing.docx") { + // FIXME: validation error in OOXML export: Errors: 1 + skipValidation(); + uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY); // This was 0, i.e. disabled automatic spacing still resulted in zero paragraph // top margin for the first paragraph in a shape. @@ -594,6 +617,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104354_firstParaInSection, "tdf104354_firstParaI CPPUNIT_TEST_FIXTURE(Test, testPageBreak_after) { createSwDoc("pageBreak_after.odt"); + + // FIXME: validation error in OOXML export: Errors: 4 + skipValidation(); + saveAndReload(TestFilter::DOCX); // The problem was that the page breakAfter put the empty page BEFORE the table xmlDocUniquePtr pDump = parseLayoutDump(); @@ -763,6 +790,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116801, "tdf116801.docx") DECLARE_OOXMLEXPORT_TEST(testTdf107969, "tdf107969.docx") { + // FIXME: validation error in OOXML export: Errors: 2 + skipValidation(); + // A VML object in a footnote's tracked changes caused write past end of document.xml at export to docx. // After that, importing after export failed with // SAXParseException: '[word/document.xml line 2]: Extra content at the end of the document', Stream 'word/document.xml'. @@ -775,6 +805,9 @@ DECLARE_OOXMLEXPORT_TEST(testOpenDocumentAsReadOnly, "open-as-read-only.docx") DECLARE_OOXMLEXPORT_TEST(testNoDefault, "noDefault.docx") { + // FIXME: validation error in OOXML export: Errors: 7 + 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);
