starmath/source/ooxmlexport.cxx | 16 ++++++++++++---- sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 6 ------ 2 files changed, 12 insertions(+), 10 deletions(-)
New commits: commit 11642917f6234c02e741c27cd1d5f0d0d0f6206b Author: Noel Grandin <[email protected]> AuthorDate: Thu Jan 8 16:40:11 2026 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sat Jan 10 12:13:00 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 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 ef2a3618cfa2..ea570064eb17 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -733,9 +733,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 @@ -994,9 +991,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
