diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-05-25 17:56:19 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-26 07:25:30 +0000 |
commit | 702eb3d389f7525674f0743a46c987bc981394f3 (patch) | |
tree | 707655981e36a2e32a76b28427b8468340ca5306 /vcl | |
parent | a92cb70768576bf906449f34db01afadc9ac7816 (diff) |
convert RSC_IMAGE to scoped enum
and drop unused RSC_IMAGE_IMAGEBITMAP
Change-Id: I6c38e5e8e17d288ab525bbef368ebbc7e860e154
Reviewed-on: https://gerrit.libreoffice.org/25458
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/image/Image.cxx | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx index 607fed2b6f64..417c3fe3433d 100644 --- a/vcl/source/image/Image.cxx +++ b/vcl/source/image/Image.cxx @@ -56,27 +56,16 @@ Image::Image( const ResId& rResId ) : { pResMgr->Increment( sizeof( RSHEADER_TYPE ) ); - BitmapEx aBmpEx; - sal_uLong nObjMask = pResMgr->ReadLong(); + BitmapEx aBmpEx; + RscImageFlags nObjMask = (RscImageFlags)pResMgr->ReadLong(); - if( nObjMask & RSC_IMAGE_IMAGEBITMAP ) + if( nObjMask & RscImageFlags::ImageBitmap ) { aBmpEx = BitmapEx( ResId( static_cast<RSHEADER_TYPE*>(pResMgr->GetClass()), *pResMgr ) ); pResMgr->Increment( ResMgr::GetObjSize( static_cast<RSHEADER_TYPE*>(pResMgr->GetClass()) ) ); } - if( nObjMask & RSC_IMAGE_MASKBITMAP ) - { - if( !aBmpEx.IsEmpty() && aBmpEx.GetTransparentType() == TRANSPARENT_NONE ) - { - const Bitmap aMaskBitmap( ResId( static_cast<RSHEADER_TYPE*>(pResMgr->GetClass()), *pResMgr ) ); - aBmpEx = BitmapEx( aBmpEx.GetBitmap(), aMaskBitmap ); - } - - pResMgr->Increment( ResMgr::GetObjSize( static_cast<RSHEADER_TYPE*>(pResMgr->GetClass()) ) ); - } - - if( nObjMask & RSC_IMAGE_MASKCOLOR ) + if( nObjMask & RscImageFlags::MaskColor ) { if( !aBmpEx.IsEmpty() && aBmpEx.GetTransparentType() == TRANSPARENT_NONE ) { |