sw/source/filter/ww8/docxattributeoutput.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit 8278f03f9eb3bf121e138e7cd39a3c7076cdba53 Author: Noel Grandin <[email protected]> AuthorDate: Tue Nov 4 13:19:38 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Wed Nov 5 19:04:37 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]> (cherry picked from commit be8bad5cd6628d7353679045742476fa9dd66121) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193472 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index be4634efdee1..823fb1f833da 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3600,7 +3600,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() ) {
