Bug 142722

Summary: [WMF] BitBlt is wrong and StretchBlt is not implemented
Product: LibreOffice Reporter: Valek Filippov <frob>
Component: filters and storageAssignee: Bartosz <gang65>
Status: CLOSED FIXED    
Severity: normal CC: gang65, raal
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard: target:7.2.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 103859    
Attachments: WMF sample with StretchBlt with bitmap
How it should look like
WMF BitBlt with 32bpp bitmap
How BitBlt with 32bpp bitmap should look like

Description Valek Filippov 2021-06-08 21:25:05 UTC
Description:
LO doesn't support WMF StretchBlt MR and shows nothing.

Steps to Reproduce:
Open attached WMF sample.

Actual Results:
LO shows empty object.

Expected Results:
It should show a small rectangle filled with color gradient.


Reproducible: Always


User Profile Reset: No



Additional Info:
tdf#142708 has a sample of StretchBlt variant w/o bitmap.
Comment 1 Valek Filippov 2021-06-08 21:26:04 UTC
Created attachment 172712 [details]
WMF sample with StretchBlt with bitmap
Comment 2 Valek Filippov 2021-06-08 21:27:33 UTC
Created attachment 172713 [details]
How it should look like
Comment 3 Valek Filippov 2021-06-08 21:31:44 UTC
Created attachment 172714 [details]
WMF BitBlt with 32bpp bitmap

Looks like BitBlt implementation of "with bitmap" variant is also incomplete.
It seems to have incorrect support for 1bpp bitmaps only.
Comment 4 Valek Filippov 2021-06-08 21:33:29 UTC
Created attachment 172715 [details]
How BitBlt with 32bpp bitmap should look like
Comment 5 raal 2021-06-08 22:00:30 UTC
Confirm with Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: ec629c5ee22d02f99d66a5cf975ce239876b7f4d
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 6 Commit Notification 2021-06-09 18:20:51 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/01ded1e6d362dbcd7148334c6965d6ad00981d4a

WMF tdf#55058 tdf#142722 Add implementation of BitBlt and StretchBlt

It will be available in 7.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.