Kaydet (Commit) 1a4fcb7f authored tarafından Noel Grandin's avatar Noel Grandin

simplify ImageList::GetAsHorizontalStrip

no need to repeat logic the BitmapEx constructor already implements

Change-Id: Ic958b3a3baafe9911b8461e1fc512e36616db89c
Reviewed-on: https://gerrit.libreoffice.org/51401Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst f07e2496
......@@ -74,14 +74,7 @@ BitmapEx ImageList::GetAsHorizontalStrip() const
}
BitmapEx aTempl = mpImplData->maImages[ 0 ]->maBitmapEx;
BitmapEx aResult;
Bitmap aPixels( aSize, aTempl.GetBitmap().GetBitCount() );
if( aTempl.IsAlpha() )
aResult = BitmapEx( aPixels, AlphaMask( aSize ) );
else if( aTempl.IsTransparent() )
aResult = BitmapEx( aPixels, Bitmap( aSize, aTempl.GetMask().GetBitCount() ) );
else
aResult = BitmapEx( aPixels );
BitmapEx aResult( aTempl, Point(), aSize );
tools::Rectangle aSrcRect( Point( 0, 0 ), mpImplData->maImageSize );
for (sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++)
......
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