Bug 142284 - FILEOPEN: DOC Wrap lost on contoured images (is it auto-contour?)
Summary: FILEOPEN: DOC Wrap lost on contoured images (is it auto-contour?)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:doc
Depends on:
Blocks: DOC-Limitations
  Show dependency treegraph
 
Reported: 2021-05-14 14:37 UTC by Luke
Modified: 2025-06-03 03:10 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of 6.3 vs 7.2 (239.81 KB, image/png)
2021-05-14 14:37 UTC, Luke
Details
Screenshot of 6.3 vs 7.2 (262.08 KB, image/png)
2021-05-14 14:42 UTC, Luke
Details
Screenshot of 6.3 vs 7.2 (249.03 KB, image/png)
2021-05-14 14:45 UTC, Luke
Details
WrappingBug.pdf: how it looks in Word 2010 - notice that the text is also wrapped around automatically (91.87 KB, application/pdf)
2023-05-30 14:42 UTC, Justin L
Details
WrappingBug.docx: round-tripped by MS Word 2010 - has contour-wrapped image (25.81 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-05-30 17:14 UTC, Justin L
Details
142284_dump.doc: doc_dump looking for relevant contour SPRMs (768.00 KB, application/msword)
2023-05-30 18:40 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2021-05-14 14:37:33 UTC
Created attachment 171997 [details]
Screenshot of 6.3 vs 7.2

In 6.4+ images with contours are no longer correctly imported in DOC format.

Steps to reproduce:
1. Open attachment 114438 [details]
2. Compare to LO 6.3 or Word
Comment 1 Luke 2021-05-14 14:42:07 UTC Comment hidden (obsolete)
Comment 2 Luke 2021-05-14 14:45:27 UTC
Created attachment 172001 [details]
Screenshot of 6.3 vs 7.2
Comment 3 Luke 2021-05-14 14:50:44 UTC
Note: this can be fixed by right clicking on the image:
Wrap -> Contour
Comment 4 Timur 2021-05-14 14:52:15 UTC
I guess duplicate of bug 140508, please see.
Comment 5 Timur 2021-05-17 11:26:32 UTC
Same commit 8ce4782b86611dd481f89e4bffac61036cc7428e.

*** This bug has been marked as a duplicate of bug 140508 ***
Comment 6 Justin L 2023-05-30 14:37:03 UTC
Not an exact duplicate. The other bug is from a different frame type (a textbox) while this one exactly matches the type of graphic (SwFlyObjDrawIdentifier).

Well, I guess they still could be duplicates ultimately, but a partial fix would be to simply allow certain types to auto-contour.

Plus, this one clearly is a regression.
CC: Miklos

for 6.4 (backported to 6.3.1) regression https://gerrit.libreoffice.org/c/core/+/76566/

commit 90928f23994d8fc1d9cc7edf95880782c8ca712a
Author: Miklos Vajna on Mon Jul 29 20:49:21 2019 +0200
   tdf#112535 DOC import: fix handling the have contour but no polygon case
Comment 7 Justin L 2023-05-30 14:42:35 UTC
Created attachment 187608 [details]
WrappingBug.pdf: how it looks in Word 2010 - notice that the text is also wrapped around automatically
Comment 8 Justin L 2023-05-30 17:03:13 UTC
Removing regression, because I'm not sure there is a pin-pointable person.
As noted in comment 7, the text OUGHT TO be wrapping around the years and other text in the image.

Confirmed edit/auto contour defined (but no visible image at all) in OOo 3.3.

The image became visible (with contour wrapped quite well) in 4.4
commit 6d431ffb682d0e64b75b6267f369822ff0b0617e
Author: Michael Stahl on  Sat May 24 18:34:06 2014 +0200
    fdo#77454: fix WW8 import/export of negative image crop

The contour wrapping got worse (years/text no longer included) in 6.2 with 
commit d4442ac1ac9aae36dbc08fda8154d71ea0f81708
Author: Noel Grandin on Wed May 30 13:02:25 2018 +0200
    drop Graphic::GetBitmap

The poor wrapping was "fixed" by Miklos' commit mentioned in comment 6.

Currently, when contour is turned on then an auto-contour picks up most of the years/text - although not as good as before. The algorithm got worse after
7.2 commit 9d89d98d3349502b56da4bdd6ea287ac4cde9ce5
Author: Luboš Luňák on Wed Feb 10 17:15:19 2021 +0100
    always optimize bitmap transform to translate+scale if possible (tdf#138068)

Wow - what conclusion can be drawn from this?
Comment 9 Justin L 2023-05-30 17:14:21 UTC
Created attachment 187609 [details]
WrappingBug.docx: round-tripped by MS Word 2010 - has contour-wrapped image

I tried to answer the question "Does the autoshape have defined contour points, or just an auto-contour". The DOCX does have defined wp:wrapPolygon, suggesting yes.

Unfortunately, LO doesn't contour wrap the DOCX version either.
Comment 10 Justin L 2023-05-30 18:40:35 UTC
Created attachment 187610 [details]
142284_dump.doc: doc_dump looking for relevant contour SPRMs

For DOC format, it sounds like I need to be looking for a pWrapPolygonVertices  property, which is an OfficeArtFOPTEOPID with an opid of 0x383.
Since the opid is the lowest 14 bits, I should be able to find a 0xX383 number in the dump, but I don't see any.
Comment 11 QA Administrators 2025-06-03 03:10:50 UTC
Dear Luke,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug