summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-06-06 13:09:15 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-06-06 13:09:15 +0000
commit2fca9fd51ab4f49774878ff583ce09a96508b0d5 (patch)
treeb3ccc2ca99744c655319f25771583ccf9f81209b /sfx2
parenteb7a8e789f20a9191a6dffdaa8db412ab246f814 (diff)
INTEGRATION: CWS ka009 (1.27.26); FILE MERGED
2006/10/13 15:50:02 ka 1.27.26.2: RESYNC: (1.27-1.28); FILE MERGED 2006/07/12 21:44:25 ka 1.27.26.1: #i66680#: added patch for optimized ImageList handling
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/toolbox/imgmgr.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
index 80d334aa22d7..e52a9475f08d 100644
--- a/sfx2/source/toolbox/imgmgr.cxx
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: imgmgr.cxx,v $
*
- * $Revision: 1.29 $
+ * $Revision: 1.30 $
*
- * last change: $Author: rt $ $Date: 2007-04-26 10:15:20 $
+ * last change: $Author: ihi $ $Date: 2007-06-06 14:09:15 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -217,7 +217,7 @@ ImageList* SfxImageManager_Impl::GetImageList( BOOL bBig, BOOL bHiContrast )
Image SfxImageManager_Impl::GetImage( USHORT nId, BOOL bBig, BOOL bHiContrast )
{
ImageList* pImageList = GetImageList( bBig, bHiContrast );
- if ( pImageList && pImageList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ if ( pImageList )
return pImageList->GetImage( nId );
return Image();
}
@@ -328,7 +328,7 @@ SfxImageManager* SfxImageManager::GetImageManager( SfxModule* pModule )
Image SfxImageManager::GetImage( USHORT nId, BOOL bBig, BOOL bHiContrast ) const
{
ImageList* pImageList = pImp->GetImageList( bBig, bHiContrast );
- if ( pImageList && pImageList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ if ( pImageList && pImageList->HasImageAtPos( nId ) )
return pImageList->GetImage( nId );
return Image();
}
@@ -347,12 +347,12 @@ Image SfxImageManager::SeekImage( USHORT nId, BOOL bBig, BOOL bHiContrast ) cons
{
sal_Bool bGlobal = ( pImp->m_pModule == 0 );
ImageList* pImageList = pImp->GetImageList( bBig, bHiContrast );
- if ( pImageList && pImageList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ if ( pImageList && pImageList->HasImageAtPos( nId ) )
return pImageList->GetImage( nId );
else if ( !bGlobal )
{
pImageList = ::GetImageManager( 0 )->GetImageList( bBig, bHiContrast );
- if ( pImageList && pImageList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ if ( pImageList )
return pImageList->GetImage( nId );
}
return Image();
@@ -416,7 +416,7 @@ void SfxImageManager::SetImagesForceSize( ToolBox& rToolBox, BOOL bHiContrast, B
{
case TOOLBOXITEM_BUTTON:
{
- if ( pImageList && pImageList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ if ( pImageList && pImageList->HasImageAtPos( nId ) )
rToolBox.SetItemImage( nId, pImageList->GetImage( nId ));
else
rToolBox.SetItemImage( nId, Image() );