https://bugs.documentfoundation.org/show_bug.cgi?id=107497

--- Comment #9 from David Vornholt <[email protected]> ---
Created attachment 209078
  --> https://bugs.documentfoundation.org/attachment.cgi?id=209078&action=edit
Reproducer: bordered first paragraph of a continuous section on page 2

Still reproducible in LibreOffice 25.8.5.2 (build 580, x86_64, Linux) with a
small synthetic DOCX (compatibilityMode 15). This is the later-page case from
duplicate bug 147644.

continuous-border.docx: page 2 starts with a paragraph inside a continuous
section. The paragraph has a top border (4.5 pt line, 9 pt padding) and no
spacing before. no-section-border.docx is identical except that the continuous
section is removed.

In the PDF export, the top border on page 2 starts 85.5 pt from the page top
with the section and 72 pt without it. The text moves down by the same 13.5 pt,
which equals border width plus padding. The distance between border and text is
the same in both files, so the border and padding space is added once more
above the paragraph. Without the border, the section makes no difference.

In the source, SwSectionFrame::Format uses CalcUpperSpace() for the section's
top margin; for a section frame, SwFlowFrame::CalcUpperSpace takes the
attributes of the first contained paragraph and adds its top line (border plus
padding). SwContentFrame::MakePrtArea then applies the paragraph's own border
spacing again. The same code path is in current master.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to