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 <michael.stahl@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Noel Grandin
2026-01-10 12:13:00 +01:00
parent f0ba64a3df
commit 11642917f6
2 changed files with 12 additions and 10 deletions
+12 -4
View File
@@ -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 );
}
@@ -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