Bug 160077 - FILEOPEN DOCX: image layoutInCell must vertical offset relative to the cell print area, not the page (comment 5)
Summary: FILEOPEN DOCX: image layoutInCell must vertical offset relative to the cell p...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:25.2.0
Keywords: filter:docx
Depends on: 162211 162304
Blocks: DOCX-Anchor-and-Text-Wrap layoutInCell
  Show dependency treegraph
 
Reported: 2024-03-06 23:05 UTC by Justin L
Modified: 2024-08-24 19:40 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).
Comment 6 Commit Notification 2024-08-08 12:07:20 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2c9f8ad2705834cdbe208373e10a0daad1040fd2

tdf#162211 revert "tdf#160077 writerfilter: shape vertRelation is FRAME

It will be available in 25.2.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 7 Commit Notification 2024-08-09 06:48:29 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/31f87f369fdb40fc746d98443d75af2e9ce2452d

tdf#162211 tdf#160077 tdf#91632 layoutInCell: vert page->margin, *->top

It will be available in 25.2.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 8 Commit Notification 2024-08-10 19:32:34 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/017fe82d7c057c9a41d558ddfbb5c598c8e1998b

tdf#162211 revert "tdf#160077 writerfilter: shape vertRelation is FRAME

It will be available in 24.8.1.

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 9 Commit Notification 2024-08-17 20:29:15 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/10bc43d6885a38ca4cccaf201df33ebea64736c3

tdf#162211 tdf#160077 layoutInCell: use row margin for MSOLayout

It will be available in 25.2.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.