From 6f12c93703b676b1b3839caaf2c21788e5d68477 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Fri, 22 Jan 2016 11:39:41 +0100 Subject: tdf#91017 Enhance WMF import of EMR_ALPHABLEND action The EMR_ALPHABLEND action was added 2012/2013, but missed support for Bitmaps with Mask/Alpha. Due to that files with WMF containing these actions may look different from before. Added suport to load contained Mask/Alpha information in DIBs and the needed additional processing through the display chain. WMF import is still based on Metafile creation, when it would be using Primitives more original data could be preserved. Change-Id: I577569848cee2528328181fa0c7eb7f87857d094 Reviewed-on: https://gerrit.libreoffice.org/21709 Tested-by: Jenkins Reviewed-by: Noel Grandin Reviewed-by: Armin Le Grand --- svtools/source/misc/transfer.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'svtools') diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index ccad405e1fce..2650d9c3f7b2 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -1673,13 +1673,13 @@ bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapEx& r if(rBmpEx.IsEmpty()) { Bitmap aBitmap; - Bitmap aMask; + AlphaMask aMask; // explicitely use Bitmap::Read with bFileHeader = sal_True // #i124085# keep DIBV5 for read from clipboard, but should not happen ReadDIBV5(aBitmap, aMask, *xStm); - if(aMask.IsEmpty()) + if(aMask.GetBitmap().IsEmpty()) { rBmpEx = aBitmap; } -- cgit