diff options
Diffstat (limited to 'vcl/source/helper/canvasbitmap.cxx')
-rw-r--r-- | vcl/source/helper/canvasbitmap.cxx | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx index 2bc0ab94d272..711a985b6fe5 100644 --- a/vcl/source/helper/canvasbitmap.cxx +++ b/vcl/source/helper/canvasbitmap.cxx @@ -65,7 +65,7 @@ namespace } } -void VclCanvasBitmap::setComponentInfo( ULONG redShift, ULONG greenShift, ULONG blueShift ) +void VclCanvasBitmap::setComponentInfo( sal_uLong redShift, sal_uLong greenShift, sal_uLong blueShift ) { // sort channels in increasing order of appearance in the pixel // (starting with the least significant bits) @@ -682,14 +682,14 @@ sal_Bool SAL_CALL VclCanvasBitmap::getIndex( uno::Sequence< double >& o_entry, s { vos::OGuard aGuard( Application::GetSolarMutex() ); - const USHORT nCount( m_pBmpAcc ? + const sal_uInt16 nCount( m_pBmpAcc ? (m_pBmpAcc->HasPalette() ? m_pBmpAcc->GetPaletteEntryCount() : 0 ) : 0 ); OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range"); if( nIndex < 0 || nIndex >= nCount ) throw lang::IndexOutOfBoundsException(::rtl::OUString::createFromAscii("Palette index out of range"), static_cast<rendering::XBitmapPalette*>(this)); - const BitmapColor aCol = m_pBmpAcc->GetPaletteColor(sal::static_int_cast<USHORT>(nIndex)); + const BitmapColor aCol = m_pBmpAcc->GetPaletteColor(sal::static_int_cast<sal_uInt16>(nIndex)); o_entry.realloc(3); double* pColor=o_entry.getArray(); pColor[0] = aCol.GetRed(); @@ -703,7 +703,7 @@ sal_Bool SAL_CALL VclCanvasBitmap::setIndex( const uno::Sequence< double >&, sal { vos::OGuard aGuard( Application::GetSolarMutex() ); - const USHORT nCount( m_pBmpAcc ? + const sal_uInt16 nCount( m_pBmpAcc ? (m_pBmpAcc->HasPalette() ? m_pBmpAcc->GetPaletteEntryCount() : 0 ) : 0 ); OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range"); @@ -787,7 +787,7 @@ uno::Sequence<rendering::RGBColor> SAL_CALL VclCanvasBitmap::convertToRGB( const for( sal_Size i=0; i<nLen; i+=nComponentsPerPixel ) { const BitmapColor aCol = m_pBmpAcc->GetPaletteColor( - sal::static_int_cast<USHORT>(deviceColor[i+m_nIndexIndex])); + sal::static_int_cast<sal_uInt16>(deviceColor[i+m_nIndexIndex])); // TODO(F3): Convert result to sRGB color space *pOut++ = rendering::RGBColor(toDoubleColor(aCol.GetRed()), @@ -836,7 +836,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertToARGB( con for( sal_Size i=0; i<nLen; i+=nComponentsPerPixel ) { const BitmapColor aCol = m_pBmpAcc->GetPaletteColor( - sal::static_int_cast<USHORT>(deviceColor[i+m_nIndexIndex])); + sal::static_int_cast<sal_uInt16>(deviceColor[i+m_nIndexIndex])); // TODO(F3): Convert result to sRGB color space const double nAlpha( m_nAlphaIndex != -1 ? 1.0 - deviceColor[i+m_nAlphaIndex] : 1.0 ); @@ -889,7 +889,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertToPARGB( co for( sal_Size i=0; i<nLen; i+=nComponentsPerPixel ) { const BitmapColor aCol = m_pBmpAcc->GetPaletteColor( - sal::static_int_cast<USHORT>(deviceColor[i+m_nIndexIndex])); + sal::static_int_cast<sal_uInt16>(deviceColor[i+m_nIndexIndex])); // TODO(F3): Convert result to sRGB color space const double nAlpha( m_nAlphaIndex != -1 ? 1.0 - deviceColor[i+m_nAlphaIndex] : 1.0 ); @@ -1085,7 +1085,7 @@ uno::Sequence<double> SAL_CALL VclCanvasBitmap::convertFromIntegerColorSpace( co for( sal_Size i=0; i<nLen; i+=nComponentsPerPixel ) { const BitmapColor aCol = m_pBmpAcc->GetPaletteColor( - sal::static_int_cast<USHORT>(deviceColor[i+m_nIndexIndex])); + sal::static_int_cast<sal_uInt16>(deviceColor[i+m_nIndexIndex])); // TODO(F3): Convert result to sRGB color space const double nAlpha( m_nAlphaIndex != -1 ? 1.0 - deviceColor[i+m_nAlphaIndex] : 1.0 ); @@ -1145,7 +1145,7 @@ uno::Sequence<rendering::RGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToRGB { vos::OGuard aGuard( Application::GetSolarMutex() ); - const BYTE* pIn( reinterpret_cast<const BYTE*>(deviceColor.getConstArray()) ); + const sal_uInt8* pIn( reinterpret_cast<const sal_uInt8*>(deviceColor.getConstArray()) ); const sal_Size nLen( deviceColor.getLength() ); const sal_Int32 nNumColors((nLen*8 + m_nBitsPerOutputPixel-1)/m_nBitsPerOutputPixel); @@ -1181,7 +1181,7 @@ uno::Sequence<rendering::RGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToRGB const BitmapColor aCol = m_bPalette ? m_pBmpAcc->GetPaletteColor( - sal::static_int_cast<USHORT>( + sal::static_int_cast<sal_uInt16>( m_pBmpAcc->GetPixelFromData( pIn, i ))) : m_pBmpAcc->GetPixelFromData(pIn, i); @@ -1200,7 +1200,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToAR { vos::OGuard aGuard( Application::GetSolarMutex() ); - const BYTE* pIn( reinterpret_cast<const BYTE*>(deviceColor.getConstArray()) ); + const sal_uInt8* pIn( reinterpret_cast<const sal_uInt8*>(deviceColor.getConstArray()) ); const sal_Size nLen( deviceColor.getLength() ); const sal_Int32 nNumColors((nLen*8 + m_nBitsPerOutputPixel-1)/m_nBitsPerOutputPixel); @@ -1238,7 +1238,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToAR const BitmapColor aCol = m_bPalette ? m_pBmpAcc->GetPaletteColor( - sal::static_int_cast<USHORT>( + sal::static_int_cast<sal_uInt16>( m_pBmpAcc->GetPixelFromData( pIn, i ))) : m_pBmpAcc->GetPixelFromData(pIn, i); @@ -1258,7 +1258,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToPA { vos::OGuard aGuard( Application::GetSolarMutex() ); - const BYTE* pIn( reinterpret_cast<const BYTE*>(deviceColor.getConstArray()) ); + const sal_uInt8* pIn( reinterpret_cast<const sal_uInt8*>(deviceColor.getConstArray()) ); const sal_Size nLen( deviceColor.getLength() ); const sal_Int32 nNumColors((nLen*8 + m_nBitsPerOutputPixel-1)/m_nBitsPerOutputPixel); @@ -1297,7 +1297,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToPA const BitmapColor aCol = m_bPalette ? m_pBmpAcc->GetPaletteColor( - sal::static_int_cast<USHORT>( + sal::static_int_cast<sal_uInt16>( m_pBmpAcc->GetPixelFromData( pIn, i ))) : m_pBmpAcc->GetPixelFromData(pIn, i); @@ -1321,7 +1321,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromRGB( con const sal_Int32 nNumBytes((nLen*m_nBitsPerOutputPixel+7)/8); uno::Sequence< sal_Int8 > aRes(nNumBytes); - BYTE* pColors=reinterpret_cast<BYTE*>(aRes.getArray()); + sal_uInt8* pColors=reinterpret_cast<sal_uInt8*>(aRes.getArray()); if( m_aBmpEx.IsTransparent() ) { @@ -1334,12 +1334,12 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromRGB( con const BitmapColor aCol2 = m_bPalette ? BitmapColor( - sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) : + sal::static_int_cast<sal_uInt8>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) : aCol; m_pBmpAcc->SetPixelOnData(pColors,0,aCol2); pColors += nNonAlphaBytes; - *pColors++ = BYTE(255); + *pColors++ = sal_uInt8(255); } } else @@ -1352,7 +1352,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromRGB( con const BitmapColor aCol2 = m_bPalette ? BitmapColor( - sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) : + sal::static_int_cast<sal_uInt8>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) : aCol; m_pBmpAcc->SetPixelOnData(pColors,i,aCol2); @@ -1370,7 +1370,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromARGB( co const sal_Int32 nNumBytes((nLen*m_nBitsPerOutputPixel+7)/8); uno::Sequence< sal_Int8 > aRes(nNumBytes); - BYTE* pColors=reinterpret_cast<BYTE*>(aRes.getArray()); + sal_uInt8* pColors=reinterpret_cast<sal_uInt8*>(aRes.getArray()); if( m_aBmpEx.IsTransparent() ) { @@ -1383,7 +1383,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromARGB( co const BitmapColor aCol2 = m_bPalette ? BitmapColor( - sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) : + sal::static_int_cast<sal_uInt8>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) : aCol; m_pBmpAcc->SetPixelOnData(pColors,0,aCol2); @@ -1401,7 +1401,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromARGB( co const BitmapColor aCol2 = m_bPalette ? BitmapColor( - sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) : + sal::static_int_cast<sal_uInt8>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) : aCol; m_pBmpAcc->SetPixelOnData(pColors,i,aCol2); @@ -1419,7 +1419,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromPARGB( c const sal_Int32 nNumBytes((nLen*m_nBitsPerOutputPixel+7)/8); uno::Sequence< sal_Int8 > aRes(nNumBytes); - BYTE* pColors=reinterpret_cast<BYTE*>(aRes.getArray()); + sal_uInt8* pColors=reinterpret_cast<sal_uInt8*>(aRes.getArray()); if( m_aBmpEx.IsTransparent() ) { @@ -1433,7 +1433,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromPARGB( c const BitmapColor aCol2 = m_bPalette ? BitmapColor( - sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) : + sal::static_int_cast<sal_uInt8>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) : aCol; m_pBmpAcc->SetPixelOnData(pColors,0,aCol2); @@ -1451,7 +1451,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromPARGB( c const BitmapColor aCol2 = m_bPalette ? BitmapColor( - sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) : + sal::static_int_cast<sal_uInt8>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) : aCol; m_pBmpAcc->SetPixelOnData(pColors,i,aCol2); |