Bug 162612 - FILEOPEN DOC/X NOT-layoutInCell: a cell-anchored shape marked as wrap-tight (behindDoc) doesn't wrap text at all
Summary: FILEOPEN DOC/X NOT-layoutInCell: a cell-anchored shape marked as wrap-tight (...
Status: REOPENED
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:
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-24 15:34 UTC by Justin L
Modified: 2024-09-07 16:49 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
notLayoutInCell_notWrapThrough.docx: parallel-wrap image anchored in cell appears behind text (36.43 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-08-24 15:34 UTC, Justin L
Details
notLayoutInCell_notWrapThrough-mso2010.pdf: how it looks in Word 2010 (43.56 KB, application/pdf)
2024-08-24 20:55 UTC, Justin L
Details
notLayoutInCell_squareWrapping.docx: a counter example - column text is wrapping (22.82 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-09-05 14:45 UTC, Justin L
Details
notLayoutInCell_squareWrapping-mso2010.pdf - how it looks in Word 2010 (23.13 KB, application/pdf)
2024-09-05 14:47 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-24 15:34:58 UTC
Created attachment 195999 [details]
notLayoutInCell_notWrapThrough.docx: parallel-wrap image anchored in cell appears behind text

MS Word seems to treat all shapes that are anchored in a cell, but are not layoutInCell, to be background wrap-through (except for actual wrap-through objects - they are not backgrounded).

Steps to reproduce
-open notLayoutInCell_notWrapThrough.docx

Notice that the contents of cell B1 and the body text above the table do not wrap around the image: GOOD
Notice that the image is in the foreground - covering the text: BAD
Notice that the contents of cell B2 are wrapping around the image: BAD

Already in the foreground in OOo 3.3.
Comment 1 Justin L 2024-08-24 20:54:37 UTC
Nah - the background wrapping is only a forced change by the UI, not by layout. When the user selects one of the "contour" wraps (tight and through), the UI sets behindDoc=1.
Comment 2 Justin L 2024-08-24 20:55:18 UTC
Created attachment 196002 [details]
notLayoutInCell_notWrapThrough-mso2010.pdf: how it looks in Word 2010
Comment 3 Commit Notification 2024-08-26 09:54:46 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#162612 mso import NOT-layoutInCell: effectively are wrap-through

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-09-05 14:45:04 UTC
Created attachment 196257 [details]
notLayoutInCell_squareWrapping.docx: a counter example - column text is wrapping

So, somehow there are occasions when wrapping still applies.
Comment 5 Justin L 2024-09-05 14:47:45 UTC
Created attachment 196258 [details]
notLayoutInCell_squareWrapping-mso2010.pdf - how it looks in Word 2010
Comment 6 Commit Notification 2024-09-05 17:34:51 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/47bb0e2b7d0690f06150c7e110e6992f3d62bd10

Revert "tdf#162612 mso import NOT-layoutInCell: effectively are wrap-through"

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 Justin L 2024-09-07 16:12:11 UTC
This document was created (mostly) by MS Word 2010. Unexpected things happen when you change wrapping when the shape is not "layout in table cell".

I haven't figured out why wrapping does not affect anything in this specific document. It is NOT related to behindDoc.