Bug 160077 - FILEOPEN DOCX: image layoutInCell must vertical offset relative to the paragraph, not the page (comment 5)
Summary: FILEOPEN DOCX: image layoutInCell must vertical offset relative to the paragr...
Status: NEW
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: target:24.8.0
Keywords: filter:docx
Depends on:
Blocks: DOCX-Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2024-03-06 23:05 UTC by Justin L
Modified: 2024-04-20 22:18 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
layoutInCell_mso2010.pdf: how it looks in the authoring program (33.78 KB, application/pdf)
2024-03-06 23:05 UTC, Justin L
Details
160077_layoutInCell.docx: anchored to top of page margin, but forced into cell (21.88 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-03-06 23:09 UTC, Justin L
Details
tdf160077_layoutInCellB.docx: needed for images too (21.96 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-03-07 21:27 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2024-03-06 23:05:54 UTC
Created attachment 193006 [details]
layoutInCell_mso2010.pdf: how it looks in the authoring program

The in-background-through image (following the shape code path since it is rotated) must not be placed relative to the page margins, but must be placed relative to the paragraph area.

Therefore, the image should appear mid-way down the cell, instead of at the top.
 
This is not related to compatibilityMode.
Comment 1 Justin L 2024-03-06 23:09:42 UTC
Created attachment 193007 [details]
160077_layoutInCell.docx: anchored to top of page margin, but forced into cell
Comment 2 Justin L 2024-03-07 21:27:08 UTC
Created attachment 193022 [details]
tdf160077_layoutInCellB.docx: needed for images too
Comment 3 Commit Notification 2024-03-08 10:00:37 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#160077 writerfilter: shape vertRelation is FRAME for layoutinCell

It will be available in 24.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 2024-03-08 17:23:34 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/61b1d3a17ff784b7c79a92cbe069a90ce4932535

tdf#160077 unit test: this file was helpful identifying a "bad fix"

It will be available in 24.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 Justin L 2024-03-08 17:36:12 UTC
(In reply to Justin L from comment #2)
> Created attachment 193022 [details]
> tdf160077_layoutInCellB.docx: needed for images too

https://gerrit.libreoffice.org/c/core/+/164516 fixes this, but in an unsafe way... Leaving the issue open to address the image path (which keeps the FollowTextFlow attribute, while the shape path didn't).