sw/source/filter/ww8/docxattributeoutput.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f6140a360dced4fc45816bd0605089110dd6835c
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Oct 29 13:40:30 2025 +0200
Commit:     Miklos Vajna <[email protected]>
CommitDate: Fri Oct 31 10:38:51 2025 +0100

    mso-test: fix duplicate w:rFonts elements under w:rPr
    
    When loading and then saving the document from forum-mso-de-56075.docx,
    we ended up with a duplicate rFonts element.
    
    The xml looked something like:
    
    <w:numbering ...
      <w:lvl w:ilvl="0">
          ...
          <w:rPr>
              <w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Calibri" 
w:hint="default"/>
              <w:rFonts w:eastAsiaTheme="minorEastAsia"/>
          </w:rPr>
      </w:lvl>
    
    Change-Id: I958023fb0c9e40af5aec31b07628bb72b25e730e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193146
    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 664634b01107..582e52e54ca4 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7948,7 +7948,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 
nLevel,
         {
             GetExport().GetId( *pFont ); // ensure font info is written to 
fontTable.xml
             OString aFamilyName( OUStringToOString( pFont->GetFamilyName(), 
RTL_TEXTENCODING_UTF8 ) );
-            m_pSerializer->singleElementNS( XML_w, XML_rFonts,
+            AddToAttrList( m_pFontsAttrList,
                     FSNS( XML_w, XML_ascii ), aFamilyName,
                     FSNS( XML_w, XML_hAnsi ), aFamilyName,
                     FSNS( XML_w, XML_cs ), aFamilyName,

Reply via email to