summaryrefslogtreecommitdiff
path: root/canvas/source
diff options
context:
space:
mode:
Diffstat (limited to 'canvas/source')
-rw-r--r--canvas/source/cairo/cairo_canvasfont.cxx4
-rw-r--r--canvas/source/cairo/cairo_canvashelper_text.cxx2
-rw-r--r--canvas/source/cairo/cairo_canvashelper_texturefill.cxx2
-rw-r--r--canvas/source/cairo/cairo_devicehelper.cxx2
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx2
-rwxr-xr-xcanvas/source/directx/dx_5rm.cxx6
-rwxr-xr-xcanvas/source/directx/dx_9rm.cxx4
-rwxr-xr-xcanvas/source/directx/dx_textlayout_drawhelper.cxx8
-rwxr-xr-xcanvas/source/directx/dx_winstuff.hxx6
-rw-r--r--canvas/source/tools/image.cxx44
-rw-r--r--canvas/source/vcl/bitmapbackbuffer.cxx6
-rw-r--r--canvas/source/vcl/canvasbitmap.cxx2
-rw-r--r--canvas/source/vcl/canvasbitmaphelper.cxx12
-rw-r--r--canvas/source/vcl/canvasfont.cxx4
-rw-r--r--canvas/source/vcl/canvashelper.cxx54
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx44
-rw-r--r--canvas/source/vcl/devicehelper.cxx2
-rw-r--r--canvas/source/vcl/impltools.cxx18
-rw-r--r--canvas/source/vcl/impltools.hxx2
-rw-r--r--canvas/source/vcl/spritecanvashelper.cxx10
-rw-r--r--canvas/source/vcl/spritedevicehelper.cxx2
-rw-r--r--canvas/source/vcl/spritehelper.cxx4
-rw-r--r--canvas/source/vcl/textlayout.cxx28
23 files changed, 131 insertions, 137 deletions
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx
index 452280728151..e90276f2ba33 100644
--- a/canvas/source/cairo/cairo_canvasfont.cxx
+++ b/canvas/source/cairo/cairo_canvasfont.cxx
@@ -78,7 +78,7 @@ namespace cairocanvas
{
maFont->SetAlign( ALIGN_BASELINE );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE );
+ maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
// TODO(F2): improve panose->vclenum conversion
maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
@@ -94,7 +94,7 @@ namespace cairocanvas
if( pOutDev )
{
const bool bOldMapState( pOutDev->IsMapModeEnabled() );
- pOutDev->EnableMapMode(FALSE);
+ pOutDev->EnableMapMode(sal_False);
const Size aSize = pOutDev->GetFontMetric( *maFont ).GetSize();
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx
index 35310e1c078d..7e60d912e1ca 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -318,7 +318,7 @@ namespace cairocanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL); // no output necessary
// change text direction and layout mode
- ULONG nLayoutMode(0);
+ sal_uLong nLayoutMode(0);
switch( textDirection )
{
case rendering::TextDirection::WEAK_LEFT_TO_RIGHT:
diff --git a/canvas/source/cairo/cairo_canvashelper_texturefill.cxx b/canvas/source/cairo/cairo_canvashelper_texturefill.cxx
index ee8aff6980cf..43447645daf9 100644
--- a/canvas/source/cairo/cairo_canvashelper_texturefill.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_texturefill.cxx
@@ -82,7 +82,7 @@ namespace cairocanvas
const ::Size& rTileSize,
const GraphicAttr& rAttr)
{
- BOOL bRet( false );
+ bool bRet( false );
Point aCurrPos;
int nX, nY;
diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx
index 70a5ea51c0ea..36f7a2452aa5 100644
--- a/canvas/source/cairo/cairo_devicehelper.cxx
+++ b/canvas/source/cairo/cairo_devicehelper.cxx
@@ -270,7 +270,7 @@ namespace cairocanvas
const ::Point aEmptyPoint;
bool bOldMap( mpRefDevice->IsMapModeEnabled() );
- mpRefDevice->EnableMapMode( FALSE );
+ mpRefDevice->EnableMapMode( sal_False );
aStream << mpRefDevice->GetBitmap(aEmptyPoint,
mpRefDevice->GetOutputSizePixel());
mpRefDevice->EnableMapMode( bOldMap );
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index d0873b63f5f0..1da9197693ff 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -81,7 +81,7 @@ namespace cairocanvas
sal_Int8 nTextDirection )
{
// TODO(P3): avoid if already correctly set
- ULONG nLayoutMode;
+ sal_uLong nLayoutMode;
switch( nTextDirection )
{
default:
diff --git a/canvas/source/directx/dx_5rm.cxx b/canvas/source/directx/dx_5rm.cxx
index 642ef7bd7db6..ecc8e6af2a9b 100755
--- a/canvas/source/directx/dx_5rm.cxx
+++ b/canvas/source/directx/dx_5rm.cxx
@@ -1108,7 +1108,7 @@ namespace dxcanvas
const_cast<Window *>(&rWindow), 0) );
// system child window must not receive mouse events
- mpWindow->SetMouseTransparent( TRUE );
+ mpWindow->SetMouseTransparent( sal_True );
// parent should receive paint messages as well
// [PARENTCLIPMODE_NOCLIP], the argument is here
@@ -1117,11 +1117,11 @@ namespace dxcanvas
mpWindow->SetParentClipMode(0x0002);
// the system child window must not clear its background
- mpWindow->EnableEraseBackground( FALSE );
+ mpWindow->EnableEraseBackground( sal_False );
mpWindow->SetControlForeground();
mpWindow->SetControlBackground();
- mpWindow->EnablePaint(FALSE);
+ mpWindow->EnablePaint(sal_False);
const SystemEnvData *pData = mpWindow->GetSystemData();
const HWND hwnd(reinterpret_cast<HWND>(pData->hWnd));
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index a0f485befa12..6a2d218e936c 100755
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -696,11 +696,11 @@ namespace dxcanvas
mpWindow->SetParentClipMode(0x0002);
// the system child window must not clear its background
- mpWindow->EnableEraseBackground( FALSE );
+ mpWindow->EnableEraseBackground( sal_False );
mpWindow->SetControlForeground();
mpWindow->SetControlBackground();
- mpWindow->EnablePaint(FALSE);
+ mpWindow->EnablePaint(sal_False);
const SystemEnvData *pData = mpWindow->GetSystemData();
const HWND hwnd(reinterpret_cast<HWND>(pData->hWnd));
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index 56ec00e9a648..b246cf5bedeb 100755
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -129,7 +129,7 @@ namespace dxcanvas
aFont.SetAlign( ALIGN_BASELINE );
aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE );
+ aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
@@ -261,7 +261,7 @@ namespace dxcanvas
aFont.SetAlign( ALIGN_BASELINE );
aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE );
+ aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
@@ -301,8 +301,8 @@ namespace dxcanvas
return geometry::RealRectangle2D( 0, nAboveBaseline,
aVirtualDevice.GetTextWidth(
rText.Text,
- ::canvas::tools::numeric_cast<USHORT>(rText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(rText.Length) ),
+ ::canvas::tools::numeric_cast<sal_uInt16>(rText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(rText.Length) ),
nBelowBaseline );
}
}
diff --git a/canvas/source/directx/dx_winstuff.hxx b/canvas/source/directx/dx_winstuff.hxx
index d1718b07f3d1..f4dc1fcd0496 100755
--- a/canvas/source/directx/dx_winstuff.hxx
+++ b/canvas/source/directx/dx_winstuff.hxx
@@ -55,9 +55,6 @@
#endif
-#define BOOL win32BOOL
-#define INT32 win32INT32
-#define UINT32 win32UINT32
#define GradientStyle_RECT win32GradientStyle_RECT
#define Polygon win32Polygon
#define PolyPolygon win32PolyPolygon
@@ -211,9 +208,6 @@ namespace dxcanvas
#endif
#undef DELETE
-#undef BOOL
-#undef INT32
-#undef UINT32
#undef PolyPolygon
#endif /* _DXCANVAS_WINSTUFF_HXX */
diff --git a/canvas/source/tools/image.cxx b/canvas/source/tools/image.cxx
index b6183e463e99..4b8a2a334873 100644
--- a/canvas/source/tools/image.cxx
+++ b/canvas/source/tools/image.cxx
@@ -417,7 +417,7 @@ namespace canvas { namespace
// out notion of alpha is
// different from the rest
// of the world's
- *pCurrOutput++ = 255 - (BYTE)*pAScan++;
+ *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++;
}
}
break;
@@ -437,7 +437,7 @@ namespace canvas { namespace
// out notion of alpha is
// different from the rest
// of the world's
- *pCurrOutput++ = 255 - (BYTE)*pAScan++;
+ *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++;
}
}
break;
@@ -469,7 +469,7 @@ namespace canvas { namespace
// out notion of alpha is
// different from the rest
// of the world's
- *pCurrOutput++ = 255 - (BYTE)*pAScan++;
+ *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++;
}
}
break;
@@ -661,8 +661,8 @@ namespace canvas { namespace
else
{
// *no* alpha mask
- ULONG nFormat = pReadAccess->GetScanlineFormat();
- BYTE *pBuffer = reinterpret_cast<BYTE *>(rBmpData.mpBitmapData);
+ sal_uIntPtr nFormat = pReadAccess->GetScanlineFormat();
+ sal_uInt8 *pBuffer = reinterpret_cast<sal_uInt8 *>(rBmpData.mpBitmapData);
switch(nFormat)
{
@@ -672,14 +672,14 @@ namespace canvas { namespace
sal_Int32 height = pReadAccess->Height();
for(sal_Int32 y=0; y<height; ++y)
{
- BYTE *pScanline=pReadAccess->GetScanline(y);
+ sal_uInt8 *pScanline=pReadAccess->GetScanline(y);
sal_Int32 width = pReadAccess->Width();
for(sal_Int32 x=0; x<width; ++x)
{
// BGR -> RGB
- BYTE b(*pScanline++);
- BYTE g(*pScanline++);
- BYTE r(*pScanline++);
+ sal_uInt8 b(*pScanline++);
+ sal_uInt8 g(*pScanline++);
+ sal_uInt8 r(*pScanline++);
*pBuffer++ = r;
*pBuffer++ = g;
*pBuffer++ = b;
@@ -694,14 +694,14 @@ namespace canvas { namespace
sal_Int32 height = pReadAccess->Height();
for(sal_Int32 y=0; y<height; ++y)
{
- BYTE *pScanline=pReadAccess->GetScanline(y);
+ sal_uInt8 *pScanline=pReadAccess->GetScanline(y);
sal_Int32 width = pReadAccess->Width();
for(sal_Int32 x=0; x<width; ++x)
{
// RGB -> RGB
- BYTE r(*pScanline++);
- BYTE g(*pScanline++);
- BYTE b(*pScanline++);
+ sal_uInt8 r(*pScanline++);
+ sal_uInt8 g(*pScanline++);
+ sal_uInt8 b(*pScanline++);
*pBuffer++ = r;
*pBuffer++ = g;
*pBuffer++ = b;
@@ -720,7 +720,7 @@ namespace canvas { namespace
sal_Int32 height = pReadAccess->Height();
for(sal_Int32 y=0; y<height; ++y)
{
- BYTE *pScanline=pReadAccess->GetScanline(y);
+ sal_uInt8 *pScanline=pReadAccess->GetScanline(y);
sal_Int32 width = pReadAccess->Width();
for(sal_Int32 x=0; x<width; ++x)
{
@@ -1263,11 +1263,11 @@ ImageCachedPrimitiveSharedPtr Image::fillTexturedPolyPolygonImpl(
sal_uInt8 *pDst=pDstBuffer;
for(sal_Int32 x=0; x<dwWidth; ++x)
{
- BYTE r(*pSrc++);
- BYTE g(*pSrc++);
- BYTE b(*pSrc++);
- BYTE Alpha(*pSrc++);
- BYTE OneMinusAlpha(0xFF-Alpha);
+ sal_uInt8 r(*pSrc++);
+ sal_uInt8 g(*pSrc++);
+ sal_uInt8 b(*pSrc++);
+ sal_uInt8 Alpha(*pSrc++);
+ sal_uInt8 OneMinusAlpha(0xFF-Alpha);
*pDst=(((r*Alpha)+((*pDst)*OneMinusAlpha))/0xFF);
++pDst;
*pDst=(((g*Alpha)+((*pDst)*OneMinusAlpha))/0xFF);
@@ -1287,9 +1287,9 @@ ImageCachedPrimitiveSharedPtr Image::fillTexturedPolyPolygonImpl(
sal_uInt8 *pDst=pDstBuffer;
for(sal_Int32 x=0; x<dwWidth; ++x)
{
- BYTE r(*pSrc++);
- BYTE g(*pSrc++);
- BYTE b(*pSrc++);
+ sal_uInt8 r(*pSrc++);
+ sal_uInt8 g(*pSrc++);
+ sal_uInt8 b(*pSrc++);
*pDst++=r;
*pDst++=g;
*pDst++=b;
diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx
index c09721a5cfaf..53bb67dc32c2 100644
--- a/canvas/source/vcl/bitmapbackbuffer.cxx
+++ b/canvas/source/vcl/bitmapbackbuffer.cxx
@@ -88,7 +88,7 @@ namespace vclcanvas
if( mbVDevContentIsCurrent && mpVDev )
{
// VDev content is more current than bitmap - copy contents before!
- mpVDev->EnableMapMode( FALSE );
+ mpVDev->EnableMapMode( sal_False );
const Point aEmptyPoint;
*maBitmap = mpVDev->GetBitmapEx( aEmptyPoint,
mpVDev->GetOutputSizePixel() );
@@ -108,7 +108,7 @@ namespace vclcanvas
if( mbVDevContentIsCurrent && mpVDev )
{
- mpVDev->EnableMapMode( FALSE );
+ mpVDev->EnableMapMode( sal_False );
aSize = mpVDev->GetOutputSizePixel();
}
@@ -151,7 +151,7 @@ namespace vclcanvas
if( mpVDev && mbBitmapContentIsCurrent )
{
// fill with bitmap content
- mpVDev->EnableMapMode( FALSE );
+ mpVDev->EnableMapMode( sal_False );
const Point aEmptyPoint;
mpVDev->DrawBitmapEx( aEmptyPoint, *maBitmap );
}
diff --git a/canvas/source/vcl/canvasbitmap.cxx b/canvas/source/vcl/canvasbitmap.cxx
index 38008e86ba87..2b244602e3fd 100644
--- a/canvas/source/vcl/canvasbitmap.cxx
+++ b/canvas/source/vcl/canvasbitmap.cxx
@@ -49,7 +49,7 @@ namespace vclcanvas
{
// create bitmap for given reference device
// ========================================
- const USHORT nBitCount( (USHORT)24U );
+ const sal_uInt16 nBitCount( (sal_uInt16)24U );
const BitmapPalette* pPalette = NULL;
Bitmap aBitmap( rSize, nBitCount, pPalette );
diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx
index 8fb5a872589d..5b8f9fd84d94 100644
--- a/canvas/source/vcl/canvasbitmaphelper.cxx
+++ b/canvas/source/vcl/canvasbitmaphelper.cxx
@@ -266,7 +266,7 @@ namespace vclcanvas
x<aBmpSize.Width() && x<rect.X2;
++x )
{
- *pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex(
+ *pScan++ = (sal_uInt8)pWriteAccess->GetBestPaletteIndex(
BitmapColor( data[ nCurrPos ],
data[ nCurrPos+1 ],
data[ nCurrPos+2 ] ) );
@@ -274,7 +274,7 @@ namespace vclcanvas
nCurrPos += 3;
// cast to unsigned byte, for correct subtraction result
- *pAScan++ = static_cast<BYTE>(255 -
+ *pAScan++ = static_cast<sal_uInt8>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ]));
}
}
@@ -296,7 +296,7 @@ namespace vclcanvas
nCurrPos += 3;
// cast to unsigned byte, for correct subtraction result
- *pAScan++ = static_cast<BYTE>(255 -
+ *pAScan++ = static_cast<sal_uInt8>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ]));
}
}
@@ -318,7 +318,7 @@ namespace vclcanvas
nCurrPos += 3;
// cast to unsigned byte, for correct subtraction result
- *pAScan++ = static_cast<BYTE>(255 -
+ *pAScan++ = static_cast<sal_uInt8>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ]));
}
}
@@ -338,7 +338,7 @@ namespace vclcanvas
// cast to unsigned byte, for correct subtraction result
pAlphaWriteAccess->SetPixel( y, x,
BitmapColor(
- static_cast<BYTE>(255 -
+ static_cast<sal_uInt8>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ])) ) );
}
}
@@ -359,7 +359,7 @@ namespace vclcanvas
x<aBmpSize.Width() && x<rect.X2;
++x )
{
- *pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex(
+ *pScan++ = (sal_uInt8)pWriteAccess->GetBestPaletteIndex(
BitmapColor( data[ nCurrPos ],
data[ nCurrPos+1 ],
data[ nCurrPos+2 ] ) );
diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx
index e95a3f79f2b5..4ca0084983db 100644
--- a/canvas/source/vcl/canvasfont.cxx
+++ b/canvas/source/vcl/canvasfont.cxx
@@ -58,7 +58,7 @@ namespace vclcanvas
{
maFont->SetAlign( ALIGN_BASELINE );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE );
+ maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
// TODO(F2): improve panose->vclenum conversion
maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
@@ -72,7 +72,7 @@ namespace vclcanvas
OutputDevice& rOutDev( rOutDevProvider->getOutDev() );
const bool bOldMapState( rOutDev.IsMapModeEnabled() );
- rOutDev.EnableMapMode(FALSE);
+ rOutDev.EnableMapMode(sal_False);
const Size aSize = rOutDev.GetFontMetric( *maFont ).GetSize();
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index a83b260d52d5..e135ec494fdf 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -144,7 +144,7 @@ namespace vclcanvas
void CanvasHelper::setBackgroundOutDev( const OutDevProviderSharedPtr& rOutDev )
{
mp2ndOutDev = rOutDev;
- mp2ndOutDev->getOutDev().EnableMapMode( FALSE );
+ mp2ndOutDev->getOutDev().EnableMapMode( sal_False );
}
void CanvasHelper::clear()
@@ -155,7 +155,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
rOutDev.SetLineColor( COL_WHITE );
rOutDev.SetFillColor( COL_WHITE );
rOutDev.DrawRect( Rectangle( Point(),
@@ -166,7 +166,7 @@ namespace vclcanvas
OutputDevice& rOutDev2( mp2ndOutDev->getOutDev() );
rOutDev2.SetDrawMode( DRAWMODE_DEFAULT );
- rOutDev2.EnableMapMode( FALSE );
+ rOutDev2.EnableMapMode( sal_False );
rOutDev2.SetLineColor( COL_WHITE );
rOutDev2.SetFillColor( COL_WHITE );
rOutDev2.DrawRect( Rectangle( Point(),
@@ -297,9 +297,9 @@ namespace vclcanvas
// DrawPolygon(), and open ones via DrawPolyLine():
// closed polygons will simply already contain the
// closing segment.
- USHORT nSize( aPolyPoly.Count() );
+ sal_uInt16 nSize( aPolyPoly.Count() );
- for( USHORT i=0; i<nSize; ++i )
+ for( sal_uInt16 i=0; i<nSize; ++i )
{
mpOutDev->getOutDev().DrawPolyLine( aPolyPoly[i] );
@@ -409,21 +409,21 @@ namespace vclcanvas
// self-intersections. Therefore, if we would render it
// via OutDev::DrawPolyPolygon(), on/off fill would
// generate off areas on those self-intersections.
- USHORT nSize( aVCLPolyPoly.Count() );
+ sal_uInt16 nSize( aVCLPolyPoly.Count() );
- for( USHORT i=0; i<nSize; ++i )
+ for( sal_uInt16 i=0; i<nSize; ++i )
{
if( aStrokedPolyPoly.getB2DPolygon( i ).isClosed() ) {
mpOutDev->getOutDev().DrawPolygon( aVCLPolyPoly[i] );
if( mp2ndOutDev )
mp2ndOutDev->getOutDev().DrawPolygon( aVCLPolyPoly[i] );
} else {
- const USHORT nPolySize = aVCLPolyPoly[i].GetSize();
+ const sal_uInt16 nPolySize = aVCLPolyPoly[i].GetSize();
if( nPolySize ) {
Point rPrevPoint = aVCLPolyPoly[i].GetPoint( 0 );
Point rPoint;
- for( USHORT j=1; j<nPolySize; j++ ) {
+ for( sal_uInt16 j=1; j<nPolySize; j++ ) {
rPoint = aVCLPolyPoly[i].GetPoint( j );
mpOutDev->getOutDev().DrawLine( rPrevPoint, rPoint );
if( mp2ndOutDev )
@@ -496,7 +496,7 @@ namespace vclcanvas
}
else
{
- mpOutDev->getOutDev().DrawTransparent( aPolyPoly, (USHORT)nTransPercent );
+ mpOutDev->getOutDev().DrawTransparent( aPolyPoly, (sal_uInt16)nTransPercent );
}
if( mp2ndOutDev )
@@ -521,7 +521,7 @@ namespace vclcanvas
}
else
{
- mp2ndOutDev->getOutDev().DrawTransparent( aPolyPoly, (USHORT)nTransPercent );
+ mp2ndOutDev->getOutDev().DrawTransparent( aPolyPoly, (sal_uInt16)nTransPercent );
}
}
}
@@ -583,7 +583,7 @@ namespace vclcanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL); // no output necessary
// change text direction and layout mode
- ULONG nLayoutMode(0);
+ sal_uIntPtr nLayoutMode(0);
switch( textDirection )
{
case rendering::TextDirection::WEAK_LEFT_TO_RIGHT:
@@ -607,16 +607,16 @@ namespace vclcanvas
mpOutDev->getOutDev().SetLayoutMode( nLayoutMode );
mpOutDev->getOutDev().DrawText( aOutpos,
text.Text,
- ::canvas::tools::numeric_cast<USHORT>(text.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(text.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(text.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(text.Length) );
if( mp2ndOutDev )
{
mp2ndOutDev->getOutDev().SetLayoutMode( nLayoutMode );
mp2ndOutDev->getOutDev().DrawText( aOutpos,
text.Text,
- ::canvas::tools::numeric_cast<USHORT>(text.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(text.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(text.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(text.Length) );
}
}
@@ -759,7 +759,7 @@ namespace vclcanvas
// equivalent to the origAlpha*modulateAlpha the
// DX canvas performs)
aGrfAttr.SetTransparency(
- static_cast< BYTE >(
+ static_cast< sal_uInt8 >(
::basegfx::fround( 255.0*( 1.0 - nAlphaModulation ) ) ) );
}
@@ -778,7 +778,7 @@ namespace vclcanvas
// (3600,0]. Note that the original angle may have
// values outside the [0,2Pi) interval.
const double nAngleInTenthOfDegrees (3600.0 - nRotate * 3600.0 / (2*M_PI));
- aGrfAttr.SetRotation( static_cast< USHORT >(::basegfx::fround(nAngleInTenthOfDegrees)) );
+ aGrfAttr.SetRotation( static_cast< sal_uInt16 >(::basegfx::fround(nAngleInTenthOfDegrees)) );
pGrfObj.reset( new GraphicObject( aBmpEx ) );
}
@@ -913,7 +913,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
// TODO(F2): Support alpha vdev canvas here
const Point aEmptyPoint(0,0);
@@ -942,7 +942,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(),
aRect.GetSize()) );
@@ -995,11 +995,11 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
const Rectangle aRect( ::vcl::unotools::rectangleFromIntegerRectangle2D(rect) );
- const USHORT nBitCount( ::std::min( (USHORT)24U,
- (USHORT)rOutDev.GetBitCount() ) );
+ const sal_uInt16 nBitCount( ::std::min( (sal_uInt16)24U,
+ (sal_uInt16)rOutDev.GetBitCount() ) );
const BitmapPalette* pPalette = NULL;
if( nBitCount <= 8 )
@@ -1045,7 +1045,7 @@ namespace vclcanvas
for( x=0; x<nWidth; ++x )
{
- *pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex(
+ *pScan++ = (sal_uInt8)pWriteAccess->GetBestPaletteIndex(
BitmapColor( data[ nCurrPos ],
data[ nCurrPos+1 ],
data[ nCurrPos+2 ] ) );
@@ -1121,7 +1121,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
const Size aBmpSize( rOutDev.GetOutputSizePixel() );
@@ -1158,7 +1158,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
const Size aBmpSize( rOutDev.GetOutputSizePixel() );
@@ -1197,7 +1197,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
OutputDevice* p2ndOutDev = NULL;
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
if( mp2ndOutDev )
p2ndOutDev = &mp2ndOutDev->getOutDev();
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index c1e71ceb943f..077b30d5b904 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -88,7 +88,7 @@ namespace vclcanvas
const ::Size& rTileSize,
const GraphicAttr& rAttr)
{
- BOOL bRet( false );
+ bool bRet( false );
Point aCurrPos;
int nX, nY;
@@ -101,10 +101,10 @@ namespace vclcanvas
{
// update return value. This method should return true, if
// at least one of the looped Draws succeeded.
- bRet |= rGraphic.Draw( &rOutDev,
+ bRet |= ( sal_True == rGraphic.Draw( &rOutDev,
aCurrPos,
rTileSize,
- &rAttr );
+ &rAttr ) );
aCurrPos.X() += rNextTileX.Width();
aCurrPos.Y() += rNextTileX.Height();
@@ -178,7 +178,7 @@ namespace vclcanvas
// vertex values in the loop below (as ::Polygon is a
// pimpl class, creating one every loop turn would really
// stress the mem allocator)
- ::Polygon aTempPoly( static_cast<USHORT>(5) );
+ ::Polygon aTempPoly( static_cast<sal_uInt16>(5) );
OSL_ENSURE( nStepCount >= 3,
"fillLinearGradient(): stepcount smaller than 3" );
@@ -222,9 +222,9 @@ namespace vclcanvas
boost::tuples::tie(nIndex,fAlpha)=aLerper.lerp(double(i)/nStepCount);
rOutDev.SetFillColor(
- Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
+ Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
// copy right egde of polygon to left edge (and also
// copy the closing point)
@@ -348,7 +348,7 @@ namespace vclcanvas
const sal_uInt32 nNumPoints( aOuterPoly.count() );
- ::Polygon aTempPoly( static_cast<USHORT>(nNumPoints+1) );
+ ::Polygon aTempPoly( static_cast<sal_uInt16>(nNumPoints+1) );
// increase number of steps by one: polygonal gradients have
// the outermost polygon rendered in rColor2, and the
@@ -387,9 +387,9 @@ namespace vclcanvas
// lerp color
rOutDev.SetFillColor(
- Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
+ Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
// scale and render polygon, by interpolating between
// outer and inner polygon.
@@ -399,13 +399,13 @@ namespace vclcanvas
const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) );
const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) );
- aTempPoly[(USHORT)p] = ::Point(
+ aTempPoly[(sal_uInt16)p] = ::Point(
basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ),
basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) );
}
// close polygon explicitely
- aTempPoly[(USHORT)p] = aTempPoly[0];
+ aTempPoly[(sal_uInt16)p] = aTempPoly[0];
// TODO(P1): compare with vcl/source/gdi/outdev4.cxx,
// OutputDevice::ImplDrawComplexGradient(), there's a note
@@ -424,7 +424,7 @@ namespace vclcanvas
// in the loop below (as ::Polygon is a pimpl class, creating
// one every loop turn would really stress the mem allocator)
::PolyPolygon aTempPolyPoly;
- ::Polygon aTempPoly2( static_cast<USHORT>(nNumPoints+1) );
+ ::Polygon aTempPoly2( static_cast<sal_uInt16>(nNumPoints+1) );
aTempPoly2[0] = rBounds.TopLeft();
aTempPoly2[1] = rBounds.TopRight();
@@ -445,9 +445,9 @@ namespace vclcanvas
// lerp color
rOutDev.SetFillColor(
- Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
+ Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
if( i && !(i % 10) )
@@ -463,13 +463,13 @@ namespace vclcanvas
const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) );
const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) );
- aTempPoly[(USHORT)p] = ::Point(
+ aTempPoly[(sal_uInt16)p] = ::Point(
basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ),
basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) );
}
// close polygon explicitely
- aTempPoly[(USHORT)p] = aTempPoly[0];
+ aTempPoly[(sal_uInt16)p] = aTempPoly[0];
// swap inner and outer polygon
aTempPolyPoly.Replace( aTempPolyPoly.GetObject( 1 ), 0 );
@@ -921,7 +921,7 @@ namespace vclcanvas
aGrfAttr.SetMirrorFlags(
( aScale.getX() < 0.0 ? BMP_MIRROR_HORZ : 0 ) |
( aScale.getY() < 0.0 ? BMP_MIRROR_VERT : 0 ) );
- aGrfAttr.SetRotation( static_cast< USHORT >(::basegfx::fround( nRotate*10.0 )) );
+ aGrfAttr.SetRotation( static_cast< sal_uInt16 >(::basegfx::fround( nRotate*10.0 )) );
pGrfObj.reset( new GraphicObject( aBmpEx ) );
}
@@ -1050,7 +1050,7 @@ namespace vclcanvas
// equivalent to the origAlpha*modulateAlpha
// the DX canvas performs)
aGrfAttr.SetTransparency(
- static_cast< BYTE >(
+ static_cast< sal_uInt8 >(
::basegfx::fround( 255.0*( 1.0 - textures[0].Alpha ) ) ) );
}
@@ -1121,7 +1121,7 @@ namespace vclcanvas
aVDev.GetBitmap( aEmptyPoint,
aVDev.GetOutputSizePixel() ) );
- BYTE nCol( static_cast< BYTE >(
+ sal_uInt8 nCol( static_cast< sal_uInt8 >(
::basegfx::fround( 255.0*( 1.0 - textures[0].Alpha ) ) ) );
AlphaMask aAlpha( aVDev.GetOutputSizePixel(),
&nCol );
diff --git a/canvas/source/vcl/devicehelper.cxx b/canvas/source/vcl/devicehelper.cxx
index 9b7b9fac2857..699a2ebfe9b8 100644
--- a/canvas/source/vcl/devicehelper.cxx
+++ b/canvas/source/vcl/devicehelper.cxx
@@ -230,7 +230,7 @@ namespace vclcanvas
const ::Point aEmptyPoint;
OutputDevice& rOutDev = mpOutDev->getOutDev();
bool bOldMap( rOutDev.IsMapModeEnabled() );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
aStream << rOutDev.GetBitmap(aEmptyPoint,
rOutDev.GetOutputSizePixel());
rOutDev.EnableMapMode( bOldMap );
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index b4c19aa5a028..97a825f48f01 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -178,7 +178,7 @@ namespace vclcanvas
const ::Polygon& rPoly( rPolyPoly[0] );
- USHORT nCount( rPoly.GetSize() );
+ sal_uInt16 nCount( rPoly.GetSize() );
if( nCount < 4 )
return false;
@@ -389,7 +389,7 @@ namespace vclcanvas
pAlphaWriteAccess->SetPixel( y, x,
BitmapColor(
255U -
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nAlphaModulation*
(255U
- aAlphaMap[ pAlphaReadAccess->GetPixel(
@@ -400,15 +400,15 @@ namespace vclcanvas
nSrcX ) );
aColor.SetRed(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nRedModulation *
aColor.GetRed() + .5 ));
aColor.SetGreen(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nGreenModulation *
aColor.GetGreen() + .5 ));
aColor.SetBlue(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nBlueModulation *
aColor.GetBlue() + .5 ));
@@ -443,7 +443,7 @@ namespace vclcanvas
pAlphaWriteAccess->SetPixel( y, x,
BitmapColor(
255U -
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nAlphaModulation*255.0
+ .5 ) ) );
@@ -451,15 +451,15 @@ namespace vclcanvas
nSrcX ) );
aColor.SetRed(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nRedModulation *
aColor.GetRed() + .5 ));
aColor.SetGreen(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nGreenModulation *
aColor.GetGreen() + .5 ));
aColor.SetBlue(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nBlueModulation *
aColor.GetBlue() + .5 ));
diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx
index 8bedfc6de340..e79ddb8496df 100644
--- a/canvas/source/vcl/impltools.hxx
+++ b/canvas/source/vcl/impltools.hxx
@@ -168,7 +168,7 @@ namespace vclcanvas
if( mpOutDev )
{
mpOutDev->Push();
- mpOutDev->EnableMapMode(FALSE);
+ mpOutDev->EnableMapMode(sal_False);
}
}
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index f2327a29c480..50f02e6b5888 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -98,7 +98,7 @@ namespace vclcanvas
// clip output to actual update region (otherwise a)
// wouldn't save much render time, and b) will clutter
// scrolled sprite content outside this area)
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
rOutDev.SetClipRegion( rRequestedArea );
// repaint affected sprite directly to output device (at
@@ -318,7 +318,7 @@ namespace vclcanvas
// but repaint everything (or caller requested that)
maVDev->SetOutputSizePixel( aOutDevSize );
- maVDev->EnableMapMode( FALSE );
+ maVDev->EnableMapMode( sal_False );
maVDev->DrawOutDev( aEmptyPoint, aOutDevSize,
aEmptyPoint, aOutDevSize,
rBackOutDev );
@@ -332,7 +332,7 @@ namespace vclcanvas
_1 ) );
// flush to screen
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
rOutDev.SetClipRegion();
rOutDev.DrawOutDev( aEmptyPoint, aOutDevSize,
aEmptyPoint, aOutDevSize,
@@ -577,7 +577,7 @@ namespace vclcanvas
}
// paint background
- maVDev->EnableMapMode( FALSE );
+ maVDev->EnableMapMode( sal_False );
maVDev->SetClipRegion();
maVDev->DrawOutDev( aEmptyPoint, aOutputSize,
aOutputPosition, aOutputSize,
@@ -594,7 +594,7 @@ namespace vclcanvas
_1 ) );
// flush to screen
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
rOutDev.DrawOutDev( aOutputPosition, aOutputSize,
aEmptyPoint, aOutputSize,
*maVDev );
diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx
index 46561bc3f835..6aa6de0bac97 100644
--- a/canvas/source/vcl/spritedevicehelper.cxx
+++ b/canvas/source/vcl/spritedevicehelper.cxx
@@ -147,7 +147,7 @@ namespace vclcanvas
SvFileStream aStream( aFilename, STREAM_STD_READWRITE );
const ::Point aEmptyPoint;
- mpBackBuffer->getOutDev().EnableMapMode( FALSE );
+ mpBackBuffer->getOutDev().EnableMapMode( sal_False );
aStream << mpBackBuffer->getOutDev().GetBitmap(aEmptyPoint,
mpBackBuffer->getOutDev().GetOutputSizePixel());
}
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index a09905e006a8..774a43ae3855 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -376,7 +376,7 @@ namespace vclcanvas
// here
// draw semi-transparent
- BYTE nColor( static_cast<UINT8>( ::basegfx::fround( 255.0*(1.0 - fAlpha) + .5) ) );
+ sal_uInt8 nColor( static_cast<sal_uInt8>( ::basegfx::fround( 255.0*(1.0 - fAlpha) + .5) ) );
AlphaMask aAlpha( maContent->GetSizePixel(),
&nColor );
@@ -408,7 +408,7 @@ namespace vclcanvas
for( int i=0; i<aMarkerPoly.Count(); ++i )
{
- rTargetSurface.DrawPolyLine( aMarkerPoly.GetObject((USHORT)i) );
+ rTargetSurface.DrawPolyLine( aMarkerPoly.GetObject((sal_uInt16)i) );
}
// paint sprite prio
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index a2fd331fa66f..19b0f7cea4ce 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -58,7 +58,7 @@ namespace vclcanvas
sal_Int8 nTextDirection )
{
// TODO(P3): avoid if already correctly set
- ULONG nLayoutMode;
+ sal_uIntPtr nLayoutMode;
switch( nTextDirection )
{
default:
@@ -139,10 +139,10 @@ namespace vclcanvas
if (aVDev.GetTextOutlines(
aOutlines,
maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length),
- FALSE,
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length),
+ sal_False,
0,
aOffsets.get()))
{
@@ -192,9 +192,9 @@ namespace vclcanvas
if (aVDev.GetGlyphBoundRects(
Point(0,0),
maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length),
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
aMetricVector))
{
aBoundingBoxes.realloc(aMetricVector.size());
@@ -272,8 +272,8 @@ namespace vclcanvas
return geometry::RealRectangle2D( 0, nAboveBaseline,
aVDev.GetTextWidth(
maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) ),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ),
nBelowBaseline );
}
}
@@ -405,15 +405,15 @@ namespace vclcanvas
rOutDev.DrawTextArray( rOutpos,
maText.Text,
aOffsets.get(),
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
}
else
{
rOutDev.DrawText( rOutpos,
maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
}
return true;