diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-07-10 13:20:30 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-07-10 13:20:30 +0000 |
commit | 0c6e1d6587bd5779f906486fccbc016cf94799a6 (patch) | |
tree | b8e505308b6f9e8964fa2393f967c8cb44ef3791 /vcl/unx/source/gdi/salbmp.cxx | |
parent | 027b3a2081dc4e363897e00ab04db6ce6da831fb (diff) |
INTEGRATION: CWS bitcount01 (1.19.38); FILE MERGED
2006/04/13 23:48:46 thb 1.19.38.2: RESYNC: (1.19-1.20); FILE MERGED
2006/04/07 09:15:14 hdu 1.19.38.1: #i63959# do not lie about bitcounts
Diffstat (limited to 'vcl/unx/source/gdi/salbmp.cxx')
-rw-r--r-- | vcl/unx/source/gdi/salbmp.cxx | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/vcl/unx/source/gdi/salbmp.cxx b/vcl/unx/source/gdi/salbmp.cxx index bfc73b59cd35..65599de50fb9 100644 --- a/vcl/unx/source/gdi/salbmp.cxx +++ b/vcl/unx/source/gdi/salbmp.cxx @@ -4,9 +4,9 @@ * * $RCSfile: salbmp.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: hr $ $Date: 2006-06-19 19:53:52 $ + * last change: $Author: obo $ $Date: 2006-07-10 14:20:30 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -133,7 +133,7 @@ void X11SalBitmap::ImplRemovedFromCache() BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ) { - DBG_ASSERT( nBitCount == 1 || nBitCount == 4 || nBitCount == 8 || nBitCount == 24, "Unsupported BitCount!" ); + DBG_ASSERT( nBitCount == 1 || nBitCount == 4 || nBitCount == 8 || nBitCount == 16 || nBitCount == 24, "Unsupported BitCount!" ); BitmapBuffer* pDIB; @@ -152,6 +152,11 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount, case( 1 ): pDIB->mnFormat |= BMP_FORMAT_1BIT_MSB_PAL; break; case( 4 ): pDIB->mnFormat |= BMP_FORMAT_4BIT_MSN_PAL; break; case( 8 ): pDIB->mnFormat |= BMP_FORMAT_8BIT_PAL; break; +#ifdef OSL_BIGENDIAN + case(16 ) : pDIB->mnFormat|= BMP_FORMAT_16BIT_TC_MSB_MASK; break; +#else + case(16 ) : pDIB->mnFormat|= BMP_FORMAT_16BIT_TC_LSB_MASK; break; +#endif default: nBitCount = 24; //fall through @@ -820,19 +825,7 @@ USHORT X11SalBitmap::GetBitCount() const if( mpDIB ) nBitCount = mpDIB->mnBitCount; else if( mpDDB ) - { nBitCount = mpDDB->ImplGetDepth(); - - if( nBitCount && nBitCount > 1 ) - { - if( nBitCount <= 4 ) - nBitCount = 4; - else if( nBitCount <= 8 ) - nBitCount = 8; - else - nBitCount = 24; - } - } else nBitCount = 0; |