[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/unx

Jan Holesovsky kendy at collabora.com
Fri Jul 31 07:22:52 PDT 2015


 vcl/unx/gtk/window/gtksalframe.cxx |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 0e530f22bf43993ca5db7efec4b6dbc0673b2e12
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Jul 30 12:13:30 2015 +0200

    tdf#92765: Show the real icon instead of a black square with gtk vclplug.
    
    This partially brings back the behavior before
    10a3db37377a68ec7529bbfbf876c852d58b7ae4.
    
    Change-Id: I5b372ab56105c05dda6ecb9aa1eed1c6a0c72ea8
    Reviewed-on: https://gerrit.libreoffice.org/17420
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index ba2f79b..7f8570e 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -1659,15 +1659,20 @@ bitmapToPixbuf( SalBitmap *pSalBitmap, SalBitmap *pSalAlpha )
         for( nX = 0; nX < pBitmap->mnWidth; nX++ )
         {
             BitmapColor aColor;
-            if (pBitmap->mnBitCount == 24)
+            if (pBitmap->mnFormat == BMP_FORMAT_24BIT_TC_BGR)
             {
-                pBitmap->maColorMask.GetColorFor24Bit(aColor, pData);
-                pData+=3;
+                aColor = BitmapColor(pData[2], pData[1], pData[0]);
+                pData += 3;
+            }
+            else if (pBitmap->mnFormat == BMP_FORMAT_24BIT_TC_RGB)
+            {
+                aColor = BitmapColor(pData[0], pData[1], pData[2]);
+                pData += 3;
             }
             else
             {
                 pBitmap->maColorMask.GetColorFor32Bit(aColor, pData);
-                pData+=4;
+                pData += 4;
             }
             *pDestData++ = aColor.GetRed();
             *pDestData++ = aColor.GetGreen();


More information about the Libreoffice-commits mailing list