vcl/source/gdi/bitmapex.cxx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)
New commits: commit e52f636aa44615b180bf799b2d664de9244c3138 Author: Armin Le Grand <a...@apache.org> Date: Thu Sep 6 10:06:38 2012 +0000 assertion removed: allow BitmapEx constructors with empty Mask or AlphaMask (cherry picked from commit c66db94a90efe954691da4ac6bb1ce82ff99e22f) Change-Id: Ifd4c734fee97d7b8f904a1f32c1367a13dde92b2 assertion corrected: BitmapEx constructors with Mask or AlphaMask... needed more checks (cherry picked from commit 560ab48c4b4453ffdd316d8db5dbda111f08650c) Change-Id: Ib6d41bf3349ee89458e06c632342bff43d7a233c diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index e160cb0..61edab7 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -117,14 +117,10 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Bitmap& rMask ) : eTransparent ( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ), bAlpha ( sal_False ) { - if(!rMask) - { - OSL_ENSURE(false, "Empty mask given (!)"); - } - else if(rBmp.GetSizePixel() != rMask.GetSizePixel()) + if(!!aBitmap && !!aMask && aBitmap.GetSizePixel() != aMask.GetSizePixel()) { OSL_ENSURE(false, "Mask size differs from Bitmap size, corrected Mask (!)"); - aMask.Scale(rBmp.GetSizePixel()); + aMask.Scale(aBitmap.GetSizePixel()); } // Ensure a mask is exactly one bit deep @@ -142,11 +138,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const AlphaMask& rAlphaMask ) : eTransparent ( !rAlphaMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ), bAlpha ( !rAlphaMask ? sal_False : sal_True ) { - if(!rAlphaMask) - { - OSL_ENSURE(false, "Empty alpha given (!)"); - } - else if(rBmp.GetSizePixel() != rAlphaMask.GetSizePixel()) + if(!!aBitmap && !!aMask && aBitmap.GetSizePixel() != aMask.GetSizePixel()) { OSL_ENSURE(false, "Alpha size differs from Bitmap size, corrected Mask (!)"); aMask.Scale(rBmp.GetSizePixel()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits