This is just re-opening LO 7.2 bug 135217. The unit test for it (writerfilter/dmapper/follow-page-top-margin.docx) was changed to be a 1.25cm margin instead of a very minimal 0.25cm margin, in order to allow a patch to be merged. This is due to fundamental header/footer differences between MSO and LO. Now that we don't use two page styles for first/follow, we have lost the ability to emulate an enabled first header and disabled follow header. margin.docx (attachment 154527 [details]): has a 0.25cm top page margin set with some header contents on the first page and no header contents on the second. So the first page is supposed to apply the "header from top" value of 1.25cm, while the second page is supposed to ignore all that and just use the page margin settings. attachment 163682 [details]: Screenshot of the margin.docx side by side in Word and Writer The 24.2 regression comes from author Tomaž Vajngerl on 2023-12-01 08:26:38 with commit 4b0fa253a4540f5461397815d290586f9ddabe61 tdf#136472 adjust ooxml import to handle first header/footer https://gerrit.libreoffice.org/c/core/+/157860
I have worked a bit for this issue: https://gerrit.libreoffice.org/c/core/+/163884 The problem is that in MSO if the header/footer is empty it takes 0 space, but not in LO. My changes implements the MSO behavior, but that would need to be made an option, so we can turn it only when necessary to not break existing documents (either ooxml or odf).
Again this is something that just made an existing bug more visible, but it already existed before. For example - a left page header would also necessarily enable a right page header even if the right page would be empty it would still take up space. We minimized the consequences of this to the document format by setting a near 0 font size to the right page header on import, but that's not a proper solution obviously.
This is the same problem as various other of tdf#136472's disabled tests -tdf127778 is the same file as margins.docx -n779642.docx (same file as TestFirstFooterDisabled.docx, can't open in mso2010) -fdo44176.rtf (not interesting: default margin is larger than "header from top") -tdf112694.docx (also not interesting in the same way)