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

New commits:
commit 82ed25c9eeeef5551388d8171f13f733f8d7ee66
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Oct 28 13:48:48 2025 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Mon Nov 17 11:22: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]>
    (cherry picked from commit a2cb8cd8f680c0a8b7f04162573603b4449018c5)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193235
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>
    (cherry picked from commit 25ad702447b849767446f8d59e03d3b623d7ad7f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194098
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 84162524104d..b6a4523e0905 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7944,6 +7944,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 )
@@ -7962,6 +7964,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