Created attachment 198979 [details] forum-mso-en-16581B_compat15.docx: example document that seems focused on Heading after page break Starting in 25.8 (backported to 24.8.5), some top-margins-after-page-breaks are taller than they are in Word 2019. In one sense, this looks like the perfect example document. No headers to complicate things. The first page still looks perfect, suggesting no underlying issues with header size, page size, etc. In the other sense, I do see Word 2019 being affected by changing the ULSpacing. However, changing the spacing using values less than 10pt seem to do nothing / little, while values 12 and higher seem to work as vmiklos' commit expects. So why the discrepancy? I've seen MANY document affected by this commit of course, and it is really hard to determine whether the commit is always just exposing something else (very possible), or whether there actually are additional factors coming into play. This document seems like one of the better ones to find "additional factors". It isn't easy to make any "steps to reproduce" because it has to do with comparative space. I'll attach overlay comparison images to illustrate. This started with 25.8 commit ae7900dd42a65aaf60df6b21b9ad511496b209d9 Author: Miklos Vajna on Fri Dec 6 14:09:28 2024 +0100 tdf#164095 sw: fix missing top margin on paragraph after changing page style Found by Collabora's mso-test Another possible example is LibreOffice - DRN V09 Reloaded.docx (attachment 135880 [details] from bug 99970) - "Índice" on page 3.
Created attachment 198980 [details] forum-mso-en-16581B_compat15.zip: RED=comment 0 commit, BLUE=the prior commit, grayscale=Word 2019
Created attachment 198983 [details] 165047_topMarginAfterPageBreak.doc Amazingly enough, it seems like the top spacing depends on the bottom spacing from the paragraph containing the section break. This is something that has never worked.
Based on comment 3, the steps to reproduce are really easy 1.) Open 165047_topMarginAfterPageBreak.doc. Look at page 2. There should not be any significant gap between the header and the first line of text. If you do the same in MS Word, you can see the gap appear if you change page 1's paragraph to have a zero spacing below the paragraph.
Since comment 2's example is in DOC format, it always returns SwFrame::IsCollapseUpper() as false, so comment 0's patch doesn't have any effect on DOC files. This is the proof that it is not a true regression - this has never worked properly. Re-affirmed that OOo 3.3 acts the same way as 25.8 master.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9a8eb2dc17435d290f482070dd5f20f538b5b68b tdf#165047 sw mso-compat layout: always consolidate top margin It will be available in 25.8.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: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/74f67cd1c3ef1bb38bf3de6b3a888d9c94227957 tdf#165047 sw mso-compat layout: always honour contextualSpacing It will be available in 25.8.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: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-25-2": https://git.libreoffice.org/core/commit/395c4f07a61bf607f3283d7a75be93c95a3571d7 tdf#165047 sw mso-compat layout: always consolidate top margin It will be available in 25.2.3. 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: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-25-2": https://git.libreoffice.org/core/commit/be07e6e8bef7f594494a866e36e972a379aa0513 tdf#165047 sw mso-compat layout: always honour contextualSpacing It will be available in 25.2.3. 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: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.