summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/bitmap.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi/bitmap.cxx')
-rw-r--r--vcl/source/gdi/bitmap.cxx18
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() )