Bug 161979 - Saving an ODT with an embedded metafile as HTML produces a total black image of the metafile
Summary: Saving an ODT with an embedded metafile as HTML produces a total black image ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:25.2.0 target:24.8.0.2
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-07-10 10:36 UTC by Mike Kaganski
Modified: 2024-07-11 19:27 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
A sample with a metafile saved to HTML as a black rectangle (10.23 KB, application/vnd.oasis.opendocument.text)
2024-07-10 10:36 UTC, Mike Kaganski
Details
Another sample using a different codepath (14.63 KB, application/vnd.oasis.opendocument.text)
2024-07-10 20:04 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2024-07-10 10:36:06 UTC
Created attachment 195203 [details]
A sample with a metafile saved to HTML as a black rectangle

Since version 6.2, the attached document, when saved as HTML (using "HTML Document (Writer)" filter), produces a black rectangle for the embedded metafile. Before, the generated GIF had correct black diagonal lines on transparent background.
Comment 1 m_a_riosv 2024-07-10 11:34:53 UTC
Reproducible with
Version: 24.2.5.1 (X86_64) / LibreOffice Community
Build ID: 2ccb78ad6bdfe3f3356a7a7f294ec388775c5816
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
+
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 872e0d3c8a17b582f04b82aa2525e614080acda9
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

Exporting as xhtml works fine.
Comment 2 Mike Kaganski 2024-07-10 13:00:18 UTC
https://gerrit.libreoffice.org/c/core/+/170311
Comment 3 Mike Kaganski 2024-07-10 20:04:17 UTC
Created attachment 195219 [details]
Another sample using a different codepath

Interestingly, this sample uses a different code path, started to produce black result in 6.3, but is fixed by the same change.
Comment 4 Commit Notification 2024-07-10 20:20:14 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/37217909f2e7c042eab9a8b5eb1ab0a88cdda513

tdf#161979: Render GDI metafile using drawinglayer in XOutBitmap

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 5 Commit Notification 2024-07-11 16:06:09 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/813271fd50b384f0fb3f6201d6063a9ec5a371dc

tdf#161979: Render GDI metafile using drawinglayer in XOutBitmap

It will be available in 24.8.0.2.

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 6 m_a_riosv 2024-07-11 19:27:38 UTC
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 37217909f2e7c042eab9a8b5eb1ab0a88cdda513
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded