https://bugs.documentfoundation.org/show_bug.cgi?id=167657
Bug ID: 167657
Summary: FILEOPEN DOCX: Don't copy continuous section break
bottom spacing to previous paragraph
Product: LibreOffice
Version: 25.2.4.3 release
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: bisected, regression
Severity: normal
Priority: medium
Component: Writer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Blocks: 107830
Created attachment 201966
--> https://bugs.documentfoundation.org/attachment.cgi?id=201966&action=edit
sectPr_belowSpacing_simple.docx: example document with a continuous section
break
The problem is that the bottom spacing is lost after a continuous section
break.
It started with 25.8 commit 5ff1fd13f1879105ecc0541c55f30cea32ae54f4
Author: Justin Luth on Fri May 16 11:43:06 2025 -0400
tdf#166510 writerfilter: move empty sectPr bottom margin to prev para
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185424
which was backported to 25.2.4.
For section-PAGE breaks, the bottom spacing isn't seen since it is the last
content on the page, so it doesn't hurt to clear the bottom spacing. But for
section-CONTINUOUS breaks, the bottom spacing of the previous paragraph ALWAYS
applies. In fact, it does NOT consolidate with the top spacing of the following
paragraph. The top spacing consolidates with the CONTINUOUS break, but there is
no layout implication of the CONTINUOUS break's bottom (or top) spacing by
itself.
The problem is that at the sectPr talks about the section that has JUST
FINISHED. So we can only know about how that section STARTED. (Things are
confusing because MS Word labels that point as "continuous" or "next page", but
that is not referring to THIS sectPr that just finished, but the next one -
which we won't learn about until much, much later.)
So, we either need to do some extreme hackery and keep a pointer to this and
process it much later when the section ends (to see if it is a real page break
or not), or else we need to adjust the next paragraph's bottom margin to
achieve the desired result. Both options are rather desperate... (remember,
these are layout-time considerations that need to have roundtrip-able results).
Steps to reproduce:
-open sectPr_belowSpacing_simple.docx
As the document itself tells you, the second paragraph should be vertically
centered.
Referenced Bugs:
https://bugs.documentfoundation.org/show_bug.cgi?id=107830
[Bug 107830] [META] DOCX (OOXML) paragraph-related issues
--
You are receiving this mail because:
You are the assignee for the bug.