sw/source/filter/ww8/docxattributeoutput.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit 9e6271ae0979d7c8aa97704a92a7c4dfd60d7b28 Author: Noel Grandin <[email protected]> AuthorDate: Thu Jan 15 14:36:41 2026 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Jan 20 16:39:23 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]> (cherry picked from commit 821e808610a9710d4875bff65604f34aacf4a29c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197590 Reviewed-by: Xisco Fauli <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197647 diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 77f1bc7a3e6b..a18eb6802ef7 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7085,6 +7085,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:
