Bug 162551 - LAYOUT DOC/X: line (vertical) or character (horizontal) orientation forces layoutInCell
Summary: LAYOUT DOC/X: line (vertical) or character (horizontal) orientation forces la...
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:doc, filter:docx
: 162550 (view as bug list)
Depends on:
Blocks: DOC-Tables layoutInCell 162542 162550
  Show dependency treegraph
 
Reported: 2024-08-21 23:45 UTC by Justin L
Modified: 2024-08-26 09:25 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
notLayoutInCell_pageLeft_lineBottom.docx: image is laid out from top of line, not bottom (36.05 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-08-21 23:45 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-08-21 23:45:55 UTC
Created attachment 195947 [details]
notLayoutInCell_pageLeft_lineBottom.docx: image is laid out from top of line, not bottom

This is a follow-up to bug 91632, where this was reported as layoutInCell behaviour. It turns out the same thing happens without being layoutInCell.

Line-oriented Center and Bottom behave the same way as Top when anchored inside a table.

This is still true for wrapThrough images.

Steps to reproduce
1- open notLayoutInCell_pageLeft_lineBottom.docx

Note that the image is extending above the table. (It should have it's top over the anchor point, and extend below the table.

Ignore the horizontal placement problem.
Comment 1 Justin L 2024-08-21 23:46:37 UTC
attachment 195945 [details]
notLayoutInCell_pageLeft_lineBottom-mso2010.pdf: how it looks in Word 2010
Comment 2 Justin L 2024-08-22 13:14:10 UTC
The conclusion I am reaching is that if either vertical == line or horizontal == character, then all the rules for layoutInCell apply.

That is hinted at in MS Word's UI. If you select FROM TOP of line, then it automatically enables layoutInCell, and if you disable layoutInCell, then Line changes to Paragraph. (But that UI hint only happens in one of the four possible places.)

So, this re-enforces why compat15 would just ignore layoutInCell and always treat it as true.

For proof about horizontal, see bug 162550's attachment 195944 [details] notLayoutInCell_lineFromLeft.doc and PDF attachment 195946 [details].
Comment 3 Commit Notification 2024-08-24 12:35:16 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0640a0f673635f861a28d14d21e40599e7a54553

tdf#162551 mso formats: line(vert) or char(hori) forces layoutInCell

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 4 Justin L 2024-08-26 09:25:11 UTC
*** Bug 162550 has been marked as a duplicate of this bug. ***