sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx | 33 -------------------------- sw/source/filter/ww8/docxattributeoutput.cxx | 4 +-- 2 files changed, 2 insertions(+), 35 deletions(-)
New commits: commit 1460804ba3987f163ecb0e228785aada2819d99a Author: Noel Grandin <[email protected]> AuthorDate: Fri Nov 28 14:24:16 2025 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Mon Dec 1 17:58:41 2025 +0100 officeotron: wrong ordering of elements under sdtPr Change-Id: Ib5ffffe959d0e58c9d3566d10880cc980c8fac99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194784 Tested-by: Jenkins Reviewed-by: Michael Stahl <[email protected]> diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx index f5dab71e916b..3e8a71c7c0e1 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx @@ -360,9 +360,6 @@ CPPUNIT_TEST_FIXTURE(Test, testIndexFieldFlagF) CPPUNIT_TEST_FIXTURE(Test, testBibliography) { - // FIXME: validation error in OOXML export - skipValidation(); - createSwDoc("FDO75133.docx"); saveAndReload(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -400,9 +397,6 @@ CPPUNIT_TEST_FIXTURE(Test, test_FieldType) CPPUNIT_TEST_FIXTURE(Test, testCitation) { - // FIXME: validation error in OOXML export - skipValidation(); - createSwDoc("FDO74775.docx"); saveAndReload(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -511,9 +505,6 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtCitationRun) CPPUNIT_TEST_FIXTURE(Test, testParagraphSdt) { - // FIXME: validation error in OOXML export - skipValidation(); - createSwDoc("paragraph-sdt.docx"); saveAndReload(TestFilter::DOCX); // The problem was that the SDT was around the run only, not the whole paragraph. @@ -544,9 +535,6 @@ CPPUNIT_TEST_FIXTURE(Test, testParagraphSdt) CPPUNIT_TEST_FIXTURE(Test, testTdf158661_blockSDT) { - // FIXME: validation error in OOXML export - skipValidation(); - createSwDoc("tdf158661_blockSDT.docx"); saveAndReload(TestFilter::DOCX); uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); @@ -589,9 +577,6 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158661_blockSDT) CPPUNIT_TEST_FIXTURE(Test, testSdt2Run) { - // FIXME: validation error in OOXML export - skipValidation(); - createSwDoc("sdt-2-para.docx"); saveAndReload(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -613,9 +598,6 @@ CPPUNIT_TEST_FIXTURE(Test, test2Id) CPPUNIT_TEST_FIXTURE(Test, testTableStart2Sdt) { - // FIXME: validation error in OOXML export - skipValidation(); - createSwDoc("table-start-2-sdt.docx"); saveAndReload(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -625,9 +607,6 @@ CPPUNIT_TEST_FIXTURE(Test, testTableStart2Sdt) CPPUNIT_TEST_FIXTURE(Test, testSdtDateDuplicate) { - // FIXME: validation error in OOXML export - skipValidation(); - auto verify = [this](bool bIsExport = false) { if (bIsExport) { @@ -719,9 +698,6 @@ CPPUNIT_TEST_FIXTURE(Test, testFlyFieldmark) CPPUNIT_TEST_FIXTURE(Test, testFdo81945) { - // FIXME: validation error in OOXML export - skipValidation(); - createSwDoc("fdo81945.docx"); saveAndReload(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -731,9 +707,6 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo81945) CPPUNIT_TEST_FIXTURE(Test, testfdo82123) { - // FIXME: validation error in OOXML export - skipValidation(); - createSwDoc("fdo82123.docx"); saveAndReload(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -745,9 +718,6 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo82123) CPPUNIT_TEST_FIXTURE(Test, testSdtBeforeField) { - // FIXME: validation error in OOXML export - skipValidation(); - createSwDoc("sdt-before-field.docx"); saveAndReload(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -758,9 +728,6 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtBeforeField) CPPUNIT_TEST_FIXTURE(Test, testfdo81946) { - // FIXME: validation error in OOXML export - skipValidation(); - createSwDoc("fdo81946.docx"); saveAndReload(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/header1.xml"_ustr); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 5ad3505b978e..22406b69160a 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -778,6 +778,8 @@ void SdtBlockHelper::WriteSdtBlock(const ::sax_fastparser::FSHelperPtr& pSeriali // output sdt properties pSerializer->startElementNS(XML_w, XML_sdtPr); + WriteExtraParams(pSerializer); + if (m_nSdtPrToken > 0 && m_pTokenChildren.is()) { if (!m_pTokenAttributes.is()) @@ -806,8 +808,6 @@ void SdtBlockHelper::WriteSdtBlock(const ::sax_fastparser::FSHelperPtr& pSeriali } } - WriteExtraParams(pSerializer); - pSerializer->endElementNS(XML_w, XML_sdtPr); // sdt contents start tag
