[Libreoffice-commits] core.git: framework/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Mar 16 14:15:42 UTC 2018


 framework/source/uiconfiguration/ImageList.cxx |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

New commits:
commit 1a4fcb7feac223e9384a2b91fc6db8a16a5dbe78
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Mar 16 12:57:57 2018 +0200

    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 at collabora.com>
    Tested-by: Jenkins <ci at libreoffice.org>

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++)


More information about the Libreoffice-commits mailing list