summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-03 15:07:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-04 09:18:22 +0200
commite27be9dfbcf8636a7440f828435b1860dfa38977 (patch)
tree62a572bc8ad911b011574152c8575f25980c2f45 /svx/source
parent0ba0cfa9a0173a5cca9e230f980b9f4efde7a794 (diff)
move some Bitmap replace logic inside vcl
i.e. behind BitmapEx Change-Id: Ibe5a20ffe127acf7fb5bcf6341dcd046371aa761 Reviewed-on: https://gerrit.libreoffice.org/75044 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/dialog/_bmpmask.cxx18
1 files changed, 5 insertions, 13 deletions
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 1eb212f9f636..a37e3e8c4693 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -608,19 +608,16 @@ sal_uInt16 SvxBmpMask::InitColorArrays( Color* pSrcCols, Color* pDstCols, sal_uI
return nCount;
}
-Bitmap SvxBmpMask::ImpMask( const Bitmap& rBitmap )
+void SvxBmpMask::ImpMask( BitmapEx& rBitmap )
{
- Bitmap aBitmap( rBitmap );
Color pSrcCols[4];
Color pDstCols[4];
sal_uInt8 pTols[4];
const sal_uInt16 nCount = InitColorArrays( pSrcCols, pDstCols, pTols );
EnterWait();
- aBitmap.Replace( pSrcCols, pDstCols, nCount, pTols );
+ rBitmap.Replace( pSrcCols, pDstCols, nCount, pTols );
LeaveWait();
-
- return aBitmap;
}
BitmapEx SvxBmpMask::ImpMaskTransparent( const BitmapEx& rBitmapEx, const Color& rColor, const sal_uInt8 nTol )
@@ -1006,15 +1003,10 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
}
// now replace it again with the normal colors
- Bitmap aBitmap( ImpMask( aGraphic.GetBitmapEx().GetBitmap() ) );
- Size aSize( aBitmap.GetSizePixel() );
-
- if ( aSize.Width() && aSize.Height() )
+ BitmapEx aBitmapEx( aGraphic.GetBitmapEx() );
+ if ( aBitmapEx.GetSizePixel().Width() && aBitmapEx.GetSizePixel().Height() )
{
- if ( aGraphic.IsTransparent() )
- aGraphic = Graphic( BitmapEx( aBitmap, aGraphic.GetBitmapEx().GetMask() ) );
- else
- aGraphic = aBitmap;
+ ImpMask( aBitmapEx );
}
}
}