summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-16 12:57:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-16 15:15:15 +0100
commit1a4fcb7feac223e9384a2b91fc6db8a16a5dbe78 (patch)
treebab28e1dad7160450c4dfdf5cdd53170c3357003
parentf07e2496963baf8f7c0fecc79e7a420544075d98 (diff)
simplify ImageList::GetAsHorizontalStrip
no need to repeat logic the BitmapEx constructor already implements Change-Id: Ic958b3a3baafe9911b8461e1fc512e36616db89c Reviewed-on: https://gerrit.libreoffice.org/51401 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r--framework/source/uiconfiguration/ImageList.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/framework/source/uiconfiguration/ImageList.cxx b/framework/source/uiconfiguration/ImageList.cxx
index 3e39b08f45f8..575cfd8de6c6 100644
--- a/framework/source/uiconfiguration/ImageList.cxx
+++ b/framework/source/uiconfiguration/ImageList.cxx
@@ -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++)