Bug 165205 - FILEOPEN DOCX: VML "tight" wrap import ignores specified contour wrap
Summary: FILEOPEN DOCX: VML "tight" wrap import ignores specified contour wrap
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.2.2 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, implementationError, regression
Depends on:
Blocks: DOCX-Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2025-02-11 18:23 UTC by Justin L
Modified: 2025-02-22 20:03 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
OLE-distanceimportB.docx: modified example containing an image with specified contour (195.60 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-02-11 18:23 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2025-02-11 18:23:00 UTC
Created attachment 199155 [details]
OLE-distanceimportB.docx: modified example containing an image with specified contour

I'm guessing that VML import doesn't read in the contour coordinates, but just does an "automatic" contour. However, there are wrap coordinate specified:
    wrapcoords="-212 0 -212 21273 21600 21273 21600 0 -212 0"

Attached above, I have provided a modified version, adding an image that DOES have contour wrap. Ironically, that one is NOT being auto-contoured by LO.

This started in LO 7.1 (backported to 7.0.2)
with commit 4b7ee7bd61f78be60211cc72ba36da987191266e
Author: Daniel Arato (NISZ) on Wed Sep 2 15:46:56 2020 +0200
    tdf#135665 DOCX: import tight wrap setting of VML shapes
    
    The wrap setting that OOXML calls "tight" and LibreOffice calls
    "contour" (== true) was not supported by the import code, only
    the export.

In Word's UI, I don't see any way to set contour points on an OLE object. So probably we can just not turn on "contour" for OLE objects.

Steps to reproduce (using the non-modified source)
1.) open OLE-distanceimport.docx (attachment 164192 [details] from bug 135660)

In MS Word, the text is wrapping around this OLE object in a square, but in LO it is wrapping around the contour. (see a screenshot of MS Word on right half of attachment 164193 [details]).

Note: bug 60351 seems to have deal with various similar issues (including image behind paragraph shade).

Note: bug 143484 suggests the same may be true for smart-art.
Comment 1 Justin L 2025-02-11 18:24:05 UTC
Found by Collabora's mso-test
Comment 2 Justin L 2025-02-22 20:03:05 UTC
confirmed in master.

Probably easiest to see if you right-click on the ole - wrap - Edit Contour and there you can easily see it is following the edges of the "image".