incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Herbert Duerr <>
Subject Re: Build fails in main/drawinglayer/source/texture/texture3d.cxx
Date Fri, 19 Oct 2012 13:19:12 GMT
On 18.10.2012 14:14, Armin Le Grand wrote:
> [...]
> ..but will convert BitmapColor to sal_uInt8 (because there is a inline
> operator in the class BitmapColor), then casting to sal_uInt32 (since
> ColorData is a typedef to sal_uInt32) and thus would be wrong. Sigh.
> Herbert is right, these operators are dangerous. I found two ways:
> (a) extract RGB by feet from BitmapColor and construct a Color with it
> (b) use the 'operator Color()' : '== aBitmapColor.operator Color()'
> Where (a) will need more code, and (b) looks ugly.
> I tend to (b) currently...

Option (c) could be even better: removal of both the dangerous 
conversion BitmapColor::operator sal_uInt8() and the implicit 
construction of a BitmapColor from a sal_uInt8.

But binfilter depends on their behind the scenes conversions and nobody 
should or would want to touch binfilter to make it compile again after 
such a change. Yet another reason to get rid of binfilter...


View raw message