Created attachment 198301 [details] forum-mso-de-124831.docx: compat15: Heading1 paragraphs should honour the top margin in this document Page 4's title "3 Zweites Kapitel" should be 0.85cm from the top of the header. (So should "2 Erstes Kapitel", but that is an earlier bug.) The specified top margin is now ignored in 24.2.4. It started with 24.8 commit 6200d89b905d51776ff4f3c8a84f338655ffaa7f Author: Miklos Vajna on Tue May 7 08:13:37 2024 +0200 tdf#160952 sw: ignore top margin of para on non-first pages with newer DOCX Steps to reproduce: 1.) Open forum-mso-de-124831.docx and go to page 4. Note that there isn't really any margin above the heading. In comparison with MS Word 2019, the gap in LO from the line in the header is not large enough. I suspect that when there is a style's <w:pageBreakBefore/> then it should be treated similar to section break? (or else there must be some other kind of layout setting...) (That's the difference with point #2. That one has a w:br page break AS WELL AS thie pageBreakBefore. There is no w:br before point #3.) --------------------------------------------- Note: the problem with "2 Erstes Kapital" started in 7.6 with commit 96a502b3756a1c100b40235f50ef2122d5b543f9 Author: Justin Luth on Tue Mar 7 07:43:14 2023 -0500 tdf#153964 writerfilter compat15: top margin after break split
Created attachment 198302 [details] forum-mso-de-124831.docx_mso.pdf: how it looks in Word 2019
Confirm Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: cac9c7db6257b27724d90d4a355e52e456ef7e08 CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: x11 Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US Calc: threaded
Hmm, need to find a way that fixes this bug, while it keeps bug 160952 and bug 164095 fixed.
(In reply to Justin L from comment #0) > I suspect that when there is a style's > <w:pageBreakBefore/> From my understanding, w:br (as a character-ish break) means that since the paragraph has already started on the first page, the "top" paragraph properties have already been applied on page 1, and therefore are not repeated on page 2. [Note that for <= compat14 this is only true if w:br is NOT the first character property. But thankfully bug 153964 seems to indicate that compat15 treats w:br consistently.] So then IIUC, a paragraph pageBreakBefore would override the paragraph-starting w:br - forcing the ENTIRE paragraph onto the next page, and thus applying the "top" properties to page 2.
Interesting, so far I have a completely different analysis. :-) It seems to me that the lack of top margin is correct; what's wrong is the floating table in the header. Looking at Word, the floating table is wrapper around by the empty paragraph, so the empty paragraph takes extra space below the floating table in the header, leading to extra spacing. Writer has the floating table and the normal header content overlapping, so the header takes less space, leading to a mismatch. I'll attach Word and Writer screenshots. If my analysis is correct, then the above commit just uncovered an already existing problem and this should be an implementation error from the floating table feature. What do you think?
Created attachment 198409 [details] Word 2021 UI rendering, empty para and floating table in header doesn't overlap
Created attachment 198410 [details] Writer UI rendering, empty para and floating table in header overlaps
Created attachment 198474 [details] 164498_noHeader.docx - minimized (compat15) (In reply to Miklos Vajna from comment #5) > If my analysis is correct, ... What do you think? It appears I must be wrong. When I load this minimized version into Word 2019, all the text starts at the top of the page. (When I load it into Word 2010, then the text starts in the middle-ish of the page.) So your comment 0 patch fixed the third page for this document (and doesn't break a compat14 version).
Created attachment 198479 [details] 164498_compat15.docx: minimal version (containing the header)
Created attachment 198480 [details] 164498_compat15.docx_import-2.png: page 3 - Word 2019 is red, after comment0's patch is black
Created attachment 198481 [details] 164498_compat15.docx_prev-import-2.png: page 3 - Word 2019 is red, before comment0's patch is black
(In reply to Miklos Vajna from comment #5) > then the above commit just uncovered an already existing problem Yes. As the above (exaggerated) minimal example shows, it wasn't correct before your comment 0 patch either.
(In reply to Justin L from comment #0) Note: the problem with "2 Erstes Kapital" started in 7.6 with > tdf#153964 writerfilter compat15: top margin after break split Yay, that means that this commit is correct after all...
(In reply to Miklos Vajna from comment #5) > Interesting, so far I have a completely different analysis. :-) > > Looking at Word, the floating table is wrapped > around by the empty paragraph, so the empty paragraph takes extra space > below the floating table in the header, leading to extra spacing. So then it is just a duplicate of bug 104254 image in header overlaps header text in compat15 mode *** This bug has been marked as a duplicate of bug 104254 ***