Bug 166544 - FILEOPEN DOC/X: no top spacing after ToC-with-page-break
Summary: FILEOPEN DOC/X: no top spacing after ToC-with-page-break
Status: UNCONFIRMED
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: filter:doc, filter:docx
Depends on:
Blocks: DOCX-Paragraph DOC-Paragraph
  Show dependency treegraph
 
Reported: 2025-05-12 14:38 UTC by Justin L
Modified: 2025-05-12 14:38 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
TopMarginAfterTOC.docx (18.15 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-05-12 14:38 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-05-12 14:38:23 UTC
Created attachment 200754 [details]
TopMarginAfterTOC.docx

Normally, after a normal page break, the top paragraph spacing is applied. And we do that in LO. However, it seems that Microsoft makes an exception to the case where the page break comes after a Table of Contents field. In that particular case, no top margin is applied.

Already true in OOo 3.3, so Inherited.

Steps to reproduce:
1.) open TopMarginAfterTOC.docx

On page 2 is the ToC. Notice the big gap between the header and the heading 1 paragraph "Table of Contents" with 48pt of "above spacing". That's all good.

On page 3 is where the problem is seen. In LO we have the same large gap before the heading 1 paragraph "Chapter 1 48pt", while in MS Office there is no gap at all.

This oddity was found by looking at overlays from these documents:
abi5309-1.doc
moz1003146-1.doc
novell657806-1.doc
ooo119706-1.doc
ooo23187-1.doc
ooo53044-1.doc

Watch out though for a section page break - that is handled differently... forum-mso-de-102317.docx and forum-mso-en-13234.docx.

Found by Collabora's mso-test