crashtesting: crash on export of forum-en-41439.odp to pdf
and various others.
since:
commit 81994cb2b8b32453a92bcb011830fcb884f22ff3
Date: Fri Apr 16 20:33:10 2021 +0200
Convert internal vcl bitmap formats transparency->alpha (II)
changed drawinglayer/source/tools/converters.cxx convertToBitmapEx
return BitmapEx(aRetval, aAlpha);
if (aAlpha.hasAlpha())
return BitmapEx(aRetval, aAlpha);
else
return BitmapEx(aRetval);
and SoftEdgePrimitive2D::create2DDecomposition assumes a mask exists.
Presumably no mask -> fully opaque -> do nothing is the right outcome
here.
Change-Id: I7379c55c822c149a4320509d27a159cf5a07cc09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154985
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
diff --git a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
index ecf4e48..27e265a 100644
--- a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
@@ -197,6 +197,8 @@ void SoftEdgePrimitive2D::create2DDecomposition(
// Get the Alpha and use as base to blur and apply the effect
AlphaMask aMask(aBitmapEx.GetAlphaMask());
if (aMask.IsEmpty()) // There is no mask, fully opaque
break;
const AlphaMask blurMask(drawinglayer::primitive2d::ProcessAndBlurAlphaMask(
aMask, -fDiscreteSoftRadius * fScale, fDiscreteSoftRadius * fScale, 0));
aMask.BlendWith(blurMask);