Bug 167748 - FILEOPEN DOCX: layout pushes CR marker into header territory on specific document
Summary: FILEOPEN DOCX: layout pushes CR marker into header territory on specific docu...
Status: RESOLVED DUPLICATE of bug 129808
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.4.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx
Depends on:
Blocks: Text-Grid
  Show dependency treegraph
 
Reported: 2025-07-31 18:51 UTC by Justin L
Modified: 2025-08-22 15:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
tdf129627-1_screenshot.png: showing the CR marker position after/before identified commit (19.75 KB, image/png)
2025-07-31 18:51 UTC, Justin L
Details
Screenshot from Word showing the first line in test doc (63.94 KB, image/png)
2025-08-21 13:09 UTC, Jonathan Clark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2025-07-31 18:51:02 UTC
Created attachment 202102 [details]
tdf129627-1_screenshot.png: showing the CR marker position after/before identified commit

The content of a specific document has been push upwards in 25.2.4 (and confirmed still a problem in 26.2 master). 

Steps to reproduce:
1.) open test.docx (attachment 157274 [details] from bug 129627)
2.) turn on "View - Formatting Marks (Ctrl-F10)

Notice that the first content (an empty paragraph) is not positioned below the boundary marker as it should be.

This started with 25.8 commit fd7717f81b18faab0e400c9fa3e87c4579f254d1
Author: Jonathan Clark on Tue Feb 18 03:25:39 2025 -0700
    tdf#165089 sw: disable grid centering for DOC/DOCX compatibility
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181829

Found by Collabora's mso-test. (Only noticed it on this particular file.)
Comment 1 raal 2025-08-12 14:38:57 UTC
Confirm with Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a0ae1b0cf2661e7be9ea042e5357530f5fb412f5
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 2 Jonathan Clark 2025-08-21 13:09:55 UTC
Created attachment 202429 [details]
Screenshot from Word showing the first line in test doc

Attachment is a screenshot from Word, showing the document starts with a 1 pt empty line that extends above the top margin. The original document doesn't have any text, but I added some so it's easier to see where the line is on the page.

This isn't a regression due to the linked commit. There is supposed to be a pilcrow above the margin there. The reason it was below the margin in earlier versions of LibreOffice is because we were incorrectly pushing text grid content lower on the page than it is supposed to be.
Comment 3 Jonathan Clark 2025-08-21 13:51:27 UTC
This document does seem to exhibit one bug: Some of the lines are narrower in Writer than they are in Word. This may be an instance of Bug 134540.

The last two paragraphs of the sample document should fit on a single line. They may appear broken across multiple lines in Word and/or Writer. You may need to turn punctuation compression on or off to compare horizontal layout between Writer and Word (Options -> Languages and Locales -> Asian Layout).
Comment 4 Justin L 2025-08-21 14:53:56 UTC
OK - makes sense.

Another problem (that helped to make this one seem real) is that we don't import the default paragraph style with a 10pt below spacing (or 8pt if using Word 2024). I created bug 168042 for that (although it is in-actionable since a missing w:pPrDefault just means use the program's built-in default).

Probably this report can be closed if comment 3 is handled elsewhere.
Comment 5 Jonathan Clark 2025-08-22 15:03:30 UTC
(In reply to Justin L from comment #4)
> Probably this report can be closed if comment 3 is handled elsewhere.

Done. Closing as a duplicate since it documents another observation of the bug.

*** This bug has been marked as a duplicate of bug 129808 ***