Bug 164903 - FILEOPEN DOCX inline frame: frame is improperly positioned and causes all content to shift down
Summary: FILEOPEN DOCX inline frame: frame is improperly positioned and causes all con...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0 target:25.2.2
Keywords: bibisected, filter:docx, regression
Depends on:
Blocks:
 
Reported: 2025-01-28 21:55 UTC by Justin L
Modified: 2025-02-26 12:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
forum-mso-de-104030.docx_import-compare-0.png. RED=25.2 master, BLUE=25.2 oldest, grayscale=Word 2019 (111.97 KB, image/png)
2025-01-28 21:55 UTC, Justin L
Details
forum-mso-de-104030.docx: example document (114.18 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-01-28 21:57 UTC, Justin L
Details
LO25.2.0.1 display paragraph-text-line after inline frame vertically shifted (both are center aligned) (392.22 KB, image/png)
2025-01-29 00:18 UTC, Piotr Osada
Details
LO24.8.4.2 don't put text before style separator into inline frame (40.89 KB, image/png)
2025-01-29 00:24 UTC, Piotr Osada
Details
forum-mso-de-59278.docx: item 17 on first page gets mangled (33.21 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-02-08 16:20 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-01-28 21:55:41 UTC
Created attachment 198822 [details]
forum-mso-de-104030.docx_import-compare-0.png. RED=25.2 master, BLUE=25.2 oldest, grayscale=Word 2019

The framed text does not line up with the text following it, but is below the regular line-of-text. This also affects all the content that follows - pushing it down further on the page than where MS Word places it.

This started with 25.2 commit 56588663a0fddc005c12afaa7d3f8874d036875f
Author: László Németh on Fri Sep 13 09:02:08 2024 +0200
    tdf#131728 sw inline heading: fix DOCX paragraph layout interoperability

Steps to reproduce:
1.) open forum-mso-de-104030.docx

Notice that 1.1.1 and 1.1.2 no longer line up with their following text. Prior to this things where nearly pixel-for-pixel correct with MS Word.

Note that bug 164893 comment 0 also mentions this problems, since its forum-mso-de-59279.docx (attachment 198807 [details]) exhibits the same issue.

Found by Collabora's mso-test
Comment 1 Justin L 2025-01-28 21:57:05 UTC
Created attachment 198823 [details]
forum-mso-de-104030.docx: example document
Comment 2 Piotr Osada 2025-01-29 00:18:00 UTC
Created attachment 198828 [details]
LO25.2.0.1 display paragraph-text-line after inline frame vertically shifted (both are center aligned)

Confirm with:

Version: 25.2.0.1 (X86_64) / LibreOffice Community
Build ID: ddb2a7ea3a8857aae619555f1a8743e430e146c9
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Vulkan; VCL: win
Locale: pl-PL (pl_PL); UI: en-US
Calc: CL threaded
Comment 3 Piotr Osada 2025-01-29 00:24:33 UTC
Created attachment 198829 [details]
LO24.8.4.2 don't put text before style separator into inline frame

BTW: LO24.8.4.2 don't put text before style separator into inline frame (without commit 56588663a0fddc005c12afaa7d3f8874d036875f)
Comment 4 Justin L 2025-02-08 16:20:54 UTC
Created attachment 199075 [details]
forum-mso-de-59278.docx: item 17 on first page gets mangled

another example that sounds like this bug's description.
Comment 5 Commit Notification 2025-02-25 13:20:02 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/33e54802ee31d4c76e7e41b714f5bfeed484bbd2

tdf#164903 sw inline heading: fix DOCX layout by zeroing top margin

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 László Németh 2025-02-25 13:22:37 UTC
fixed in master, started backporting to 25.2

@Justin, Piotr: many thanks for the report and feedback!
Comment 7 Commit Notification 2025-02-26 12:25:25 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/9c7539af6810b51b3be8c738e702622658cf1d23

tdf#164903 sw inline heading: fix DOCX layout by zeroing top margin

It will be available in 25.2.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.