Kaydet (Commit) 1f588cba authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Andras Timar

tdf#94384 change the black icons fix for LO 5.0

commit 15195fb8 removed the Windows
specific codepath in ImplUpdateDisplayBmp, but it is much safer for
LO 5.0 to skip the problematic codepath only when OpenGL is enabled.

The codepath will stay removed only in master.

Change-Id: I438e8194f5ebfee2c58193aeb7fd00e1d44b9690
Reviewed-on: https://gerrit.libreoffice.org/19403Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
(cherry picked from commit 6b7ae3f8)
üst e4ed1efc
......@@ -29,6 +29,10 @@
#include <image.h>
#include <boost/scoped_array.hpp>
#if defined WNT
#include <vcl/opengl/OpenGLHelper.hxx>
#endif
#define IMPSYSIMAGEITEM_MASK ( 0x01 )
#define IMPSYSIMAGEITEM_ALPHA ( 0x02 )
......@@ -327,11 +331,28 @@ void ImplImageBmp::Draw( sal_uInt16 nPos, OutputDevice* pOutDev,
}
}
void ImplImageBmp::ImplUpdateDisplayBmp(OutputDevice*)
void ImplImageBmp::ImplUpdateDisplayBmp( OutputDevice*
#if defined WNT
pOutDev
#endif
)
{
if (!mpDisplayBmp && !maBmpEx.IsEmpty())
if( !mpDisplayBmp && !maBmpEx.IsEmpty() )
{
mpDisplayBmp = new BitmapEx(maBmpEx);
#if defined WNT
if( !maBmpEx.IsAlpha() && !OpenGLHelper::isVCLOpenGLEnabled())
{
// FIXME: this looks like rather an obsolete code-path to me.
const Bitmap aBmp( maBmpEx.GetBitmap().CreateDisplayBitmap( pOutDev ) );
if( maBmpEx.IsTransparent() )
mpDisplayBmp = new BitmapEx( aBmp, maBmpEx.GetMask().CreateDisplayBitmap( pOutDev ) );
else
mpDisplayBmp = new BitmapEx( aBmp );
}
else
#endif
mpDisplayBmp = new BitmapEx( maBmpEx );
}
}
......
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