starmath/source/ooxmlexport.cxx | 16 ++++++++++++---- sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 6 ------ 2 files changed, 12 insertions(+), 10 deletions(-)
New commits: commit 5305a227cbdbbddbd56a3f99838c6729631485e7 Author: Noel Grandin <[email protected]> AuthorDate: Thu Jan 8 16:40:11 2026 +0200 Commit: Adolfo Jayme Barrientos <[email protected]> CommitDate: Sun Jan 11 00:44:08 2026 +0100 officeotron: m:e element under m:d is required Change-Id: I4a0a8e25163565446845baffe6eb5a5556f2abb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196853 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins (cherry picked from commit 11642917f6234c02e741c27cd1d5f0d0d0f6206b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196967 Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx index 2956dd9a8142..d0cc15237959 100644 --- a/starmath/source/ooxmlexport.cxx +++ b/starmath/source/ooxmlexport.cxx @@ -536,11 +536,19 @@ void SmOoxmlExport::HandleBrace( const SmBraceNode* pNode, int nLevel ) FSNS( XML_m, XML_val ), mathSymbolToString(pNode->ClosingBrace()) ); m_pSerializer->endElementNS( XML_m, XML_dPr ); - for(const SmNode* subnode : subnodes) + if (subnodes.empty()) { - m_pSerializer->startElementNS(XML_m, XML_e); - HandleNode( subnode, nLevel + 1 ); - m_pSerializer->endElementNS( XML_m, XML_e ); + // e element is required + m_pSerializer->singleElementNS(XML_m, XML_e); + } + else + { + for(const SmNode* subnode : subnodes) + { + m_pSerializer->startElementNS(XML_m, XML_e); + HandleNode( subnode, nLevel + 1 ); + m_pSerializer->endElementNS( XML_m, XML_e ); + } } m_pSerializer->endElementNS( XML_m, XML_d ); } diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx index 1be442124c76..089150d11c78 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -718,9 +718,6 @@ CPPUNIT_TEST_FIXTURE(Test, test_OpeningBrace) { createSwDoc("2120112713_OpenBrace.docx"); - //FIXME: validation error in OOXML export: Errors: 2 - skipValidation(); - save(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // Checking for OpeningBrace tag @@ -979,9 +976,6 @@ CPPUNIT_TEST_FIXTURE(Test, test_ClosingBrace) { createSwDoc("2120112713.docx"); - //FIXME: validation error in OOXML export: Errors: 1 - skipValidation(); - save(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // Checking for ClosingBrace tag
