sw/qa/extras/ooxmlexport/ooxmlexport21.cxx | 3 --- sw/source/filter/ww8/docxattributeoutput.cxx | 12 +++++++++--- 2 files changed, 9 insertions(+), 6 deletions(-)
New commits: commit fca86a116dcc5c6e309a66dd47809b05ec0d2c89 Author: Noel Grandin <[email protected]> AuthorDate: Wed Jan 14 13:23:43 2026 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Jan 16 09:07:06 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]> diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx index d51b5b2456b2..97c0a3d06242 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx @@ -1302,9 +1302,6 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf164474) CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount()); } - // FIXME: validation error in OOXML export: Errors: 2 - skipValidation(); - // Test also after save-and-reload: saveAndReload(TestFilter::DOCX); { diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 551b253e6cef..f553ea9a2878 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1626,17 +1626,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);
