summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/image.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2007-04-26 08:29:11 +0000
committerRüdiger Timm <rt@openoffice.org>2007-04-26 08:29:11 +0000
commit9ef846ebc47dad2011efdbbacd41adf6e519fb61 (patch)
tree0c8c560ae798d1c3c4029acf299166dd61bce9a8 /vcl/source/gdi/image.cxx
parent740819b8e3aa6defc2e2d92863f1a70a5080a0d0 (diff)
INTEGRATION: CWS residcleanup (1.26.162); FILE MERGED
2007/02/18 18:18:56 pl 1.26.162.1: #i74635# get rid of implicit global ResMgr
Diffstat (limited to 'vcl/source/gdi/image.cxx')
-rw-r--r--vcl/source/gdi/image.cxx23
1 files changed, 8 insertions, 15 deletions
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index 18c9c8e8cbba..f3d9f800f97b 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: image.cxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 12:02:02 $
+ * last change: $Author: rt $ $Date: 2007-04-26 09:29:11 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -106,11 +106,7 @@ Image::Image( const ResId& rResId ) :
rResId.SetRT( RSC_IMAGE );
ResMgr* pResMgr = rResId.GetResMgr();
-
- if( !pResMgr )
- pResMgr = Resource::GetResManager();
-
- if( pResMgr->GetResource( rResId ) )
+ if( pResMgr && pResMgr->GetResource( rResId ) )
{
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
@@ -119,7 +115,7 @@ Image::Image( const ResId& rResId ) :
if( nObjMask & RSC_IMAGE_IMAGEBITMAP )
{
- aBmpEx = BitmapEx( ResId( (RSHEADER_TYPE*)pResMgr->GetClass() ) );
+ aBmpEx = BitmapEx( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) );
pResMgr->Increment( pResMgr->GetObjSize( (RSHEADER_TYPE*)pResMgr->GetClass() ) );
}
@@ -129,7 +125,7 @@ Image::Image( const ResId& rResId ) :
{
if( aBmpEx.GetTransparentType() == TRANSPARENT_NONE )
{
- const Bitmap aMaskBitmap( ResId( (RSHEADER_TYPE*)pResMgr->GetClass() ) );
+ const Bitmap aMaskBitmap( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) );
aBmpEx = BitmapEx( aBmpEx.GetBitmap(), aMaskBitmap );
}
}
@@ -143,7 +139,7 @@ Image::Image( const ResId& rResId ) :
{
if( aBmpEx.GetTransparentType() == TRANSPARENT_NONE )
{
- const Color aMaskColor( ResId( (RSHEADER_TYPE*)pResMgr->GetClass() ) );
+ const Color aMaskColor( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) );
aBmpEx = BitmapEx( aBmpEx.GetBitmap(), aMaskColor );
}
}
@@ -493,10 +489,7 @@ ImageList::ImageList( const ResId& rResId ) :
ResMgr* pResMgr = rResId.GetResMgr();
- if( !pResMgr )
- pResMgr = Resource::GetResManager();
-
- if( pResMgr->GetResource( rResId ) )
+ if( pResMgr && pResMgr->GetResource( rResId ) )
{
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
@@ -505,7 +498,7 @@ ImageList::ImageList( const ResId& rResId ) :
::boost::scoped_ptr< Color > spMaskColor;
if( nObjMask & RSC_IMAGE_MASKCOLOR )
- spMaskColor.reset( new Color( ResId( (RSHEADER_TYPE*)pResMgr->GetClass() ) ) );
+ spMaskColor.reset( new Color( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) ) );
pResMgr->Increment( pResMgr->GetObjSize( (RSHEADER_TYPE*)pResMgr->GetClass() ) );