Bug 164878 - FILEOPEN DOCX: inline formula no longer centred
Summary: FILEOPEN DOCX: inline formula no longer centred
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, bisected, filter:docx, regression
Depends on:
Blocks: DOCX-Paragraph
  Show dependency treegraph
 
Reported: 2025-01-28 01:13 UTC by Justin L
Modified: 2025-02-26 12:23 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
forum-mso-en-834.docx (52.81 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-01-28 01:13 UTC, Justin L
Details
Original layout (formula and caption in the same line) (984.20 KB, application/pdf)
2025-02-24 19:57 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2025-01-28 01:13:17 UTC
Created attachment 198791 [details]
forum-mso-en-834.docx

The OLE AS_CHAR equation is no longer centred. Instead of the paragraph having zero first/left margins, it has taken the 1/2-inch first/1-inch left margin properties of the following (now attached behind) paragraph.

This was not correct before, because MS Word has three paragraphs strung together on one line. But it did look a lot better before.

Steps to reproduce
1.) Open forum-mso-en-834.docx

Notice that on page 2 the formula looks messy.

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

Perhaps it is worth noting that it looked a bit different at the time of that commit. It was latter affected by the import aspects of the follow-up commit 49765a9e7be41d4908729ff7d838755276b244cb
Author: László Németh on  Wed Oct 30 17:11:26 2024 +0100
    tdf#48459 tdf#131728 sw inline heading: new frame style: fix DOCX export


Found by Collabora's mso-test
Comment 1 raal 2025-02-13 06:00:49 UTC
Confirm with Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7da1497aa462e2b719aa9b308a749caf7b9a19b1
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 László Németh 2025-02-24 19:57:55 UTC
Created attachment 199430 [details]
Original layout (formula and caption in the same line)
Comment 3 László Németh 2025-02-24 22:04:40 UTC
Proposed fix: https://gerrit.libreoffice.org/c/core/+/182127
Comment 4 Commit Notification 2025-02-25 13:18:59 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#164878 sw inline heading: skip non-text content, i.e. formula

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 5 László Németh 2025-02-25 13:21:52 UTC
fixed in master, started backporting to 25.2

@Justin, Raal: many thanks for the report and feedback!
Comment 6 Commit Notification 2025-02-26 12:23:22 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/e7e0190880229af7384a429695d5558440e3293c

tdf#164878 sw inline heading: skip non-text content, i.e. formula

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.