Bug 165047 - LAYOUT: top margin after changing page style should be "reduced" by the "shared" amount below the previous paragraph
Summary: LAYOUT: top margin after changing page style should be "reduced" by the "shar...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx
Depends on:
Blocks: DOCX-Paragraph
  Show dependency treegraph
 
Reported: 2025-02-04 20:39 UTC by Justin L
Modified: 2025-02-04 22:35 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
forum-mso-en-16581B_compat15.docx: example document that seems focused on Heading after page break (27.33 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-02-04 20:39 UTC, Justin L
Details
forum-mso-en-16581B_compat15.zip: RED=comment 0 commit, BLUE=the prior commit, grayscale=Word 2019 (119.15 KB, application/zip)
2025-02-04 20:41 UTC, Justin L
Details
165047_topMarginAfterPageBreak.doc (22.50 KB, application/msword)
2025-02-04 22:23 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2025-02-04 20:39:45 UTC
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.
Comment 1 Justin L 2025-02-04 20:41:05 UTC
Created attachment 198980 [details]
forum-mso-en-16581B_compat15.zip: RED=comment 0 commit, BLUE=the prior commit, grayscale=Word 2019
Comment 2 Justin L 2025-02-04 22:23:24 UTC
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.
Comment 3 Justin L 2025-02-04 22:35:38 UTC
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.