[Libreoffice-commits] core.git: vcl/unx
Jan Holesovsky
kendy at collabora.com
Thu Jul 30 03:17:43 PDT 2015
vcl/unx/gtk/window/gtksalframe.cxx | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
New commits:
commit 28ef8e43cdb2944326963c0becc2812a46be5be1
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
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 2439d45..1db20e5 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -1693,15 +1693,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