Bug 162539 - FILEOPEN DOC/X layoutInCell: from-top should be limited by cell margin, not cell frame
Summary: FILEOPEN DOC/X layoutInCell: from-top should be limited by cell margin, not c...
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
Depends on:
Blocks: DOCX-Anchor-and-Text-Wrap DOC-Anchor-and-Text-Wrap layoutInCell
  Show dependency treegraph
 
Reported: 2024-08-21 14:25 UTC by Justin L
Modified: 2024-09-04 11:54 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
layoutInCell_fromTop_cellMargin.doc: image top should start at cell margin (54.50 KB, application/msword)
2024-08-21 14:25 UTC, Justin L
Details
layoutInCell_fromTop_cellMargin-mso2010.pdf: how it looks in Word 2010 (37.69 KB, application/pdf)
2024-08-21 20:19 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 14:25:54 UTC
Created attachment 195928 [details]
layoutInCell_fromTop_cellMargin.doc: image top should start at cell margin

This is a follow-up to DOC bug 91632 and DOCX bug 160077.

Not only should the vertical "page" be limited to the cell margin,
but similarly, negative "from paragraph top" should be limited by cell margin (as well as positive values be limited by bottom cell margin).

Once again, this is not related to compatibilityMode=15.

Steps to reproduce:
-open layoutInCell_fromTop_cellMargin.doc

Notice that the image top is at the top of the cell. (It should be 0.25cm below the border.)

I think this should be an MSO-only layout issue. It isn't logical to use margin for vert and cell edge for horizontal.
Comment 1 Justin L 2024-08-21 20:19:09 UTC
Created attachment 195936 [details]
layoutInCell_fromTop_cellMargin-mso2010.pdf: how it looks in Word 2010
Comment 2 Justin L 2024-08-31 13:54:21 UTC
proposed patch at https://gerrit.libreoffice.org/c/core/+/172612
Comment 3 Commit Notification 2024-09-02 07:32:23 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/23a97ce1d501a7b98d438007c4cfe5b5c77fa295

tdf#162539 layoutInCell: limit vert to cell margin

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.