Bug 164932 - FILEOPEN DOCX inline frame: autosize frame is wrong size (too short length, too tall height)
Summary: FILEOPEN DOCX inline frame: autosize frame is wrong size (too short length, t...
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
Keywords: bibisected, bisected, implementationError
Depends on:
Blocks:
 
Reported: 2025-01-29 14:42 UTC by Justin L
Modified: 2025-02-03 23:48 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
forum-mso-en3-20475.docx: example document (57.63 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-01-29 14:42 UTC, Justin L
Details
forum-mso-en3-20475.docx_mso.pdf: how it looks in Word 2019 (138.25 KB, application/pdf)
2025-01-29 14:48 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-29 14:42:02 UTC
Created attachment 198856 [details]
forum-mso-en3-20475.docx: example document

A field and some text are framed together. The frame is set to autosize, but that ends up wrapping the text and taking up two lines, while Word 2019 displays all of that content on a single line. Additionally, the frame isn't large enough to even show all of the text...

This never worked properly before, but the current implementation is not correct either, starting in 25.2 with 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-en3-20475.docx

Find "Section 1.01 Defined Terms". That should be in a single line, fully visible.

Found by Collabora's mso-test
Comment 1 Justin L 2025-01-29 14:48:25 UTC
Created attachment 198857 [details]
forum-mso-en3-20475.docx_mso.pdf: how it looks in Word 2019

Also note "Section 1.02 Commitments", which is another bug. It should be 2.01 - which it was before comment 0's commit.
Comment 2 László Németh 2025-02-03 00:04:35 UTC
Indeed, this is a general problem of text frames with AutoSize.

Proposed fix, fixing the layout for the list styles with non-zero left offset:

https://gerrit.libreoffice.org/c/core/+/181025

The numbering regression will be filed under a different issue.

@Justin: Thanks for the bug report!
Comment 3 Commit Notification 2025-02-03 10:27:38 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b4d41f6b0deb0299cd01173c150c5b94568c9a21

tdf#164932 sw inline heading: fix frame AutoSize at list offset

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 4 Commit Notification 2025-02-03 23:48:26 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d60ea6596f7a394290f9a82ac5324e2e8307f5f9

tdf#164932 sw inline heading: unit test for fixed text frame AutoSize

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.