From e568d233a3f9cbc926bfa12dac3fbc6d29a4b6c7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 16 Mar 2018 09:51:44 +0200 Subject: move framework/toolkit use of BitmapEx::GetMask inside vcl Change-Id: I2a942377d6e9b8b09673e5ad2804e0e7fb2bb943 Reviewed-on: https://gerrit.libreoffice.org/51387 Reviewed-by: Michael Meeks Tested-by: Noel Grandin --- framework/source/fwe/classes/imagewrapper.cxx | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'framework/source/fwe/classes') diff --git a/framework/source/fwe/classes/imagewrapper.cxx b/framework/source/fwe/classes/imagewrapper.cxx index f916d7a4e607..bb7b65a622fa 100644 --- a/framework/source/fwe/classes/imagewrapper.cxx +++ b/framework/source/fwe/classes/imagewrapper.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -74,22 +75,8 @@ Sequence< sal_Int8 > SAL_CALL ImageWrapper::getDIB() Sequence< sal_Int8 > SAL_CALL ImageWrapper::getMaskDIB() { SolarMutexGuard aGuard; - BitmapEx aBmpEx( m_aImage.GetBitmapEx() ); - - if ( aBmpEx.IsAlpha() ) - { - SvMemoryStream aMem; - WriteDIB(aBmpEx.GetAlpha().GetBitmap(), aMem, false, true); - return Sequence< sal_Int8 >( static_cast(aMem.GetData()), aMem.Tell() ); - } - else if ( aBmpEx.IsTransparent() ) - { - SvMemoryStream aMem; - WriteDIB(aBmpEx.GetMask(), aMem, false, true); - return Sequence< sal_Int8 >( static_cast(aMem.GetData()), aMem.Tell() ); - } - - return Sequence< sal_Int8 >(); + + return vcl::bitmap::GetMaskDIB(m_aImage.GetBitmapEx()); } // XUnoTunnel -- cgit