starmath/source/ooxmlexport.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
New commits: commit 3c1fee24964c17533e756941f7caf8cbb730ce5d Author: Noel Grandin <[email protected]> AuthorDate: Thu Jan 8 16:40:11 2026 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Mon Jan 12 11:46:23 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]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197077 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 ); }
