Kaydet (Commit) fe45c9ef authored tarafından Caolán McNamara's avatar Caolán McNamara

restore ImageList::AddImage variant

correctly removed in 804e8617
but we will need it again soon

Change-Id: I52700cb4da0285bf08db20af2d7c314a37c4fee2
üst 70ecdef0
......@@ -103,6 +103,7 @@ public:
Size GetImageSize() const;
void AddImage( const OUString& rImageName, const Image& rImage );
void AddImage( sal_uInt16 nNewId, const Image& rImage );
void ReplaceImage( const OUString& rImageName, const Image& rImage );
......
......@@ -505,6 +505,21 @@ sal_uInt16 ImageList::ImplGetImageId( const OUString& rImageName ) const
return 0;
}
void ImageList::AddImage( sal_uInt16 nId, const Image& rImage )
{
DBG_CHKTHIS( ImageList, NULL );
DBG_CHKOBJ( &rImage, Image, NULL );
DBG_ASSERT( nId, "ImageList::AddImage(): ImageId == 0" );
DBG_ASSERT( GetImagePos( nId ) == IMAGELIST_IMAGE_NOTFOUND, "ImageList::AddImage() - ImageId already exists" );
DBG_ASSERT( rImage.mpImplData, "ImageList::AddImage(): Wrong Size" );
DBG_ASSERT( !mpImplData || (rImage.GetSizePixel() == mpImplData->maImageSize), "ImageList::AddImage(): Wrong Size" );
if( !mpImplData )
ImplInit( 0, rImage.GetSizePixel() );
mpImplData->AddImage( rtl::OUString(), nId, rImage.GetBitmapEx());
}
void ImageList::AddImage( const OUString& rImageName, const Image& rImage )
{
DBG_ASSERT( GetImagePos( rImageName ) == IMAGELIST_IMAGE_NOTFOUND, "ImageList::AddImage() - ImageName already exists" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment