diff options
author | Louis-Francis Ratté-Boulianne <lfrb@collabora.com> | 2014-12-02 14:19:33 -0500 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-12-03 14:05:36 +0100 |
commit | cf3ba3561522cba179ab602b257df902d6d5d110 (patch) | |
tree | bccacc8a093ece30d7af463049a195ac5de42631 /vcl/source/gdi/bitmap.cxx | |
parent | 58824d6f551bd505af89d8086576fed2cdf95867 (diff) |
vcl: Add dummy Replace to SalBitmap implementations
Change-Id: I2f8b11a3f7cb8872a1d8f6eeeae8ce3f30223496
Diffstat (limited to 'vcl/source/gdi/bitmap.cxx')
-rw-r--r-- | vcl/source/gdi/bitmap.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 69a6ecfaa575..9915125cfd8d 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -1583,6 +1583,24 @@ bool Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor ) bool Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol ) { + if( mpImpBmp ) + { + // implementation specific replace + ImpBitmap* pImpBmp = new ImpBitmap; + + if( pImpBmp->ImplCreate( *mpImpBmp ) && pImpBmp->ImplReplace( rSearchColor, rReplaceColor, nTol ) ) + { + ImplSetImpBitmap( pImpBmp ); + maPrefMapMode = MapMode( MAP_PIXEL ); + maPrefSize = pImpBmp->ImplGetSize(); + return true; + } + else + { + delete pImpBmp; + } + } + // Bitmaps with 1 bit color depth can cause problems // if they have other entries than black/white in their palette if( 1 == GetBitCount() ) |