Bug 165064 - LAYOUT: contour-wrapped image no longer painted
Summary: LAYOUT: contour-wrapped image no longer painted
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0 target:25.2.3
Keywords: bibisected, filter:docx, regression
Depends on:
Blocks: DOCX-Images
  Show dependency treegraph
 
Reported: 2025-02-05 18:55 UTC by Justin L
Modified: 2025-03-17 14:48 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
tdf97090-1.docx_mso.pdf: how it looks in MS Word 2019 (183.38 KB, application/pdf)
2025-02-05 18:55 UTC, Justin L
Details
165064 wrap contour no clip.docx: emphasis example (56.27 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-02-26 14:30 UTC, Justin L
Details
165064 wrap contour no clip.Word2010.pdf: how it looks in MS Office 2010 (122.95 KB, application/pdf)
2025-02-26 14:51 UTC, Justin L
Details
The second image after the regression fix (104.11 KB, image/png)
2025-03-07 15:50 UTC, Gabor Kelemen (allotropia)
Details
The attachment 199469 in 24.8 and Word 16 (195.53 KB, image/png)
2025-03-07 15:54 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2025-02-05 18:55:30 UTC
Created attachment 199003 [details]
tdf97090-1.docx_mso.pdf: how it looks in MS Word 2019

Hardly any of the image is painted any more.

This started with 25.2 commit 3800ab58355385dcb482d3089accc7ce141f5ee9
Author: Oliver Specht on Tue Sep 24 16:10:15 2024 +0200
    tdf#161233 paint pictures completely also with contour wrap

Steps to reproduce:
1.) open WORD_EXAMPLE (1).docx (attachment 121892 [details] from bug 97090)

Notice that only the top slice of the image is visible.

Found by Collabora's mso-test
Comment 1 mikhail.machine 2025-02-11 07:34:19 UTC
Hello Justin L,

Thank you for reporting the bug. I can confirm that the bug is present in master.

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a8ec21adf255b70bb6eeb0a1717190df303d8b26
CPU threads: 12; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_FI); UI: en-US
Writer: threaded
Comment 2 Justin L 2025-02-26 14:30:56 UTC
Created attachment 199469 [details]
165064 wrap contour no clip.docx: emphasis example

The problem comes because comment 0's identified patch is forcing the image into the background - where paragraph area fill colour is hiding the image.

But the image kind-of has to be in the background so that any text that overlaps it won't be cut off (which is probably why historically we have cropped the image - although the crop should take into regards the Surround LR/UL spacing values I guess).
Comment 3 Justin L 2025-02-26 14:51:47 UTC
Created attachment 199470 [details]
165064 wrap contour no clip.Word2010.pdf: how it looks in MS Office 2010
Comment 4 Justin L 2025-02-26 14:54:41 UTC
In my opinion, this patch should probably just be reverted. It trades one workaround for another one - and both have limitations. IMHO, this one has worse limitations than before.
Comment 5 Gabor Kelemen (allotropia) 2025-03-07 15:50:43 UTC
Created attachment 199690 [details]
The second image after the regression fix

https://gerrit.libreoffice.org/c/core/+/182487 
seems to solve the situation for the first example file (and keeps the original bugs example fixed), but for the second, there is still room for improvement.
Comment 6 Gabor Kelemen (allotropia) 2025-03-07 15:54:42 UTC
Created attachment 199691 [details]
The attachment 199469 [details] in 24.8 and Word 16

It was not exactly perfectly "like in Word" before, either.
Comment 7 Commit Notification 2025-03-08 14:00:20 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

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

tdf#165064 fix regression from tdf#161233

It will be available in 25.8.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 8 Commit Notification 2025-03-11 13:05:12 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

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

tdf#165064 fix regression from tdf#161233

It will be available in 25.2.3.

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 9 Gabor Kelemen (allotropia) 2025-03-17 14:48:49 UTC
The image is now painted, but now too much of it is painted compared to Word, or the previous state. Still there was enough improvement in bug 161233, so let's keep these changes.

Filed a new bug specifically to mimic the behavior seen in Word -> bug 165789