sw/source/filter/ww8/docxattributeoutput.cxx |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 376394b5748ad9e709325b55102aa74d9bbb3fb2
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Jan 14 13:23:43 2026 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Tue Jan 20 11:12:21 2026 +0100

    officeotron: duplicate w:framePr under w:pPr
    
    we have duplicate data here
    
    <w:pPr>
        <w:pStyle w:val="Normal"/>
        <w:framePr w:hRule="exact" w:h="23" ...
        <w:framePr w:w="9923" w:h="910" w:y="568" ...
    
    Seems like the w:framePr has more useful info, so suppress the first 
framePr in this case.
    
    Change-Id: I7dfd7ced352b773c63a31e04f9ab0cdc82743942
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197287
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>
    Signed-off-by: Xisco Fauli <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197428
    Signed-off-by: Xisco Fauli <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197595

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index d2ec43dd66fc..a3b581ffd0f8 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1628,17 +1628,23 @@ void DocxAttributeOutput::EndParagraphProperties(const 
SfxItemSet& rParagraphMar
         WriteCollectedParagraphProperties();
     Redline( pRedlineData );
 
-    WriteCollectedParagraphProperties();
-
-    // Write w:framePr
     if (!m_bWritingHeaderFooter && m_aFramePr.Frame())
     {
+        // write the collected paragraph properties __without__ the <framePr> 
element
+        m_rExport.SdrExporter().getFlyAttrList().clear();
+        WriteCollectedParagraphProperties();
+
+        // Write w:framePr
         const SwFrameFormat& rFrameFormat = 
m_aFramePr.Frame()->GetFrameFormat();
         assert(SwTextBoxHelper::TextBoxIsFramePr(rFrameFormat) && "by 
definition, because Frame()");
 
         const Size aSize = m_aFramePr.Frame()->GetSize();
         PopulateFrameProperties(&rFrameFormat, aSize);
     }
+    else
+    {
+        WriteCollectedParagraphProperties();
+    }
 
     // Write 'Paragraph Mark' properties
     m_pSerializer->startElementNS(XML_w, XML_rPr);

Reply via email to