sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 3 --- sw/source/filter/ww8/docxattributeoutput.cxx | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-)
New commits: commit 821e808610a9710d4875bff65604f34aacf4a29c Author: Noel Grandin <[email protected]> AuthorDate: Thu Jan 15 14:36:41 2026 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Jan 19 13:39:04 2026 +0100 officeotron: w:r inside w:pPr is invalid we end with the following in word/header1.xml: <w:hdr> <w:p> <w:pPr> <w:pStyle w:val="Header"/> <w:r> <w:br w:type="page"/> </w:r> <w:rPr></w:rPr> </w:pPr> restrict the fix to the case of writing header data, just in case I missed some other case somewhere. Change-Id: I451480a075c55cafd016279d229dbf0698c01265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197425 Tested-by: Jenkins Reviewed-by: Michael Stahl <[email protected]> diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 20ab9215a127..53686f34aeca 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -111,9 +111,6 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121374_sectionHF) { createSwDoc("tdf121374_sectionHF.odt"); - // FIXME: validation error in OOXML export: Errors: 1 - skipValidation(); - saveAndReload(TestFilter::DOCX); uno::Reference<beans::XPropertySet> xPageStyle(getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY); uno::Reference<text::XTextRange> xFooterText = getProperty< uno::Reference<text::XTextRange> >(xPageStyle, u"FooterText"_ustr); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 9573f086aad9..4090515df968 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7093,6 +7093,8 @@ void DocxAttributeOutput::PageBreakBefore( bool bBreak ) void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, bool bBreakAfter, const WW8_SepInfo* pSectionInfo, bool bExtraPageBreak) { + if (m_bWritingHeaderFooter && m_bOpenedParaPr) + return; // do not put a run inside <w:hdr>..<w:p>..<w:pPr> switch ( nC ) { case msword::ColumnBreak:
