sw/source/filter/ww8/docxattributeoutput.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit 2fa6971894de674c97e2f05beb7c0000394a3505 Author: Noel Grandin <[email protected]> AuthorDate: Tue Nov 4 13:19:38 2025 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Wed Nov 5 14:51:52 2025 +0100 mso-test: duplicate w:sz This is using the test document from tdf120515-1.odt. When importing and exporting to DOCX, we generate duplicate w:sz because we call WriteCollectedRunProperties() twice from EndRunProperties(), but we were not clearing m_oFontSize like we clear all the other accumulated data. Change-Id: I1397606cd1f374e395f29a479eff860c3ebe75b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193397 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 6ed38924da86..ea532b104018 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3609,7 +3609,10 @@ void DocxAttributeOutput::WriteCollectedRunProperties() } if ( m_oFontSize ) + { m_pSerializer->singleElementNS(XML_w, XML_sz, FSNS(XML_w, XML_val), OString::number(*m_oFontSize)); + m_oFontSize.reset(); + } if ( m_pColorAttrList.is() ) {
