sw/source/filter/ww8/docxattributeoutput.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit a2cb8cd8f680c0a8b7f04162573603b4449018c5
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Oct 28 13:48:48 2025 +0200
Commit:     Miklos Vajna <[email protected]>
CommitDate: Fri Oct 31 08:11:19 2025 +0100

    mso-test: emit w:sz in correct order in numbering xml
    
    When loading and then saving the document from moz#1197332-4,
    we end up with incorrect ordering of w:sz under w:rPr in numbering.xml
    
    Re-use our existing ordering logic to get the right order here.
    
    Change-Id: I218c52d36235a023d64420c41423daf09c87a89c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193090
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 3992c06bd2bb..2ba165adf82d 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7965,6 +7965,8 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 
nLevel,
     if ( pOutSet )
     {
         m_pSerializer->startElementNS(XML_w, XML_rPr);
+        // mark() before child elements.
+        InitCollectedRunProperties();
 
         SfxItemSet aTempSet(*pOutSet);
         if ( pFont )
@@ -7983,6 +7985,9 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 
nLevel,
 
         WriteCollectedRunProperties();
 
+        // Merge the marks for the ordered elements
+        m_pSerializer->mergeTopMarks(Tag_InitCollectedRunProperties);
+
         m_pSerializer->endElementNS( XML_w, XML_rPr );
     }
 

Reply via email to