diff options
Diffstat (limited to 'vcl/source/helper/canvastools.cxx')
-rw-r--r-- | vcl/source/helper/canvastools.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx index 71c306ff9bbb..36fdd514efe9 100644 --- a/vcl/source/helper/canvastools.cxx +++ b/vcl/source/helper/canvastools.cxx @@ -116,11 +116,11 @@ namespace vcl { RTL_LOGFILE_CONTEXT( aLog, "::vcl::unotools::polygonFromPoint2DSequence()" ); - const USHORT nCurrSize( sal::static_int_cast<USHORT>(points.getLength()) ); + const sal_uInt16 nCurrSize( sal::static_int_cast<sal_uInt16>(points.getLength()) ); ::Polygon aPoly( nCurrSize ); - USHORT nCurrPoint; + sal_uInt16 nCurrPoint; for( nCurrPoint=0; nCurrPoint<nCurrSize; ++nCurrPoint ) aPoly[nCurrPoint] = pointFromRealPoint2D( points[nCurrPoint] ); @@ -254,7 +254,7 @@ namespace vcl { const rendering::ARGBColor& rColor=aARGBColors[x]; rWriteAcc->SetPixel( aRect.Y1, x, - (BYTE)rWriteAcc->GetBestPaletteIndex( + (sal_uInt8)rWriteAcc->GetBestPaletteIndex( BitmapColor( toByteColor(rColor.Red), toByteColor(rColor.Green), toByteColor(rColor.Blue))) ); @@ -286,7 +286,7 @@ namespace vcl { const rendering::RGBColor& rColor=aRGBColors[x]; rWriteAcc->SetPixel( aRect.Y1, x, - (BYTE)rWriteAcc->GetBestPaletteIndex( + (sal_uInt8)rWriteAcc->GetBestPaletteIndex( BitmapColor( toByteColor(rColor.Red), toByteColor(rColor.Green), toByteColor(rColor.Blue))) ); @@ -384,8 +384,8 @@ namespace vcl else nDepth = 8; - const USHORT nPaletteEntries( - sal::static_int_cast<USHORT>( + const sal_uInt16 nPaletteEntries( + sal::static_int_cast<sal_uInt16>( std::min(sal_Int32(255), nEntryCount))); // copy palette entries @@ -394,7 +394,7 @@ namespace vcl uno::Reference<rendering::XColorSpace> xPalColorSpace( xPalette->getColorSpace() ); uno::Sequence<double> aPaletteEntry; - for( USHORT j=0; j<nPaletteEntries; ++j ) + for( sal_uInt16 j=0; j<nPaletteEntries; ++j ) { if( !xPalette->getIndex(aPaletteEntry,j) && nAlphaDepth == 0 ) @@ -422,14 +422,14 @@ namespace vcl ( nDepth <= 8 ) ? 8 : 24; ::Bitmap aBitmap( aPixelSize, - sal::static_int_cast<USHORT>(nDepth), + sal::static_int_cast<sal_uInt16>(nDepth), aLayout.Palette.is() ? &aPalette : NULL ); ::Bitmap aAlpha; if( nAlphaDepth ) aAlpha = ::Bitmap( aPixelSize, - sal::static_int_cast<USHORT>(nAlphaDepth), + sal::static_int_cast<sal_uInt16>(nAlphaDepth), &::Bitmap::GetGreyPalette( - sal::static_int_cast<USHORT>(1L << nAlphaDepth)) ); + sal::static_int_cast<sal_uInt16>(1L << nAlphaDepth)) ); { // limit scoped access ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(), |