Open DOCX attachment 117142 [details] from bug 92642 and see that header from 2nd page (Header - Section 2) is shown also on 1st page.
This docx is compatible mode, but same is if resaved in MSO.
We have a few inherited bugs with header sections but this one looked good in LO 4.0 so I'll mark regression from 4.2.
Attachment 157392 [details] is comparison between Word 2013 and Libreoffice 6.5+.
Actually, even in LO 4.0 header wasn't correct, it just wasn't shown on 1st page.
Actually, even in LO 4.0 header wasn't correct, it just wasn't shown on 1st page. So I won't set regression. But bibisect would still be useful.
I confirm it with
Version: 22.214.171.124.alpha0+ (x64)
Build ID: 350d25da375f221edfa37309324ce3c68cf297ef
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: default; VCL: win;
Locale: de-DE (de_DE); UI-Language: en-GB
To be precixe, it's not the whole header but only the image "Picture 3" from the header, that appears as "Piture 2" on page one. Text Box 1 "Page 2" from header on second page doesn't appear in first page header.
This started with the following commit, bibisected using repo bibisect-42max. Note that the document has a continuous section break on the first page, which is unsupported in Writer, therefore complete compatibility is unlikely, but perhaps it can be improved. Adding CC: to Miklos Vajna.
author Adam Co <email@example.com> 2013-06-12 15:06:42 +0300
committer Miklos Vajna <firstname.lastname@example.org> 2013-06-19 14:31:38 +0200
fdo#64238: fix for missing footer bug
Issue also seen in DOCX attachment 153533 [details] from bug 127052, per Aron's bibisect.
Seems like author is not active from 2013. I'll be free to add here Miklos, who is committer and Justin, who tracks a lot of similar issues.
For "Letterhead-wrong-import-in-LO.docx", the second header's image appears to be imported into the body of the message. (When you delete the header, it doesn't disappear from the first page.)
The same idea is true for the header in "image in header.docx", which doesn't have a continuous section. So the good news is that this doesn't seem to be related to continuous sections. But what is different about these documents compared to other headers/footers containing images? (valid and invalid use of the same image?)
There are other commits indicating that m_bDiscardHeader didn't discard enough.
git log -p -w 5510f5635021
git log -p -w da0c3b50c7969
Proposed fix at https://gerrit.libreoffice.org/c/core/+/87909
Justin Luth committed a patch related to this issue.
It has been pushed to "master":
tdf#130167 writerfilter: while bDiscardHeaderFooter, ignore inlines
It will be available in 7.0.0.
The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Looks good. Thanks Justin.
*** Bug 127052 has been marked as a duplicate of this bug. ***