tdf#157086 invert the blur mask instead of the alpha mask

An invert is needed to fix tdf#156808 but inverting the alpha mask
causes tdf#157086 so invert the blur mask instead.

Change-Id: Id695d04f008932caadb0fc2b477b0a4b152fa66c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156854
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
diff --git a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
index 1da2f68..89e1fd5 100644
--- a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
@@ -199,10 +199,13 @@ void SoftEdgePrimitive2D::create2DDecomposition(
        AlphaMask aMask(aBitmapEx.GetAlphaMask());
        if (aMask.IsEmpty()) // There is no mask, fully opaque
            break;
        const AlphaMask blurMask(drawinglayer::primitive2d::ProcessAndBlurAlphaMask(
        AlphaMask blurMask(drawinglayer::primitive2d::ProcessAndBlurAlphaMask(
            aMask, -fDiscreteSoftRadius * fScale, fDiscreteSoftRadius * fScale, 0));
        // tdf#157086 invert the blur mask instead of the alpha mask
        // An invert is needed to fix tdf#156808 but inverting the alpha mask
        // causes tdf#157086 so invert the blur mask instead.
        blurMask.Invert();
        aMask.BlendWith(blurMask);
        aMask.Invert();

        // The end result is the original bitmap with blurred 8-bit alpha mask
        BitmapEx result(aBitmapEx.GetBitmap(), aMask);