summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r--vcl/source/gdi/alpha.cxx58
-rw-r--r--vcl/source/gdi/animate.cxx200
-rw-r--r--vcl/source/gdi/bitmap.cxx234
-rw-r--r--vcl/source/gdi/bitmap2.cxx266
-rw-r--r--vcl/source/gdi/bitmap3.cxx362
-rw-r--r--vcl/source/gdi/bitmap4.cxx154
-rw-r--r--vcl/source/gdi/bitmapex.cxx134
-rw-r--r--vcl/source/gdi/bmpacc.cxx30
-rw-r--r--vcl/source/gdi/bmpacc2.cxx8
-rw-r--r--vcl/source/gdi/bmpacc3.cxx24
-rw-r--r--vcl/source/gdi/bmpconv.cxx4
-rw-r--r--vcl/source/gdi/bmpfast.cxx34
-rw-r--r--vcl/source/gdi/cvtgrf.cxx22
-rw-r--r--vcl/source/gdi/cvtsvm.cxx614
-rw-r--r--vcl/source/gdi/font.cxx76
-rw-r--r--vcl/source/gdi/gdimtf.cxx290
-rw-r--r--vcl/source/gdi/gfxlink.cxx40
-rw-r--r--vcl/source/gdi/gradient.cxx26
-rw-r--r--vcl/source/gdi/graph.cxx72
-rw-r--r--vcl/source/gdi/graphictools.cxx20
-rw-r--r--vcl/source/gdi/hatch.cxx10
-rw-r--r--vcl/source/gdi/image.cxx84
-rw-r--r--vcl/source/gdi/impanmvw.cxx42
-rw-r--r--vcl/source/gdi/impanmvw.hxx30
-rw-r--r--vcl/source/gdi/impbmp.cxx16
-rw-r--r--vcl/source/gdi/impgraph.cxx186
-rw-r--r--vcl/source/gdi/impimage.cxx66
-rw-r--r--vcl/source/gdi/impvect.cxx192
-rw-r--r--vcl/source/gdi/impvect.hxx14
-rw-r--r--vcl/source/gdi/jobset.cxx42
-rw-r--r--vcl/source/gdi/lineinfo.cxx12
-rw-r--r--vcl/source/gdi/mapmod.cxx26
-rw-r--r--vcl/source/gdi/metaact.cxx108
-rw-r--r--vcl/source/gdi/metric.cxx36
-rw-r--r--vcl/source/gdi/octree.cxx84
-rwxr-xr-xvcl/source/gdi/outdev.cxx226
-rwxr-xr-xvcl/source/gdi/outdev2.cxx134
-rw-r--r--vcl/source/gdi/outdev3.cxx386
-rw-r--r--vcl/source/gdi/outdev4.cxx126
-rw-r--r--vcl/source/gdi/outdev5.cxx2
-rw-r--r--vcl/source/gdi/outdev6.cxx102
-rwxr-xr-xvcl/source/gdi/outdevnative.cxx38
-rw-r--r--vcl/source/gdi/outmap.cxx78
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter.cxx18
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx64
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx12
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx18
-rw-r--r--vcl/source/gdi/pngread.cxx236
-rw-r--r--vcl/source/gdi/pngwrite.cxx140
-rw-r--r--vcl/source/gdi/polyscan.cxx32
-rw-r--r--vcl/source/gdi/print.cxx244
-rw-r--r--vcl/source/gdi/print2.cxx38
-rwxr-xr-xvcl/source/gdi/print3.cxx54
-rw-r--r--vcl/source/gdi/regband.cxx86
-rwxr-xr-xvcl/source/gdi/region.cxx262
-rwxr-xr-xvcl/source/gdi/salgdilayout.cxx60
-rw-r--r--vcl/source/gdi/salmisc.cxx24
-rw-r--r--vcl/source/gdi/salnativewidgets-none.cxx30
-rw-r--r--vcl/source/gdi/svcompat.cxx6
-rwxr-xr-x[-rw-r--r--]vcl/source/gdi/textlayout.cxx8
-rw-r--r--vcl/source/gdi/virdev.cxx56
-rw-r--r--vcl/source/gdi/wall.cxx58
63 files changed, 3078 insertions, 3078 deletions
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index 9d93a540750a..21c3f15f51c0 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -58,7 +58,7 @@ AlphaMask::AlphaMask( const AlphaMask& rAlphaMask ) :
// -----------------------------------------------------------------------------
-AlphaMask::AlphaMask( const Size& rSizePixel, BYTE* pEraseTransparency ) :
+AlphaMask::AlphaMask( const Size& rSizePixel, sal_uInt8* pEraseTransparency ) :
Bitmap( rSizePixel, 8, &Bitmap::GetGreyPalette( 256 ) )
{
if( pEraseTransparency )
@@ -107,14 +107,14 @@ Bitmap AlphaMask::GetBitmap() const
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Crop( const Rectangle& rRectPixel )
+sal_Bool AlphaMask::Crop( const Rectangle& rRectPixel )
{
return Bitmap::Crop( rRectPixel );
}
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Expand( ULONG nDX, ULONG nDY, BYTE* pInitTransparency )
+sal_Bool AlphaMask::Expand( sal_uLong nDX, sal_uLong nDY, sal_uInt8* pInitTransparency )
{
Color aColor;
@@ -126,7 +126,7 @@ BOOL AlphaMask::Expand( ULONG nDX, ULONG nDY, BYTE* pInitTransparency )
// -----------------------------------------------------------------------------
-BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
+sal_Bool AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
const AlphaMask* pAlphaSrc )
{
// Note: this code is copied from Bitmap::CopyPixel but avoids any palette lookups
@@ -134,7 +134,7 @@ BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
const Size aSizePix( GetSizePixel() );
Rectangle aRectDst( rRectDst );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
aRectDst.Intersection( Rectangle( Point(), aSizePix ) );
@@ -225,7 +225,7 @@ BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
}
ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -237,26 +237,26 @@ BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Erase( BYTE cTransparency )
+sal_Bool AlphaMask::Erase( sal_uInt8 cTransparency )
{
return Bitmap::Erase( Color( cTransparency, cTransparency, cTransparency ) );
}
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Invert()
+sal_Bool AlphaMask::Invert()
{
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pAcc && pAcc->GetBitCount() == 8 )
{
BitmapColor aCol( 0 );
const long nWidth = pAcc->Width(), nHeight = pAcc->Height();
- BYTE* pMap = new BYTE[ 256 ];
+ sal_uInt8* pMap = new sal_uInt8[ 256 ];
for( long i = 0; i < 256; i++ )
- pMap[ i ] = ~(BYTE) i;
+ pMap[ i ] = ~(sal_uInt8) i;
for( long nY = 0L; nY < nHeight; nY++ )
{
@@ -268,7 +268,7 @@ BOOL AlphaMask::Invert()
}
delete[] pMap;
- bRet = TRUE;
+ bRet = sal_True;
}
if( pAcc )
@@ -279,16 +279,16 @@ BOOL AlphaMask::Invert()
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Mirror( ULONG nMirrorFlags )
+sal_Bool AlphaMask::Mirror( sal_uLong nMirrorFlags )
{
return Bitmap::Mirror( nMirrorFlags );
}
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Scale( const Size& rNewSize, ULONG nScaleFlag )
+sal_Bool AlphaMask::Scale( const Size& rNewSize, sal_uLong nScaleFlag )
{
- BOOL bRet = Bitmap::Scale( rNewSize, nScaleFlag );
+ sal_Bool bRet = Bitmap::Scale( rNewSize, nScaleFlag );
if( bRet && ( nScaleFlag == BMP_SCALE_INTERPOLATE ) )
Bitmap::Convert( BMP_CONVERSION_8BIT_GREYS );
@@ -298,9 +298,9 @@ BOOL AlphaMask::Scale( const Size& rNewSize, ULONG nScaleFlag )
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFlag )
+sal_Bool AlphaMask::Scale( const double& rScaleX, const double& rScaleY, sal_uLong nScaleFlag )
{
- BOOL bRet = Bitmap::Scale( rScaleX, rScaleY, nScaleFlag );
+ sal_Bool bRet = Bitmap::Scale( rScaleX, rScaleY, nScaleFlag );
if( bRet && ( nScaleFlag == BMP_SCALE_INTERPOLATE ) )
Bitmap::Convert( BMP_CONVERSION_8BIT_GREYS );
@@ -310,18 +310,18 @@ BOOL AlphaMask::Scale( const double& rScaleX, const double& rScaleY, ULONG nScal
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Rotate( long nAngle10, BYTE cFillTransparency )
+sal_Bool AlphaMask::Rotate( long nAngle10, sal_uInt8 cFillTransparency )
{
return Bitmap::Rotate( nAngle10, Color( cFillTransparency, cFillTransparency, cFillTransparency ) );
}
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Replace( const Bitmap& rMask, BYTE cReplaceTransparency )
+sal_Bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency )
{
BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pMaskAcc && pAcc )
{
@@ -344,14 +344,14 @@ BOOL AlphaMask::Replace( const Bitmap& rMask, BYTE cReplaceTransparency )
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Replace( BYTE cSearchTransparency, BYTE cReplaceTransparency, ULONG
+sal_Bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency, sal_uLong
#ifdef DBG_UTIL
nTol
#endif
)
{
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
DBG_ASSERT( !nTol, "AlphaMask::Replace: nTol not used yet" );
@@ -386,7 +386,7 @@ nTol
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
if( pAcc )
@@ -397,17 +397,17 @@ nTol
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Replace( BYTE* pSearchTransparencies, BYTE* pReplaceTransparencies,
- ULONG nColorCount, ULONG* pTols )
+sal_Bool AlphaMask::Replace( sal_uInt8* pSearchTransparencies, sal_uInt8* pReplaceTransparencies,
+ sal_uLong nColorCount, sal_uLong* pTols )
{
Color* pSearchColors = new Color[ nColorCount ];
Color* pReplaceColors = new Color[ nColorCount ];
- BOOL bRet;
+ sal_Bool bRet;
- for( ULONG i = 0; i < nColorCount; i++ )
+ for( sal_uLong i = 0; i < nColorCount; i++ )
{
- const BYTE cSearchTransparency = pSearchTransparencies[ i ];
- const BYTE cReplaceTransparency = pReplaceTransparencies[ i ];
+ const sal_uInt8 cSearchTransparency = pSearchTransparencies[ i ];
+ const sal_uInt8 cReplaceTransparency = pReplaceTransparencies[ i ];
pSearchColors[ i ] = Color( cSearchTransparency, cSearchTransparency, cSearchTransparency );
pReplaceColors[ i ] = Color( cReplaceTransparency, cReplaceTransparency, cReplaceTransparency );
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index b0fb3b3de513..9fc45f2f61d6 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -49,13 +49,13 @@ DBG_NAME( Animation )
// - statics -
// -----------
-ULONG Animation::mnAnimCount = 0UL;
+sal_uLong Animation::mnAnimCount = 0UL;
// -------------------
// - AnimationBitmap -
// -------------------
-ULONG AnimationBitmap::GetChecksum() const
+sal_uLong AnimationBitmap::GetChecksum() const
{
sal_uInt32 nCrc = aBmpEx.GetChecksum();
SVBT32 aBT32;
@@ -93,9 +93,9 @@ Animation::Animation() :
mnLoops ( 0 ),
mnPos ( 0 ),
meCycleMode ( CYCLE_NORMAL ),
- mbIsInAnimation ( FALSE ),
- mbLoopTerminated ( FALSE ),
- mbIsWaiting ( FALSE )
+ mbIsInAnimation ( sal_False ),
+ mbLoopTerminated ( sal_False ),
+ mbIsWaiting ( sal_False )
{
DBG_CTOR( Animation, NULL );
maTimer.SetTimeoutHdl( LINK( this, Animation, ImplTimeoutHdl ) );
@@ -110,7 +110,7 @@ Animation::Animation( const Animation& rAnimation ) :
mnLoopCount ( rAnimation.mnLoopCount ),
mnPos ( rAnimation.mnPos ),
meCycleMode ( rAnimation.meCycleMode ),
- mbIsInAnimation ( FALSE ),
+ mbIsInAnimation ( sal_False ),
mbLoopTerminated ( rAnimation.mbLoopTerminated ),
mbIsWaiting ( rAnimation.mbIsWaiting )
{
@@ -165,24 +165,24 @@ Animation& Animation::operator=( const Animation& rAnimation )
// -----------------------------------------------------------------------
-BOOL Animation::operator==( const Animation& rAnimation ) const
+sal_Bool Animation::operator==( const Animation& rAnimation ) const
{
- const ULONG nCount = maList.Count();
- BOOL bRet = FALSE;
+ const sal_uLong nCount = maList.Count();
+ sal_Bool bRet = sal_False;
if( rAnimation.maList.Count() == nCount &&
rAnimation.maBitmapEx == maBitmapEx &&
rAnimation.maGlobalSize == maGlobalSize &&
rAnimation.meCycleMode == meCycleMode )
{
- bRet = TRUE;
+ bRet = sal_True;
- for( ULONG n = 0; n < nCount; n++ )
+ for( sal_uLong n = 0; n < nCount; n++ )
{
if( ( *(AnimationBitmap*) maList.GetObject( n ) ) !=
( *(AnimationBitmap*) rAnimation.maList.GetObject( n ) ) )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -193,19 +193,19 @@ BOOL Animation::operator==( const Animation& rAnimation ) const
// ------------------------------------------------------------------
-BOOL Animation::IsEqual( const Animation& rAnimation ) const
+sal_Bool Animation::IsEqual( const Animation& rAnimation ) const
{
- const ULONG nCount = maList.Count();
- BOOL bRet = FALSE;
+ const sal_uLong nCount = maList.Count();
+ sal_Bool bRet = sal_False;
if( rAnimation.maList.Count() == nCount &&
rAnimation.maBitmapEx.IsEqual( maBitmapEx ) &&
rAnimation.maGlobalSize == maGlobalSize &&
rAnimation.meCycleMode == meCycleMode )
{
- for( ULONG n = 0; ( n < nCount ) && !bRet; n++ )
+ for( sal_uLong n = 0; ( n < nCount ) && !bRet; n++ )
if( ( (AnimationBitmap*) maList.GetObject( n ) )->IsEqual( *(AnimationBitmap*) rAnimation.maList.GetObject( n ) ) )
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -213,7 +213,7 @@ BOOL Animation::IsEqual( const Animation& rAnimation ) const
// ------------------------------------------------------------------
-BOOL Animation::IsEmpty() const
+sal_Bool Animation::IsEmpty() const
{
return( maBitmapEx.IsEmpty() && !maList.Count() );
}
@@ -223,7 +223,7 @@ BOOL Animation::IsEmpty() const
void Animation::SetEmpty()
{
maTimer.Stop();
- mbIsInAnimation = FALSE;
+ mbIsInAnimation = sal_False;
maGlobalSize = Size();
maBitmapEx.SetEmpty();
@@ -245,11 +245,11 @@ void Animation::Clear()
// -----------------------------------------------------------------------
-BOOL Animation::IsTransparent() const
+sal_Bool Animation::IsTransparent() const
{
Point aPoint;
Rectangle aRect( aPoint, maGlobalSize );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// Falls irgendein 'kleines' Bildchen durch den Hintergrund
// ersetzt werden soll, muessen wir 'transparent' sein, um
@@ -261,7 +261,7 @@ BOOL Animation::IsTransparent() const
if( DISPOSE_BACK == pAnimBmp->eDisposal && Rectangle( pAnimBmp->aPosPix, pAnimBmp->aSizePix ) != aRect )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -274,9 +274,9 @@ BOOL Animation::IsTransparent() const
// -----------------------------------------------------------------------
-ULONG Animation::GetSizeBytes() const
+sal_uLong Animation::GetSizeBytes() const
{
- ULONG nSizeBytes = GetBitmapEx().GetSizeBytes();
+ sal_uLong nSizeBytes = GetBitmapEx().GetSizeBytes();
for( long i = 0, nCount = maList.Count(); i < nCount; i++ )
{
@@ -289,7 +289,7 @@ ULONG Animation::GetSizeBytes() const
// -----------------------------------------------------------------------
-ULONG Animation::GetChecksum() const
+sal_uLong Animation::GetChecksum() const
{
SVBT32 aBT32;
sal_uInt32 nCrc = GetBitmapEx().GetChecksum();
@@ -317,7 +317,7 @@ ULONG Animation::GetChecksum() const
// -----------------------------------------------------------------------
-BOOL Animation::Start( OutputDevice* pOut, const Point& rDestPt, long nExtraData,
+sal_Bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, long nExtraData,
OutputDevice* pFirstFrameOutDev )
{
return Start( pOut, rDestPt, pOut->PixelToLogic( maGlobalSize ), nExtraData, pFirstFrameOutDev );
@@ -325,10 +325,10 @@ BOOL Animation::Start( OutputDevice* pOut, const Point& rDestPt, long nExtraData
// -----------------------------------------------------------------------
-BOOL Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDestSz, long nExtraData,
+sal_Bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDestSz, long nExtraData,
OutputDevice* pFirstFrameOutDev )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( maList.Count() )
{
@@ -361,7 +361,7 @@ BOOL Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDe
if( !mpViewList->Count() )
{
maTimer.Stop();
- mbIsInAnimation = FALSE;
+ mbIsInAnimation = sal_False;
mnPos = 0UL;
}
@@ -371,13 +371,13 @@ BOOL Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDe
if( !mbIsInAnimation )
{
ImplRestartTimer( ( (AnimationBitmap*) maList.GetObject( mnPos ) )->nWait );
- mbIsInAnimation = TRUE;
+ mbIsInAnimation = sal_True;
}
}
else
Draw( pOut, rDestPt, rDestSz );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -403,7 +403,7 @@ void Animation::Stop( OutputDevice* pOut, long nExtraData )
if( !mpViewList->Count() )
{
maTimer.Stop();
- mbIsInAnimation = FALSE;
+ mbIsInAnimation = sal_False;
}
}
@@ -418,7 +418,7 @@ void Animation::Draw( OutputDevice* pOut, const Point& rDestPt ) const
void Animation::Draw( OutputDevice* pOut, const Point& rDestPt, const Size& rDestSz ) const
{
- const ULONG nCount = maList.Count();
+ const sal_uLong nCount = maList.Count();
if( nCount )
{
@@ -430,7 +430,7 @@ void Animation::Draw( OutputDevice* pOut, const Point& rDestPt, const Size& rDes
pObj->aBmpEx.Draw( pOut, rDestPt, rDestSz );
else
{
- const ULONG nOldPos = mnPos;
+ const sal_uLong nOldPos = mnPos;
( (Animation*) this )->mnPos = mbLoopTerminated ? ( nCount - 1UL ) : mnPos;
delete new ImplAnimView( (Animation*) this, pOut, rDestPt, rDestSz, 0 );
( (Animation*) this )->mnPos = nOldPos;
@@ -440,9 +440,9 @@ void Animation::Draw( OutputDevice* pOut, const Point& rDestPt, const Size& rDes
// -----------------------------------------------------------------------
-void Animation::ImplRestartTimer( ULONG nTimeout )
+void Animation::ImplRestartTimer( sal_uLong nTimeout )
{
- maTimer.SetTimeout( Max( nTimeout, (ULONG)(MIN_TIMEOUT + ( mnAnimCount - 1 ) * INC_TIMEOUT) ) * 10L );
+ maTimer.SetTimeout( Max( nTimeout, (sal_uLong)(MIN_TIMEOUT + ( mnAnimCount - 1 ) * INC_TIMEOUT) ) * 10L );
maTimer.Start();
}
@@ -450,12 +450,12 @@ void Animation::ImplRestartTimer( ULONG nTimeout )
IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
{
- const ULONG nAnimCount = maList.Count();
+ const sal_uLong nAnimCount = maList.Count();
if( nAnimCount )
{
ImplAnimView* pView;
- BOOL bGlobalPause = TRUE;
+ sal_Bool bGlobalPause = sal_True;
if( maNotifyLink.IsSet() )
{
@@ -481,7 +481,7 @@ IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
pView = (ImplAnimView*) pAInfo->pViewData;
pView->ImplPause( pAInfo->bPause );
- pView->ImplSetMarked( TRUE );
+ pView->ImplSetMarked( sal_True );
}
// delete AInfo structures
@@ -501,15 +501,15 @@ IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
else
{
if( !pView->ImplIsPause() )
- bGlobalPause = FALSE;
+ bGlobalPause = sal_False;
- pView->ImplSetMarked( FALSE );
+ pView->ImplSetMarked( sal_False );
pView = (ImplAnimView*) mpViewList->Next();
}
}
}
else
- bGlobalPause = FALSE;
+ bGlobalPause = sal_False;
if( !mpViewList->Count() )
Stop();
@@ -524,7 +524,7 @@ IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
if( mnLoops == 1 )
{
Stop();
- mbLoopTerminated = TRUE;
+ mbLoopTerminated = sal_True;
mnPos = nAnimCount - 1UL;
maBitmapEx = ( (AnimationBitmap*) maList.GetObject( mnPos ) )->aBmpEx;
return 0L;
@@ -572,9 +572,9 @@ IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
// -----------------------------------------------------------------------
-BOOL Animation::Insert( const AnimationBitmap& rStepBmp )
+sal_Bool Animation::Insert( const AnimationBitmap& rStepBmp )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsInAnimation() )
{
@@ -588,7 +588,7 @@ BOOL Animation::Insert( const AnimationBitmap& rStepBmp )
if( maList.Count() == 1 )
maBitmapEx = rStepBmp.aBmpEx;
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -596,7 +596,7 @@ BOOL Animation::Insert( const AnimationBitmap& rStepBmp )
// -----------------------------------------------------------------------
-const AnimationBitmap& Animation::Get( USHORT nAnimation ) const
+const AnimationBitmap& Animation::Get( sal_uInt16 nAnimation ) const
{
DBG_ASSERT( ( nAnimation < maList.Count() ), "No object at this position" );
return *(AnimationBitmap*) maList.GetObject( nAnimation );
@@ -604,7 +604,7 @@ const AnimationBitmap& Animation::Get( USHORT nAnimation ) const
// -----------------------------------------------------------------------
-void Animation::Replace( const AnimationBitmap& rNewAnimationBitmap, USHORT nAnimation )
+void Animation::Replace( const AnimationBitmap& rNewAnimationBitmap, sal_uInt16 nAnimation )
{
DBG_ASSERT( ( nAnimation < maList.Count() ), "No object at this position" );
@@ -623,7 +623,7 @@ void Animation::Replace( const AnimationBitmap& rNewAnimationBitmap, USHORT nAni
// -----------------------------------------------------------------------
-void Animation::SetLoopCount( const ULONG nLoopCount )
+void Animation::SetLoopCount( const sal_uLong nLoopCount )
{
mnLoopCount = nLoopCount;
ResetLoopCount();
@@ -634,20 +634,20 @@ void Animation::SetLoopCount( const ULONG nLoopCount )
void Animation::ResetLoopCount()
{
mnLoops = mnLoopCount;
- mbLoopTerminated = FALSE;
+ mbLoopTerminated = sal_False;
}
// -----------------------------------------------------------------------
-BOOL Animation::Convert( BmpConversion eConversion )
+sal_Bool Animation::Convert( BmpConversion eConversion )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( void* pStepBmp = maList.First(); pStepBmp && bRet; pStepBmp = maList.Next() )
bRet = ( ( AnimationBitmap*) pStepBmp )->aBmpEx.Convert( eConversion );
@@ -655,22 +655,22 @@ BOOL Animation::Convert( BmpConversion eConversion )
maBitmapEx.Convert( eConversion );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// -----------------------------------------------------------------------
-BOOL Animation::ReduceColors( USHORT nNewColorCount, BmpReduce eReduce )
+sal_Bool Animation::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( void* pStepBmp = maList.First(); pStepBmp && bRet; pStepBmp = maList.Next() )
bRet = ( ( AnimationBitmap*) pStepBmp )->aBmpEx.ReduceColors( nNewColorCount, eReduce );
@@ -678,22 +678,22 @@ BOOL Animation::ReduceColors( USHORT nNewColorCount, BmpReduce eReduce )
maBitmapEx.ReduceColors( nNewColorCount, eReduce );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// -----------------------------------------------------------------------
-BOOL Animation::Invert()
+sal_Bool Animation::Invert()
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( void* pStepBmp = maList.First(); pStepBmp && bRet; pStepBmp = maList.Next() )
bRet = ( ( AnimationBitmap*) pStepBmp )->aBmpEx.Invert();
@@ -701,22 +701,22 @@ BOOL Animation::Invert()
maBitmapEx.Invert();
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// -----------------------------------------------------------------------
-BOOL Animation::Mirror( ULONG nMirrorFlags )
+sal_Bool Animation::Mirror( sal_uLong nMirrorFlags )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
if( nMirrorFlags )
{
@@ -724,7 +724,7 @@ BOOL Animation::Mirror( ULONG nMirrorFlags )
pStepBmp && bRet;
pStepBmp = (AnimationBitmap*) maList.Next() )
{
- if( ( bRet = pStepBmp->aBmpEx.Mirror( nMirrorFlags ) ) == TRUE )
+ if( ( bRet = pStepBmp->aBmpEx.Mirror( nMirrorFlags ) ) == sal_True )
{
if( nMirrorFlags & BMP_MIRROR_HORZ )
pStepBmp->aPosPix.X() = maGlobalSize.Width() - pStepBmp->aPosPix.X() - pStepBmp->aSizePix.Width();
@@ -738,22 +738,22 @@ BOOL Animation::Mirror( ULONG nMirrorFlags )
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// -----------------------------------------------------------------------
-BOOL Animation::Dither( ULONG nDitherFlags )
+sal_Bool Animation::Dither( sal_uLong nDitherFlags )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( void* pStepBmp = maList.First(); pStepBmp && bRet; pStepBmp = maList.Next() )
bRet = ( ( AnimationBitmap*) pStepBmp )->aBmpEx.Dither( nDitherFlags );
@@ -761,24 +761,24 @@ BOOL Animation::Dither( ULONG nDitherFlags )
maBitmapEx.Dither( nDitherFlags );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// -----------------------------------------------------------------------
-BOOL Animation::Adjust( short nLuminancePercent, short nContrastPercent,
+sal_Bool Animation::Adjust( short nLuminancePercent, short nContrastPercent,
short nChannelRPercent, short nChannelGPercent, short nChannelBPercent,
- double fGamma, BOOL bInvert )
+ double fGamma, sal_Bool bInvert )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( void* pStepBmp = maList.First(); pStepBmp && bRet; pStepBmp = maList.Next() )
{
@@ -792,22 +792,22 @@ BOOL Animation::Adjust( short nLuminancePercent, short nContrastPercent,
fGamma, bInvert );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// -----------------------------------------------------------------------
-BOOL Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
+sal_Bool Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( void* pStepBmp = maList.First(); pStepBmp && bRet; pStepBmp = maList.Next() )
bRet = ( ( AnimationBitmap*) pStepBmp )->aBmpEx.Filter( eFilter, pFilterParam, pProgress );
@@ -815,7 +815,7 @@ BOOL Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, c
maBitmapEx.Filter( eFilter, pFilterParam, pProgress );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -824,12 +824,12 @@ BOOL Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, c
SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
{
- const USHORT nCount = rAnimation.Count();
+ const sal_uInt16 nCount = rAnimation.Count();
if( nCount )
{
const ByteString aDummyStr;
- const UINT32 nDummy32 = 0UL;
+ const sal_uInt32 nDummy32 = 0UL;
// Falls keine BitmapEx gesetzt wurde, schreiben wir
// einfach die erste Bitmap der Animation
@@ -839,22 +839,22 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
rOStm << rAnimation.GetBitmapEx();
// Kennung schreiben ( SDANIMA1 )
- rOStm << (UINT32) 0x5344414e << (UINT32) 0x494d4931;
+ rOStm << (sal_uInt32) 0x5344414e << (sal_uInt32) 0x494d4931;
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
const AnimationBitmap& rAnimBmp = rAnimation.Get( i );
- const UINT16 nRest = nCount - i - 1;
+ const sal_uInt16 nRest = nCount - i - 1;
// AnimationBitmap schreiben
rOStm << rAnimBmp.aBmpEx;
rOStm << rAnimBmp.aPosPix;
rOStm << rAnimBmp.aSizePix;
rOStm << rAnimation.maGlobalSize;
- rOStm << (UINT16) ( ( ANIMATION_TIMEOUT_ON_CLICK == rAnimBmp.nWait ) ? 65535 : rAnimBmp.nWait );
- rOStm << (UINT16) rAnimBmp.eDisposal;
- rOStm << (BYTE) rAnimBmp.bUserInput;
- rOStm << (UINT32) rAnimation.mnLoopCount;
+ rOStm << (sal_uInt16) ( ( ANIMATION_TIMEOUT_ON_CLICK == rAnimBmp.nWait ) ? 65535 : rAnimBmp.nWait );
+ rOStm << (sal_uInt16) rAnimBmp.eDisposal;
+ rOStm << (sal_uInt8) rAnimBmp.bUserInput;
+ rOStm << (sal_uInt32) rAnimation.mnLoopCount;
rOStm << nDummy32; // unbenutzt
rOStm << nDummy32; // unbenutzt
rOStm << nDummy32; // unbenutzt
@@ -871,10 +871,10 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
{
Bitmap aBmp;
- ULONG nStmPos = rIStm.Tell();
- UINT32 nAnimMagic1, nAnimMagic2;
- USHORT nOldFormat = rIStm.GetNumberFormatInt();
- BOOL bReadAnimations = FALSE;
+ sal_uLong nStmPos = rIStm.Tell();
+ sal_uInt32 nAnimMagic1, nAnimMagic2;
+ sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ sal_Bool bReadAnimations = sal_False;
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
nStmPos = rIStm.Tell();
@@ -885,7 +885,7 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
// Wenn die BitmapEx am Anfang schon gelesen
// wurde ( von Graphic ), koennen wir direkt die Animationsbitmaps einlesen
if( ( nAnimMagic1 == 0x5344414e ) && ( nAnimMagic2 == 0x494d4931 ) && !rIStm.GetError() )
- bReadAnimations = TRUE;
+ bReadAnimations = sal_True;
// ansonsten versuchen wir erstmal die Bitmap(-Ex) zu lesen
else
{
@@ -895,7 +895,7 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
rIStm >> nAnimMagic1 >> nAnimMagic2;
if( ( nAnimMagic1 == 0x5344414e ) && ( nAnimMagic2 == 0x494d4931 ) && !rIStm.GetError() )
- bReadAnimations = TRUE;
+ bReadAnimations = sal_True;
else
rIStm.Seek( nStmPos );
}
@@ -906,9 +906,9 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
AnimationBitmap aAnimBmp;
BitmapEx aBmpEx;
ByteString aDummyStr;
- UINT32 nTmp32;
- UINT16 nTmp16;
- BYTE cTmp;
+ sal_uInt32 nTmp32;
+ sal_uInt16 nTmp16;
+ sal_uInt8 cTmp;
do
{
@@ -918,8 +918,8 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
rIStm >> rAnimation.maGlobalSize;
rIStm >> nTmp16; aAnimBmp.nWait = ( ( 65535 == nTmp16 ) ? ANIMATION_TIMEOUT_ON_CLICK : nTmp16 );
rIStm >> nTmp16; aAnimBmp.eDisposal = ( Disposal) nTmp16;
- rIStm >> cTmp; aAnimBmp.bUserInput = (BOOL) cTmp;
- rIStm >> nTmp32; rAnimation.mnLoopCount = (USHORT) nTmp32;
+ rIStm >> cTmp; aAnimBmp.bUserInput = (sal_Bool) cTmp;
+ rIStm >> nTmp32; rAnimation.mnLoopCount = (sal_uInt16) nTmp32;
rIStm >> nTmp32; // unbenutzt
rIStm >> nTmp32; // unbenutzt
rIStm >> nTmp32; // unbenutzt
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 2d879d83a247..8d831961f8af 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -87,7 +87,7 @@ Bitmap::Bitmap( SalBitmap* pSalBitmap )
// ------------------------------------------------------------------
-Bitmap::Bitmap( const Size& rSizePixel, USHORT nBitCount, const BitmapPalette* pPal )
+Bitmap::Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalette* pPal )
{
if( rSizePixel.Width() && rSizePixel.Height() )
{
@@ -127,12 +127,12 @@ Bitmap::Bitmap( const Size& rSizePixel, USHORT nBitCount, const BitmapPalette* p
// Dither-Palette erzeugen
if( 8 == nBitCount )
{
- USHORT nActCol = 16;
+ sal_uInt16 nActCol = 16;
- for( USHORT nB = 0; nB < 256; nB += 51 )
- for( USHORT nG = 0; nG < 256; nG += 51 )
- for( USHORT nR = 0; nR < 256; nR += 51 )
- aPal[ nActCol++ ] = BitmapColor( (BYTE) nR, (BYTE) nG, (BYTE) nB );
+ for( sal_uInt16 nB = 0; nB < 256; nB += 51 )
+ for( sal_uInt16 nG = 0; nG < 256; nG += 51 )
+ for( sal_uInt16 nR = 0; nR < 256; nR += 51 )
+ aPal[ nActCol++ ] = BitmapColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB );
// Standard-Office-Farbe setzen
aPal[ nActCol++ ] = BitmapColor( 0, 184, 255 );
@@ -197,11 +197,11 @@ const BitmapPalette& Bitmap::GetGreyPalette( int nEntries )
{
if( !aGreyPalette16.GetEntryCount() )
{
- BYTE cGrey = 0, cGreyInc = 17;
+ sal_uInt8 cGrey = 0, cGreyInc = 17;
aGreyPalette16.SetEntryCount( 16 );
- for( USHORT i = 0; i < 16; i++, cGrey = sal::static_int_cast<BYTE>(cGrey + cGreyInc) )
+ for( sal_uInt16 i = 0; i < 16; i++, cGrey = sal::static_int_cast<sal_uInt8>(cGrey + cGreyInc) )
aGreyPalette16[ i ] = BitmapColor( cGrey, cGrey, cGrey );
}
@@ -213,8 +213,8 @@ const BitmapPalette& Bitmap::GetGreyPalette( int nEntries )
{
aGreyPalette256.SetEntryCount( 256 );
- for( USHORT i = 0; i < 256; i++ )
- aGreyPalette256[ i ] = BitmapColor( (BYTE) i, (BYTE) i, (BYTE) i );
+ for( sal_uInt16 i = 0; i < 256; i++ )
+ aGreyPalette256[ i ] = BitmapColor( (sal_uInt8) i, (sal_uInt8) i, (sal_uInt8) i );
}
return aGreyPalette256;
@@ -265,7 +265,7 @@ Bitmap& Bitmap::operator=( const Bitmap& rBitmap )
// ------------------------------------------------------------------
-BOOL Bitmap::IsEqual( const Bitmap& rBmp ) const
+sal_Bool Bitmap::IsEqual( const Bitmap& rBmp ) const
{
return( IsSameInstance( rBmp ) ||
( rBmp.GetSizePixel() == GetSizePixel() &&
@@ -314,17 +314,17 @@ void Bitmap::SetSourceSizePixel( const Size& rSize)
// ------------------------------------------------------------------
-USHORT Bitmap::GetBitCount() const
+sal_uInt16 Bitmap::GetBitCount() const
{
return( mpImpBmp ? mpImpBmp->ImplGetBitCount() : 0 );
}
// ------------------------------------------------------------------
-BOOL Bitmap::HasGreyPalette() const
+sal_Bool Bitmap::HasGreyPalette() const
{
- const USHORT nBitCount = GetBitCount();
- BOOL bRet = FALSE;
+ const sal_uInt16 nBitCount = GetBitCount();
+ sal_Bool bRet = sal_False;
if( 1 == nBitCount )
{
@@ -337,12 +337,12 @@ BOOL Bitmap::HasGreyPalette() const
if( rCol0.GetRed() == rCol0.GetGreen() && rCol0.GetRed() == rCol0.GetBlue() &&
rCol1.GetRed() == rCol1.GetGreen() && rCol1.GetRed() == rCol1.GetBlue() )
{
- bRet = TRUE;
+ bRet = sal_True;
}
( (Bitmap*) this )->ReleaseAccess( pRAcc );
}
else
- bRet = TRUE;
+ bRet = sal_True;
}
else if( 4 == nBitCount || 8 == nBitCount )
{
@@ -351,7 +351,7 @@ BOOL Bitmap::HasGreyPalette() const
if( pRAcc )
{
if( pRAcc->HasPalette() && ( (BitmapPalette&) pRAcc->GetPalette() == GetGreyPalette( 1 << nBitCount ) ) )
- bRet = TRUE;
+ bRet = sal_True;
( (Bitmap*) this )->ReleaseAccess( pRAcc );
}
@@ -362,9 +362,9 @@ BOOL Bitmap::HasGreyPalette() const
// ------------------------------------------------------------------
-ULONG Bitmap::GetChecksum() const
+sal_uLong Bitmap::GetChecksum() const
{
- ULONG nRet = 0UL;
+ sal_uLong nRet = 0UL;
if( mpImpBmp )
{
@@ -528,44 +528,44 @@ void Bitmap::ReleaseAccess( BitmapReadAccess* pBitmapAccess )
// ------------------------------------------------------------------
-BOOL Bitmap::Erase( const Color& rFillColor )
+sal_Bool Bitmap::Erase( const Color& rFillColor )
{
if( !(*this) )
- return TRUE;
+ return sal_True;
BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pWriteAcc )
{
- const ULONG nFormat = pWriteAcc->GetScanlineFormat();
- BYTE cIndex = 0;
- BOOL bFast = FALSE;
+ const sal_uLong nFormat = pWriteAcc->GetScanlineFormat();
+ sal_uInt8 cIndex = 0;
+ sal_Bool bFast = sal_False;
switch( nFormat )
{
case( BMP_FORMAT_1BIT_MSB_PAL ):
case( BMP_FORMAT_1BIT_LSB_PAL ):
{
- cIndex = (BYTE) pWriteAcc->GetBestPaletteIndex( rFillColor );
+ cIndex = (sal_uInt8) pWriteAcc->GetBestPaletteIndex( rFillColor );
cIndex = ( cIndex ? 255 : 0 );
- bFast = TRUE;
+ bFast = sal_True;
}
break;
case( BMP_FORMAT_4BIT_MSN_PAL ):
case( BMP_FORMAT_4BIT_LSN_PAL ):
{
- cIndex = (BYTE) pWriteAcc->GetBestPaletteIndex( rFillColor );
+ cIndex = (sal_uInt8) pWriteAcc->GetBestPaletteIndex( rFillColor );
cIndex = cIndex | ( cIndex << 4 );
- bFast = TRUE;
+ bFast = sal_True;
}
break;
case( BMP_FORMAT_8BIT_PAL ):
{
- cIndex = (BYTE) pWriteAcc->GetBestPaletteIndex( rFillColor );
- bFast = TRUE;
+ cIndex = (sal_uInt8) pWriteAcc->GetBestPaletteIndex( rFillColor );
+ bFast = sal_True;
}
break;
@@ -576,21 +576,21 @@ BOOL Bitmap::Erase( const Color& rFillColor )
( rFillColor.GetRed() == rFillColor.GetBlue() ) )
{
cIndex = rFillColor.GetRed();
- bFast = TRUE;
+ bFast = sal_True;
}
else
- bFast = FALSE;
+ bFast = sal_False;
}
break;
default:
- bFast = FALSE;
+ bFast = sal_False;
break;
}
if( bFast )
{
- const ULONG nBufSize = pWriteAcc->GetScanlineSize() * pWriteAcc->Height();
+ const sal_uLong nBufSize = pWriteAcc->GetScanlineSize() * pWriteAcc->Height();
memset( pWriteAcc->GetBuffer(), cIndex, nBufSize );
}
else
@@ -602,7 +602,7 @@ BOOL Bitmap::Erase( const Color& rFillColor )
}
ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -610,19 +610,19 @@ BOOL Bitmap::Erase( const Color& rFillColor )
// ------------------------------------------------------------------
-BOOL Bitmap::Invert()
+sal_Bool Bitmap::Invert()
{
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pAcc )
{
if( pAcc->HasPalette() )
{
BitmapPalette aBmpPal( pAcc->GetPalette() );
- const USHORT nCount = aBmpPal.GetEntryCount();
+ const sal_uInt16 nCount = aBmpPal.GetEntryCount();
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
aBmpPal[ i ].Invert();
pAcc->SetPalette( aBmpPal );
@@ -638,7 +638,7 @@ BOOL Bitmap::Invert()
}
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -646,11 +646,11 @@ BOOL Bitmap::Invert()
// ------------------------------------------------------------------
-BOOL Bitmap::Mirror( ULONG nMirrorFlags )
+sal_Bool Bitmap::Mirror( sal_uLong nMirrorFlags )
{
- BOOL bHorz = ( ( nMirrorFlags & BMP_MIRROR_HORZ ) == BMP_MIRROR_HORZ );
- BOOL bVert = ( ( nMirrorFlags & BMP_MIRROR_VERT ) == BMP_MIRROR_VERT );
- BOOL bRet = FALSE;
+ sal_Bool bHorz = ( ( nMirrorFlags & BMP_MIRROR_HORZ ) == BMP_MIRROR_HORZ );
+ sal_Bool bVert = ( ( nMirrorFlags & BMP_MIRROR_VERT ) == BMP_MIRROR_VERT );
+ sal_Bool bRet = sal_False;
if( bHorz && !bVert )
{
@@ -675,7 +675,7 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
}
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if( bVert && !bHorz )
@@ -685,7 +685,7 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
if( pAcc )
{
const long nScanSize = pAcc->GetScanlineSize();
- BYTE* pBuffer = new BYTE[ nScanSize ];
+ sal_uInt8* pBuffer = new sal_uInt8[ nScanSize ];
const long nHeight = pAcc->Height();
const long nHeight1 = nHeight - 1L;
const long nHeight_2 = nHeight >> 1L;
@@ -699,7 +699,7 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
delete[] pBuffer;
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if( bHorz && bVert )
@@ -736,26 +736,26 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
}
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
// ------------------------------------------------------------------
-BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
+sal_Bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
nAngle10 %= 3600L;
nAngle10 = ( nAngle10 < 0L ) ? ( 3599L + nAngle10 ) : nAngle10;
if( !nAngle10 )
- bRet = TRUE;
+ bRet = sal_True;
else if( 1800L == nAngle10 )
bRet = Mirror( BMP_MIRROR_HORZ | BMP_MIRROR_VERT );
else
@@ -805,7 +805,7 @@ BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
Point aTmpPoint;
Rectangle aTmpRectangle( aTmpPoint, aSizePix );
Polygon aPoly( aTmpRectangle );
- aPoly.Rotate( aTmpPoint, (USHORT) nAngle10 );
+ aPoly.Rotate( aTmpPoint, (sal_uInt16) nAngle10 );
Rectangle aNewBound( aPoly.GetBoundRect() );
const Size aNewSizePix( aNewBound.GetSize() );
@@ -881,7 +881,7 @@ BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
ReleaseAccess( pReadAcc );
}
- if( ( bRet = !!aRotatedBmp ) == TRUE )
+ if( ( bRet = !!aRotatedBmp ) == sal_True )
ImplAssignWithSize( aRotatedBmp );
}
@@ -890,11 +890,11 @@ BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
// ------------------------------------------------------------------
-BOOL Bitmap::Crop( const Rectangle& rRectPixel )
+sal_Bool Bitmap::Crop( const Rectangle& rRectPixel )
{
const Size aSizePix( GetSizePixel() );
Rectangle aRect( rRectPixel );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
aRect.Intersection( Rectangle( Point(), aSizePix ) );
@@ -921,7 +921,7 @@ BOOL Bitmap::Crop( const Rectangle& rRectPixel )
pWriteAcc->SetPixel( nY, nX, pReadAcc->GetPixel( nY2, nX2 ) );
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -936,12 +936,12 @@ BOOL Bitmap::Crop( const Rectangle& rRectPixel )
// ------------------------------------------------------------------
-BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
+sal_Bool Bitmap::CopyPixel( const Rectangle& rRectDst,
const Rectangle& rRectSrc, const Bitmap* pBmpSrc )
{
const Size aSizePix( GetSizePixel() );
Rectangle aRectDst( rRectDst );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
aRectDst.Intersection( Rectangle( Point(), aSizePix ) );
@@ -952,8 +952,8 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
Bitmap* pSrc = (Bitmap*) pBmpSrc;
const Size aCopySizePix( pSrc->GetSizePixel() );
Rectangle aRectSrc( rRectSrc );
- const USHORT nSrcBitCount = pBmpSrc->GetBitCount();
- const USHORT nDstBitCount = GetBitCount();
+ const sal_uInt16 nSrcBitCount = pBmpSrc->GetBitCount();
+ const sal_uInt16 nDstBitCount = GetBitCount();
if( nSrcBitCount > nDstBitCount )
{
@@ -981,25 +981,25 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
{
const long nSrcCount = pDstAcc->GetPaletteEntryCount();
const long nDstCount = 1 << nDstBitCount;
- BOOL bFound;
+ sal_Bool bFound;
for( long i = 0L; ( i < nSrcCount ) && ( nNextIndex < nSrcCount ); i++ )
{
- const BitmapColor& rSrcCol = pSrcAcc->GetPaletteColor( (USHORT) i );
+ const BitmapColor& rSrcCol = pSrcAcc->GetPaletteColor( (sal_uInt16) i );
- bFound = FALSE;
+ bFound = sal_False;
for( long j = 0L; j < nDstCount; j++ )
{
- if( rSrcCol == pDstAcc->GetPaletteColor( (USHORT) j ) )
+ if( rSrcCol == pDstAcc->GetPaletteColor( (sal_uInt16) j ) )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
if( !bFound )
- pDstAcc->SetPaletteColor( (USHORT) nNextIndex++, rSrcCol );
+ pDstAcc->SetPaletteColor( (sal_uInt16) nNextIndex++, rSrcCol );
}
}
@@ -1031,14 +1031,14 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
if( pReadAcc->HasPalette() && pWriteAcc->HasPalette() )
{
- const USHORT nCount = pReadAcc->GetPaletteEntryCount();
- BYTE* pMap = new BYTE[ nCount ];
+ const sal_uInt16 nCount = pReadAcc->GetPaletteEntryCount();
+ sal_uInt8* pMap = new sal_uInt8[ nCount ];
// Index-Map fuer Farbtabelle
// aufbauen, da das Bild ja (relativ) farbgenau
// kopiert werden soll
- for( USHORT i = 0; i < nCount; i++ )
- pMap[ i ] = (BYTE) pWriteAcc->GetBestPaletteIndex( pReadAcc->GetPaletteColor( i ) );
+ for( sal_uInt16 i = 0; i < nCount; i++ )
+ pMap[ i ] = (sal_uInt8) pWriteAcc->GetBestPaletteIndex( pReadAcc->GetPaletteColor( i ) );
for( long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++ )
for( long nSrcX = aRectSrc.Left(), nDstX = aRectDst.Left(); nSrcX < nSrcEndX; nSrcX++, nDstX++ )
@@ -1114,7 +1114,7 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
}
ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1125,9 +1125,9 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
// ------------------------------------------------------------------
-BOOL Bitmap::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor )
+sal_Bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nDX || nDY )
{
@@ -1171,7 +1171,7 @@ BOOL Bitmap::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor )
pWriteAcc->SetPixel( nY, nX, aColor );
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -1186,11 +1186,11 @@ BOOL Bitmap::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor )
// ------------------------------------------------------------------
-Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
+Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const
{
Bitmap aNewBmp( GetSizePixel(), 1 );
BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pWriteAcc )
{
@@ -1212,7 +1212,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
pReadAcc->GetScanlineFormat() == BMP_FORMAT_4BIT_LSN_PAL )
{
// optimized for 4Bit-MSN/LSN source palette
- const BYTE cTest = aTest.GetIndex();
+ const sal_uInt8 cTest = aTest.GetIndex();
const long nShiftInit = ( ( pReadAcc->GetScanlineFormat() == BMP_FORMAT_4BIT_MSN_PAL ) ? 4 : 0 );
if( pWriteAcc->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
@@ -1250,7 +1250,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
else if( pReadAcc->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL )
{
// optimized for 8Bit source palette
- const BYTE cTest = aTest.GetIndex();
+ const sal_uInt8 cTest = aTest.GetIndex();
if( pWriteAcc->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
aWhite.GetIndex() == 1 )
@@ -1357,7 +1357,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
}
( (Bitmap*) this )->ReleaseAccess( pReadAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aNewBmp.ReleaseAccess( pWriteAcc );
@@ -1429,11 +1429,11 @@ Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) const
// ------------------------------------------------------------------
-BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
+sal_Bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
{
BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pMaskAcc && pAcc )
{
@@ -1444,15 +1444,15 @@ BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
if( pAcc->HasPalette() )
{
- const USHORT nActColors = pAcc->GetPaletteEntryCount();
- const USHORT nMaxColors = 1 << pAcc->GetBitCount();
+ const sal_uInt16 nActColors = pAcc->GetPaletteEntryCount();
+ const sal_uInt16 nMaxColors = 1 << pAcc->GetBitCount();
// erst einmal naechste Farbe nehmen
aReplace = pAcc->GetBestMatchingColor( rReplaceColor );
// falls Palettenbild, und die zu setzende Farbe ist nicht
// in der Palette, suchen wir nach freien Eintraegen (teuer)
- if( pAcc->GetPaletteColor( (BYTE) aReplace ) != BitmapColor( rReplaceColor ) )
+ if( pAcc->GetPaletteColor( (sal_uInt8) aReplace ) != BitmapColor( rReplaceColor ) )
{
// erst einmal nachsehen, ob wir unsere ReplaceColor
// nicht auf einen freien Platz am Ende der Palette
@@ -1461,26 +1461,26 @@ BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
{
pAcc->SetPaletteEntryCount( nActColors + 1 );
pAcc->SetPaletteColor( nActColors, rReplaceColor );
- aReplace = BitmapColor( (BYTE) nActColors );
+ aReplace = BitmapColor( (sal_uInt8) nActColors );
}
else
{
- BOOL* pFlags = new BOOL[ nMaxColors ];
+ sal_Bool* pFlags = new sal_Bool[ nMaxColors ];
// alle Eintraege auf 0 setzen
memset( pFlags, 0, nMaxColors );
for( long nY = 0L; nY < nHeight; nY++ )
for( long nX = 0L; nX < nWidth; nX++ )
- pFlags[ (BYTE) pAcc->GetPixel( nY, nX ) ] = TRUE;
+ pFlags[ (sal_uInt8) pAcc->GetPixel( nY, nX ) ] = sal_True;
- for( USHORT i = 0UL; i < nMaxColors; i++ )
+ for( sal_uInt16 i = 0UL; i < nMaxColors; i++ )
{
// Hurra, wir haben einen unbenutzten Eintrag
if( !pFlags[ i ] )
{
- pAcc->SetPaletteColor( (USHORT) i, rReplaceColor );
- aReplace = BitmapColor( (BYTE) i );
+ pAcc->SetPaletteColor( (sal_uInt16) i, rReplaceColor );
+ aReplace = BitmapColor( (sal_uInt8) i );
}
}
@@ -1496,7 +1496,7 @@ BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
if( pMaskAcc->GetPixel( nY, nX ) == aMaskWhite )
pAcc->SetPixel( nY, nX, aReplace );
- bRet = TRUE;
+ bRet = sal_True;
}
( (Bitmap&) rMask ).ReleaseAccess( pMaskAcc );
@@ -1507,13 +1507,13 @@ BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
// ------------------------------------------------------------------
-BOOL Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
+sal_Bool Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
{
Bitmap aNewBmp( GetSizePixel(), 24 );
BitmapReadAccess* pAcc = AcquireReadAccess();
BitmapReadAccess* pAlphaAcc = ( (AlphaMask&) rAlpha ).AcquireReadAccess();
BitmapWriteAccess* pNewAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pAcc && pAlphaAcc && pNewAcc )
{
@@ -1526,11 +1526,11 @@ BOOL Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
for( long nX = 0L; nX < nWidth; nX++ )
{
aCol = pAcc->GetColor( nY, nX );
- pNewAcc->SetPixel( nY, nX, aCol.Merge( rMergeColor, 255 - (BYTE) pAlphaAcc->GetPixel( nY, nX ) ) );
+ pNewAcc->SetPixel( nY, nX, aCol.Merge( rMergeColor, 255 - (sal_uInt8) pAlphaAcc->GetPixel( nY, nX ) ) );
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pAcc );
@@ -1553,7 +1553,7 @@ BOOL Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
// ------------------------------------------------------------------
-BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol )
+sal_Bool Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol )
{
// Bitmaps with 1 bit color depth can cause problems
// if they have other entries than black/white in their palette
@@ -1561,7 +1561,7 @@ BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULO
Convert( BMP_CONVERSION_4BIT_COLORS );
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pAcc )
{
@@ -1574,7 +1574,7 @@ BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULO
if( pAcc->HasPalette() )
{
- for( USHORT i = 0, nPalCount = pAcc->GetPaletteEntryCount(); i < nPalCount; i++ )
+ for( sal_uInt16 i = 0, nPalCount = pAcc->GetPaletteEntryCount(); i < nPalCount; i++ )
{
const BitmapColor& rCol = pAcc->GetPaletteColor( i );
@@ -1608,7 +1608,7 @@ BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULO
}
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1616,8 +1616,8 @@ BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULO
// ------------------------------------------------------------------
-BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
- ULONG nColorCount, ULONG* _pTols )
+sal_Bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
+ sal_uLong nColorCount, sal_uLong* _pTols )
{
// Bitmaps with 1 bit color depth can cause problems
// if they have other entries than black/white in their palette
@@ -1625,7 +1625,7 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
Convert( BMP_CONVERSION_4BIT_COLORS );
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pAcc )
{
@@ -1636,7 +1636,7 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
long* pMinB = new long[ nColorCount ];
long* pMaxB = new long[ nColorCount ];
long* pTols;
- ULONG i;
+ sal_uLong i;
if( !_pTols )
{
@@ -1661,7 +1661,7 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
if( pAcc->HasPalette() )
{
- for( USHORT nEntry = 0, nPalCount = pAcc->GetPaletteEntryCount(); nEntry < nPalCount; nEntry++ )
+ for( sal_uInt16 nEntry = 0, nPalCount = pAcc->GetPaletteEntryCount(); nEntry < nPalCount; nEntry++ )
{
const BitmapColor& rCol = pAcc->GetPaletteColor( nEntry );
@@ -1671,7 +1671,7 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
pMinG[ i ] <= rCol.GetGreen() && pMaxG[ i ] >= rCol.GetGreen() &&
pMinB[ i ] <= rCol.GetBlue() && pMaxB[ i ] >= rCol.GetBlue() )
{
- pAcc->SetPaletteColor( (USHORT)nEntry, pReplaceColors[ i ] );
+ pAcc->SetPaletteColor( (sal_uInt16)nEntry, pReplaceColors[ i ] );
break;
}
}
@@ -1717,7 +1717,7 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
delete[] pMinB;
delete[] pMaxB;
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1752,7 +1752,7 @@ Bitmap Bitmap::GetColorTransformedBitmap( BmpColorMode eColorMode ) const
{
Color* pSrcColors = NULL;
Color* pDstColors = NULL;
- ULONG nColorCount = 0;
+ sal_uLong nColorCount = 0;
aRet = *this;
@@ -1776,11 +1776,11 @@ Bitmap Bitmap::GetColorTransformedBitmap( BmpColorMode eColorMode ) const
// ------------------------------------------------------------------
-BOOL Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
+sal_Bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
{
BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pMaskAcc && pAcc )
{
@@ -1904,7 +1904,7 @@ BOOL Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
break;
}
- bRet = TRUE;
+ bRet = sal_True;
}
( (Bitmap&) rMask ).ReleaseAccess( pMaskAcc );
@@ -1915,7 +1915,7 @@ BOOL Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
// ------------------------------------------------------------------
-BOOL Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
+sal_Bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
{
// TODO: Have a look at OutputDevice::ImplDrawAlpha() for some
// optimizations. Might even consolidate the code here and there.
@@ -1927,7 +1927,7 @@ BOOL Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
BitmapReadAccess* pAlphaAcc = const_cast<AlphaMask&>(rAlpha).AcquireReadAccess();
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pAlphaAcc && pAcc )
{
@@ -1940,7 +1940,7 @@ BOOL Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
pAcc->GetPixel( nY, nX ).Merge( rBackgroundColor,
255 - pAlphaAcc->GetPixel( nY, nX ) ) );
- bRet = TRUE;
+ bRet = sal_True;
}
const_cast<AlphaMask&>(rAlpha).ReleaseAccess( pAlphaAcc );
@@ -1951,7 +1951,7 @@ BOOL Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
// ------------------------------------------------------------------
-BOOL Bitmap::MakeMono( BYTE cThreshold )
+sal_Bool Bitmap::MakeMono( sal_uInt8 cThreshold )
{
return ImplMakeMono( cThreshold );
}
diff --git a/vcl/source/gdi/bitmap2.cxx b/vcl/source/gdi/bitmap2.cxx
index de926a0446ca..8dffa7d59a2c 100644
--- a/vcl/source/gdi/bitmap2.cxx
+++ b/vcl/source/gdi/bitmap2.cxx
@@ -95,14 +95,14 @@ struct DIBInfoHeader
namespace
{
- inline USHORT discretizeBitcount( UINT16 nInputCount )
+ inline sal_uInt16 discretizeBitcount( sal_uInt16 nInputCount )
{
return ( nInputCount <= 1 ) ? 1 :
( nInputCount <= 4 ) ? 4 :
( nInputCount <= 8 ) ? 8 : 24;
}
- inline bool isBitfieldCompression( ULONG nScanlineFormat )
+ inline bool isBitfieldCompression( sal_uLong nScanlineFormat )
{
return nScanlineFormat == BMP_FORMAT_16BIT_TC_LSB_MASK ||
nScanlineFormat == BMP_FORMAT_32BIT_TC_MASK;
@@ -115,7 +115,7 @@ namespace
SvStream& operator>>( SvStream& rIStm, Bitmap& rBitmap )
{
- rBitmap.Read( rIStm, TRUE );
+ rBitmap.Read( rIStm, sal_True );
return rIStm;
}
@@ -123,18 +123,18 @@ SvStream& operator>>( SvStream& rIStm, Bitmap& rBitmap )
SvStream& operator<<( SvStream& rOStm, const Bitmap& rBitmap )
{
- rBitmap.Write( rOStm, FALSE, TRUE );
+ rBitmap.Write( rOStm, sal_False, sal_True );
return rOStm;
}
// ------------------------------------------------------------------
-BOOL Bitmap::Read( SvStream& rIStm, BOOL bFileHeader )
+sal_Bool Bitmap::Read( SvStream& rIStm, sal_Bool bFileHeader )
{
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
- const ULONG nOldPos = rIStm.Tell();
- ULONG nOffset = 0UL;
- BOOL bRet = FALSE;
+ const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ const sal_uLong nOldPos = rIStm.Tell();
+ sal_uLong nOffset = 0UL;
+ sal_Bool bRet = sal_False;
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -161,16 +161,16 @@ BOOL Bitmap::Read( SvStream& rIStm, BOOL bFileHeader )
// ------------------------------------------------------------------
-BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
+sal_Bool Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, sal_uLong nOffset )
{
DIBInfoHeader aHeader;
- const ULONG nStmPos = rIStm.Tell();
- BOOL bRet = FALSE;
+ const sal_uLong nStmPos = rIStm.Tell();
+ sal_Bool bRet = sal_False;
sal_Bool bTopDown = sal_False;
if( ImplReadDIBInfoHeader( rIStm, aHeader, bTopDown ) && aHeader.nWidth && aHeader.nHeight && aHeader.nBitCount )
{
- const USHORT nBitCount( discretizeBitcount(aHeader.nBitCount) );
+ const sal_uInt16 nBitCount( discretizeBitcount(aHeader.nBitCount) );
const Size aSizePixel( aHeader.nWidth, aHeader.nHeight );
BitmapPalette aDummyPal;
@@ -179,15 +179,15 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
if( pAcc )
{
- USHORT nColors;
+ sal_uInt16 nColors;
SvStream* pIStm;
SvMemoryStream* pMemStm = NULL;
- BYTE* pData = NULL;
+ sal_uInt8* pData = NULL;
if( nBitCount <= 8 )
{
if( aHeader.nColsUsed )
- nColors = (USHORT) aHeader.nColsUsed;
+ nColors = (sal_uInt16) aHeader.nColsUsed;
else
nColors = ( 1 << aHeader.nBitCount );
}
@@ -198,11 +198,11 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
{
ZCodec aCodec;
sal_uInt32 nCodedSize, nUncodedSize;
- ULONG nCodedPos;
+ sal_uLong nCodedPos;
// read coding information
rIStm >> nCodedSize >> nUncodedSize >> aHeader.nCompression;
- pData = (BYTE*) rtl_allocateMemory( nUncodedSize );
+ pData = (sal_uInt8*) rtl_allocateMemory( nUncodedSize );
// decode buffer
nCodedPos = rIStm.Tell();
@@ -216,7 +216,7 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
// set decoded bytes to memory stream,
// from which we will read the bitmap data
pIStm = pMemStm = new SvMemoryStream;
- pMemStm->SetBuffer( (char*) pData, nUncodedSize, FALSE, nUncodedSize );
+ pMemStm->SetBuffer( (char*) pData, nUncodedSize, sal_False, nUncodedSize );
nOffset = 0;
}
else
@@ -264,11 +264,11 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
// ------------------------------------------------------------------
-BOOL Bitmap::ImplReadDIBFileHeader( SvStream& rIStm, ULONG& rOffset )
+sal_Bool Bitmap::ImplReadDIBFileHeader( SvStream& rIStm, sal_uLong& rOffset )
{
- UINT32 nTmp32;
- UINT16 nTmp16 = 0;
- BOOL bRet = FALSE;
+ sal_uInt32 nTmp32;
+ sal_uInt16 nTmp16 = 0;
+ sal_Bool bRet = sal_False;
rIStm >> nTmp16;
@@ -299,7 +299,7 @@ BOOL Bitmap::ImplReadDIBFileHeader( SvStream& rIStm, ULONG& rOffset )
// ------------------------------------------------------------------
-BOOL Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal_Bool& bTopDown )
+sal_Bool Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal_Bool& bTopDown )
{
// BITMAPINFOHEADER or BITMAPCOREHEADER
rIStm >> rHeader.nSize;
@@ -319,7 +319,7 @@ BOOL Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal
// unknown Header
if( rHeader.nSize < DIBINFOHEADERSIZE )
{
- ULONG nUnknownSize = sizeof( rHeader.nSize );
+ sal_uLong nUnknownSize = sizeof( rHeader.nSize );
rIStm >> rHeader.nWidth; nUnknownSize += sizeof( rHeader.nWidth );
rIStm >> rHeader.nHeight; nUnknownSize += sizeof( rHeader.nHeight );
@@ -400,17 +400,17 @@ BOOL Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal
// ------------------------------------------------------------------
-BOOL Bitmap::ImplReadDIBPalette( SvStream& rIStm, BitmapWriteAccess& rAcc, BOOL bQuad )
+sal_Bool Bitmap::ImplReadDIBPalette( SvStream& rIStm, BitmapWriteAccess& rAcc, sal_Bool bQuad )
{
- const USHORT nColors = rAcc.GetPaletteEntryCount();
- const ULONG nPalSize = nColors * ( bQuad ? 4UL : 3UL );
+ const sal_uInt16 nColors = rAcc.GetPaletteEntryCount();
+ const sal_uLong nPalSize = nColors * ( bQuad ? 4UL : 3UL );
BitmapColor aPalColor;
- BYTE* pEntries = new BYTE[ nPalSize ];
+ sal_uInt8* pEntries = new sal_uInt8[ nPalSize ];
rIStm.Read( pEntries, nPalSize );
- BYTE* pTmpEntry = pEntries;
- for( USHORT i = 0; i < nColors; i++ )
+ sal_uInt8* pTmpEntry = pEntries;
+ for( sal_uInt16 i = 0; i < nColors; i++ )
{
aPalColor.SetBlue( *pTmpEntry++ );
aPalColor.SetGreen( *pTmpEntry++ );
@@ -429,15 +429,15 @@ BOOL Bitmap::ImplReadDIBPalette( SvStream& rIStm, BitmapWriteAccess& rAcc, BOOL
// ------------------------------------------------------------------
-BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWriteAccess& rAcc, sal_Bool bTopDown )
+sal_Bool Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWriteAccess& rAcc, sal_Bool bTopDown )
{
- const ULONG nAlignedWidth = AlignedWidth4Bytes( rHeader.nWidth * rHeader.nBitCount );
- UINT32 nRMask = 0;
- UINT32 nGMask = 0;
- UINT32 nBMask = 0;
- BOOL bNative;
- BOOL bTCMask = ( rHeader.nBitCount == 16 ) || ( rHeader.nBitCount == 32 );
- BOOL bRLE = ( RLE_8 == rHeader.nCompression && rHeader.nBitCount == 8 ) ||
+ const sal_uLong nAlignedWidth = AlignedWidth4Bytes( rHeader.nWidth * rHeader.nBitCount );
+ sal_uInt32 nRMask = 0;
+ sal_uInt32 nGMask = 0;
+ sal_uInt32 nBMask = 0;
+ sal_Bool bNative;
+ sal_Bool bTCMask = ( rHeader.nBitCount == 16 ) || ( rHeader.nBitCount == 32 );
+ sal_Bool bRLE = ( RLE_8 == rHeader.nCompression && rHeader.nBitCount == 8 ) ||
( RLE_4 == rHeader.nCompression && rHeader.nBitCount == 4 );
// Is native format?
@@ -451,7 +451,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
break;
default:
- bNative = FALSE;
+ bNative = sal_False;
break;
}
// Read data
@@ -487,14 +487,14 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
{
if ( !rHeader.nSizeImage )
{
- const ULONG nOldPos = rIStm.Tell();
+ const sal_uLong nOldPos = rIStm.Tell();
rIStm.Seek( STREAM_SEEK_TO_END );
rHeader.nSizeImage = rIStm.Tell() - nOldPos;
rIStm.Seek( nOldPos );
}
- BYTE* pBuffer = (BYTE*) rtl_allocateMemory( rHeader.nSizeImage );
+ sal_uInt8* pBuffer = (sal_uInt8*) rtl_allocateMemory( rHeader.nSizeImage );
rIStm.Read( (char*) pBuffer, rHeader.nSizeImage );
ImplDecodeRLE( pBuffer, rHeader, rAcc, RLE_4 == rHeader.nCompression );
@@ -505,7 +505,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
{
const long nWidth = rHeader.nWidth;
const long nHeight = rHeader.nHeight;
- BYTE* pBuf = new BYTE[ nAlignedWidth ];
+ sal_uInt8* pBuf = new sal_uInt8[ nAlignedWidth ];
// true color DIB's can have a (optimization) palette
if( rHeader.nColsUsed && rHeader.nBitCount > 8 )
@@ -519,8 +519,8 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
{
case( 1 ):
{
- BYTE* pTmp;
- BYTE cTmp;
+ sal_uInt8* pTmp;
+ sal_uInt8 cTmp;
for( ; nCount--; nY += nI )
{
@@ -535,7 +535,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
cTmp = *pTmp++;
}
- rAcc.SetPixel( nY, nX, sal::static_int_cast<BYTE>(( cTmp >> --nShift ) & 1) );
+ rAcc.SetPixel( nY, nX, sal::static_int_cast<sal_uInt8>(( cTmp >> --nShift ) & 1) );
}
}
}
@@ -543,8 +543,8 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 4 ):
{
- BYTE* pTmp;
- BYTE cTmp;
+ sal_uInt8* pTmp;
+ sal_uInt8 cTmp;
for( ; nCount--; nY += nI )
{
@@ -559,7 +559,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
cTmp = *pTmp++;
}
- rAcc.SetPixel( nY, nX, sal::static_int_cast<BYTE>(( cTmp >> ( --nShift << 2UL ) ) & 0x0f) );
+ rAcc.SetPixel( nY, nX, sal::static_int_cast<sal_uInt8>(( cTmp >> ( --nShift << 2UL ) ) & 0x0f) );
}
}
}
@@ -567,7 +567,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 8 ):
{
- BYTE* pTmp;
+ sal_uInt8* pTmp;
for( ; nCount--; nY += nI )
{
@@ -583,15 +583,15 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
{
ColorMask aMask( nRMask, nGMask, nBMask );
BitmapColor aColor;
- UINT16* pTmp16;
+ sal_uInt16* pTmp16;
for( ; nCount--; nY += nI )
{
- rIStm.Read( (char*)( pTmp16 = (UINT16*) pBuf ), nAlignedWidth );
+ rIStm.Read( (char*)( pTmp16 = (sal_uInt16*) pBuf ), nAlignedWidth );
for( long nX = 0L; nX < nWidth; nX++ )
{
- aMask.GetColorFor16BitLSB( aColor, (BYTE*) pTmp16++ );
+ aMask.GetColorFor16BitLSB( aColor, (sal_uInt8*) pTmp16++ );
rAcc.SetPixel( nY, nX, aColor );
}
}
@@ -601,7 +601,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 24 ):
{
BitmapColor aPixelColor;
- BYTE* pTmp;
+ sal_uInt8* pTmp;
for( ; nCount--; nY += nI )
{
@@ -622,15 +622,15 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
{
ColorMask aMask( nRMask, nGMask, nBMask );
BitmapColor aColor;
- UINT32* pTmp32;
+ sal_uInt32* pTmp32;
for( ; nCount--; nY += nI )
{
- rIStm.Read( (char*)( pTmp32 = (UINT32*) pBuf ), nAlignedWidth );
+ rIStm.Read( (char*)( pTmp32 = (sal_uInt32*) pBuf ), nAlignedWidth );
for( long nX = 0L; nX < nWidth; nX++ )
{
- aMask.GetColorFor32Bit( aColor, (BYTE*) pTmp32++ );
+ aMask.GetColorFor32Bit( aColor, (sal_uInt8*) pTmp32++ );
rAcc.SetPixel( nY, nX, aColor );
}
}
@@ -646,18 +646,18 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
// ------------------------------------------------------------------
-BOOL Bitmap::Write( SvStream& rOStm, BOOL bCompressed, BOOL bFileHeader ) const
+sal_Bool Bitmap::Write( SvStream& rOStm, sal_Bool bCompressed, sal_Bool bFileHeader ) const
{
DBG_ASSERT( mpImpBmp, "Empty Bitmaps can't be saved" );
const Size aSizePix( GetSizePixel() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( mpImpBmp && aSizePix.Width() && aSizePix.Height() )
{
BitmapReadAccess* pAcc = ( (Bitmap*) this)->AcquireReadAccess();
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
- const ULONG nOldPos = rOStm.Tell();
+ const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
+ const sal_uLong nOldPos = rOStm.Tell();
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -688,14 +688,14 @@ BOOL Bitmap::Write( SvStream& rOStm, BOOL bCompressed, BOOL bFileHeader ) const
// ------------------------------------------------------------------
-BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompressed ) const
+sal_Bool Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, sal_Bool bCompressed ) const
{
const MapMode aMapPixel( MAP_PIXEL );
DIBInfoHeader aHeader;
- ULONG nImageSizePos;
- ULONG nEndPos;
+ sal_uLong nImageSizePos;
+ sal_uLong nEndPos;
sal_uInt32 nCompression = 0;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
aHeader.nSize = DIBINFOHEADERSIZE;
aHeader.nWidth = rAcc.Width();
@@ -720,7 +720,7 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
// recent.
// #i59239# discretize bitcount to 1,4,8,24 (other cases
// are not written below)
- const UINT16 nBitCount( sal::static_int_cast<UINT16>(rAcc.GetBitCount()) );
+ const sal_uInt16 nBitCount( sal::static_int_cast<sal_uInt16>(rAcc.GetBitCount()) );
aHeader.nBitCount = discretizeBitcount( nBitCount );
aHeader.nSizeImage = rAcc.Height() *
@@ -763,8 +763,8 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
if( fabs(fBmpWidthM) > 0.000000001 &&
fabs(fBmpHeightM) > 0.000000001 )
{
- aHeader.nXPelsPerMeter = (UINT32)(rAcc.Width() / fBmpWidthM + .5);
- aHeader.nYPelsPerMeter = (UINT32)(rAcc.Height() / fBmpHeightM + .5);
+ aHeader.nXPelsPerMeter = (sal_uInt32)(rAcc.Width() / fBmpWidthM + .5);
+ aHeader.nYPelsPerMeter = (sal_uInt32)(rAcc.Height() / fBmpHeightM + .5);
}
}
@@ -790,7 +790,7 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
{
ZCodec aCodec;
SvMemoryStream aMemStm( aHeader.nSizeImage + 4096, 65535 );
- ULONG nCodedPos = rOStm.Tell(), nLastPos;
+ sal_uLong nCodedPos = rOStm.Tell(), nLastPos;
sal_uInt32 nCodedSize, nUncodedSize;
// write uncoded data palette
@@ -808,7 +808,7 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
// write compressed data
aCodec.BeginCompression( 3 );
- aCodec.Write( rOStm, (BYTE*) aMemStm.GetData(), nUncodedSize );
+ aCodec.Write( rOStm, (sal_uInt8*) aMemStm.GetData(), nUncodedSize );
aCodec.EndCompression();
// update compress info ( coded size, uncoded size, uncoded compression )
@@ -838,16 +838,16 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
// ------------------------------------------------------------------
-BOOL Bitmap::ImplWriteDIBFileHeader( SvStream& rOStm, BitmapReadAccess& rAcc )
+sal_Bool Bitmap::ImplWriteDIBFileHeader( SvStream& rOStm, BitmapReadAccess& rAcc )
{
- UINT32 nPalCount = ( rAcc.HasPalette() ? rAcc.GetPaletteEntryCount() :
+ sal_uInt32 nPalCount = ( rAcc.HasPalette() ? rAcc.GetPaletteEntryCount() :
isBitfieldCompression( rAcc.GetScanlineFormat() ) ? 3UL : 0UL );
- UINT32 nOffset = 14 + DIBINFOHEADERSIZE + nPalCount * 4UL;
+ sal_uInt32 nOffset = 14 + DIBINFOHEADERSIZE + nPalCount * 4UL;
- rOStm << (UINT16) 0x4D42;
- rOStm << (UINT32) ( nOffset + ( rAcc.Height() * rAcc.GetScanlineSize() ) );
- rOStm << (UINT16) 0;
- rOStm << (UINT16) 0;
+ rOStm << (sal_uInt16) 0x4D42;
+ rOStm << (sal_uInt32) ( nOffset + ( rAcc.Height() * rAcc.GetScanlineSize() ) );
+ rOStm << (sal_uInt16) 0;
+ rOStm << (sal_uInt16) 0;
rOStm << nOffset;
return( rOStm.GetError() == 0UL );
@@ -855,15 +855,15 @@ BOOL Bitmap::ImplWriteDIBFileHeader( SvStream& rOStm, BitmapReadAccess& rAcc )
// ------------------------------------------------------------------
-BOOL Bitmap::ImplWriteDIBPalette( SvStream& rOStm, BitmapReadAccess& rAcc )
+sal_Bool Bitmap::ImplWriteDIBPalette( SvStream& rOStm, BitmapReadAccess& rAcc )
{
- const USHORT nColors = rAcc.GetPaletteEntryCount();
- const ULONG nPalSize = nColors * 4UL;
- BYTE* pEntries = new BYTE[ nPalSize ];
- BYTE* pTmpEntry = pEntries;
+ const sal_uInt16 nColors = rAcc.GetPaletteEntryCount();
+ const sal_uLong nPalSize = nColors * 4UL;
+ sal_uInt8* pEntries = new sal_uInt8[ nPalSize ];
+ sal_uInt8* pTmpEntry = pEntries;
BitmapColor aPalColor;
- for( USHORT i = 0; i < nColors; i++ )
+ for( sal_uInt16 i = 0; i < nColors; i++ )
{
const BitmapColor& rPalColor = rAcc.GetPaletteColor( i );
@@ -881,8 +881,8 @@ BOOL Bitmap::ImplWriteDIBPalette( SvStream& rOStm, BitmapReadAccess& rAcc )
// ------------------------------------------------------------------
-BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
- ULONG nCompression, sal_uInt32& rImageSize )
+sal_Bool Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
+ sal_uLong nCompression, sal_uInt32& rImageSize )
{
if( BITFIELDS == nCompression )
{
@@ -890,13 +890,13 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
SVBT32 aVal32;
UInt32ToSVBT32( rMask.GetRedMask(), aVal32 );
- rOStm.Write( (BYTE*) aVal32, 4UL );
+ rOStm.Write( (sal_uInt8*) aVal32, 4UL );
UInt32ToSVBT32( rMask.GetGreenMask(), aVal32 );
- rOStm.Write( (BYTE*) aVal32, 4UL );
+ rOStm.Write( (sal_uInt8*) aVal32, 4UL );
UInt32ToSVBT32( rMask.GetBlueMask(), aVal32 );
- rOStm.Write( (BYTE*) aVal32, 4UL );
+ rOStm.Write( (sal_uInt8*) aVal32, 4UL );
rImageSize = rOStm.Tell();
@@ -923,10 +923,10 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
// bitmaps is relatively recent.
// #i59239# discretize bitcount for aligned width to 1,4,8,24
// (other cases are not written below)
- const USHORT nBitCount( sal::static_int_cast<USHORT>(rAcc.GetBitCount()) );
- const ULONG nAlignedWidth = AlignedWidth4Bytes( rAcc.Width() *
+ const sal_uInt16 nBitCount( sal::static_int_cast<sal_uInt16>(rAcc.GetBitCount()) );
+ const sal_uLong nAlignedWidth = AlignedWidth4Bytes( rAcc.Width() *
discretizeBitcount(nBitCount));
- BOOL bNative = FALSE;
+ sal_Bool bNative = sal_False;
switch( rAcc.GetScanlineFormat() )
{
@@ -936,7 +936,7 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
case( BMP_FORMAT_24BIT_TC_BGR ):
{
if( rAcc.IsBottomUp() && ( rAcc.GetScanlineSize() == nAlignedWidth ) )
- bNative = TRUE;
+ bNative = sal_True;
}
break;
@@ -952,9 +952,9 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
{
const long nWidth = rAcc.Width();
const long nHeight = rAcc.Height();
- BYTE* pBuf = new BYTE[ nAlignedWidth ];
- BYTE* pTmp;
- BYTE cTmp;
+ sal_uInt8* pBuf = new sal_uInt8[ nAlignedWidth ];
+ sal_uInt8* pTmp;
+ sal_uInt8 cTmp;
switch( nBitCount )
{
@@ -974,7 +974,7 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
cTmp = 0;
}
- cTmp |= ( (BYTE) rAcc.GetPixel( nY, nX ) << --nShift );
+ cTmp |= ( (sal_uInt8) rAcc.GetPixel( nY, nX ) << --nShift );
}
*pTmp = cTmp;
@@ -999,7 +999,7 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
cTmp = 0;
}
- cTmp |= ( (BYTE) rAcc.GetPixel( nY, nX ) << ( --nShift << 2L ) );
+ cTmp |= ( (sal_uInt8) rAcc.GetPixel( nY, nX ) << ( --nShift << 2L ) );
}
*pTmp = cTmp;
rOStm.Write( pBuf, nAlignedWidth );
@@ -1057,17 +1057,17 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
// ------------------------------------------------------------------
-void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
- BitmapWriteAccess& rAcc, BOOL bRLE4 )
+void Bitmap::ImplDecodeRLE( sal_uInt8* pBuffer, DIBInfoHeader& rHeader,
+ BitmapWriteAccess& rAcc, sal_Bool bRLE4 )
{
Scanline pRLE = pBuffer;
long nY = rHeader.nHeight - 1L;
- const ULONG nWidth = rAcc.Width();
- ULONG nCountByte;
- ULONG nRunByte;
- ULONG nX = 0UL;
- BYTE cTmp;
- BOOL bEndDecoding = FALSE;
+ const sal_uLong nWidth = rAcc.Width();
+ sal_uLong nCountByte;
+ sal_uLong nRunByte;
+ sal_uLong nX = 0UL;
+ sal_uInt8 cTmp;
+ sal_Bool bEndDecoding = sal_False;
do
{
@@ -1081,7 +1081,7 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
{
nCountByte = nRunByte >> 1;
- for( ULONG i = 0UL; i < nCountByte; i++ )
+ for( sal_uLong i = 0UL; i < nCountByte; i++ )
{
cTmp = *pRLE++;
@@ -1105,7 +1105,7 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
}
else
{
- for( ULONG i = 0UL; i < nRunByte; i++ )
+ for( sal_uLong i = 0UL; i < nRunByte; i++ )
{
if( nX < nWidth )
rAcc.SetPixel( nY, nX++, *pRLE );
@@ -1123,7 +1123,7 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
nX = 0UL;
}
else if( nRunByte == 1 )
- bEndDecoding = TRUE;
+ bEndDecoding = sal_True;
else
{
nX += *pRLE++;
@@ -1138,7 +1138,7 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
{
nRunByte = nCountByte >> 1;
- for( ULONG i = 0UL; i < nRunByte; i++ )
+ for( sal_uLong i = 0UL; i < nRunByte; i++ )
{
if( nX < nWidth )
rAcc.SetPixel( nY, nX++, cTmp >> 4 );
@@ -1152,7 +1152,7 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
}
else
{
- for( ULONG i = 0UL; ( i < nCountByte ) && ( nX < nWidth ); i++ )
+ for( sal_uLong i = 0UL; ( i < nCountByte ) && ( nX < nWidth ); i++ )
rAcc.SetPixel( nY, nX++, cTmp );
}
}
@@ -1162,19 +1162,19 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
// ------------------------------------------------------------------
-BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
+sal_Bool Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, sal_Bool bRLE4 )
{
- const ULONG nWidth = rAcc.Width();
- const ULONG nHeight = rAcc.Height();
- ULONG nX;
- ULONG nSaveIndex;
- ULONG nCount;
- ULONG nBufCount;
- BYTE* pBuf = new BYTE[ ( nWidth << 1 ) + 2 ];
- BYTE* pTmp;
- BYTE cPix;
- BYTE cLast;
- BOOL bFound;
+ const sal_uLong nWidth = rAcc.Width();
+ const sal_uLong nHeight = rAcc.Height();
+ sal_uLong nX;
+ sal_uLong nSaveIndex;
+ sal_uLong nCount;
+ sal_uLong nBufCount;
+ sal_uInt8* pBuf = new sal_uInt8[ ( nWidth << 1 ) + 2 ];
+ sal_uInt8* pTmp;
+ sal_uInt8 cPix;
+ sal_uInt8 cLast;
+ sal_Bool bFound;
for ( long nY = nHeight - 1L; nY >= 0L; nY-- )
{
@@ -1194,7 +1194,7 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
if ( nCount > 1 )
{
- *pTmp++ = (BYTE) nCount;
+ *pTmp++ = (sal_uInt8) nCount;
*pTmp++ = ( bRLE4 ? ( ( cPix << 4 ) | cPix ) : cPix );
nBufCount += 2;
}
@@ -1202,13 +1202,13 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
{
cLast = cPix;
nSaveIndex = nX - 1UL;
- bFound = FALSE;
+ bFound = sal_False;
while( ( nX < nWidth ) && ( nCount < 256L ) && ( cPix = rAcc.GetPixel( nY, nX ) ) != cLast )
{
nX++; nCount++;
cLast = cPix;
- bFound = TRUE;
+ bFound = sal_True;
}
if ( bFound )
@@ -1217,13 +1217,13 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
if ( nCount > 3 )
{
*pTmp++ = 0;
- *pTmp++ = (BYTE) --nCount;
+ *pTmp++ = (sal_uInt8) --nCount;
if( bRLE4 )
{
- for ( ULONG i = 0; i < nCount; i++, pTmp++ )
+ for ( sal_uLong i = 0; i < nCount; i++, pTmp++ )
{
- *pTmp = (BYTE) rAcc.GetPixel( nY, nSaveIndex++ ) << 4;
+ *pTmp = (sal_uInt8) rAcc.GetPixel( nY, nSaveIndex++ ) << 4;
if ( ++i < nCount )
*pTmp |= rAcc.GetPixel( nY, nSaveIndex++ );
@@ -1233,7 +1233,7 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
}
else
{
- for( ULONG i = 0UL; i < nCount; i++ )
+ for( sal_uLong i = 0UL; i < nCount; i++ )
*pTmp++ = rAcc.GetPixel( nY, nSaveIndex++ );
}
@@ -1248,12 +1248,12 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
else
{
*pTmp++ = 1;
- *pTmp++ = (BYTE) rAcc.GetPixel( nY, nSaveIndex ) << ( bRLE4 ? 4 : 0 );
+ *pTmp++ = (sal_uInt8) rAcc.GetPixel( nY, nSaveIndex ) << ( bRLE4 ? 4 : 0 );
if ( nCount == 3 )
{
*pTmp++ = 1;
- *pTmp++ = (BYTE) rAcc.GetPixel( nY, ++nSaveIndex ) << ( bRLE4 ? 4 : 0 );
+ *pTmp++ = (sal_uInt8) rAcc.GetPixel( nY, ++nSaveIndex ) << ( bRLE4 ? 4 : 0 );
nBufCount += 4;
}
else
@@ -1268,8 +1268,8 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
rOStm.Write( pBuf, nBufCount );
}
- rOStm << (BYTE) 0;
- rOStm << (BYTE) 1;
+ rOStm << (sal_uInt8) 0;
+ rOStm << (sal_uInt8) 1;
delete[] pBuf;
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index ec476157fbeb..4905646d3563 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -40,8 +40,8 @@
// - Defines -
// -----------
-#define RGB15( _def_cR, _def_cG, _def_cB ) (((ULONG)(_def_cR)<<10UL)|((ULONG)(_def_cG)<<5UL)|(ULONG)(_def_cB))
-#define GAMMA( _def_cVal, _def_InvGamma ) ((BYTE)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
+#define RGB15( _def_cR, _def_cG, _def_cB ) (((sal_uLong)(_def_cR)<<10UL)|((sal_uLong)(_def_cG)<<5UL)|(sal_uLong)(_def_cB))
+#define GAMMA( _def_cVal, _def_InvGamma ) ((sal_uInt8)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
#define CALC_ERRORS \
nTemp = p1T[nX++] >> 12; \
@@ -76,13 +76,13 @@
// - Statics -
// -----------
-ULONG nVCLRLut[ 6 ] = { 16, 17, 18, 19, 20, 21 };
-ULONG nVCLGLut[ 6 ] = { 0, 6, 12, 18, 24, 30 };
-ULONG nVCLBLut[ 6 ] = { 0, 36, 72, 108, 144, 180 };
+sal_uLong nVCLRLut[ 6 ] = { 16, 17, 18, 19, 20, 21 };
+sal_uLong nVCLGLut[ 6 ] = { 0, 6, 12, 18, 24, 30 };
+sal_uLong nVCLBLut[ 6 ] = { 0, 36, 72, 108, 144, 180 };
// ------------------------------------------------------------------------
-ULONG nVCLDitherLut[ 256 ] =
+sal_uLong nVCLDitherLut[ 256 ] =
{
0, 49152, 12288, 61440, 3072, 52224, 15360, 64512, 768, 49920, 13056,
62208, 3840, 52992, 16128, 65280, 32768, 16384, 45056, 28672, 35840, 19456,
@@ -112,7 +112,7 @@ ULONG nVCLDitherLut[ 256 ] =
// ------------------------------------------------------------------------
-ULONG nVCLLut[ 256 ] =
+sal_uLong nVCLLut[ 256 ] =
{
0, 1286, 2572, 3858, 5144, 6430, 7716, 9002,
10288, 11574, 12860, 14146, 15432, 16718, 18004, 19290,
@@ -242,14 +242,14 @@ long FloydIndexMap[6] =
// - ImplCreateDitherMatrix -
// --------------------------
-void ImplCreateDitherMatrix( BYTE (*pDitherMatrix)[16][16] )
+void ImplCreateDitherMatrix( sal_uInt8 (*pDitherMatrix)[16][16] )
{
double fVal = 3.125;
const double fVal16 = fVal / 16.;
long i, j, k, l;
- USHORT pMtx[ 16 ][ 16 ];
- USHORT nMax = 0;
- static BYTE pMagic[4][4] = { { 0, 14, 3, 13, },
+ sal_uInt16 pMtx[ 16 ][ 16 ];
+ sal_uInt16 nMax = 0;
+ static sal_uInt8 pMagic[4][4] = { { 0, 14, 3, 13, },
{11, 5, 8, 6, },
{12, 2, 15, 1, },
{7, 9, 4, 10 } };
@@ -260,22 +260,22 @@ void ImplCreateDitherMatrix( BYTE (*pDitherMatrix)[16][16] )
for ( k = 0; k < 4; k++ )
for ( l = 0; l < 4; l++ )
nMax = Max ( pMtx[ (k<<2) + i][(l<<2 ) + j] =
- (USHORT) ( 0.5 + pMagic[i][j]*fVal + pMagic[k][l]*fVal16 ), nMax );
+ (sal_uInt16) ( 0.5 + pMagic[i][j]*fVal + pMagic[k][l]*fVal16 ), nMax );
// auf Intervall [0;254] skalieren
for ( i = 0, fVal = 254. / nMax; i < 16; i++ )
for( j = 0; j < 16; j++ )
- (*pDitherMatrix)[i][j] = (BYTE) ( fVal * pMtx[i][j] );
+ (*pDitherMatrix)[i][j] = (sal_uInt8) ( fVal * pMtx[i][j] );
}
// ----------
// - Bitmap -
// ----------
-BOOL Bitmap::Convert( BmpConversion eConversion )
+sal_Bool Bitmap::Convert( BmpConversion eConversion )
{
- const USHORT nBitCount = GetBitCount();
- BOOL bRet = FALSE;
+ const sal_uInt16 nBitCount = GetBitCount();
+ sal_Bool bRet = sal_False;
switch( eConversion )
{
@@ -298,7 +298,7 @@ BOOL Bitmap::Convert( BmpConversion eConversion )
else if( nBitCount > 4 )
bRet = ImplConvertDown( 4, NULL );
else
- bRet = TRUE;
+ bRet = sal_True;
}
break;
@@ -324,7 +324,7 @@ BOOL Bitmap::Convert( BmpConversion eConversion )
else if( nBitCount > 8 )
bRet = ImplConvertDown( 8 );
else
- bRet = TRUE;
+ bRet = sal_True;
}
break;
@@ -342,9 +342,9 @@ BOOL Bitmap::Convert( BmpConversion eConversion )
case( BMP_CONVERSION_24BIT ):
{
if( nBitCount < 24 )
- bRet = ImplConvertUp( 24, FALSE );
+ bRet = ImplConvertUp( 24, sal_False );
else
- bRet = TRUE;
+ bRet = sal_True;
}
break;
@@ -362,10 +362,10 @@ BOOL Bitmap::Convert( BmpConversion eConversion )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplMakeMono( BYTE cThreshold )
+sal_Bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold )
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -413,7 +413,7 @@ BOOL Bitmap::ImplMakeMono( BYTE cThreshold )
}
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -435,10 +435,10 @@ BOOL Bitmap::ImplMakeMono( BYTE cThreshold )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplMakeMonoDither()
+sal_Bool Bitmap::ImplMakeMonoDither()
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -451,7 +451,7 @@ BOOL Bitmap::ImplMakeMonoDither()
const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
const long nWidth = pWriteAcc->Width();
const long nHeight = pWriteAcc->Height();
- BYTE pDitherMatrix[ 16 ][ 16 ];
+ sal_uInt8 pDitherMatrix[ 16 ][ 16 ];
ImplCreateDitherMatrix( &pDitherMatrix );
@@ -489,7 +489,7 @@ BOOL Bitmap::ImplMakeMonoDither()
}
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -511,18 +511,18 @@ BOOL Bitmap::ImplMakeMonoDither()
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
+sal_Bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys )
{
DBG_ASSERT( nGreys == 16 || nGreys == 256, "Only 16 or 256 greyscales are supported!" );
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
const BitmapPalette& rPal = GetGreyPalette( nGreys );
- ULONG nShift = ( ( nGreys == 16 ) ? 4UL : 0UL );
- BOOL bPalDiffers = !pReadAcc->HasPalette() || ( rPal.GetEntryCount() != pReadAcc->GetPaletteEntryCount() );
+ sal_uLong nShift = ( ( nGreys == 16 ) ? 4UL : 0UL );
+ sal_Bool bPalDiffers = !pReadAcc->HasPalette() || ( rPal.GetEntryCount() != pReadAcc->GetPaletteEntryCount() );
if( !bPalDiffers )
bPalDiffers = ( (BitmapPalette&) rPal != pReadAcc->GetPalette() );
@@ -544,7 +544,7 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
for( long nX = 0L; nX < nWidth; nX++ )
{
pWriteAcc->SetPixel( nY, nX,
- (BYTE) ( pReadAcc->GetPaletteColor(
+ (sal_uInt8) ( pReadAcc->GetPaletteColor(
pReadAcc->GetPixel( nY, nX ) ).GetLuminance() >> nShift ) );
}
}
@@ -561,11 +561,11 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
for( long nX = 0L; nX < nWidth; nX++ )
{
- const ULONG nB = *pReadScan++;
- const ULONG nG = *pReadScan++;
- const ULONG nR = *pReadScan++;
+ const sal_uLong nB = *pReadScan++;
+ const sal_uLong nG = *pReadScan++;
+ const sal_uLong nR = *pReadScan++;
- *pWriteScan++ = (BYTE) ( ( nB * 28UL + nG * 151UL + nR * 77UL ) >> nShift );
+ *pWriteScan++ = (sal_uInt8) ( ( nB * 28UL + nG * 151UL + nR * 77UL ) >> nShift );
}
}
}
@@ -581,11 +581,11 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
for( long nX = 0L; nX < nWidth; nX++ )
{
- const ULONG nR = *pReadScan++;
- const ULONG nG = *pReadScan++;
- const ULONG nB = *pReadScan++;
+ const sal_uLong nR = *pReadScan++;
+ const sal_uLong nG = *pReadScan++;
+ const sal_uLong nB = *pReadScan++;
- *pWriteScan++ = (BYTE) ( ( nB * 28UL + nG * 151UL + nR * 77UL ) >> nShift );
+ *pWriteScan++ = (sal_uInt8) ( ( nB * 28UL + nG * 151UL + nR * 77UL ) >> nShift );
}
}
}
@@ -593,11 +593,11 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
{
for( long nY = 0L; nY < nHeight; nY++ )
for( long nX = 0L; nX < nWidth; nX++ )
- pWriteAcc->SetPixel( nY, nX, sal::static_int_cast<BYTE>(( pReadAcc->GetPixel( nY, nX ) ).GetLuminance() >> nShift) );
+ pWriteAcc->SetPixel( nY, nX, sal::static_int_cast<sal_uInt8>(( pReadAcc->GetPixel( nY, nX ) ).GetLuminance() >> nShift) );
}
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -616,7 +616,7 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
else
{
ReleaseAccess( pReadAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -625,12 +625,12 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplConvertUp( USHORT nBitCount, Color* pExtColor )
+sal_Bool Bitmap::ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor )
{
DBG_ASSERT( nBitCount > GetBitCount(), "New BitCount must be greater!" );
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -645,12 +645,12 @@ BOOL Bitmap::ImplConvertUp( USHORT nBitCount, Color* pExtColor )
if( pWriteAcc->HasPalette() )
{
- const USHORT nOldCount = 1 << GetBitCount();
+ const sal_uInt16 nOldCount = 1 << GetBitCount();
const BitmapPalette& rOldPal = pReadAcc->GetPalette();
aPal.SetEntryCount( 1 << nBitCount );
- for( USHORT i = 0; i < nOldCount; i++ )
+ for( sal_uInt16 i = 0; i < nOldCount; i++ )
aPal[ i ] = rOldPal[ i ];
if( pExtColor )
@@ -679,7 +679,7 @@ BOOL Bitmap::ImplConvertUp( USHORT nBitCount, Color* pExtColor )
}
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -701,12 +701,12 @@ BOOL Bitmap::ImplConvertUp( USHORT nBitCount, Color* pExtColor )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
+sal_Bool Bitmap::ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor )
{
DBG_ASSERT( nBitCount <= GetBitCount(), "New BitCount must be lower ( or equal when pExtColor is set )!" );
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -716,7 +716,7 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
if( pWriteAcc )
{
- const USHORT nCount = 1 << nBitCount;
+ const sal_uInt16 nCount = 1 << nBitCount;
const long nWidth = pWriteAcc->Width();
const long nWidth1 = nWidth - 1L;
const long nHeight = pWriteAcc->Height();
@@ -730,8 +730,8 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
ImpErrorQuad* pQLine2 = 0;
long nX, nY;
long nYTmp = 0L;
- BYTE cIndex;
- BOOL bQ1 = TRUE;
+ sal_uInt8 cIndex;
+ sal_Bool bQ1 = sal_True;
if( pExtColor )
{
@@ -763,12 +763,12 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
for( nY = 0L; nY < nHeight; nY++, nYTmp++ )
{
// erstes ZeilenPixel
- cIndex = (BYTE) aColorMap.GetBestPaletteIndex( pQLine1[ 0 ].ImplGetColor() );
+ cIndex = (sal_uInt8) aColorMap.GetBestPaletteIndex( pQLine1[ 0 ].ImplGetColor() );
pWriteAcc->SetPixel( nY, 0, cIndex );
for( nX = 1L; nX < nWidth1; nX++ )
{
- cIndex = (BYTE) aColorMap.GetBestPaletteIndex( aColor = pQLine1[ nX ].ImplGetColor() );
+ cIndex = (sal_uInt8) aColorMap.GetBestPaletteIndex( aColor = pQLine1[ nX ].ImplGetColor() );
aErrQuad = ( ImpErrorQuad( aColor ) -= pWriteAcc->GetPaletteColor( cIndex ) );
pQLine1[ ++nX ].ImplAddColorError7( aErrQuad );
pQLine2[ nX-- ].ImplAddColorError1( aErrQuad );
@@ -780,13 +780,13 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
// letztes ZeilenPixel
if( nX < nWidth )
{
- cIndex = (BYTE) aColorMap.GetBestPaletteIndex( pQLine1[ nWidth1 ].ImplGetColor() );
+ cIndex = (sal_uInt8) aColorMap.GetBestPaletteIndex( pQLine1[ nWidth1 ].ImplGetColor() );
pWriteAcc->SetPixel( nY, nX, cIndex );
}
// Zeilenpuffer neu fuellen/kopieren
pQLine1 = pQLine2;
- pQLine2 = ( bQ1 = !bQ1 ) != FALSE ? pErrQuad2 : pErrQuad1;
+ pQLine2 = ( bQ1 = !bQ1 ) != sal_False ? pErrQuad2 : pErrQuad1;
if( nYTmp < nHeight )
{
@@ -805,7 +805,7 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
delete[] pErrQuad2;
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -827,11 +827,11 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplConvertGhosted()
+sal_Bool Bitmap::ImplConvertGhosted()
{
Bitmap aNewBmp;
BitmapReadAccess* pR = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pR )
{
@@ -841,8 +841,8 @@ BOOL Bitmap::ImplConvertGhosted()
for( long i = 0, nCount = aNewPal.GetEntryCount(); i < nCount; i++ )
{
- const BitmapColor& rOld = pR->GetPaletteColor( (USHORT) i );
- aNewPal[ (USHORT) i ] = BitmapColor( ( rOld.GetRed() >> 1 ) | 0x80,
+ const BitmapColor& rOld = pR->GetPaletteColor( (sal_uInt16) i );
+ aNewPal[ (sal_uInt16) i ] = BitmapColor( ( rOld.GetRed() >> 1 ) | 0x80,
( rOld.GetGreen() >> 1 ) | 0x80,
( rOld.GetBlue() >> 1 ) | 0x80 );
}
@@ -854,7 +854,7 @@ BOOL Bitmap::ImplConvertGhosted()
{
pW->CopyBuffer( *pR );
aNewBmp.ReleaseAccess( pW );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
@@ -880,7 +880,7 @@ BOOL Bitmap::ImplConvertGhosted()
}
aNewBmp.ReleaseAccess( pW );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -903,9 +903,9 @@ BOOL Bitmap::ImplConvertGhosted()
// ------------------------------------------------------------------------
-BOOL Bitmap::Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFlag )
+sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uLong nScaleFlag )
{
- BOOL bRet;
+ sal_Bool bRet;
if( ( rScaleX != 1.0 ) || ( rScaleY != 1.0 ) )
{
@@ -914,20 +914,20 @@ BOOL Bitmap::Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFl
else if( BMP_SCALE_INTERPOLATE == nScaleFlag )
bRet = ImplScaleInterpolate( rScaleX, rScaleY );
else
- bRet = FALSE;
+ bRet = sal_False;
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
// ------------------------------------------------------------------------
-BOOL Bitmap::Scale( const Size& rNewSize, ULONG nScaleFlag )
+sal_Bool Bitmap::Scale( const Size& rNewSize, sal_uLong nScaleFlag )
{
const Size aSize( GetSizePixel() );
- BOOL bRet;
+ sal_Bool bRet;
if( aSize.Width() && aSize.Height() )
{
@@ -936,19 +936,19 @@ BOOL Bitmap::Scale( const Size& rNewSize, ULONG nScaleFlag )
nScaleFlag );
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
+sal_Bool Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
{
const Size aSizePix( GetSizePixel() );
const long nNewWidth = FRound( aSizePix.Width() * rScaleX );
const long nNewHeight = FRound( aSizePix.Height() * rScaleY );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nNewWidth && nNewHeight )
{
@@ -992,7 +992,7 @@ BOOL Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
nActY++;
}
- bRet = TRUE;
+ bRet = sal_True;
}
delete[] pLutX;
@@ -1011,12 +1011,12 @@ BOOL Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY )
+sal_Bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY )
{
const Size aSizePix( GetSizePixel() );
const long nNewWidth = FRound( aSizePix.Width() * rScaleX );
const long nNewHeight = FRound( aSizePix.Height() * rScaleY );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( ( nNewWidth > 1L ) && ( nNewHeight > 1L ) )
{
@@ -1077,9 +1077,9 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
lXG1 = aCol1.GetGreen() - ( lXG0 = aCol0.GetGreen() );
lXB1 = aCol1.GetBlue() - ( lXB0 = aCol0.GetBlue() );
- aCol0.SetRed( (BYTE) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
- aCol0.SetGreen( (BYTE) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
- aCol0.SetBlue( (BYTE) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
+ aCol0.SetRed( (sal_uInt8) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
+ aCol0.SetGreen( (sal_uInt8) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
+ aCol0.SetBlue( (sal_uInt8) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
pWriteAcc->SetPixel( nY, nX, aCol0 );
}
@@ -1112,9 +1112,9 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
lXG1 = aCol1.GetGreen() - ( lXG0 = aCol0.GetGreen() );
lXB1 = aCol1.GetBlue() - ( lXB0 = aCol0.GetBlue() );
- aCol0.SetRed( (BYTE) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
- aCol0.SetGreen( (BYTE) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
- aCol0.SetBlue( (BYTE) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
+ aCol0.SetRed( (sal_uInt8) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
+ aCol0.SetGreen( (sal_uInt8) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
+ aCol0.SetBlue( (sal_uInt8) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
pWriteAcc->SetPixel( nY, nX, aCol0 );
}
@@ -1124,7 +1124,7 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
delete[] pLutInt;
delete[] pLutFrac;
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -1132,7 +1132,7 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
if( bRet )
{
- bRet = FALSE;
+ bRet = sal_False;
ImplAssignWithSize( aNewBmp );
pReadAcc = AcquireReadAccess();
aNewBmp = Bitmap( Size( nNewWidth, nNewHeight ), 24 );
@@ -1181,9 +1181,9 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
lXG1 = aCol1.GetGreen() - ( lXG0 = aCol0.GetGreen() );
lXB1 = aCol1.GetBlue() - ( lXB0 = aCol0.GetBlue() );
- aCol0.SetRed( (BYTE) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
- aCol0.SetGreen( (BYTE) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
- aCol0.SetBlue( (BYTE) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
+ aCol0.SetRed( (sal_uInt8) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
+ aCol0.SetGreen( (sal_uInt8) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
+ aCol0.SetBlue( (sal_uInt8) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
pWriteAcc->SetPixel( nY, nX, aCol0 );
}
@@ -1216,9 +1216,9 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
lXG1 = aCol1.GetGreen() - ( lXG0 = aCol0.GetGreen() );
lXB1 = aCol1.GetBlue() - ( lXB0 = aCol0.GetBlue() );
- aCol0.SetRed( (BYTE) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
- aCol0.SetGreen( (BYTE) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
- aCol0.SetBlue( (BYTE) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
+ aCol0.SetRed( (sal_uInt8) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
+ aCol0.SetGreen( (sal_uInt8) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
+ aCol0.SetBlue( (sal_uInt8) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
pWriteAcc->SetPixel( nY, nX, aCol0 );
}
@@ -1228,7 +1228,7 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
delete[] pLutInt;
delete[] pLutFrac;
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -1247,14 +1247,14 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
// ------------------------------------------------------------------------
-BOOL Bitmap::Dither( ULONG nDitherFlags )
+sal_Bool Bitmap::Dither( sal_uLong nDitherFlags )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const Size aSizePix( GetSizePixel() );
if( aSizePix.Width() == 1 || aSizePix.Height() == 1 )
- bRet = TRUE;
+ bRet = sal_True;
else if( nDitherFlags & BMP_DITHER_MATRIX )
bRet = ImplDitherMatrix();
else if( nDitherFlags & BMP_DITHER_FLOYD )
@@ -1267,55 +1267,55 @@ BOOL Bitmap::Dither( ULONG nDitherFlags )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplDitherMatrix()
+sal_Bool Bitmap::ImplDitherMatrix()
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
Bitmap aNewBmp( GetSizePixel(), 8 );
BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc && pWriteAcc )
{
- const ULONG nWidth = pReadAcc->Width();
- const ULONG nHeight = pReadAcc->Height();
- BitmapColor aIndex( (BYTE) 0 );
+ const sal_uLong nWidth = pReadAcc->Width();
+ const sal_uLong nHeight = pReadAcc->Height();
+ BitmapColor aIndex( (sal_uInt8) 0 );
if( pReadAcc->HasPalette() )
{
- for( ULONG nY = 0UL; nY < nHeight; nY++ )
+ for( sal_uLong nY = 0UL; nY < nHeight; nY++ )
{
- for( ULONG nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
+ for( sal_uLong nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
{
const BitmapColor aCol( pReadAcc->GetPaletteColor( pReadAcc->GetPixel( nY, nX ) ) );
- const ULONG nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
- const ULONG nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
- const ULONG nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
- const ULONG nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
+ const sal_uLong nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
+ const sal_uLong nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
+ const sal_uLong nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
+ const sal_uLong nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
- aIndex.SetIndex( (BYTE) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
pWriteAcc->SetPixel( nY, nX, aIndex );
}
}
}
else
{
- for( ULONG nY = 0UL; nY < nHeight; nY++ )
+ for( sal_uLong nY = 0UL; nY < nHeight; nY++ )
{
- for( ULONG nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
+ for( sal_uLong nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
{
const BitmapColor aCol( pReadAcc->GetPixel( nY, nX ) );
- const ULONG nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
- const ULONG nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
- const ULONG nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
- const ULONG nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
+ const sal_uLong nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
+ const sal_uLong nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
+ const sal_uLong nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
+ const sal_uLong nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
- aIndex.SetIndex( (BYTE) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
pWriteAcc->SetPixel( nY, nX, aIndex );
}
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -1337,10 +1337,10 @@ BOOL Bitmap::ImplDitherMatrix()
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplDitherFloyd()
+sal_Bool Bitmap::ImplDitherFloyd()
{
const Size aSize( GetSizePixel() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( ( aSize.Width() > 3 ) && ( aSize.Height() > 2 ) )
{
@@ -1366,7 +1366,7 @@ BOOL Bitmap::ImplDitherFloyd()
long* p1T = p1;
long* p2T = p2;
long* pTmp;
- BOOL bPal = pReadAcc->HasPalette();
+ sal_Bool bPal = pReadAcc->HasPalette();
pTmp = p2T;
@@ -1431,7 +1431,7 @@ BOOL Bitmap::ImplDitherFloyd()
CALC_TABLES7;
nX -= 5;
CALC_TABLES5;
- pWriteAcc->SetPixel( nYAcc, 0, BitmapColor( (BYTE) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
+ pWriteAcc->SetPixel( nYAcc, 0, BitmapColor( (sal_uInt8) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
// mittlere Pixel ueber Schleife
long nXAcc;
@@ -1442,7 +1442,7 @@ BOOL Bitmap::ImplDitherFloyd()
nX -= 8;
CALC_TABLES3;
CALC_TABLES5;
- pWriteAcc->SetPixel( nYAcc, nXAcc, BitmapColor( (BYTE) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
+ pWriteAcc->SetPixel( nYAcc, nXAcc, BitmapColor( (sal_uInt8) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
}
// letztes Pixel gesondert betrachten
@@ -1450,12 +1450,12 @@ BOOL Bitmap::ImplDitherFloyd()
nX -= 5;
CALC_TABLES3;
CALC_TABLES5;
- pWriteAcc->SetPixel( nYAcc, nWidth1, BitmapColor( (BYTE) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
+ pWriteAcc->SetPixel( nYAcc, nWidth1, BitmapColor( (sal_uInt8) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
}
delete[] p1;
delete[] p2;
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -1478,12 +1478,12 @@ BOOL Bitmap::ImplDitherFloyd()
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplDitherFloyd16()
+sal_Bool Bitmap::ImplDitherFloyd16()
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
Bitmap aNewBmp( GetSizePixel(), 24 );
BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc && pWriteAcc )
{
@@ -1499,7 +1499,7 @@ BOOL Bitmap::ImplDitherFloyd16()
ImpErrorQuad* pQLine2 = 0;
long nX, nY;
long nYTmp = 0L;
- BOOL bQ1 = TRUE;
+ sal_Bool bQ1 = sal_True;
for( nY = 0L; nY < Min( nHeight, 2L ); nY++, nYTmp++ )
for( nX = 0L, pQLine2 = !nY ? pErrQuad1 : pErrQuad2; nX < nWidth; nX++ )
@@ -1537,7 +1537,7 @@ BOOL Bitmap::ImplDitherFloyd16()
// Zeilenpuffer neu fuellen/kopieren
pQLine1 = pQLine2;
- pQLine2 = ( bQ1 = !bQ1 ) != FALSE ? pErrQuad2 : pErrQuad1;
+ pQLine2 = ( bQ1 = !bQ1 ) != sal_False ? pErrQuad2 : pErrQuad1;
if( nYTmp < nHeight )
for( nX = 0L; nX < nWidth; nX++ )
@@ -1547,7 +1547,7 @@ BOOL Bitmap::ImplDitherFloyd16()
// Zeilenpuffer zerstoeren
delete[] pErrQuad1;
delete[] pErrQuad2;
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -1569,12 +1569,12 @@ BOOL Bitmap::ImplDitherFloyd16()
// ------------------------------------------------------------------------
-BOOL Bitmap::ReduceColors( USHORT nColorCount, BmpReduce eReduce )
+sal_Bool Bitmap::ReduceColors( sal_uInt16 nColorCount, BmpReduce eReduce )
{
- BOOL bRet;
+ sal_Bool bRet;
- if( GetColorCount() <= (ULONG) nColorCount )
- bRet = TRUE;
+ if( GetColorCount() <= (sal_uLong) nColorCount )
+ bRet = sal_True;
else if( nColorCount )
{
if( BMP_REDUCE_SIMPLE == eReduce )
@@ -1585,20 +1585,20 @@ BOOL Bitmap::ReduceColors( USHORT nColorCount, BmpReduce eReduce )
bRet = ImplReduceMedian( nColorCount );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplReduceSimple( USHORT nColorCount )
+sal_Bool Bitmap::ImplReduceSimple( sal_uInt16 nColorCount )
{
Bitmap aNewBmp;
BitmapReadAccess* pRAcc = AcquireReadAccess();
- const USHORT nColCount = Min( nColorCount, (USHORT) 256 );
- USHORT nBitCount;
- BOOL bRet = FALSE;
+ const sal_uInt16 nColCount = Min( nColorCount, (sal_uInt16) 256 );
+ sal_uInt16 nBitCount;
+ sal_Bool bRet = sal_False;
if( nColCount <= 2 )
nBitCount = 1;
@@ -1625,17 +1625,17 @@ BOOL Bitmap::ImplReduceSimple( USHORT nColorCount )
{
for( long nY = 0L; nY < nHeight; nY++ )
for( long nX =0L; nX < nWidth; nX++ )
- pWAcc->SetPixel( nY, nX, (BYTE) aOct.GetBestPaletteIndex( pRAcc->GetPaletteColor( pRAcc->GetPixel( nY, nX ) ) ) );
+ pWAcc->SetPixel( nY, nX, (sal_uInt8) aOct.GetBestPaletteIndex( pRAcc->GetPaletteColor( pRAcc->GetPixel( nY, nX ) ) ) );
}
else
{
for( long nY = 0L; nY < nHeight; nY++ )
for( long nX =0L; nX < nWidth; nX++ )
- pWAcc->SetPixel( nY, nX, (BYTE) aOct.GetBestPaletteIndex( pRAcc->GetPixel( nY, nX ) ) );
+ pWAcc->SetPixel( nY, nX, (sal_uInt8) aOct.GetBestPaletteIndex( pRAcc->GetPixel( nY, nX ) ) );
}
aNewBmp.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pRAcc );
@@ -1680,11 +1680,11 @@ extern "C" int __LOADONCALLAPI ImplPopularCmpFnc( const void* p1, const void* p2
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplReducePopular( USHORT nColCount )
+sal_Bool Bitmap::ImplReducePopular( sal_uInt16 nColCount )
{
BitmapReadAccess* pRAcc = AcquireReadAccess();
- USHORT nBitCount;
- BOOL bRet = FALSE;
+ sal_uInt16 nBitCount;
+ sal_Bool bRet = sal_False;
if( nColCount > 256 )
nColCount = 256;
@@ -1753,12 +1753,12 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
qsort( pCountTable, nTotalColors, sizeof( PopularColorCount ), ImplPopularCmpFnc );
- for( USHORT n = 0; n < nColCount; n++ )
+ for( sal_uInt16 n = 0; n < nColCount; n++ )
{
const PopularColorCount& rPop = pCountTable[ n ];
- aNewPal[ n ] = BitmapColor( (BYTE) ( ( rPop.mnIndex >> nLeftShiftBits2 ) << nRightShiftBits ),
- (BYTE) ( ( ( rPop.mnIndex >> nLeftShiftBits1 ) & ( nColorsPerComponent - 1 ) ) << nRightShiftBits ),
- (BYTE) ( ( rPop.mnIndex & ( nColorsPerComponent - 1 ) ) << nRightShiftBits ) );
+ aNewPal[ n ] = BitmapColor( (sal_uInt8) ( ( rPop.mnIndex >> nLeftShiftBits2 ) << nRightShiftBits ),
+ (sal_uInt8) ( ( ( rPop.mnIndex >> nLeftShiftBits1 ) & ( nColorsPerComponent - 1 ) ) << nRightShiftBits ),
+ (sal_uInt8) ( ( rPop.mnIndex & ( nColorsPerComponent - 1 ) ) << nRightShiftBits ) );
}
Bitmap aNewBmp( GetSizePixel(), nBitCount, &aNewPal );
@@ -1766,13 +1766,13 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
if( pWAcc )
{
- BitmapColor aDstCol( (BYTE) 0 );
- BYTE* pIndexMap = new BYTE[ nTotalColors ];
+ BitmapColor aDstCol( (sal_uInt8) 0 );
+ sal_uInt8* pIndexMap = new sal_uInt8[ nTotalColors ];
for( nR = 0, nIndex = 0; nR < 256; nR += nColorOffset )
for( nG = 0; nG < 256; nG += nColorOffset )
for( nB = 0; nB < 256; nB += nColorOffset )
- pIndexMap[ nIndex++ ] = (BYTE) aNewPal.GetBestIndex( BitmapColor( (BYTE) nR, (BYTE) nG, (BYTE) nB ) );
+ pIndexMap[ nIndex++ ] = (sal_uInt8) aNewPal.GetBestIndex( BitmapColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB ) );
if( pRAcc->HasPalette() )
{
@@ -1805,7 +1805,7 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
delete[] pIndexMap;
aNewBmp.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
delete[] pCountTable;
@@ -1827,11 +1827,11 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
+sal_Bool Bitmap::ImplReduceMedian( sal_uInt16 nColCount )
{
BitmapReadAccess* pRAcc = AcquireReadAccess();
- USHORT nBitCount;
- BOOL bRet = FALSE;
+ sal_uInt16 nBitCount;
+ sal_Bool bRet = sal_False;
if( nColCount < 17 )
nBitCount = 4;
@@ -1851,8 +1851,8 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
if( pWAcc )
{
- const ULONG nSize = 32768UL * sizeof( ULONG );
- ULONG* pColBuf = (ULONG*) rtl_allocateMemory( nSize );
+ const sal_uLong nSize = 32768UL * sizeof( sal_uLong );
+ sal_uLong* pColBuf = (sal_uLong*) rtl_allocateMemory( nSize );
const long nWidth = pWAcc->Width();
const long nHeight = pWAcc->Height();
long nIndex = 0L;
@@ -1893,11 +1893,11 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
pWAcc->SetPalette( aPal );
for( long nY = 0L; nY < nHeight; nY++ )
for( long nX = 0L; nX < nWidth; nX++ )
- pWAcc->SetPixel( nY, nX, (BYTE) aMap.GetBestPaletteIndex( pRAcc->GetColor( nY, nX ) ) );
+ pWAcc->SetPixel( nY, nX, (sal_uInt8) aMap.GetBestPaletteIndex( pRAcc->GetColor( nY, nX ) ) );
rtl_freeMemory( pColBuf );
aNewBmp.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pRAcc );
@@ -1918,7 +1918,7 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
// ------------------------------------------------------------------------
-void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
+void Bitmap::ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal,
long nR1, long nR2, long nG1, long nG2, long nB1, long nB2,
long nColors, long nPixels, long& rIndex )
{
@@ -1930,16 +1930,16 @@ void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
const long nGLen = nG2 - nG1;
const long nBLen = nB2 - nB1;
long nR, nG, nB;
- ULONG* pBuf = pColBuf;
+ sal_uLong* pBuf = pColBuf;
if( !nRLen && !nGLen && !nBLen )
{
if( pBuf[ RGB15( nR1, nG1, nB1 ) ] )
{
- aCol.SetRed( (BYTE) ( nR1 << 3 ) );
- aCol.SetGreen( (BYTE) ( nG1 << 3 ) );
- aCol.SetBlue( (BYTE) ( nB1 << 3 ) );
- rPal[ (USHORT) rIndex++ ] = aCol;
+ aCol.SetRed( (sal_uInt8) ( nR1 << 3 ) );
+ aCol.SetGreen( (sal_uInt8) ( nG1 << 3 ) );
+ aCol.SetBlue( (sal_uInt8) ( nB1 << 3 ) );
+ rPal[ (sal_uInt16) rIndex++ ] = aCol;
}
}
else
@@ -1966,10 +1966,10 @@ void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
}
}
- aCol.SetRed( (BYTE) ( ( nRSum / nPixels ) << 3 ) );
- aCol.SetGreen( (BYTE) ( ( nGSum / nPixels ) << 3 ) );
- aCol.SetBlue( (BYTE) ( ( nBSum / nPixels ) << 3 ) );
- rPal[ (USHORT) rIndex++ ] = aCol;
+ aCol.SetRed( (sal_uInt8) ( ( nRSum / nPixels ) << 3 ) );
+ aCol.SetGreen( (sal_uInt8) ( ( nGSum / nPixels ) << 3 ) );
+ aCol.SetBlue( (sal_uInt8) ( ( nBSum / nPixels ) << 3 ) );
+ rPal[ (sal_uInt16) rIndex++ ] = aCol;
}
else
{
@@ -2052,32 +2052,32 @@ void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
// ------------------------------------------------------------------------
-BOOL Bitmap::Vectorize( PolyPolygon& rPolyPoly, ULONG nFlags, const Link* pProgress )
+sal_Bool Bitmap::Vectorize( PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress )
{
return ImplVectorizer().ImplVectorize( *this, rPolyPoly, nFlags, pProgress );
}
// ------------------------------------------------------------------------
-BOOL Bitmap::Vectorize( GDIMetaFile& rMtf, BYTE cReduce, ULONG nFlags, const Link* pProgress )
+sal_Bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress )
{
return ImplVectorizer().ImplVectorize( *this, rMtf, cReduce, nFlags, pProgress );
}
// ------------------------------------------------------------------------
-BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
+sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
short nChannelRPercent, short nChannelGPercent, short nChannelBPercent,
- double fGamma, BOOL bInvert )
+ double fGamma, sal_Bool bInvert )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// nothing to do => return quickly
if( !nLuminancePercent && !nContrastPercent &&
!nChannelRPercent && !nChannelGPercent && !nChannelBPercent &&
( fGamma == 1.0 ) && !bInvert )
{
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -2088,9 +2088,9 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
BitmapColor aCol;
const long nW = pAcc->Width();
const long nH = pAcc->Height();
- BYTE* cMapR = new BYTE[ 256 ];
- BYTE* cMapG = new BYTE[ 256 ];
- BYTE* cMapB = new BYTE[ 256 ];
+ sal_uInt8* cMapR = new sal_uInt8[ 256 ];
+ sal_uInt8* cMapG = new sal_uInt8[ 256 ];
+ sal_uInt8* cMapB = new sal_uInt8[ 256 ];
long nX, nY;
double fM, fROff, fGOff, fBOff, fOff;
@@ -2110,14 +2110,14 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
// calculate gamma value
fGamma = ( fGamma <= 0.0 || fGamma > 10.0 ) ? 1.0 : ( 1.0 / fGamma );
- const BOOL bGamma = ( fGamma != 1.0 );
+ const sal_Bool bGamma = ( fGamma != 1.0 );
// create mapping table
for( nX = 0L; nX < 256L; nX++ )
{
- cMapR[ nX ] = (BYTE) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
- cMapG[ nX ] = (BYTE) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
- cMapB[ nX ] = (BYTE) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
+ cMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
+ cMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
+ cMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
if( bGamma )
{
@@ -2139,7 +2139,7 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
{
BitmapColor aNewCol;
- for( USHORT i = 0, nCount = pAcc->GetPaletteEntryCount(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = pAcc->GetPaletteEntryCount(); i < nCount; i++ )
{
const BitmapColor& rCol = pAcc->GetPaletteColor( i );
aNewCol.SetRed( cMapR[ rCol.GetRed() ] );
@@ -2195,7 +2195,7 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
delete[] cMapG;
delete[] cMapB;
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index b64bcd8fe540..5fe9139ea35e 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -49,9 +49,9 @@
// - Bitmap -
// ----------
-BOOL Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
+sal_Bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch( eFilter )
{
@@ -107,11 +107,11 @@ BOOL Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, cons
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
+sal_Bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -124,9 +124,9 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
long* pColm = new long[ nWidth2 ];
long* pRows = new long[ nHeight2 ];
- BitmapColor* pColRow1 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow2 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow3 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow1 = (BitmapColor*) new sal_uInt8[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow2 = (BitmapColor*) new sal_uInt8[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow3 = (BitmapColor*) new sal_uInt8[ sizeof( BitmapColor ) * nWidth2 ];
BitmapColor* pRowTmp1 = pColRow1;
BitmapColor* pRowTmp2 = pColRow2;
BitmapColor* pRowTmp3 = pColRow3;
@@ -205,9 +205,9 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
nSumB += pTmp[ pColor->GetBlue() ];
// calculate destination color
- pWriteAcc->SetPixel( nY, nX, BitmapColor( (BYTE) MinMax( nSumR / nDivisor, 0, 255 ),
- (BYTE) MinMax( nSumG / nDivisor, 0, 255 ),
- (BYTE) MinMax( nSumB / nDivisor, 0, 255 ) ) );
+ pWriteAcc->SetPixel( nY, nX, BitmapColor( (sal_uInt8) MinMax( nSumR / nDivisor, 0, 255 ),
+ (sal_uInt8) MinMax( nSumG / nDivisor, 0, 255 ),
+ (sal_uInt8) MinMax( nSumB / nDivisor, 0, 255 ) ) );
}
if( ++nY < nHeight )
@@ -225,15 +225,15 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
}
delete[] pKoeff;
- delete[] (BYTE*) pColRow1;
- delete[] (BYTE*) pColRow2;
- delete[] (BYTE*) pColRow3;
+ delete[] (sal_uInt8*) pColRow1;
+ delete[] (sal_uInt8*) pColRow2;
+ delete[] (sal_uInt8*) pColRow3;
delete[] pColm;
delete[] pRows;
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -255,10 +255,10 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -271,9 +271,9 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
long* pColm = new long[ nWidth2 ];
long* pRows = new long[ nHeight2 ];
- BitmapColor* pColRow1 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow2 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow3 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow1 = (BitmapColor*) new sal_uInt8[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow2 = (BitmapColor*) new sal_uInt8[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow3 = (BitmapColor*) new sal_uInt8[ sizeof( BitmapColor ) * nWidth2 ];
BitmapColor* pRowTmp1 = pColRow1;
BitmapColor* pRowTmp2 = pColRow2;
BitmapColor* pRowTmp3 = pColRow3;
@@ -339,7 +339,7 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
MNMX3( nB9, nB2, nB3 );
// set destination color
- pWriteAcc->SetPixel( nY, nX, BitmapColor( (BYTE) nR2, (BYTE) nG2, (BYTE) nB2 ) );
+ pWriteAcc->SetPixel( nY, nX, BitmapColor( (sal_uInt8) nR2, (sal_uInt8) nG2, (sal_uInt8) nB2 ) );
}
if( ++nY < nHeight )
@@ -356,15 +356,15 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
}
}
- delete[] (BYTE*) pColRow1;
- delete[] (BYTE*) pColRow2;
- delete[] (BYTE*) pColRow3;
+ delete[] (sal_uInt8*) pColRow1;
+ delete[] (sal_uInt8*) pColRow2;
+ delete[] (sal_uInt8*) pColRow3;
delete[] pColm;
delete[] pRows;
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -386,13 +386,13 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
{
- BOOL bRet = ImplMakeGreyscales( 256 );
+ sal_Bool bRet = ImplMakeGreyscales( 256 );
if( bRet )
{
- bRet = FALSE;
+ bRet = sal_False;
BitmapReadAccess* pReadAcc = AcquireReadAccess();
@@ -403,7 +403,7 @@ BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
if( pWriteAcc )
{
- BitmapColor aGrey( (BYTE) 0 );
+ BitmapColor aGrey( (sal_uInt8) 0 );
const long nWidth = pWriteAcc->Width();
const long nHeight = pWriteAcc->Height();
const long nMask111 = -1, nMask121 = 0, nMask131 = 1;
@@ -474,7 +474,7 @@ BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
nSum2 += nMask332 * nGrey33;
nSum1 = (long) sqrt( (double)( nSum1 * nSum1 + nSum2 * nSum2 ) );
- aGrey.SetIndex( ~(BYTE) VOS_BOUND( nSum1, 0, 255 ) );
+ aGrey.SetIndex( ~(sal_uInt8) VOS_BOUND( nSum1, 0, 255 ) );
pWriteAcc->SetPixel( nY, nX, aGrey );
if( nX < ( nWidth - 1 ) )
@@ -491,7 +491,7 @@ BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
delete[] pHMap;
delete[] pVMap;
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -514,13 +514,13 @@ BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
- BOOL bRet = ImplMakeGreyscales( 256 );
+ sal_Bool bRet = ImplMakeGreyscales( 256 );
if( bRet )
{
- bRet = FALSE;
+ bRet = sal_False;
BitmapReadAccess* pReadAcc = AcquireReadAccess();
@@ -531,7 +531,7 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
if( pWriteAcc )
{
- BitmapColor aGrey( (BYTE) 0 );
+ BitmapColor aGrey( (sal_uInt8) 0 );
const long nWidth = pWriteAcc->Width();
const long nHeight = pWriteAcc->Height();
long nGrey11, nGrey12, nGrey13;
@@ -549,7 +549,7 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
const long nLz = FRound( sin( fElev ) * 255.0 );
const long nZ2 = ( ( 6 * 255 ) / 4 ) * ( ( 6 * 255 ) / 4 );
const long nNzLz = ( ( 6 * 255 ) / 4 ) * nLz;
- const BYTE cLz = (BYTE) VOS_BOUND( nLz, 0, 255 );
+ const sal_uInt8 cLz = (sal_uInt8) VOS_BOUND( nLz, 0, 255 );
// fill mapping tables
pHMap[ 0 ] = 0;
@@ -586,7 +586,7 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
else
{
const double fGrey = nDotL / sqrt( (double)(nNx * nNx + nNy * nNy + nZ2) );
- aGrey.SetIndex( (BYTE) VOS_BOUND( fGrey, 0, 255 ) );
+ aGrey.SetIndex( (sal_uInt8) VOS_BOUND( fGrey, 0, 255 ) );
}
pWriteAcc->SetPixel( nY, nX, aGrey );
@@ -605,7 +605,7 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
delete[] pHMap;
delete[] pVMap;
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -628,21 +628,21 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
if( pWriteAcc )
{
- const BYTE cThreshold = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SOLARIZE ) ?
+ const sal_uInt8 cThreshold = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SOLARIZE ) ?
pFilterParam->mcSolarGreyThreshold : 128;
if( pWriteAcc->HasPalette() )
{
const BitmapPalette& rPal = pWriteAcc->GetPalette();
- for( USHORT i = 0, nCount = rPal.GetEntryCount(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = rPal.GetEntryCount(); i < nCount; i++ )
{
if( rPal[ i ].GetLuminance() >= cThreshold )
{
@@ -670,7 +670,7 @@ BOOL Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pPr
}
ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -678,10 +678,10 @@ BOOL Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pPr
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -692,12 +692,12 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
DBG_ASSERT( nSepiaPercent <= 100, "Bitmap::ImplSepia(): sepia value out of range; defaulting to 100%" );
- for( USHORT i = 0; i < 256; i++ )
+ for( sal_uInt16 i = 0; i < 256; i++ )
{
BitmapColor& rCol = aSepiaPal[ i ];
- const BYTE cSepiaValue = (BYTE) ( ( nSepia * i ) / 10000 );
+ const sal_uInt8 cSepiaValue = (sal_uInt8) ( ( nSepia * i ) / 10000 );
- rCol.SetRed( (BYTE) i );
+ rCol.SetRed( (sal_uInt8) i );
rCol.SetGreen( cSepiaValue );
rCol.SetBlue( cSepiaValue );
}
@@ -707,7 +707,7 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
if( pWriteAcc )
{
- BitmapColor aCol( (BYTE) 0 );
+ BitmapColor aCol( (sal_uInt8) 0 );
const long nWidth = pWriteAcc->Width();
const long nHeight = pWriteAcc->Height();
@@ -715,10 +715,10 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
{
for( long nY = 0; nY < nHeight ; nY++ )
{
- const USHORT nPalCount = pReadAcc->GetPaletteEntryCount();
- BYTE* pIndexMap = new BYTE[ nPalCount ];
+ const sal_uInt16 nPalCount = pReadAcc->GetPaletteEntryCount();
+ sal_uInt8* pIndexMap = new sal_uInt8[ nPalCount ];
- for( USHORT i = 0; i < nPalCount; i++ )
+ for( sal_uInt16 i = 0; i < nPalCount; i++ )
pIndexMap[ i ] = pReadAcc->GetPaletteColor( i ).GetLuminance();
for( long nX = 0; nX < nWidth; nX++ )
@@ -743,7 +743,7 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
}
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -765,13 +765,13 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
- ULONG nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
+ sal_uLong nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
pFilterParam->maMosaicTileSize.mnTileWidth : 4;
- ULONG nTileHeight = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
+ sal_uLong nTileHeight = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
pFilterParam->maMosaicTileSize.mnTileHeight : 4;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !nTileWidth )
nTileWidth = 1;
@@ -834,9 +834,9 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
}
}
- aCol.SetRed( (BYTE) ( nSumR * fArea_1 ) );
- aCol.SetGreen( (BYTE) ( nSumG * fArea_1 ) );
- aCol.SetBlue( (BYTE) ( nSumB * fArea_1 ) );
+ aCol.SetRed( (sal_uInt8) ( nSumR * fArea_1 ) );
+ aCol.SetGreen( (sal_uInt8) ( nSumG * fArea_1 ) );
+ aCol.SetBlue( (sal_uInt8) ( nSumB * fArea_1 ) );
for( nY = nY1; nY <= nY2; nY++ )
for( nX = nX1; nX <= nX2; nX++ )
@@ -860,16 +860,16 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
{
for( nX = nX1; nX <= nX2; nX++ )
{
- const BitmapColor& rCol = pReadAcc->GetPaletteColor( (BYTE) pReadAcc->GetPixel( nY, nX ) );
+ const BitmapColor& rCol = pReadAcc->GetPaletteColor( (sal_uInt8) pReadAcc->GetPixel( nY, nX ) );
nSumR += rCol.GetRed();
nSumG += rCol.GetGreen();
nSumB += rCol.GetBlue();
}
}
- aCol.SetRed( (BYTE) ( nSumR * fArea_1 ) );
- aCol.SetGreen( (BYTE) ( nSumG * fArea_1 ) );
- aCol.SetBlue( (BYTE) ( nSumB * fArea_1 ) );
+ aCol.SetRed( (sal_uInt8) ( nSumR * fArea_1 ) );
+ aCol.SetGreen( (sal_uInt8) ( nSumG * fArea_1 ) );
+ aCol.SetBlue( (sal_uInt8) ( nSumB * fArea_1 ) );
for( nY = nY1; nY <= nY2; nY++ )
for( nX = nX1; nX <= nX2; nX++ )
@@ -893,7 +893,7 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
}
while( nY1 < nHeight );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -917,7 +917,7 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
}
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -948,13 +948,13 @@ extern "C" int __LOADONCALLAPI ImplPopArtCmpFnc( const void* p1, const void* p2
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
{
- BOOL bRet = ( GetBitCount() > 8 ) ? Convert( BMP_CONVERSION_8BIT_COLORS ) : TRUE;
+ sal_Bool bRet = ( GetBitCount() > 8 ) ? Convert( BMP_CONVERSION_8BIT_COLORS ) : sal_True;
if( bRet )
{
- bRet = FALSE;
+ bRet = sal_False;
BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
@@ -962,8 +962,8 @@ BOOL Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*p
{
const long nWidth = pWriteAcc->Width();
const long nHeight = pWriteAcc->Height();
- const ULONG nEntryCount = 1 << pWriteAcc->GetBitCount();
- ULONG n;
+ const sal_uLong nEntryCount = 1 << pWriteAcc->GetBitCount();
+ sal_uLong n;
PopArtEntry* pPopArtTable = new PopArtEntry[ nEntryCount ];
for( n = 0; n < nEntryCount; n++ )
@@ -982,26 +982,26 @@ BOOL Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*p
qsort( pPopArtTable, nEntryCount, sizeof( PopArtEntry ), ImplPopArtCmpFnc );
// get last used entry
- ULONG nFirstEntry;
- ULONG nLastEntry = 0;
+ sal_uLong nFirstEntry;
+ sal_uLong nLastEntry = 0;
for( n = 0; n < nEntryCount; n++ )
if( pPopArtTable[ n ].mnCount )
nLastEntry = n;
// rotate palette (one entry)
- const BitmapColor aFirstCol( pWriteAcc->GetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ 0 ].mnIndex) ) );
+ const BitmapColor aFirstCol( pWriteAcc->GetPaletteColor( sal::static_int_cast<sal_uInt16>(pPopArtTable[ 0 ].mnIndex) ) );
for( nFirstEntry = 0; nFirstEntry < nLastEntry; nFirstEntry++ )
{
- pWriteAcc->SetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nFirstEntry ].mnIndex),
- pWriteAcc->GetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nFirstEntry + 1 ].mnIndex) ) );
+ pWriteAcc->SetPaletteColor( sal::static_int_cast<sal_uInt16>(pPopArtTable[ nFirstEntry ].mnIndex),
+ pWriteAcc->GetPaletteColor( sal::static_int_cast<sal_uInt16>(pPopArtTable[ nFirstEntry + 1 ].mnIndex) ) );
}
- pWriteAcc->SetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nLastEntry ].mnIndex), aFirstCol );
+ pWriteAcc->SetPaletteColor( sal::static_int_cast<sal_uInt16>(pPopArtTable[ nLastEntry ].mnIndex), aFirstCol );
// cleanup
delete[] pPopArtTable;
ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 38402af626c2..abee1ed9bf67 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -52,7 +52,7 @@
BitmapEx::BitmapEx() :
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( sal_False )
{
}
@@ -70,7 +70,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx ) :
BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) :
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( sal_False )
{
if( rBitmapEx.IsEmpty() )
return;
@@ -79,7 +79,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) :
aBitmapSize = aSize;
if( rBitmapEx.IsAlpha() )
{
- bAlpha = TRUE;
+ bAlpha = sal_True;
aMask = AlphaMask( aSize ).ImplGetBitmap();
}
else if( rBitmapEx.IsTransparent() )
@@ -94,7 +94,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) :
BitmapEx::BitmapEx( const ResId& rResId ) :
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( sal_False )
{
static ImplImageTreeSingletonRef aImageTree;
ResMgr* pResMgr = NULL;
@@ -121,7 +121,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp ) :
aBitmap ( rBmp ),
aBitmapSize ( aBitmap.GetSizePixel() ),
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( sal_False )
{
}
@@ -132,7 +132,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Bitmap& rMask ) :
aMask ( rMask ),
aBitmapSize ( aBitmap.GetSizePixel() ),
eTransparent ( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
- bAlpha ( FALSE )
+ bAlpha ( sal_False )
{
DBG_ASSERT( !rMask || rBmp.GetSizePixel() == rMask.GetSizePixel(),
"BitmapEx::BitmapEx(): size mismatch for bitmap and mask." );
@@ -152,7 +152,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const AlphaMask& rAlphaMask ) :
aMask ( rAlphaMask.ImplGetBitmap() ),
aBitmapSize ( aBitmap.GetSizePixel() ),
eTransparent ( !rAlphaMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
- bAlpha ( !rAlphaMask ? FALSE : TRUE )
+ bAlpha ( !rAlphaMask ? sal_False : sal_True )
{
DBG_ASSERT( !rAlphaMask || rBmp.GetSizePixel() == rAlphaMask.GetSizePixel(),
"BitmapEx::BitmapEx(): size mismatch for bitmap and alpha mask." );
@@ -171,7 +171,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Color& rTransparentColor ) :
aBitmapSize ( aBitmap.GetSizePixel() ),
aTransparentColor ( rTransparentColor ),
eTransparent ( TRANSPARENT_BITMAP ),
- bAlpha ( FALSE )
+ bAlpha ( sal_False )
{
aMask = aBitmap.CreateMask( aTransparentColor );
@@ -206,19 +206,19 @@ BitmapEx& BitmapEx::operator=( const BitmapEx& rBitmapEx )
// ------------------------------------------------------------------
-BOOL BitmapEx::operator==( const BitmapEx& rBitmapEx ) const
+sal_Bool BitmapEx::operator==( const BitmapEx& rBitmapEx ) const
{
if( eTransparent != rBitmapEx.eTransparent )
- return FALSE;
+ return sal_False;
if( aBitmap != rBitmapEx.aBitmap )
- return FALSE;
+ return sal_False;
if( aBitmapSize != rBitmapEx.aBitmapSize )
- return FALSE;
+ return sal_False;
if( eTransparent == TRANSPARENT_NONE )
- return TRUE;
+ return sal_True;
if( eTransparent == TRANSPARENT_COLOR )
return aTransparentColor == rBitmapEx.aTransparentColor;
@@ -228,7 +228,7 @@ BOOL BitmapEx::operator==( const BitmapEx& rBitmapEx ) const
// ------------------------------------------------------------------
-BOOL BitmapEx::IsEqual( const BitmapEx& rBmpEx ) const
+sal_Bool BitmapEx::IsEqual( const BitmapEx& rBmpEx ) const
{
return( rBmpEx.eTransparent == eTransparent &&
rBmpEx.bAlpha == bAlpha &&
@@ -238,7 +238,7 @@ BOOL BitmapEx::IsEqual( const BitmapEx& rBmpEx ) const
// ------------------------------------------------------------------
-BOOL BitmapEx::IsEmpty() const
+sal_Bool BitmapEx::IsEmpty() const
{
return( aBitmap.IsEmpty() && aMask.IsEmpty() );
}
@@ -250,7 +250,7 @@ void BitmapEx::SetEmpty()
aBitmap.SetEmpty();
aMask.SetEmpty();
eTransparent = TRANSPARENT_NONE;
- bAlpha = FALSE;
+ bAlpha = sal_False;
}
// ------------------------------------------------------------------
@@ -262,14 +262,14 @@ void BitmapEx::Clear()
// ------------------------------------------------------------------
-BOOL BitmapEx::IsTransparent() const
+sal_Bool BitmapEx::IsTransparent() const
{
return( eTransparent != TRANSPARENT_NONE );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::IsAlpha() const
+sal_Bool BitmapEx::IsAlpha() const
{
return( IsTransparent() && bAlpha );
}
@@ -356,9 +356,9 @@ AlphaMask BitmapEx::GetAlpha() const
// ------------------------------------------------------------------
-ULONG BitmapEx::GetSizeBytes() const
+sal_uLong BitmapEx::GetSizeBytes() const
{
- ULONG nSizeBytes = aBitmap.GetSizeBytes();
+ sal_uLong nSizeBytes = aBitmap.GetSizeBytes();
if( eTransparent == TRANSPARENT_BITMAP )
nSizeBytes += aMask.GetSizeBytes();
@@ -368,7 +368,7 @@ ULONG BitmapEx::GetSizeBytes() const
// ------------------------------------------------------------------
-ULONG BitmapEx::GetChecksum() const
+sal_uLong BitmapEx::GetChecksum() const
{
sal_uInt32 nCrc = aBitmap.GetChecksum();
SVBT32 aBT32;
@@ -397,9 +397,9 @@ void BitmapEx::SetSizePixel( const Size& rNewSize )
// ------------------------------------------------------------------
-BOOL BitmapEx::Invert()
+sal_Bool BitmapEx::Invert()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
@@ -414,9 +414,9 @@ BOOL BitmapEx::Invert()
// ------------------------------------------------------------------
-BOOL BitmapEx::Mirror( ULONG nMirrorFlags )
+sal_Bool BitmapEx::Mirror( sal_uLong nMirrorFlags )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
@@ -431,9 +431,9 @@ BOOL BitmapEx::Mirror( ULONG nMirrorFlags )
// ------------------------------------------------------------------
-BOOL BitmapEx::Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFlag )
+sal_Bool BitmapEx::Scale( const double& rScaleX, const double& rScaleY, sal_uLong nScaleFlag )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
@@ -453,9 +453,9 @@ BOOL BitmapEx::Scale( const double& rScaleX, const double& rScaleY, ULONG nScale
// ------------------------------------------------------------------------
-BOOL BitmapEx::Scale( const Size& rNewSize, ULONG nScaleFlag )
+sal_Bool BitmapEx::Scale( const Size& rNewSize, sal_uLong nScaleFlag )
{
- BOOL bRet;
+ sal_Bool bRet;
if( aBitmapSize.Width() && aBitmapSize.Height() )
{
@@ -464,20 +464,20 @@ BOOL BitmapEx::Scale( const Size& rNewSize, ULONG nScaleFlag )
nScaleFlag );
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
// ------------------------------------------------------------------
-BOOL BitmapEx::Rotate( long nAngle10, const Color& rFillColor )
+sal_Bool BitmapEx::Rotate( long nAngle10, const Color& rFillColor )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
- const BOOL bTransRotate = ( Color( COL_TRANSPARENT ) == rFillColor );
+ const sal_Bool bTransRotate = ( Color( COL_TRANSPARENT ) == rFillColor );
if( bTransRotate )
{
@@ -517,9 +517,9 @@ BOOL BitmapEx::Rotate( long nAngle10, const Color& rFillColor )
// ------------------------------------------------------------------
-BOOL BitmapEx::Crop( const Rectangle& rRectPixel )
+sal_Bool BitmapEx::Crop( const Rectangle& rRectPixel )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
@@ -539,23 +539,23 @@ BOOL BitmapEx::Crop( const Rectangle& rRectPixel )
// ------------------------------------------------------------------
-BOOL BitmapEx::Convert( BmpConversion eConversion )
+sal_Bool BitmapEx::Convert( BmpConversion eConversion )
{
- return( !!aBitmap ? aBitmap.Convert( eConversion ) : FALSE );
+ return( !!aBitmap ? aBitmap.Convert( eConversion ) : sal_False );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::ReduceColors( USHORT nNewColorCount, BmpReduce eReduce )
+sal_Bool BitmapEx::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce )
{
- return( !!aBitmap ? aBitmap.ReduceColors( nNewColorCount, eReduce ) : FALSE );
+ return( !!aBitmap ? aBitmap.ReduceColors( nNewColorCount, eReduce ) : sal_False );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor, BOOL bExpandTransparent )
+sal_Bool BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor, sal_Bool bExpandTransparent )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
@@ -578,10 +578,10 @@ BOOL BitmapEx::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor, BOOL bExpa
// ------------------------------------------------------------------
-BOOL BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
+sal_Bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
const BitmapEx* pBmpExSrc )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !pBmpExSrc || pBmpExSrc->IsEmpty() )
{
@@ -612,7 +612,7 @@ BOOL BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
aMask = pAlpha->ImplGetBitmap();
delete pAlpha;
- bAlpha = TRUE;
+ bAlpha = sal_True;
aMask.CopyPixel( rRectDst, rRectSrc, &pBmpExSrc->aMask );
}
else
@@ -623,7 +623,7 @@ BOOL BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
aMask = pAlpha->ImplGetBitmap();
delete pAlpha;
eTransparent = TRANSPARENT_BITMAP;
- bAlpha = TRUE;
+ bAlpha = sal_True;
aMask.CopyPixel( rRectDst, rRectSrc, &pBmpExSrc->aMask );
}
}
@@ -667,9 +667,9 @@ BOOL BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
// ------------------------------------------------------------------
-BOOL BitmapEx::Erase( const Color& rFillColor )
+sal_Bool BitmapEx::Erase( const Color& rFillColor )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
@@ -696,41 +696,41 @@ BOOL BitmapEx::Erase( const Color& rFillColor )
// ------------------------------------------------------------------
-BOOL BitmapEx::Dither( ULONG nDitherFlags )
+sal_Bool BitmapEx::Dither( sal_uLong nDitherFlags )
{
- return( !!aBitmap ? aBitmap.Dither( nDitherFlags ) : FALSE );
+ return( !!aBitmap ? aBitmap.Dither( nDitherFlags ) : sal_False );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol )
+sal_Bool BitmapEx::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol )
{
- return( !!aBitmap ? aBitmap.Replace( rSearchColor, rReplaceColor, nTol ) : FALSE );
+ return( !!aBitmap ? aBitmap.Replace( rSearchColor, rReplaceColor, nTol ) : sal_False );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceColors, ULONG nColorCount, const ULONG* pTols )
+sal_Bool BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, const sal_uLong* pTols )
{
- return( !!aBitmap ? aBitmap.Replace( pSearchColors, pReplaceColors, nColorCount, (ULONG*) pTols ) : FALSE );
+ return( !!aBitmap ? aBitmap.Replace( pSearchColors, pReplaceColors, nColorCount, (sal_uLong*) pTols ) : sal_False );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent,
+sal_Bool BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent,
short nChannelRPercent, short nChannelGPercent, short nChannelBPercent,
- double fGamma, BOOL bInvert )
+ double fGamma, sal_Bool bInvert )
{
return( !!aBitmap ? aBitmap.Adjust( nLuminancePercent, nContrastPercent,
nChannelRPercent, nChannelGPercent, nChannelBPercent,
- fGamma, bInvert ) : FALSE );
+ fGamma, bInvert ) : sal_False );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
+sal_Bool BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
{
- return( !!aBitmap ? aBitmap.Filter( eFilter, pFilterParam, pProgress ) : FALSE );
+ return( !!aBitmap ? aBitmap.Filter( eFilter, pFilterParam, pProgress ) : sal_False );
}
// ------------------------------------------------------------------
@@ -835,9 +835,9 @@ SvStream& operator<<( SvStream& rOStm, const BitmapEx& rBitmapEx )
{
rBitmapEx.aBitmap.Write( rOStm );
- rOStm << (UINT32) 0x25091962;
- rOStm << (UINT32) 0xACB20201;
- rOStm << (BYTE) rBitmapEx.eTransparent;
+ rOStm << (sal_uInt32) 0x25091962;
+ rOStm << (sal_uInt32) 0xACB20201;
+ rOStm << (sal_uInt8) rBitmapEx.eTransparent;
if( rBitmapEx.eTransparent == TRANSPARENT_BITMAP )
rBitmapEx.aMask.Write( rOStm );
@@ -857,9 +857,9 @@ SvStream& operator>>( SvStream& rIStm, BitmapEx& rBitmapEx )
if( !rIStm.GetError() )
{
- const ULONG nStmPos = rIStm.Tell();
- UINT32 nMagic1 = 0;
- UINT32 nMagic2 = 0;
+ const sal_uLong nStmPos = rIStm.Tell();
+ sal_uInt32 nMagic1 = 0;
+ sal_uInt32 nMagic2 = 0;
rIStm >> nMagic1 >> nMagic2;
@@ -871,11 +871,11 @@ SvStream& operator>>( SvStream& rIStm, BitmapEx& rBitmapEx )
}
else
{
- BYTE bTransparent = false;
+ sal_uInt8 bTransparent = false;
rIStm >> bTransparent;
- if( bTransparent == (BYTE) TRANSPARENT_BITMAP )
+ if( bTransparent == (sal_uInt8) TRANSPARENT_BITMAP )
{
Bitmap aMask;
@@ -898,7 +898,7 @@ SvStream& operator>>( SvStream& rIStm, BitmapEx& rBitmapEx )
else
rBitmapEx = aBmp;
}
- else if( bTransparent == (BYTE) TRANSPARENT_COLOR )
+ else if( bTransparent == (sal_uInt8) TRANSPARENT_COLOR )
{
Color aTransparentColor;
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index c963ea32542e..1c7b41b51de6 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -37,7 +37,7 @@
// - BitmapReadAccess -
// --------------------
-BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, BOOL bModify ) :
+BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, sal_Bool bModify ) :
mpBuffer ( NULL ),
mpScanBuf ( NULL ),
mFncGetPixel ( NULL ),
@@ -54,7 +54,7 @@ BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap ) :
mpScanBuf ( NULL ),
mFncGetPixel ( NULL ),
mFncSetPixel ( NULL ),
- mbModify ( FALSE )
+ mbModify ( sal_False )
{
ImplCreate( rBitmap );
}
@@ -154,9 +154,9 @@ void BitmapReadAccess::ImplDestroy()
// ------------------------------------------------------------------
-BOOL BitmapReadAccess::ImplSetAccessPointers( ULONG nFormat )
+sal_Bool BitmapReadAccess::ImplSetAccessPointers( sal_uLong nFormat )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nFormat )
{
@@ -178,7 +178,7 @@ BOOL BitmapReadAccess::ImplSetAccessPointers( ULONG nFormat )
CASE_FORMAT( _32BIT_TC_MASK )
default:
- bRet = FALSE;
+ bRet = sal_False;
break;
}
@@ -196,7 +196,7 @@ void BitmapReadAccess::ImplZeroInitUnusedBits()
sal_uInt32 nBits;
bool bMsb;
- const ULONG nScanlineFormat = GetScanlineFormat();
+ const sal_uLong nScanlineFormat = GetScanlineFormat();
switch( nScanlineFormat )
{
case( BMP_FORMAT_1BIT_MSB_PAL ):
@@ -272,7 +272,7 @@ void BitmapReadAccess::ImplZeroInitUnusedBits()
else
nMask = static_cast<sal_uInt8>(0xffU >> (nLeftOverBits & 3UL));
- BYTE* pLastBytes = (BYTE*)GetBuffer() + ( nScanSize - nBytes );
+ sal_uInt8* pLastBytes = (sal_uInt8*)GetBuffer() + ( nScanSize - nBytes );
for( sal_uInt32 i = 0; i < nHeight; i++, pLastBytes += nScanSize )
{
*pLastBytes &= nMask;
@@ -284,7 +284,7 @@ void BitmapReadAccess::ImplZeroInitUnusedBits()
else if( nBits & 0x1f )
{
sal_uInt32 nMask = 0xffffffff << ( ( nScanSize << 3 ) - nBits );
- BYTE* pLast4Bytes = (BYTE*) GetBuffer() + ( nScanSize - 4 );
+ sal_uInt8* pLast4Bytes = (sal_uInt8*) GetBuffer() + ( nScanSize - 4 );
#ifdef OSL_LITENDIAN
nMask = SWAPLONG( nMask );
@@ -304,7 +304,7 @@ void BitmapReadAccess::Flush()
// ------------------------------------------------------------------
-void BitmapReadAccess::ReAccess( BOOL bModify )
+void BitmapReadAccess::ReAccess( sal_Bool bModify )
{
const ImpBitmap* pImpBmp = maBitmap.ImplGetImpBitmap();
@@ -320,7 +320,7 @@ void BitmapReadAccess::ReAccess( BOOL bModify )
// ------------------------------------------------------------------
-USHORT BitmapReadAccess::GetBestPaletteIndex( const BitmapColor& rBitmapColor ) const
+sal_uInt16 BitmapReadAccess::GetBestPaletteIndex( const BitmapColor& rBitmapColor ) const
{
return( HasPalette() ? mpBuffer->maPalette.GetBestIndex( rBitmapColor ) : 0 );
}
@@ -330,7 +330,7 @@ USHORT BitmapReadAccess::GetBestPaletteIndex( const BitmapColor& rBitmapColor )
// ---------------------
BitmapWriteAccess::BitmapWriteAccess( Bitmap& rBitmap ) :
- BitmapReadAccess( rBitmap, TRUE ),
+ BitmapReadAccess( rBitmap, sal_True ),
mpLineColor ( NULL ),
mpFillColor ( NULL )
{
@@ -366,16 +366,16 @@ void BitmapWriteAccess::CopyScanline( long nY, const BitmapReadAccess& rReadAcc
// ------------------------------------------------------------------
void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
- ULONG nSrcScanlineFormat, ULONG nSrcScanlineSize )
+ sal_uLong nSrcScanlineFormat, sal_uLong nSrcScanlineSize )
{
- const ULONG nFormat = BMP_SCANLINE_FORMAT( nSrcScanlineFormat );
+ const sal_uLong nFormat = BMP_SCANLINE_FORMAT( nSrcScanlineFormat );
DBG_ASSERT( ( nY >= 0 ) && ( nY < mpBuffer->mnHeight ), "y-coordinate in destination out of range!" );
DBG_ASSERT( ( HasPalette() && nFormat <= BMP_FORMAT_8BIT_PAL ) ||
( !HasPalette() && nFormat > BMP_FORMAT_8BIT_PAL ),
"No copying possible between palette and non palette scanlines!" );
- const ULONG nCount = Min( GetScanlineSize(), nSrcScanlineSize );
+ const sal_uLong nCount = Min( GetScanlineSize(), nSrcScanlineSize );
if( nCount )
{
@@ -437,7 +437,7 @@ void BitmapWriteAccess::CopyBuffer( const BitmapReadAccess& rReadAcc )
( GetScanlineSize() == rReadAcc.GetScanlineSize() ) )
{
const long nHeight = Min( mpBuffer->mnHeight, rReadAcc.Height() );
- const ULONG nCount = nHeight * mpBuffer->mnScanlineSize;
+ const sal_uLong nCount = nHeight * mpBuffer->mnScanlineSize;
memcpy( mpBuffer->mpBits, rReadAcc.GetBuffer(), nCount );
}
diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx
index 436c165d3bb5..ae0eade2381b 100644
--- a/vcl/source/gdi/bmpacc2.cxx
+++ b/vcl/source/gdi/bmpacc2.cxx
@@ -43,7 +43,7 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _1BIT_MSB_PAL )
IMPL_FORMAT_SETPIXEL_NOMASK( _1BIT_MSB_PAL )
{
- BYTE& rByte = pScanline[ nX >> 3 ];
+ sal_uInt8& rByte = pScanline[ nX >> 3 ];
( rBitmapColor.GetIndex() & 1 ) ? ( rByte |= 1 << ( 7 - ( nX & 7 ) ) ) :
( rByte &= ~( 1 << ( 7 - ( nX & 7 ) ) ) );
@@ -60,7 +60,7 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _1BIT_LSB_PAL )
IMPL_FORMAT_SETPIXEL_NOMASK( _1BIT_LSB_PAL )
{
- BYTE& rByte = pScanline[ nX >> 3 ];
+ sal_uInt8& rByte = pScanline[ nX >> 3 ];
( rBitmapColor.GetIndex() & 1 ) ? ( rByte |= 1 << ( nX & 7 ) ) :
( rByte &= ~( 1 << ( nX & 7 ) ) );
@@ -77,7 +77,7 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _4BIT_MSN_PAL )
IMPL_FORMAT_SETPIXEL_NOMASK( _4BIT_MSN_PAL )
{
- BYTE& rByte = pScanline[ nX >> 1 ];
+ sal_uInt8& rByte = pScanline[ nX >> 1 ];
( nX & 1 ) ? ( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) ) :
( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) );
@@ -94,7 +94,7 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _4BIT_LSN_PAL )
IMPL_FORMAT_SETPIXEL_NOMASK( _4BIT_LSN_PAL )
{
- BYTE& rByte = pScanline[ nX >> 1 ];
+ sal_uInt8& rByte = pScanline[ nX >> 1 ];
( nX & 1 ) ? ( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) ) :
( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) );
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index a89015d12351..ac2e09df832f 100644
--- a/vcl/source/gdi/bmpacc3.cxx
+++ b/vcl/source/gdi/bmpacc3.cxx
@@ -53,7 +53,7 @@ void BitmapWriteAccess::SetLineColor( const Color& rColor )
if( rColor.GetTransparency() == 255 )
mpLineColor = NULL;
else
- mpLineColor = ( HasPalette() ? new BitmapColor( (BYTE) GetBestPaletteIndex( rColor ) ) : new BitmapColor( rColor ) );
+ mpLineColor = ( HasPalette() ? new BitmapColor( (sal_uInt8) GetBestPaletteIndex( rColor ) ) : new BitmapColor( rColor ) );
}
// ------------------------------------------------------------------
@@ -87,7 +87,7 @@ void BitmapWriteAccess::SetFillColor( const Color& rColor )
if( rColor.GetTransparency() == 255 )
mpFillColor = NULL;
else
- mpFillColor = ( HasPalette() ? new BitmapColor( (BYTE) GetBestPaletteIndex( rColor ) ) : new BitmapColor( rColor ) );
+ mpFillColor = ( HasPalette() ? new BitmapColor( (sal_uInt8) GetBestPaletteIndex( rColor ) ) : new BitmapColor( rColor ) );
}
// ------------------------------------------------------------------
@@ -112,7 +112,7 @@ void BitmapWriteAccess::Erase( const Color& rColor )
// TODO: provide and use Erase( BitmapColor& method)
BitmapColor aColor = rColor;
if( HasPalette() )
- aColor = BitmapColor( (BYTE)GetBestPaletteIndex( rColor) );
+ aColor = BitmapColor( (sal_uInt8)GetBestPaletteIndex( rColor) );
// try fast bitmap method first
if( ImplFastEraseBitmap( *mpBuffer, aColor ) )
return;
@@ -204,7 +204,7 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
const long nDYX = ( nDY - nDX ) << 1;
const long nDY2 = nDY << 1;
long nD = nDY2 - nDX;
- BOOL bPos = nY1 < nY2;
+ sal_Bool bPos = nY1 < nY2;
for ( nX = nX1, nY = nY1; nX <= nX2; nX++ )
{
@@ -243,7 +243,7 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
const long nDYX = ( nDX - nDY ) << 1;
const long nDY2 = nDX << 1;
long nD = nDY2 - nDY;
- BOOL bPos = nX1 < nX2;
+ sal_Bool bPos = nX1 < nX2;
for ( nX = nX1, nY = nY1; nY <= nY2; nY++ )
{
@@ -312,7 +312,7 @@ void BitmapWriteAccess::DrawRect( const Rectangle& rRect )
void BitmapWriteAccess::FillPolygon( const Polygon& rPoly )
{
- const USHORT nSize = rPoly.GetSize();
+ const sal_uInt16 nSize = rPoly.GetSize();
if( nSize && mpFillColor )
{
@@ -345,9 +345,9 @@ void BitmapWriteAccess::DrawPolygon( const Polygon& rPoly )
if( mpLineColor && ( !mpFillColor || ( *mpFillColor != *mpLineColor ) ) )
{
- const USHORT nSize = rPoly.GetSize();
+ const sal_uInt16 nSize = rPoly.GetSize();
- for( USHORT i = 0, nSize1 = nSize - 1; i < nSize1; i++ )
+ for( sal_uInt16 i = 0, nSize1 = nSize - 1; i < nSize1; i++ )
DrawLine( rPoly[ i ], rPoly[ i + 1 ] );
if( rPoly[ nSize - 1 ] != rPoly[ 0 ] )
@@ -359,7 +359,7 @@ void BitmapWriteAccess::DrawPolygon( const Polygon& rPoly )
void BitmapWriteAccess::FillPolyPolygon( const PolyPolygon& rPolyPoly )
{
- const USHORT nCount = rPolyPoly.Count();
+ const sal_uInt16 nCount = rPolyPoly.Count();
if( nCount && mpFillColor )
{
@@ -392,14 +392,14 @@ void BitmapWriteAccess::DrawPolyPolygon( const PolyPolygon& rPolyPoly )
if( mpLineColor && ( !mpFillColor || ( *mpFillColor != *mpLineColor ) ) )
{
- for( USHORT n = 0, nCount = rPolyPoly.Count(); n < nCount; )
+ for( sal_uInt16 n = 0, nCount = rPolyPoly.Count(); n < nCount; )
{
const Polygon& rPoly = rPolyPoly[ n++ ];
- const USHORT nSize = rPoly.GetSize();
+ const sal_uInt16 nSize = rPoly.GetSize();
if( nSize )
{
- for( USHORT i = 0, nSize1 = nSize - 1; i < nSize1; i++ )
+ for( sal_uInt16 i = 0, nSize1 = nSize - 1; i < nSize1; i++ )
DrawLine( rPoly[ i ], rPoly[ i + 1 ] );
if( rPoly[ nSize - 1 ] != rPoly[ 0 ] )
diff --git a/vcl/source/gdi/bmpconv.cxx b/vcl/source/gdi/bmpconv.cxx
index 188b4e49f0c5..789c8377318d 100644
--- a/vcl/source/gdi/bmpconv.cxx
+++ b/vcl/source/gdi/bmpconv.cxx
@@ -153,7 +153,7 @@ Any SAL_CALL BmpConverter::invoke(
SvMemoryStream aStream( aDIB.getArray(), aDIB.getLength(), STREAM_READ | STREAM_WRITE );
Bitmap aBM;
- aBM.Read( aStream, TRUE );
+ aBM.Read( aStream, sal_True );
if( nTargetDepth < 4 )
nTargetDepth = 1;
else if( nTargetDepth < 8 )
@@ -188,7 +188,7 @@ BmpTransporter::BmpTransporter( const Bitmap& rBM )
m_aSize.Width = rBM.GetSizePixel().Width();
m_aSize.Height = rBM.GetSizePixel().Height();
SvMemoryStream aStream;
- rBM.Write( aStream, FALSE, TRUE );
+ rBM.Write( aStream, sal_False, sal_True );
m_aBM = Sequence<sal_Int8>(static_cast<const sal_Int8*>(aStream.GetData()),
aStream.GetEndOfData());
}
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index e6c94ba0475e..ac3a80612fe5 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -55,7 +55,7 @@ protected:
PIXBYTE* mpPixel;
};
-template <ULONG PIXFMT>
+template <sal_uLong PIXFMT>
class TrueColorPixelPtr : public BasePixelPtr
{
public:
@@ -311,7 +311,7 @@ public:
// =======================================================================
// converting truecolor formats
-template <ULONG SRCFMT, ULONG DSTFMT>
+template <sal_uLong SRCFMT, sal_uLong DSTFMT>
inline void ImplConvertPixel( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc )
{
@@ -335,7 +335,7 @@ inline void ImplConvertPixel<BMP_FORMAT_16BIT_TC_LSB_MASK, BMP_FORMAT_16BIT_TC_M
// -----------------------------------------------------------------------
-template <ULONG SRCFMT, ULONG DSTFMT>
+template <sal_uLong SRCFMT, sal_uLong DSTFMT>
inline void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc, int nPixelCount )
{
@@ -352,7 +352,7 @@ inline void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst,
// =======================================================================
// alpha blending truecolor pixels
-template <unsigned ALPHABITS, ULONG SRCFMT, ULONG DSTFMT>
+template <unsigned ALPHABITS, sal_uLong SRCFMT, sal_uLong DSTFMT>
inline void ImplBlendPixels( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc, unsigned nAlphaVal )
{
@@ -384,7 +384,7 @@ inline void ImplBlendPixels( const TrueColorPixelPtr<DSTFMT>& rDst,
// -----------------------------------------------------------------------
-template <unsigned ALPHABITS, ULONG MASKFMT, ULONG SRCFMT, ULONG DSTFMT>
+template <unsigned ALPHABITS, sal_uLong MASKFMT, sal_uLong SRCFMT, sal_uLong DSTFMT>
inline void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc, const TrueColorPixelPtr<MASKFMT>& rMsk,
int nPixelCount )
@@ -403,7 +403,7 @@ inline void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst,
// -----------------------------------------------------------------------
-template <unsigned ALPHABITS, ULONG SRCFMT, ULONG DSTFMT>
+template <unsigned ALPHABITS, sal_uLong SRCFMT, sal_uLong DSTFMT>
inline void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc, unsigned nAlphaVal,
int nPixelCount )
@@ -461,7 +461,7 @@ static bool ImplCopyImage( BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuf
// -----------------------------------------------------------------------
-template <ULONG DSTFMT,ULONG SRCFMT>
+template <sal_uLong DSTFMT,sal_uLong SRCFMT>
bool ImplConvertToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine,
BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer )
{
@@ -494,7 +494,7 @@ bool ImplConvertToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine,
// -----------------------------------------------------------------------
-template <ULONG SRCFMT>
+template <sal_uLong SRCFMT>
inline bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc )
{
TrueColorPixelPtr<SRCFMT> aSrcType; aSrcType.SetRawPtr( rSrc.mpBits );
@@ -595,8 +595,8 @@ bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc,
if( rDst.mnHeight < rTR.mnDestY + rTR.mnDestHeight )
return false;
- const ULONG nSrcFormat = rSrc.mnFormat & ~BMP_FORMAT_TOP_DOWN;
- const ULONG nDstFormat = rDst.mnFormat & ~BMP_FORMAT_TOP_DOWN;
+ const sal_uLong nSrcFormat = rSrc.mnFormat & ~BMP_FORMAT_TOP_DOWN;
+ const sal_uLong nDstFormat = rDst.mnFormat & ~BMP_FORMAT_TOP_DOWN;
// TODO: also implement conversions for 16bit colormasks with non-565 format
if( nSrcFormat & (BMP_FORMAT_16BIT_TC_LSB_MASK | BMP_FORMAT_16BIT_TC_MSB_MASK) )
@@ -676,7 +676,7 @@ bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc,
// =======================================================================
-template <ULONG DSTFMT,ULONG SRCFMT> //,ULONG MSKFMT>
+template <sal_uLong DSTFMT,sal_uLong SRCFMT> //,sal_uLong MSKFMT>
bool ImplBlendToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine,
BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer,
const BitmapBuffer& rMskBuffer )
@@ -753,7 +753,7 @@ inline bool ImplBlendToBitmap<BMP_FORMAT_32BIT_TC_BGRA,BMP_FORMAT_32BIT_TC_BGRA>
// -----------------------------------------------------------------------
-template <ULONG SRCFMT>
+template <sal_uLong SRCFMT>
bool ImplBlendFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc, const BitmapBuffer& rMsk )
{
TrueColorPixelPtr<SRCFMT> aSrcType; aSrcType.SetRawPtr( rSrc.mpBits );
@@ -871,8 +871,8 @@ bool ImplFastBitmapBlending( BitmapWriteAccess& rDstWA,
const BitmapBuffer& rSrc = *rSrcRA.ImplGetBitmapBuffer();
const BitmapBuffer& rMsk = *rMskRA.ImplGetBitmapBuffer();
- const ULONG nSrcFormat = rSrc.mnFormat & ~BMP_FORMAT_TOP_DOWN;
- const ULONG nDstFormat = rDst.mnFormat & ~BMP_FORMAT_TOP_DOWN;
+ const sal_uLong nSrcFormat = rSrc.mnFormat & ~BMP_FORMAT_TOP_DOWN;
+ const sal_uLong nDstFormat = rDst.mnFormat & ~BMP_FORMAT_TOP_DOWN;
// accelerated conversions for 16bit colormasks with non-565 format are not yet implemented
if( nSrcFormat & (BMP_FORMAT_16BIT_TC_LSB_MASK | BMP_FORMAT_16BIT_TC_MSB_MASK) )
@@ -945,18 +945,18 @@ bool ImplFastEraseBitmap( BitmapBuffer& rDst, const BitmapColor& rColor )
if( bDisableFastBitops )
return false;
- const ULONG nDstFormat = rDst.mnFormat & ~BMP_FORMAT_TOP_DOWN;
+ const sal_uLong nDstFormat = rDst.mnFormat & ~BMP_FORMAT_TOP_DOWN;
// erasing a bitmap is often just a byte-wise memory fill
bool bByteFill = true;
- BYTE nFillByte;
+ sal_uInt8 nFillByte;
switch( nDstFormat )
{
case BMP_FORMAT_1BIT_MSB_PAL:
case BMP_FORMAT_1BIT_LSB_PAL:
nFillByte = rColor.GetIndex();
- nFillByte = static_cast<BYTE>( -(nFillByte & 1) ); // 0x00 or 0xFF
+ nFillByte = static_cast<sal_uInt8>( -(nFillByte & 1) ); // 0x00 or 0xFF
break;
case BMP_FORMAT_4BIT_MSN_PAL:
case BMP_FORMAT_4BIT_LSN_PAL:
diff --git a/vcl/source/gdi/cvtgrf.cxx b/vcl/source/gdi/cvtgrf.cxx
index 8ba963bc4718..3f95f56315f6 100644
--- a/vcl/source/gdi/cvtgrf.cxx
+++ b/vcl/source/gdi/cvtgrf.cxx
@@ -57,10 +57,10 @@ GraphicConverter::~GraphicConverter()
// ------------------------------------------------------------------------
-ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nInBufSize,
- void** ppOutBuffer, ULONG nOutFormat )
+sal_uLong GraphicConverter::ImplConvert( sal_uLong nInFormat, void* pInBuffer, sal_uLong nInBufSize,
+ void** ppOutBuffer, sal_uLong nOutFormat )
{
- ULONG nRetBufSize = 0UL;
+ sal_uLong nRetBufSize = 0UL;
if( ( nInFormat != nOutFormat ) && pInBuffer )
{
@@ -69,7 +69,7 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
SvMemoryStream aIStm;
Graphic aGraphic;
- aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, FALSE, nInBufSize );
+ aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, sal_False, nInBufSize );
aIStm >> aGraphic;
if( !aIStm.GetError() )
@@ -82,7 +82,7 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
{
nRetBufSize = aOStm.Seek( STREAM_SEEK_TO_END );
*ppOutBuffer = (void*) aOStm.GetData();
- aOStm.ObjectOwnsMemory( FALSE );
+ aOStm.ObjectOwnsMemory( sal_False );
}
delete mpConvertData;
@@ -93,7 +93,7 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
{
SvMemoryStream aIStm;
- aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, FALSE, nInBufSize );
+ aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, sal_False, nInBufSize );
mpConvertData = new ConvertData( Graphic(), aIStm, nInFormat );
if( maFilterHdl.IsSet() && maFilterHdl.Call( mpConvertData ) )
@@ -119,7 +119,7 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
{
nRetBufSize = aOStm.Seek( STREAM_SEEK_TO_END );
*ppOutBuffer = (void*) aOStm.GetData();
- aOStm.ObjectOwnsMemory( FALSE );
+ aOStm.ObjectOwnsMemory( sal_False );
}
}
@@ -133,10 +133,10 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
// ------------------------------------------------------------------------
-ULONG GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, ULONG nFormat )
+sal_uLong GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, sal_uLong nFormat )
{
GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
- ULONG nRet = ERRCODE_IO_GENERAL;
+ sal_uLong nRet = ERRCODE_IO_GENERAL;
if( pCvt && pCvt->GetFilterHdl().IsSet() )
{
@@ -156,10 +156,10 @@ ULONG GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, ULONG nForma
// ------------------------------------------------------------------------
-ULONG GraphicConverter::Export( SvStream& rOStm, const Graphic& rGraphic, ULONG nFormat )
+sal_uLong GraphicConverter::Export( SvStream& rOStm, const Graphic& rGraphic, sal_uLong nFormat )
{
GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
- ULONG nRet = ERRCODE_IO_GENERAL;
+ sal_uLong nRet = ERRCODE_IO_GENERAL;
if( pCvt && pCvt->GetFilterHdl().IsSet() )
{
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index af98e402f158..7a6dd74db2c5 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -74,12 +74,12 @@ void ImplWriteRect( SvStream& rOStm, const Rectangle& rRect )
void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
{
- INT32 nSize;
+ sal_Int32 nSize;
rIStm >> nSize;
- rPoly = Polygon( (USHORT) nSize );
+ rPoly = Polygon( (sal_uInt16) nSize );
- for( USHORT i = 0; i < (USHORT) nSize; i++ )
+ for( sal_uInt16 i = 0; i < (sal_uInt16) nSize; i++ )
rIStm >> rPoly[ i ];
}
@@ -88,11 +88,11 @@ void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly )
{
Polygon aPoly;
- INT32 nPolyCount;
+ sal_Int32 nPolyCount;
rIStm >> nPolyCount;
- for( USHORT i = 0; i < (USHORT) nPolyCount; i++ )
+ for( sal_uInt16 i = 0; i < (sal_uInt16) nPolyCount; i++ )
{
ImplReadPoly( rIStm, aPoly );
rPolyPoly.Insert( aPoly );
@@ -103,16 +103,16 @@ void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly )
void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly )
{
- const USHORT nPoly = rPolyPoly.Count();
- USHORT nPoints = 0;
- USHORT n;
+ const sal_uInt16 nPoly = rPolyPoly.Count();
+ sal_uInt16 nPoints = 0;
+ sal_uInt16 n;
for( n = 0; n < nPoly; n++ )
- nPoints = sal::static_int_cast<USHORT>(nPoints + rPolyPoly[ n ].GetSize());
+ nPoints = sal::static_int_cast<sal_uInt16>(nPoints + rPolyPoly[ n ].GetSize());
- rOStm << (INT16) GDI_POLYPOLYGON_ACTION;
- rOStm << (INT32) ( 8 + ( nPoly << 2 ) + ( nPoints << 3 ) );
- rOStm << (INT32) nPoly;
+ rOStm << (sal_Int16) GDI_POLYPOLYGON_ACTION;
+ rOStm << (sal_Int32) ( 8 + ( nPoly << 2 ) + ( nPoints << 3 ) );
+ rOStm << (sal_Int32) nPoly;
for( n = 0; n < nPoly; n++ )
{
@@ -121,11 +121,11 @@ void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly )
// a polygon representing the curve as good as possible
Polygon aSimplePoly;
rPolyPoly[n].AdaptiveSubdivide(aSimplePoly);
- const USHORT nSize(aSimplePoly.GetSize());
+ const sal_uInt16 nSize(aSimplePoly.GetSize());
- rOStm << (INT32) nSize;
+ rOStm << (sal_Int32) nSize;
- for( USHORT j = 0; j < nSize; j++ )
+ for( sal_uInt16 j = 0; j < nSize; j++ )
rOStm << aSimplePoly[ j ];
}
}
@@ -134,26 +134,26 @@ void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly )
void ImplReadColor( SvStream& rIStm, Color& rColor )
{
- INT16 nVal;
+ sal_Int16 nVal;
- rIStm >> nVal; rColor.SetRed( sal::static_int_cast<UINT8>((USHORT)nVal >> 8) );
- rIStm >> nVal; rColor.SetGreen( sal::static_int_cast<UINT8>((USHORT)nVal >> 8) );
- rIStm >> nVal; rColor.SetBlue( sal::static_int_cast<UINT8>((USHORT)nVal >> 8) );
+ rIStm >> nVal; rColor.SetRed( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
+ rIStm >> nVal; rColor.SetGreen( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
+ rIStm >> nVal; rColor.SetBlue( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
}
// ------------------------------------------------------------------------
void ImplWriteColor( SvStream& rOStm, const Color& rColor )
{
- INT16 nVal;
+ sal_Int16 nVal;
- nVal = ( (INT16) rColor.GetRed() << 8 ) | rColor.GetRed();
+ nVal = ( (sal_Int16) rColor.GetRed() << 8 ) | rColor.GetRed();
rOStm << nVal;
- nVal = ( (INT16) rColor.GetGreen() << 8 ) | rColor.GetGreen();
+ nVal = ( (sal_Int16) rColor.GetGreen() << 8 ) | rColor.GetGreen();
rOStm << nVal;
- nVal = ( (INT16) rColor.GetBlue() << 8 ) | rColor.GetBlue();
+ nVal = ( (sal_Int16) rColor.GetBlue() << 8 ) | rColor.GetBlue();
rOStm << nVal;
}
@@ -162,11 +162,11 @@ void ImplWriteColor( SvStream& rOStm, const Color& rColor )
void ImplReadMapMode( SvStream& rIStm, MapMode& rMapMode )
{
Point aOrg;
- INT32 nXNum;
- INT32 nXDenom;
- INT32 nYNum;
- INT32 nYDenom;
- INT16 nUnit;
+ sal_Int32 nXNum;
+ sal_Int32 nXDenom;
+ sal_Int32 nYNum;
+ sal_Int32 nYDenom;
+ sal_Int16 nUnit;
rIStm >> nUnit >> aOrg >> nXNum >> nXDenom >> nYNum >> nYDenom;
rMapMode = MapMode( (MapUnit) nUnit, aOrg, Fraction( nXNum, nXDenom ), Fraction( nYNum, nYDenom ) );
@@ -176,39 +176,39 @@ void ImplReadMapMode( SvStream& rIStm, MapMode& rMapMode )
void ImplWriteMapMode( SvStream& rOStm, const MapMode& rMapMode )
{
- rOStm << (INT16) rMapMode.GetMapUnit();
+ rOStm << (sal_Int16) rMapMode.GetMapUnit();
rOStm << rMapMode.GetOrigin();
- rOStm << (INT32) rMapMode.GetScaleX().GetNumerator();
- rOStm << (INT32) rMapMode.GetScaleX().GetDenominator();
- rOStm << (INT32) rMapMode.GetScaleY().GetNumerator();
- rOStm << (INT32) rMapMode.GetScaleY().GetDenominator();
+ rOStm << (sal_Int32) rMapMode.GetScaleX().GetNumerator();
+ rOStm << (sal_Int32) rMapMode.GetScaleX().GetDenominator();
+ rOStm << (sal_Int32) rMapMode.GetScaleY().GetNumerator();
+ rOStm << (sal_Int32) rMapMode.GetScaleY().GetDenominator();
}
// ------------------------------------------------------------------------
void ImplWritePushAction( SvStream& rOStm )
{
- rOStm << (INT16) GDI_PUSH_ACTION;
- rOStm << (INT32) 4;
+ rOStm << (sal_Int16) GDI_PUSH_ACTION;
+ rOStm << (sal_Int32) 4;
}
// ------------------------------------------------------------------------
void ImplWritePopAction( SvStream& rOStm )
{
- rOStm << (INT16) GDI_POP_ACTION;
- rOStm << (INT32) 4;
+ rOStm << (sal_Int16) GDI_POP_ACTION;
+ rOStm << (sal_Int32) 4;
}
// ------------------------------------------------------------------------
-void ImplWriteLineColor( SvStream& rOStm, const Color& rColor, INT16 nStyle, INT32 nWidth = 0L )
+void ImplWriteLineColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle, sal_Int32 nWidth = 0L )
{
if( rColor.GetTransparency() > 127 )
nStyle = 0;
- rOStm << (INT16) GDI_PEN_ACTION;
- rOStm << (INT32) 16;
+ rOStm << (sal_Int16) GDI_PEN_ACTION;
+ rOStm << (sal_Int32) 16;
ImplWriteColor( rOStm, rColor );
rOStm << nWidth;
rOStm << nStyle;
@@ -216,10 +216,10 @@ void ImplWriteLineColor( SvStream& rOStm, const Color& rColor, INT16 nStyle, INT
// ------------------------------------------------------------------------
-void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, INT16 nStyle )
+void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle )
{
- rOStm << (INT16) GDI_FILLBRUSH_ACTION;
- rOStm << (INT32) 20;
+ rOStm << (sal_Int16) GDI_FILLBRUSH_ACTION;
+ rOStm << (sal_Int32) 20;
ImplWriteColor( rOStm, rColor );
if( rColor.GetTransparency() > 127 )
@@ -229,13 +229,13 @@ void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, INT16 nStyle )
{
ImplWriteColor( rOStm, COL_WHITE );
rOStm << nStyle;
- rOStm << (INT16) 1;
+ rOStm << (sal_Int16) 1;
}
else
{
ImplWriteColor( rOStm, COL_BLACK );
rOStm << nStyle;
- rOStm << (INT16) 0;
+ rOStm << (sal_Int16) 0;
}
}
@@ -274,24 +274,24 @@ void ImplWriteFont( SvStream& rOStm, const Font& rFont,
break;
}
- rOStm << (INT16) GDI_FONT_ACTION;
- rOStm << (INT32) 78;
+ rOStm << (sal_Int16) GDI_FONT_ACTION;
+ rOStm << (sal_Int32) 78;
rActualCharSet = GetStoreCharSet( rFont.GetCharSet() );
ImplWriteColor( rOStm, rFont.GetColor() );
ImplWriteColor( rOStm, rFont.GetFillColor() );
rOStm.Write( aName, 32 );
rOStm << rFont.GetSize();
- rOStm << (INT16) 0; // no character orientation anymore
- rOStm << (INT16) rFont.GetOrientation();
- rOStm << (INT16) rActualCharSet;
- rOStm << (INT16) rFont.GetFamily();
- rOStm << (INT16) rFont.GetPitch();
- rOStm << (INT16) rFont.GetAlign();
- rOStm << (INT16) nWeight;
- rOStm << (INT16) rFont.GetUnderline();
- rOStm << (INT16) rFont.GetStrikeout();
- rOStm << (BOOL) ( rFont.GetItalic() != ITALIC_NONE );
+ rOStm << (sal_Int16) 0; // no character orientation anymore
+ rOStm << (sal_Int16) rFont.GetOrientation();
+ rOStm << (sal_Int16) rActualCharSet;
+ rOStm << (sal_Int16) rFont.GetFamily();
+ rOStm << (sal_Int16) rFont.GetPitch();
+ rOStm << (sal_Int16) rFont.GetAlign();
+ rOStm << (sal_Int16) nWeight;
+ rOStm << (sal_Int16) rFont.GetUnderline();
+ rOStm << (sal_Int16) rFont.GetStrikeout();
+ rOStm << (sal_Bool) ( rFont.GetItalic() != ITALIC_NONE );
rOStm << rFont.IsOutline();
rOStm << rFont.IsShadow();
rOStm << rFont.IsTransparent();
@@ -301,9 +301,9 @@ void ImplWriteFont( SvStream& rOStm, const Font& rFont,
// ------------------------------------------------------------------------
-void ImplWriteRasterOpAction( SvStream& rOStm, INT16 nRasterOp )
+void ImplWriteRasterOpAction( SvStream& rOStm, sal_Int16 nRasterOp )
{
- rOStm << (INT16) GDI_RASTEROP_ACTION << (INT32) 6 << nRasterOp;
+ rOStm << (sal_Int16) GDI_RASTEROP_ACTION << (sal_Int32) 6 << nRasterOp;
}
// ------------------------------------------------------------------------
@@ -355,12 +355,12 @@ void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, String& rStri
// ------------------------------------------------------------------------
-void ImplSkipActions( SvStream& rIStm, ULONG nSkipCount )
+void ImplSkipActions( SvStream& rIStm, sal_uLong nSkipCount )
{
- INT32 nActionSize;
- INT16 nType;
+ sal_Int32 nActionSize;
+ sal_Int16 nType;
- for( ULONG i = 0UL; i < nSkipCount; i++ )
+ for( sal_uLong i = 0UL; i < nSkipCount; i++ )
{
rIStm >> nType >> nActionSize;
rIStm.SeekRel( nActionSize - 4L );
@@ -399,7 +399,7 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPol
if((bOnlyWhenCurve && nAllFlagCount) || (!bOnlyWhenCurve && nAllPointCount))
{
- rOStm << (INT16) GDI_EXTENDEDPOLYGON_ACTION;
+ rOStm << (sal_Int16) GDI_EXTENDEDPOLYGON_ACTION;
const sal_Int32 nActionSize(
4 + // Action size
@@ -428,16 +428,16 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPol
if(rCandidate.HasFlags())
{
- rOStm << (BYTE)true;
+ rOStm << (sal_uInt8)true;
for(sal_uInt16 c(0); c < nPointCount; c++)
{
- rOStm << (BYTE)rCandidate.GetFlags(c);
+ rOStm << (sal_uInt8)rCandidate.GetFlags(c);
}
}
else
{
- rOStm << (BYTE)false;
+ rOStm << (sal_uInt8)false;
}
}
}
@@ -470,12 +470,12 @@ void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, PolyPolygon& rPolyPoly)
rIStm >> aCandidate[b];
}
- BYTE bHasFlags(false);
+ sal_uInt8 bHasFlags(false);
rIStm >> bHasFlags;
if(bHasFlags)
{
- BYTE aPolyFlags(0);
+ sal_uInt8 aPolyFlags(0);
for(sal_uInt16 c(0); c < nPointCount; c++)
{
@@ -493,7 +493,7 @@ void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, PolyPolygon& rPolyPoly)
// - SVMConverter -
// ----------------
-SVMConverter::SVMConverter( SvStream& rStm, GDIMetaFile& rMtf, ULONG nConvertMode )
+SVMConverter::SVMConverter( SvStream& rStm, GDIMetaFile& rMtf, sal_uLong nConvertMode )
{
if( !rStm.GetError() )
{
@@ -508,15 +508,15 @@ SVMConverter::SVMConverter( SvStream& rStm, GDIMetaFile& rMtf, ULONG nConvertMod
void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
- const ULONG nPos = rIStm.Tell();
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ const sal_uLong nPos = rIStm.Tell();
+ const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
char aCode[ 5 ];
Size aPrefSz;
- INT16 nSize;
- INT16 nVersion;
+ sal_Int16 nSize;
+ sal_Int16 nVersion;
// read header
rIStm.Read( (char*) &aCode, sizeof( aCode ) ); // Kennung
@@ -540,7 +540,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
Stack aLIStack;
VirtualDevice aFontVDev;
rtl_TextEncoding eActualCharSet = gsl_getSystemTextEncoding();
- BOOL bFatLine = FALSE;
+ sal_Bool bFatLine = sal_False;
// TODO: fix reindentation below if you can accept being blamed by the SCM
MapMode aMapMode;
@@ -549,12 +549,12 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
Point aPt, aPt1;
Size aSz;
Color aActionColor;
- INT32 nTmp, nTmp1, nActionSize;
- INT32 nActions;
- INT16 nType;
+ sal_Int32 nTmp, nTmp1, nActionSize;
+ sal_Int32 nActions;
+ sal_Int16 nType;
sal_uInt32 nUnicodeCommentStreamPos = 0;
- INT32 nUnicodeCommentActionNumber = 0;
+ sal_Int32 nUnicodeCommentActionNumber = 0;
ImplReadMapMode( rIStm, aMapMode ); // MapMode
rIStm >> nActions; // Action count
@@ -563,7 +563,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
rMtf.SetPrefMapMode( aMapMode );
sal_uInt32 nLastPolygonAction(0);
- for( INT32 i = 0L; i < nActions; i++ )
+ for( sal_Int32 i = 0L; i < nActions; i++ )
{
rIStm >> nType;
sal_Int32 nActBegin = rIStm.Tell();
@@ -597,7 +597,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case (GDI_LINEJOIN_ACTION) :
{
- INT16 nLineJoin(0);
+ sal_Int16 nLineJoin(0);
rIStm >> nLineJoin;
aLineInfo.SetLineJoin((basegfx::B2DLineJoin)nLineJoin);
}
@@ -605,8 +605,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case (GDI_LINEDASHDOT_ACTION) :
{
- INT16 a(0);
- INT32 b(0);
+ sal_Int16 a(0);
+ sal_Int32 b(0);
rIStm >> a; aLineInfo.SetDashCount(a);
rIStm >> b; aLineInfo.SetDashLen(b);
@@ -714,7 +714,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
const Polygon aPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
- rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, FALSE ) );
+ rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) );
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
rMtf.AddAction( new MetaPopAction() );
rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) );
@@ -734,7 +734,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
const Polygon aPoly( aRect, aPt, aPt1, POLY_ARC );
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
- rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, FALSE ) );
+ rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) );
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
rMtf.AddAction( new MetaPopAction() );
rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) );
@@ -754,7 +754,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
const Polygon aPoly( aRect, aPt, aPt1, POLY_PIE );
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
- rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, FALSE ) );
+ rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) );
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
rMtf.AddAction( new MetaPopAction() );
rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) );
@@ -794,7 +794,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
- rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, FALSE ) );
+ rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) );
rMtf.AddAction( new MetaPolygonAction( aActionPoly ) );
rMtf.AddAction( new MetaPopAction() );
rMtf.AddAction( new MetaPolyLineAction( aActionPoly, aLineInfo ) );
@@ -816,11 +816,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
- rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, FALSE ) );
+ rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) );
rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) );
rMtf.AddAction( new MetaPopAction() );
- for( USHORT nPoly = 0, nCount = aPolyPoly.Count(); nPoly < nCount; nPoly++ )
+ for( sal_uInt16 nPoly = 0, nCount = aPolyPoly.Count(); nPoly < nCount; nPoly++ )
rMtf.AddAction( new MetaPolyLineAction( aPolyPoly[ nPoly ], aLineInfo ) );
}
else
@@ -835,10 +835,10 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
Font aFont;
char aName[ 32 ];
- INT32 nWidth, nHeight;
- INT16 nCharSet, nFamily, nPitch, nAlign, nWeight, nUnderline, nStrikeout;
- INT16 nCharOrient, nLineOrient;
- BOOL bItalic, bOutline, bShadow, bTransparent;
+ sal_Int32 nWidth, nHeight;
+ sal_Int16 nCharSet, nFamily, nPitch, nAlign, nWeight, nUnderline, nStrikeout;
+ sal_Int16 nCharOrient, nLineOrient;
+ sal_Bool bItalic, bOutline, bShadow, bTransparent;
ImplReadColor( rIStm, aActionColor ); aFont.SetColor( aActionColor );
ImplReadColor( rIStm, aActionColor ); aFont.SetFillColor( aActionColor );
@@ -881,16 +881,16 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TEXT_ACTION ):
{
ByteString aByteStr;
- INT32 nIndex, nLen;
+ sal_Int32 nIndex, nLen;
rIStm >> aPt >> nIndex >> nLen >> nTmp;
if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_UINT16 - 1 ) ) )
{
- rIStm.Read( aByteStr.AllocBuffer( (USHORT)nTmp ), nTmp + 1 );
+ rIStm.Read( aByteStr.AllocBuffer( (sal_uInt16)nTmp ), nTmp + 1 );
UniString aStr( aByteStr, eActualCharSet );
if ( nUnicodeCommentActionNumber == i )
ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr );
- rMtf.AddAction( new MetaTextAction( aPt, aStr, (USHORT) nIndex, (USHORT) nLen ) );
+ rMtf.AddAction( new MetaTextAction( aPt, aStr, (sal_uInt16) nIndex, (sal_uInt16) nLen ) );
}
rIStm.Seek( nActBegin + nActionSize );
}
@@ -900,17 +900,17 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
ByteString aByteStr;
sal_Int32* pDXAry = NULL;
- INT32 nIndex, nLen, nAryLen;
+ sal_Int32 nIndex, nLen, nAryLen;
rIStm >> aPt >> nIndex >> nLen >> nTmp >> nAryLen;
if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_UINT16 - 1 ) ) )
{
- rIStm.Read( aByteStr.AllocBuffer( (USHORT)nTmp ), nTmp + 1 );
+ rIStm.Read( aByteStr.AllocBuffer( (sal_uInt16)nTmp ), nTmp + 1 );
UniString aStr( aByteStr, eActualCharSet );
if( nAryLen > 0L )
{
- INT32 nStrLen( aStr.Len() );
+ sal_Int32 nStrLen( aStr.Len() );
pDXAry = new sal_Int32[ Max( nAryLen, nStrLen ) ];
@@ -924,7 +924,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
sal_Int32* pTmpAry = new sal_Int32[nStrLen];
- aFontVDev.GetTextArray( aStr, pTmpAry, (USHORT) nIndex, (USHORT) nLen );
+ aFontVDev.GetTextArray( aStr, pTmpAry, (sal_uInt16) nIndex, (sal_uInt16) nLen );
// now, the difference between the
// last and the second last DX array
@@ -948,7 +948,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
}
if ( nUnicodeCommentActionNumber == i )
ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr );
- rMtf.AddAction( new MetaTextArrayAction( aPt, aStr, pDXAry, (USHORT) nIndex, (USHORT) nLen ) );
+ rMtf.AddAction( new MetaTextArrayAction( aPt, aStr, pDXAry, (sal_uInt16) nIndex, (sal_uInt16) nLen ) );
if( pDXAry )
delete[] pDXAry;
@@ -960,16 +960,16 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_STRETCHTEXT_ACTION ):
{
ByteString aByteStr;
- INT32 nIndex, nLen, nWidth;
+ sal_Int32 nIndex, nLen, nWidth;
rIStm >> aPt >> nIndex >> nLen >> nTmp >> nWidth;
if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_INT16 - 1 ) ) )
{
- rIStm.Read( aByteStr.AllocBuffer( (USHORT)nTmp ), nTmp + 1 );
+ rIStm.Read( aByteStr.AllocBuffer( (sal_uInt16)nTmp ), nTmp + 1 );
UniString aStr( aByteStr, eActualCharSet );
if ( nUnicodeCommentActionNumber == i )
ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr );
- rMtf.AddAction( new MetaStretchTextAction( aPt, nWidth, aStr, (USHORT) nIndex, (USHORT) nLen ) );
+ rMtf.AddAction( new MetaStretchTextAction( aPt, nWidth, aStr, (sal_uInt16) nIndex, (sal_uInt16) nLen ) );
}
rIStm.Seek( nActBegin + nActionSize );
}
@@ -1005,8 +1005,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_PEN_ACTION ):
{
- INT32 nPenWidth;
- INT16 nPenStyle;
+ sal_Int32 nPenWidth;
+ sal_Int16 nPenStyle;
ImplReadColor( rIStm, aActionColor );
rIStm >> nPenWidth >> nPenStyle;
@@ -1021,7 +1021,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_FILLBRUSH_ACTION ):
{
- INT16 nBrushStyle;
+ sal_Int16 nBrushStyle;
ImplReadColor( rIStm, aActionColor );
rIStm.SeekRel( 6L );
@@ -1044,9 +1044,9 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_CLIPREGION_ACTION ):
{
Region aRegion;
- INT16 nRegType;
- INT16 bIntersect;
- BOOL bClip = FALSE;
+ sal_Int16 nRegType;
+ sal_Int16 bIntersect;
+ sal_Bool bClip = sal_False;
rIStm >> nRegType >> bIntersect;
ImplReadRect( rIStm, aRect );
@@ -1062,7 +1062,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
ImplReadRect( rIStm, aRegRect );
aRegion = Region( aRegRect );
- bClip = TRUE;
+ bClip = sal_True;
}
break;
@@ -1070,25 +1070,25 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
ImplReadPoly( rIStm, aActionPoly );
aRegion = Region( aActionPoly );
- bClip = TRUE;
+ bClip = sal_True;
}
break;
case( 3 ):
{
PolyPolygon aPolyPoly;
- INT32 nPolyCount;
+ sal_Int32 nPolyCount;
rIStm >> nPolyCount;
- for( USHORT j = 0; j < (USHORT) nPolyCount; j++ )
+ for( sal_uInt16 j = 0; j < (sal_uInt16) nPolyCount; j++ )
{
ImplReadPoly( rIStm, aActionPoly );
aPolyPoly.Insert( aActionPoly );
}
aRegion = Region( aPolyPoly );
- bClip = TRUE;
+ bClip = sal_True;
}
break;
}
@@ -1117,7 +1117,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_RASTEROP_ACTION ):
{
RasterOp eRasterOp;
- INT16 nRasterOp;
+ sal_Int16 nRasterOp;
rIStm >> nRasterOp;
@@ -1175,13 +1175,13 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
Color aStartCol;
Color aEndCol;
- INT16 nStyle;
- INT16 nAngle;
- INT16 nBorder;
- INT16 nOfsX;
- INT16 nOfsY;
- INT16 nIntensityStart;
- INT16 nIntensityEnd;
+ sal_Int16 nStyle;
+ sal_Int16 nAngle;
+ sal_Int16 nBorder;
+ sal_Int16 nOfsX;
+ sal_Int16 nOfsY;
+ sal_Int16 nIntensityStart;
+ sal_Int16 nIntensityEnd;
ImplReadRect( rIStm, aRect );
rIStm >> nStyle;
@@ -1204,8 +1204,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TRANSPARENT_COMMENT ):
{
PolyPolygon aPolyPoly;
- INT32 nFollowingActionCount;
- INT16 nTrans;
+ sal_Int32 nFollowingActionCount;
+ sal_Int16 nTrans;
rIStm >> aPolyPoly >> nTrans >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1223,7 +1223,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
Point aPos;
Size aSize;
Gradient aGradient;
- INT32 nFollowingActionCount;
+ sal_Int32 nFollowingActionCount;
rIStm >> aMtf >> aPos >> aSize >> aGradient >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1239,7 +1239,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
PolyPolygon aPolyPoly;
Hatch aHatch;
- INT32 nFollowingActionCount;
+ sal_Int32 nFollowingActionCount;
rIStm >> aPolyPoly >> aHatch >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1254,8 +1254,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_REFPOINT_COMMENT ):
{
Point aRefPoint;
- BOOL bSet;
- INT32 nFollowingActionCount;
+ sal_Bool bSet;
+ sal_Int32 nFollowingActionCount;
rIStm >> aRefPoint >> bSet >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1276,8 +1276,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TEXTLINECOLOR_COMMENT ):
{
Color aColor;
- BOOL bSet;
- INT32 nFollowingActionCount;
+ sal_Bool bSet;
+ sal_Int32 nFollowingActionCount;
rIStm >> aColor >> bSet >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1295,7 +1295,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
long nWidth;
sal_uInt32 nStrikeout;
sal_uInt32 nUnderline;
- INT32 nFollowingActionCount;
+ sal_Int32 nFollowingActionCount;
rIStm >> aStartPt >> nWidth >> nStrikeout >> nUnderline >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1314,7 +1314,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
PolyPolygon aPolyPoly;
Gradient aGradient;
- INT32 nFollowingActionCount;
+ sal_Int32 nFollowingActionCount;
rIStm >> aPolyPoly >> aGradient >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1331,14 +1331,14 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
ByteString aComment;
sal_Int32 nValue;
sal_uInt32 nDataSize;
- BYTE* pData;
- INT32 nFollowingActionCount;
+ sal_uInt8* pData;
+ sal_Int32 nFollowingActionCount;
rIStm >> aComment >> nValue >> nDataSize;
if( nDataSize )
{
- pData = new BYTE[ nDataSize ];
+ pData = new sal_uInt8[ nDataSize ];
rIStm.Read( pData, nDataSize );
}
else
@@ -1379,13 +1379,13 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
{
- ULONG nPos;
- ULONG nCountPos;
+ sal_uLong nPos;
+ sal_uLong nCountPos;
Font aSaveFont;
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
rtl_TextEncoding eActualCharSet = gsl_getSystemTextEncoding();
const Size aPrefSize( rMtf.GetPrefSize() );
- BOOL bRop_0_1 = FALSE;
+ sal_Bool bRop_0_1 = sal_False;
VirtualDevice aSaveVDev;
Color aLineCol( COL_BLACK );
Stack aLineColStack;
@@ -1395,18 +1395,18 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
//MagicCode schreiben
rOStm << "SVGDI"; // Kennung
nPos = rOStm.Tell();
- rOStm << (INT16) 42; // HeaderSize
- rOStm << (INT16) 200; // VERSION
- rOStm << (INT32) aPrefSize.Width();
- rOStm << (INT32) aPrefSize.Height();
+ rOStm << (sal_Int16) 42; // HeaderSize
+ rOStm << (sal_Int16) 200; // VERSION
+ rOStm << (sal_Int32) aPrefSize.Width();
+ rOStm << (sal_Int32) aPrefSize.Height();
ImplWriteMapMode( rOStm, rMtf.GetPrefMapMode() );
// ActionCount wird spaeter geschrieben
nCountPos = rOStm.Tell();
rOStm.SeekRel( 4L );
- const INT32 nActCount = ImplWriteActions( rOStm, rMtf, aSaveVDev, bRop_0_1, aLineCol, aLineColStack, eActualCharSet );
- const ULONG nActPos = rOStm.Tell();
+ const sal_Int32 nActCount = ImplWriteActions( rOStm, rMtf, aSaveVDev, bRop_0_1, aLineCol, aLineColStack, eActualCharSet );
+ const sal_uLong nActPos = rOStm.Tell();
rOStm.Seek( nCountPos );
rOStm << nActCount;
@@ -1420,13 +1420,13 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
// ------------------------------------------------------------------------
-ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
- VirtualDevice& rSaveVDev, BOOL& rRop_0_1,
+sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
+ VirtualDevice& rSaveVDev, sal_Bool& rRop_0_1,
Color& rLineCol, Stack& rLineColStack,
rtl_TextEncoding& rActualCharSet )
{
- ULONG nCount = 0;
- for( ULONG i = 0, nActionCount = rMtf.GetActionCount(); i < nActionCount; i++ )
+ sal_uLong nCount = 0;
+ for( sal_uLong i = 0, nActionCount = rMtf.GetActionCount(); i < nActionCount; i++ )
{
const MetaAction* pAction = rMtf.GetAction( i );
@@ -1436,8 +1436,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaPixelAction* pAct = (MetaPixelAction*) pAction;
- rOStm << (INT16) GDI_PIXEL_ACTION;
- rOStm << (INT32) 18;
+ rOStm << (sal_Int16) GDI_PIXEL_ACTION;
+ rOStm << (sal_Int32) 18;
rOStm << pAct->GetPoint();
ImplWriteColor( rOStm, pAct->GetColor() );
nCount++;
@@ -1448,8 +1448,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaPointAction* pAct = (MetaPointAction*) pAction;
- rOStm << (INT16) GDI_POINT_ACTION;
- rOStm << (INT32) 12;
+ rOStm << (sal_Int16) GDI_POINT_ACTION;
+ rOStm << (sal_Int32) 12;
rOStm << pAct->GetPoint();
nCount++;
}
@@ -1470,25 +1470,25 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
if(bLineJoin)
{
- rOStm << (INT16) GDI_LINEJOIN_ACTION;
- rOStm << (INT32) 6;
- rOStm << (INT16) rInfo.GetLineJoin();
+ rOStm << (sal_Int16) GDI_LINEJOIN_ACTION;
+ rOStm << (sal_Int32) 6;
+ rOStm << (sal_Int16) rInfo.GetLineJoin();
}
if(bLineDashDot)
{
- rOStm << (INT16) GDI_LINEDASHDOT_ACTION;
- rOStm << (INT32) 4 + 16;
- rOStm << (INT16)rInfo.GetDashCount();
- rOStm << (INT32)rInfo.GetDashLen();
- rOStm << (INT16)rInfo.GetDotCount();
- rOStm << (INT32)rInfo.GetDotLen();
- rOStm << (INT32)rInfo.GetDistance();
+ rOStm << (sal_Int16) GDI_LINEDASHDOT_ACTION;
+ rOStm << (sal_Int32) 4 + 16;
+ rOStm << (sal_Int16)rInfo.GetDashCount();
+ rOStm << (sal_Int32)rInfo.GetDashLen();
+ rOStm << (sal_Int16)rInfo.GetDotCount();
+ rOStm << (sal_Int32)rInfo.GetDotLen();
+ rOStm << (sal_Int32)rInfo.GetDistance();
}
}
- rOStm << (INT16) GDI_LINE_ACTION;
- rOStm << (INT32) 20;
+ rOStm << (sal_Int16) GDI_LINE_ACTION;
+ rOStm << (sal_Int32) 20;
rOStm << pAct->GetStartPoint();
rOStm << pAct->GetEndPoint();
nCount++;
@@ -1515,11 +1515,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaRectAction* pAct = (MetaRectAction*) pAction;
- rOStm << (INT16) GDI_RECT_ACTION;
- rOStm << (INT32) 28;
+ rOStm << (sal_Int16) GDI_RECT_ACTION;
+ rOStm << (sal_Int32) 28;
ImplWriteRect( rOStm, pAct->GetRect() );
- rOStm << (INT32) 0;
- rOStm << (INT32) 0;
+ rOStm << (sal_Int32) 0;
+ rOStm << (sal_Int32) 0;
nCount++;
}
break;
@@ -1528,11 +1528,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaRoundRectAction* pAct = (MetaRoundRectAction*) pAction;
- rOStm << (INT16) GDI_RECT_ACTION;
- rOStm << (INT32) 28;
+ rOStm << (sal_Int16) GDI_RECT_ACTION;
+ rOStm << (sal_Int32) 28;
ImplWriteRect( rOStm, pAct->GetRect() );
- rOStm << (INT32) pAct->GetHorzRound();
- rOStm << (INT32) pAct->GetVertRound();
+ rOStm << (sal_Int32) pAct->GetHorzRound();
+ rOStm << (sal_Int32) pAct->GetVertRound();
nCount++;
}
break;
@@ -1541,8 +1541,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaEllipseAction* pAct = (MetaEllipseAction*) pAction;
- rOStm << (INT16) GDI_ELLIPSE_ACTION;
- rOStm << (INT32) 20;
+ rOStm << (sal_Int16) GDI_ELLIPSE_ACTION;
+ rOStm << (sal_Int32) 20;
ImplWriteRect( rOStm, pAct->GetRect() );
nCount++;
}
@@ -1552,8 +1552,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaArcAction* pAct = (MetaArcAction*) pAction;
- rOStm << (INT16) GDI_ARC_ACTION;
- rOStm << (INT32) 36;
+ rOStm << (sal_Int16) GDI_ARC_ACTION;
+ rOStm << (sal_Int32) 36;
ImplWriteRect( rOStm, pAct->GetRect() );
rOStm << pAct->GetStartPoint();
rOStm << pAct->GetEndPoint();
@@ -1565,8 +1565,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaPieAction* pAct = (MetaPieAction*) pAction;
- rOStm << (INT16) GDI_PIE_ACTION;
- rOStm << (INT32) 36;
+ rOStm << (sal_Int16) GDI_PIE_ACTION;
+ rOStm << (sal_Int32) 36;
ImplWriteRect( rOStm, pAct->GetRect() );
rOStm << pAct->GetStartPoint();
rOStm << pAct->GetEndPoint();
@@ -1579,13 +1579,13 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaChordAction* pAct = (MetaChordAction*) pAction;
Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(),
pAct->GetEndPoint(), POLY_CHORD );
- const USHORT nPoints = aChordPoly.GetSize();
+ const sal_uInt16 nPoints = aChordPoly.GetSize();
- rOStm << (INT16) GDI_POLYGON_ACTION;
- rOStm << (INT32) ( 8 + ( nPoints << 3 ) );
- rOStm << (INT32) nPoints;
+ rOStm << (sal_Int16) GDI_POLYGON_ACTION;
+ rOStm << (sal_Int32) ( 8 + ( nPoints << 3 ) );
+ rOStm << (sal_Int32) nPoints;
- for( USHORT n = 0; n < nPoints; n++ )
+ for( sal_uInt16 n = 0; n < nPoints; n++ )
rOStm << aChordPoly[ n ];
nCount++;
}
@@ -1601,7 +1601,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
Polygon aSimplePoly;
pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly);
const LineInfo& rInfo = pAct->GetLineInfo();
- const USHORT nPoints(aSimplePoly.GetSize());
+ const sal_uInt16 nPoints(aSimplePoly.GetSize());
const bool bFatLine(!rInfo.IsDefault() && (LINE_NONE != rInfo.GetStyle()));
const bool bLineJoin(bFatLine && basegfx::B2DLINEJOIN_ROUND != rInfo.GetLineJoin());
const bool bLineDashDot(LINE_DASH == rInfo.GetStyle());
@@ -1613,28 +1613,28 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
if(bLineJoin)
{
- rOStm << (INT16) GDI_LINEJOIN_ACTION;
- rOStm << (INT32) 6;
- rOStm << (INT16) rInfo.GetLineJoin();
+ rOStm << (sal_Int16) GDI_LINEJOIN_ACTION;
+ rOStm << (sal_Int32) 6;
+ rOStm << (sal_Int16) rInfo.GetLineJoin();
}
}
if(bLineDashDot)
{
- rOStm << (INT16) GDI_LINEDASHDOT_ACTION;
- rOStm << (INT32) 4 + 16;
- rOStm << (INT16)rInfo.GetDashCount();
- rOStm << (INT32)rInfo.GetDashLen();
- rOStm << (INT16)rInfo.GetDotCount();
- rOStm << (INT32)rInfo.GetDotLen();
- rOStm << (INT32)rInfo.GetDistance();
+ rOStm << (sal_Int16) GDI_LINEDASHDOT_ACTION;
+ rOStm << (sal_Int32) 4 + 16;
+ rOStm << (sal_Int16)rInfo.GetDashCount();
+ rOStm << (sal_Int32)rInfo.GetDashLen();
+ rOStm << (sal_Int16)rInfo.GetDotCount();
+ rOStm << (sal_Int32)rInfo.GetDotLen();
+ rOStm << (sal_Int32)rInfo.GetDistance();
}
- rOStm << (INT16) GDI_POLYLINE_ACTION;
- rOStm << (INT32) ( 8 + ( nPoints << 3 ) );
- rOStm << (INT32) nPoints;
+ rOStm << (sal_Int16) GDI_POLYLINE_ACTION;
+ rOStm << (sal_Int32) ( 8 + ( nPoints << 3 ) );
+ rOStm << (sal_Int32) nPoints;
- for( USHORT n = 0; n < nPoints; n++ )
+ for( sal_uInt16 n = 0; n < nPoints; n++ )
{
rOStm << aSimplePoly[ n ];
}
@@ -1673,13 +1673,13 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// a polygon representing the curve as good as possible
Polygon aSimplePoly;
pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly);
- const USHORT nPoints(aSimplePoly.GetSize());
+ const sal_uInt16 nPoints(aSimplePoly.GetSize());
- rOStm << (INT16) GDI_POLYGON_ACTION;
- rOStm << (INT32) ( 8 + ( nPoints << 3 ) );
- rOStm << (INT32) nPoints;
+ rOStm << (sal_Int16) GDI_POLYGON_ACTION;
+ rOStm << (sal_Int32) ( 8 + ( nPoints << 3 ) );
+ rOStm << (sal_Int32) nPoints;
- for( USHORT n = 0; n < nPoints; n++ )
+ for( sal_uInt16 n = 0; n < nPoints; n++ )
rOStm << aSimplePoly[ n ];
nCount++;
@@ -1710,17 +1710,17 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaTextAction* pAct = (MetaTextAction*) pAction;
String aUniText( pAct->GetText() );
ByteString aText( aUniText, rActualCharSet );
- const ULONG nStrLen = aText.Len();
+ const sal_uLong nStrLen = aText.Len();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
nCount++;
- rOStm << (INT16) GDI_TEXT_ACTION;
- rOStm << (INT32) ( 24 + ( nStrLen + 1 ) );
+ rOStm << (sal_Int16) GDI_TEXT_ACTION;
+ rOStm << (sal_Int32) ( 24 + ( nStrLen + 1 ) );
rOStm << pAct->GetPoint();
- rOStm << (INT32) pAct->GetIndex();
- rOStm << (INT32) pAct->GetLen();
- rOStm << (INT32) nStrLen;
+ rOStm << (sal_Int32) pAct->GetIndex();
+ rOStm << (sal_Int32) pAct->GetLen();
+ rOStm << (sal_Int32) nStrLen;
rOStm.Write( aText.GetBuffer(), nStrLen + 1 );
nCount++;
}
@@ -1731,9 +1731,9 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaTextArrayAction* pAct = (MetaTextArrayAction*)pAction;
ByteString aText( pAct->GetText(), rActualCharSet );
String aUniText( pAct->GetText(), pAct->GetIndex(), pAct->GetLen() );
- ULONG nAryLen;
- ULONG nLen = pAct->GetLen();
- const ULONG nTextLen = aText.Len();
+ sal_uLong nAryLen;
+ sal_uLong nLen = pAct->GetLen();
+ const sal_uLong nTextLen = aText.Len();
sal_Int32* pDXArray = pAct->GetDXArray();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
@@ -1752,17 +1752,17 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
else
nAryLen = nLen; // #105987# Write out all of DX array
- rOStm << (INT16) GDI_TEXTARRAY_ACTION;
- rOStm << (INT32) ( 28 + ( nLen + 1 ) + ( nAryLen * 4 ) );
+ rOStm << (sal_Int16) GDI_TEXTARRAY_ACTION;
+ rOStm << (sal_Int32) ( 28 + ( nLen + 1 ) + ( nAryLen * 4 ) );
rOStm << pAct->GetPoint();
- rOStm << (INT32) 0;
- rOStm << (INT32) nLen;
- rOStm << (INT32) nLen;
- rOStm << (INT32) nAryLen;
+ rOStm << (sal_Int32) 0;
+ rOStm << (sal_Int32) nLen;
+ rOStm << (sal_Int32) nLen;
+ rOStm << (sal_Int32) nAryLen;
rOStm.Write( aText.GetBuffer()+pAct->GetIndex(), nLen + 1 );
- for( ULONG n = 0UL ; n < nAryLen; n++ )
- rOStm << (INT32) pDXArray[ n ];
+ for( sal_uLong n = 0UL ; n < nAryLen; n++ )
+ rOStm << (sal_Int32) pDXArray[ n ];
nCount++;
}
@@ -1773,18 +1773,18 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
String aUniText( pAct->GetText() );
ByteString aText( aUniText, rActualCharSet );
- const ULONG nStrLen = aText.Len();
+ const sal_uLong nStrLen = aText.Len();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
nCount++;
- rOStm << (INT16) GDI_STRETCHTEXT_ACTION;
- rOStm << (INT32) ( 28 + ( nStrLen + 1 ) );
+ rOStm << (sal_Int16) GDI_STRETCHTEXT_ACTION;
+ rOStm << (sal_Int32) ( 28 + ( nStrLen + 1 ) );
rOStm << pAct->GetPoint();
- rOStm << (INT32) pAct->GetIndex();
- rOStm << (INT32) pAct->GetLen();
- rOStm << (INT32) nStrLen;
- rOStm << (INT32) pAct->GetWidth();
+ rOStm << (sal_Int32) pAct->GetIndex();
+ rOStm << (sal_Int32) pAct->GetLen();
+ rOStm << (sal_Int32) nStrLen;
+ rOStm << (sal_Int32) pAct->GetWidth();
rOStm.Write( aText.GetBuffer(), nStrLen + 1 );
nCount++;
}
@@ -1794,8 +1794,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaBmpAction* pAct = (MetaBmpAction*) pAction;
- rOStm << (INT16) GDI_BITMAP_ACTION;
- rOStm << (INT32) 12;
+ rOStm << (sal_Int16) GDI_BITMAP_ACTION;
+ rOStm << (sal_Int32) 12;
rOStm << pAct->GetPoint();
rOStm << pAct->GetBitmap();
nCount++;
@@ -1806,8 +1806,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaBmpScaleAction* pAct = (MetaBmpScaleAction*) pAction;
- rOStm << (INT16) GDI_BITMAPSCALE_ACTION;
- rOStm << (INT32) 20;
+ rOStm << (sal_Int16) GDI_BITMAPSCALE_ACTION;
+ rOStm << (sal_Int32) 20;
rOStm << pAct->GetPoint();
rOStm << pAct->GetSize();
rOStm << pAct->GetBitmap();
@@ -1819,8 +1819,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaBmpScalePartAction* pAct = (MetaBmpScalePartAction*) pAction;
- rOStm << (INT16) GDI_BITMAPSCALEPART_ACTION;
- rOStm << (INT32) 36;
+ rOStm << (sal_Int16) GDI_BITMAPSCALEPART_ACTION;
+ rOStm << (sal_Int32) 36;
rOStm << pAct->GetDestPoint();
rOStm << pAct->GetDestSize();
rOStm << pAct->GetSrcPoint();
@@ -1835,8 +1835,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaBmpExAction* pAct = (MetaBmpExAction*) pAction;
const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
- rOStm << (INT16) GDI_BITMAP_ACTION;
- rOStm << (INT32) 12;
+ rOStm << (sal_Int16) GDI_BITMAP_ACTION;
+ rOStm << (sal_Int32) 12;
rOStm << pAct->GetPoint();
rOStm << aBmp;
nCount++;
@@ -1848,8 +1848,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction;
const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
- rOStm << (INT16) GDI_BITMAPSCALE_ACTION;
- rOStm << (INT32) 20;
+ rOStm << (sal_Int16) GDI_BITMAPSCALE_ACTION;
+ rOStm << (sal_Int32) 20;
rOStm << pAct->GetPoint();
rOStm << pAct->GetSize();
rOStm << aBmp;
@@ -1862,8 +1862,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaBmpExScalePartAction* pAct = (MetaBmpExScalePartAction*) pAction;
const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
- rOStm << (INT16) GDI_BITMAPSCALEPART_ACTION;
- rOStm << (INT32) 36;
+ rOStm << (sal_Int16) GDI_BITMAPSCALEPART_ACTION;
+ rOStm << (sal_Int32) 36;
rOStm << pAct->GetDestPoint();
rOStm << pAct->GetDestSize();
rOStm << pAct->GetSrcPoint();
@@ -1878,18 +1878,18 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaGradientAction* pAct = (MetaGradientAction*) pAction;
const Gradient& rGrad = pAct->GetGradient();
- rOStm << (INT16) GDI_GRADIENT_ACTION;
- rOStm << (INT32) 46;
+ rOStm << (sal_Int16) GDI_GRADIENT_ACTION;
+ rOStm << (sal_Int32) 46;
ImplWriteRect( rOStm, pAct->GetRect() );
- rOStm << (INT16) rGrad.GetStyle();
+ rOStm << (sal_Int16) rGrad.GetStyle();
ImplWriteColor( rOStm, rGrad.GetStartColor() );
ImplWriteColor( rOStm, rGrad.GetEndColor() );
- rOStm << (INT16) rGrad.GetAngle();
- rOStm << (INT16) rGrad.GetBorder();
- rOStm << (INT16) rGrad.GetOfsX();
- rOStm << (INT16) rGrad.GetOfsY();
- rOStm << (INT16) rGrad.GetStartIntensity();
- rOStm << (INT16) rGrad.GetEndIntensity();
+ rOStm << (sal_Int16) rGrad.GetAngle();
+ rOStm << (sal_Int16) rGrad.GetBorder();
+ rOStm << (sal_Int16) rGrad.GetOfsX();
+ rOStm << (sal_Int16) rGrad.GetOfsY();
+ rOStm << (sal_Int16) rGrad.GetStartIntensity();
+ rOStm << (sal_Int16) rGrad.GetEndIntensity();
nCount++;
}
break;
@@ -1897,10 +1897,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_GRADIENTEX_ACTION ):
{
const MetaGradientExAction* pA = (MetaGradientExAction*) pAction;
- ULONG nOldPos, nNewPos;
+ sal_uLong nOldPos, nNewPos;
// write RefPoint comment
- rOStm << (INT16) GDI_GRADIENTEX_COMMENT;
+ rOStm << (sal_Int16) GDI_GRADIENTEX_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -1908,12 +1908,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// write data
rOStm << pA->GetPolyPolygon() << pA->GetGradient();
- rOStm << (INT32) 0; // number of actions that follow this comment
+ rOStm << (sal_Int32) 0; // number of actions that follow this comment
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos );
rOStm.Seek( nNewPos );
nCount++;
@@ -1929,11 +1929,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
ImplWriteLineColor( rOStm, rColor, 1 );
ImplWriteFillColor( rOStm, rColor, 1 );
- rOStm << (INT16) GDI_RECT_ACTION;
- rOStm << (INT32) 28;
+ rOStm << (sal_Int16) GDI_RECT_ACTION;
+ rOStm << (sal_Int32) 28;
ImplWriteRect( rOStm, pAct->GetRect() );
- rOStm << (INT32) 0;
- rOStm << (INT32) 0;
+ rOStm << (sal_Int32) 0;
+ rOStm << (sal_Int32) 0;
ImplWritePopAction( rOStm );
nCount += 5;
@@ -1946,18 +1946,18 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
const Region& rRegion = pAct->GetRegion();
Rectangle aClipRect;
- rOStm << (INT16) GDI_CLIPREGION_ACTION;
- rOStm << (INT32) 24;
+ rOStm << (sal_Int16) GDI_CLIPREGION_ACTION;
+ rOStm << (sal_Int32) 24;
if( pAct->IsClipping() )
{
aClipRect = rRegion.GetBoundRect();
- rOStm << (INT16) 1;
+ rOStm << (sal_Int16) 1;
}
else
- rOStm << (INT16) 0;
+ rOStm << (sal_Int16) 0;
- rOStm << (INT16) 0;
+ rOStm << (sal_Int16) 0;
ImplWriteRect( rOStm, aClipRect );
if( pAct->IsClipping() )
@@ -1971,8 +1971,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaISectRectClipRegionAction* pAct = (MetaISectRectClipRegionAction*) pAction;
- rOStm << (INT16) GDI_ISECTCLIPREGION_ACTION;
- rOStm << (INT32) 20;
+ rOStm << (sal_Int16) GDI_ISECTCLIPREGION_ACTION;
+ rOStm << (sal_Int32) 20;
rOStm << pAct->GetRect();
nCount++;
}
@@ -1982,10 +1982,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaMoveClipRegionAction* pAct = (MetaMoveClipRegionAction*) pAction;
- rOStm << (INT16) GDI_MOVECLIPREGION_ACTION;
- rOStm << (INT32) 12;
- rOStm << (INT32) pAct->GetHorzMove();
- rOStm << (INT32) pAct->GetVertMove();
+ rOStm << (sal_Int16) GDI_MOVECLIPREGION_ACTION;
+ rOStm << (sal_Int32) 12;
+ rOStm << (sal_Int32) pAct->GetHorzMove();
+ rOStm << (sal_Int32) pAct->GetVertMove();
nCount++;
}
break;
@@ -2056,8 +2056,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaMapModeAction* pAct = (MetaMapModeAction*) pAction;
- rOStm << (INT16) GDI_MAPMODE_ACTION;
- rOStm << (INT32) 30;
+ rOStm << (sal_Int16) GDI_MAPMODE_ACTION;
+ rOStm << (sal_Int32) 30;
ImplWriteMapMode( rOStm, pAct->GetMapMode() );
nCount++;
}
@@ -2094,7 +2094,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
if( ( pAct->GetRasterOp() != ROP_0 ) && ( pAct->GetRasterOp() != ROP_1 ) )
{
- INT16 nRasterOp;
+ sal_Int16 nRasterOp;
// Falls vorher ROP_0/1 gesetzt war, alten
// Zustand durch Pop erst wieder herstellen
@@ -2102,7 +2102,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
ImplWritePopAction( rOStm );
rSaveVDev.Pop();
- rRop_0_1 = FALSE;
+ rRop_0_1 = sal_False;
nCount++;
}
@@ -2134,7 +2134,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
ImplWriteRasterOpAction( rOStm, 0 );
- rRop_0_1 = TRUE;
+ rRop_0_1 = sal_True;
nCount += 4;
}
}
@@ -2143,12 +2143,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TRANSPARENT_ACTION ):
{
const PolyPolygon& rPolyPoly = ( (MetaTransparentAction*) pAction )->GetPolyPolygon();
- const INT16 nTrans = ( (MetaTransparentAction*) pAction )->GetTransparence();
- const INT16 nBrushStyle = ( nTrans < 38 ) ? 8 : ( nTrans < 63 ) ? 9 : 10;
- ULONG nOldPos, nNewPos;
+ const sal_Int16 nTrans = ( (MetaTransparentAction*) pAction )->GetTransparence();
+ const sal_Int16 nBrushStyle = ( nTrans < 38 ) ? 8 : ( nTrans < 63 ) ? 9 : 10;
+ sal_uLong nOldPos, nNewPos;
// write transparence comment
- rOStm << (INT16) GDI_TRANSPARENT_COMMENT;
+ rOStm << (sal_Int16) GDI_TRANSPARENT_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2157,12 +2157,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// write comment data
rOStm << rPolyPoly;
rOStm << nTrans;
- rOStm << (INT32) 15; // number of actions that follow this comment
+ rOStm << (sal_Int32) 15; // number of actions that follow this comment
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos );
rOStm.Seek( nNewPos );
{
@@ -2208,10 +2208,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
const Point& rPos = pA->GetPoint();
const Size& rSize = pA->GetSize();
const Gradient& rGradient = pA->GetGradient();
- ULONG nOldPos, nNewPos;
+ sal_uLong nOldPos, nNewPos;
// write RefPoint comment
- rOStm << (INT16) GDI_FLOATTRANSPARENT_COMMENT;
+ rOStm << (sal_Int16) GDI_FLOATTRANSPARENT_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2223,12 +2223,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos + 4 );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos + 4 );
rOStm.Seek( ( nOldPos = nNewPos ) + 4 );
{
// write actions for float transparence
- ULONG nAddCount;
+ sal_uLong nAddCount;
GDIMetaFile aMtf( rTransMtf );
const Size aSrcSize( rTransMtf.GetPrefSize() );
Point aSrcPt( rTransMtf.GetPrefMapMode().GetOrigin() );
@@ -2250,7 +2250,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
nAddCount = ImplWriteActions( rOStm, aMtf, rSaveVDev, rRop_0_1, rLineCol, rLineColStack, rActualCharSet );
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) nAddCount;
+ rOStm << (sal_Int32) nAddCount;
rOStm.Seek( nNewPos );
#ifdef CVTSVM_WRITE_SUBACTIONCOUNT
@@ -2267,10 +2267,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
const MetaHatchAction* pA = (MetaHatchAction*) pAction;
const PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
const Hatch& rHatch = pA->GetHatch();
- ULONG nOldPos, nNewPos, nAddCount;
+ sal_uLong nOldPos, nNewPos, nAddCount;
// write hatch comment
- rOStm << (INT16) GDI_HATCH_COMMENT;
+ rOStm << (sal_Int16) GDI_HATCH_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2283,7 +2283,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos + 4 );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos + 4 );
rOStm.Seek( ( nOldPos = nNewPos ) + 4 );
{
@@ -2295,7 +2295,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
nAddCount = ImplWriteActions( rOStm, aTmpMtf, rSaveVDev, rRop_0_1, rLineCol, rLineColStack, rActualCharSet );
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) nAddCount;
+ rOStm << (sal_Int32) nAddCount;
rOStm.Seek( nNewPos );
#ifdef CVTSVM_WRITE_SUBACTIONCOUNT
@@ -2311,11 +2311,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
const MetaRefPointAction* pA = (MetaRefPointAction*) pAction;
const Point& rRefPoint = pA->GetRefPoint();
- const BOOL bSet = pA->IsSetting();
- ULONG nOldPos, nNewPos;
+ const sal_Bool bSet = pA->IsSetting();
+ sal_uLong nOldPos, nNewPos;
// write RefPoint comment
- rOStm << (INT16) GDI_REFPOINT_COMMENT;
+ rOStm << (sal_Int16) GDI_REFPOINT_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2323,12 +2323,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// write data
rOStm << rRefPoint << bSet;
- rOStm << (INT32) 0; // number of actions that follow this comment
+ rOStm << (sal_Int32) 0; // number of actions that follow this comment
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos );
rOStm.Seek( nNewPos );
nCount++;
@@ -2339,11 +2339,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
const MetaTextLineColorAction* pA = (MetaTextLineColorAction*) pAction;
const Color& rColor = pA->GetColor();
- const BOOL bSet = pA->IsSetting();
- ULONG nOldPos, nNewPos;
+ const sal_Bool bSet = pA->IsSetting();
+ sal_uLong nOldPos, nNewPos;
// write RefPoint comment
- rOStm << (INT16) GDI_TEXTLINECOLOR_COMMENT;
+ rOStm << (sal_Int16) GDI_TEXTLINECOLOR_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2351,12 +2351,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// write data
rOStm << rColor << bSet;
- rOStm << (INT32) 0; // number of actions that follow this comment
+ rOStm << (sal_Int32) 0; // number of actions that follow this comment
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos );
rOStm.Seek( nNewPos );
nCount++;
@@ -2375,10 +2375,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
const long nWidth = pA->GetWidth();
const FontStrikeout eStrikeout = pA->GetStrikeout();
const FontUnderline eUnderline = pA->GetUnderline();
- ULONG nOldPos, nNewPos;
+ sal_uLong nOldPos, nNewPos;
// write RefPoint comment
- rOStm << (INT16) GDI_TEXTLINE_COMMENT;
+ rOStm << (sal_Int16) GDI_TEXTLINE_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2388,12 +2388,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
rOStm << rStartPt << nWidth <<
static_cast<sal_uInt32>(eStrikeout) <<
static_cast<sal_uInt32>(eUnderline);
- rOStm << (INT32) 0; // number of actions that follow this comment
+ rOStm << (sal_Int32) 0; // number of actions that follow this comment
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos );
rOStm.Seek( nNewPos );
nCount++;
@@ -2407,10 +2407,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
const MetaCommentAction* pA = (MetaCommentAction*) pAction;
const sal_uInt32 nDataSize = pA->GetDataSize();
- ULONG nOldPos, nNewPos;
+ sal_uLong nOldPos, nNewPos;
// write RefPoint comment
- rOStm << (INT16) GDI_COMMENT_COMMENT;
+ rOStm << (sal_Int16) GDI_COMMENT_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2422,12 +2422,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
if( nDataSize )
rOStm.Write( pA->GetData(), nDataSize );
- rOStm << (INT32) 0; // number of actions that follow this comment
+ rOStm << (sal_Int32) 0; // number of actions that follow this comment
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos );
rOStm.Seek( nNewPos );
nCount++;
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index e26c15309c54..4a3a2f265374 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -170,7 +170,7 @@ void Impl_Font::AskConfig()
String aShortName;
String aFamilyName;
- ULONG nType = 0;
+ sal_uLong nType = 0;
FontWeight eWeight = WEIGHT_DONTKNOW;
FontWidth eWidthType = WIDTH_DONTKNOW;
String aMapName = maFamilyName;
@@ -347,7 +347,7 @@ void Font::SetFillColor( const Color& rColor )
// -----------------------------------------------------------------------
-void Font::SetTransparent( BOOL bTransparent )
+void Font::SetTransparent( sal_Bool bTransparent )
{
DBG_CHKTHIS( Font, NULL );
@@ -484,7 +484,7 @@ void Font::SetOrientation( short nOrientation )
// -----------------------------------------------------------------------
-void Font::SetVertical( BOOL bVertical )
+void Font::SetVertical( sal_Bool bVertical )
{
DBG_CHKTHIS( Font, NULL );
@@ -510,7 +510,7 @@ void Font::SetKerning( FontKerning nKerning )
// -----------------------------------------------------------------------
-BOOL Font::IsKerning() const
+sal_Bool Font::IsKerning() const
{
return (mpImplFont->mnKerning & KERNING_FONTSPECIFIC) != 0;
}
@@ -556,7 +556,7 @@ void Font::SetItalic( FontItalic eItalic )
// -----------------------------------------------------------------------
-void Font::SetOutline( BOOL bOutline )
+void Font::SetOutline( sal_Bool bOutline )
{
DBG_CHKTHIS( Font, NULL );
@@ -569,7 +569,7 @@ void Font::SetOutline( BOOL bOutline )
// -----------------------------------------------------------------------
-void Font::SetShadow( BOOL bShadow )
+void Font::SetShadow( sal_Bool bShadow )
{
DBG_CHKTHIS( Font, NULL );
@@ -647,7 +647,7 @@ void Font::SetEmphasisMark( FontEmphasisMark eEmphasisMark )
// -----------------------------------------------------------------------
-void Font::SetWordLineMode( BOOL bWordLine )
+void Font::SetWordLineMode( sal_Bool bWordLine )
{
DBG_CHKTHIS( Font, NULL );
@@ -688,17 +688,17 @@ Font& Font::operator=( const Font& rFont )
// -----------------------------------------------------------------------
-BOOL Font::operator==( const Font& rFont ) const
+sal_Bool Font::operator==( const Font& rFont ) const
{
DBG_CHKTHIS( Font, NULL );
DBG_CHKOBJ( &rFont, Font, NULL );
if( mpImplFont == rFont.mpImplFont )
- return TRUE;
+ return sal_True;
if( *mpImplFont == *rFont.mpImplFont )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -773,9 +773,9 @@ void Font::GetFontAttributes( ImplFontAttributes& rAttrs ) const
SvStream& operator>>( SvStream& rIStm, Impl_Font& rImpl_Font )
{
VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
- BOOL bTmp;
- BYTE nTmp8;
+ sal_uInt16 nTmp16;
+ sal_Bool bTmp;
+ sal_uInt8 nTmp8;
rIStm.ReadByteString( rImpl_Font.maFamilyName, rIStm.GetStreamCharSet() );
rIStm.ReadByteString( rImpl_Font.maStyleName, rIStm.GetStreamCharSet() );
@@ -824,31 +824,31 @@ SvStream& operator<<( SvStream& rOStm, const Impl_Font& rImpl_Font )
rOStm.WriteByteString( rImpl_Font.maStyleName, rOStm.GetStreamCharSet() );
rOStm << rImpl_Font.maSize;
- rOStm << (UINT16) GetStoreCharSet( rImpl_Font.meCharSet );
- rOStm << (UINT16) rImpl_Font.meFamily;
- rOStm << (UINT16) rImpl_Font.mePitch;
- rOStm << (UINT16) rImpl_Font.meWeight;
- rOStm << (UINT16) rImpl_Font.meUnderline;
- rOStm << (UINT16) rImpl_Font.meStrikeout;
- rOStm << (UINT16) rImpl_Font.meItalic;
- rOStm << (UINT16) rImpl_Font.meLanguage;
- rOStm << (UINT16) rImpl_Font.meWidthType;
+ rOStm << (sal_uInt16) GetStoreCharSet( rImpl_Font.meCharSet );
+ rOStm << (sal_uInt16) rImpl_Font.meFamily;
+ rOStm << (sal_uInt16) rImpl_Font.mePitch;
+ rOStm << (sal_uInt16) rImpl_Font.meWeight;
+ rOStm << (sal_uInt16) rImpl_Font.meUnderline;
+ rOStm << (sal_uInt16) rImpl_Font.meStrikeout;
+ rOStm << (sal_uInt16) rImpl_Font.meItalic;
+ rOStm << (sal_uInt16) rImpl_Font.meLanguage;
+ rOStm << (sal_uInt16) rImpl_Font.meWidthType;
rOStm << rImpl_Font.mnOrientation;
- rOStm << (BOOL) rImpl_Font.mbWordLine;
- rOStm << (BOOL) rImpl_Font.mbOutline;
- rOStm << (BOOL) rImpl_Font.mbShadow;
- rOStm << (BYTE) rImpl_Font.mnKerning;
+ rOStm << (sal_Bool) rImpl_Font.mbWordLine;
+ rOStm << (sal_Bool) rImpl_Font.mbOutline;
+ rOStm << (sal_Bool) rImpl_Font.mbShadow;
+ rOStm << (sal_uInt8) rImpl_Font.mnKerning;
// new in version 2
- rOStm << (BYTE) rImpl_Font.meRelief;
- rOStm << (UINT16) rImpl_Font.meCJKLanguage;
- rOStm << (BOOL) rImpl_Font.mbVertical;
- rOStm << (UINT16) rImpl_Font.meEmphasisMark;
+ rOStm << (sal_uInt8) rImpl_Font.meRelief;
+ rOStm << (sal_uInt16) rImpl_Font.meCJKLanguage;
+ rOStm << (sal_Bool) rImpl_Font.mbVertical;
+ rOStm << (sal_uInt16) rImpl_Font.meEmphasisMark;
// new in version 3
- rOStm << (UINT16) rImpl_Font.meOverline;
+ rOStm << (sal_uInt16) rImpl_Font.meOverline;
return rOStm;
}
@@ -1085,7 +1085,7 @@ Font Font::identifyFont( const void* i_pBuffer, sal_uInt32 i_nSize )
// TODO: reformat
const Color& Font::GetColor() const { return mpImplFont->maColor; }
const Color& Font::GetFillColor() const { return mpImplFont->maFillColor; }
-BOOL Font::IsTransparent() const { return mpImplFont->mbTransparent; }
+sal_Bool Font::IsTransparent() const { return mpImplFont->mbTransparent; }
FontAlign Font::GetAlign() const { return mpImplFont->meAlign; }
const String& Font::GetName() const { return mpImplFont->maFamilyName; }
const String& Font::GetStyleName() const { return mpImplFont->maStyleName; }
@@ -1098,19 +1098,19 @@ rtl_TextEncoding Font::GetCharSet() const { return mpImplFont->meCharSet; }
LanguageType Font::GetLanguage() const { return mpImplFont->meLanguage; }
LanguageType Font::GetCJKContextLanguage() const { return mpImplFont->meCJKLanguage; }
short Font::GetOrientation() const { return mpImplFont->mnOrientation; }
-BOOL Font::IsVertical() const { return mpImplFont->mbVertical; }
+sal_Bool Font::IsVertical() const { return mpImplFont->mbVertical; }
FontKerning Font::GetKerning() const { return mpImplFont->mnKerning; }
FontPitch Font::GetPitch() const { return mpImplFont->GetPitch(); }
FontWeight Font::GetWeight() const { return mpImplFont->GetWeight(); }
FontWidth Font::GetWidthType() const { return mpImplFont->GetWidthType(); }
FontItalic Font::GetItalic() const { return mpImplFont->GetItalic(); }
FontFamily Font::GetFamily() const { return mpImplFont->GetFamily(); }
-BOOL Font::IsOutline() const { return mpImplFont->mbOutline; }
-BOOL Font::IsShadow() const { return mpImplFont->mbShadow; }
+sal_Bool Font::IsOutline() const { return mpImplFont->mbOutline; }
+sal_Bool Font::IsShadow() const { return mpImplFont->mbShadow; }
FontRelief Font::GetRelief() const { return mpImplFont->meRelief; }
FontUnderline Font::GetUnderline() const { return mpImplFont->meUnderline; }
FontUnderline Font::GetOverline() const { return mpImplFont->meOverline; }
FontStrikeout Font::GetStrikeout() const { return mpImplFont->meStrikeout; }
FontEmphasisMark Font::GetEmphasisMark() const { return mpImplFont->meEmphasisMark; }
-BOOL Font::IsWordLineMode() const { return mpImplFont->mbWordLine; }
-BOOL Font::IsSameInstance( const Font& rFont ) const { return (mpImplFont == rFont.mpImplFont); }
+sal_Bool Font::IsWordLineMode() const { return mpImplFont->mbWordLine; }
+sal_Bool Font::IsSameInstance( const Font& rFont ) const { return (mpImplFont == rFont.mpImplFont); }
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index d36a18a1afba..23da138d23a2 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -46,7 +46,7 @@
// - Defines -
// -----------
-#define GAMMA( _def_cVal, _def_InvGamma ) ((BYTE)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
+#define GAMMA( _def_cVal, _def_InvGamma ) ((sal_uInt8)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
// --------------------------
// - Color exchange structs -
@@ -54,9 +54,9 @@
struct ImplColAdjustParam
{
- BYTE* pMapR;
- BYTE* pMapG;
- BYTE* pMapB;
+ sal_uInt8* pMapR;
+ sal_uInt8* pMapG;
+ sal_uInt8* pMapB;
};
struct ImplBmpAdjustParam
@@ -67,7 +67,7 @@ struct ImplBmpAdjustParam
short nChannelGPercent;
short nChannelBPercent;
double fGamma;
- BOOL bInvert;
+ sal_Bool bInvert;
};
// -----------------------------------------------------------------------------
@@ -98,22 +98,22 @@ struct ImplBmpMonoParam
struct ImplColReplaceParam
{
- ULONG* pMinR;
- ULONG* pMaxR;
- ULONG* pMinG;
- ULONG* pMaxG;
- ULONG* pMinB;
- ULONG* pMaxB;
+ sal_uLong* pMinR;
+ sal_uLong* pMaxR;
+ sal_uLong* pMinG;
+ sal_uLong* pMaxG;
+ sal_uLong* pMinB;
+ sal_uLong* pMaxB;
const Color* pDstCols;
- ULONG nCount;
+ sal_uLong nCount;
};
struct ImplBmpReplaceParam
{
const Color* pSrcCols;
const Color* pDstCols;
- ULONG nCount;
- const ULONG* pTols;
+ sal_uLong nCount;
+ const sal_uLong* pTols;
};
@@ -124,9 +124,9 @@ struct ImplBmpReplaceParam
struct ImpLabel
{
String aLabelName;
- ULONG nActionPos;
+ sal_uLong nActionPos;
- ImpLabel( const String& rLabelName, ULONG _nActionPos ) :
+ ImpLabel( const String& rLabelName, sal_uLong _nActionPos ) :
aLabelName( rLabelName ),
nActionPos( _nActionPos ) {}
};
@@ -144,13 +144,13 @@ public:
~ImpLabelList();
void ImplInsert( ImpLabel* p ) { Insert( p, LIST_APPEND ); }
- ImpLabel* ImplRemove( ULONG nPos ) { return (ImpLabel*) Remove( nPos ); }
+ ImpLabel* ImplRemove( sal_uLong nPos ) { return (ImpLabel*) Remove( nPos ); }
void ImplReplace( ImpLabel* p ) { Replace( (void*)p ); }
ImpLabel* ImplFirst() { return (ImpLabel*) First(); }
ImpLabel* ImplNext() { return (ImpLabel*) Next(); }
- ImpLabel* ImplGetLabel( ULONG nPos ) const { return (ImpLabel*) GetObject( nPos ); }
- ULONG ImplGetLabelPos( const String& rLabelName );
- ULONG ImplCount() const { return Count(); }
+ ImpLabel* ImplGetLabel( sal_uLong nPos ) const { return (ImpLabel*) GetObject( nPos ); }
+ sal_uLong ImplGetLabelPos( const String& rLabelName );
+ sal_uLong ImplCount() const { return Count(); }
};
// ------------------------------------------------------------------------
@@ -172,9 +172,9 @@ ImpLabelList::~ImpLabelList()
// ------------------------------------------------------------------------
-ULONG ImpLabelList::ImplGetLabelPos( const String& rLabelName )
+sal_uLong ImpLabelList::ImplGetLabelPos( const String& rLabelName )
{
- ULONG nLabelPos = METAFILE_LABEL_NOTFOUND;
+ sal_uLong nLabelPos = METAFILE_LABEL_NOTFOUND;
for( ImpLabel* pLabel = ImplFirst(); pLabel; pLabel = ImplNext() )
{
@@ -199,8 +199,8 @@ GDIMetaFile::GDIMetaFile() :
pNext ( NULL ),
pOutDev ( NULL ),
pLabelList ( NULL ),
- bPause ( FALSE ),
- bRecord ( FALSE )
+ bPause ( sal_False ),
+ bRecord ( sal_False )
{
}
@@ -214,8 +214,8 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
pPrev ( rMtf.pPrev ),
pNext ( rMtf.pNext ),
pOutDev ( NULL ),
- bPause ( FALSE ),
- bRecord ( FALSE )
+ bPause ( sal_False ),
+ bRecord ( sal_False )
{
// RefCount der MetaActions erhoehen
for( void* pAct = First(); pAct; pAct = Next() )
@@ -231,7 +231,7 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
Record( rMtf.pOutDev );
if ( rMtf.bPause )
- Pause( TRUE );
+ Pause( sal_True );
}
}
@@ -267,15 +267,15 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
pPrev = rMtf.pPrev;
pNext = rMtf.pNext;
pOutDev = NULL;
- bPause = FALSE;
- bRecord = FALSE;
+ bPause = sal_False;
+ bRecord = sal_False;
if( rMtf.bRecord )
{
Record( rMtf.pOutDev );
if( rMtf.bPause )
- Pause( TRUE );
+ Pause( sal_True );
}
}
@@ -284,24 +284,24 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
// ------------------------------------------------------------------------
-BOOL GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const
+sal_Bool GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const
{
- const ULONG nObjCount = Count();
- BOOL bRet = FALSE;
+ const sal_uLong nObjCount = Count();
+ sal_Bool bRet = sal_False;
if( this == &rMtf )
- bRet = TRUE;
+ bRet = sal_True;
else if( rMtf.GetActionCount() == nObjCount &&
rMtf.GetPrefSize() == aPrefSize &&
rMtf.GetPrefMapMode() == aPrefMapMode )
{
- bRet = TRUE;
+ bRet = sal_True;
- for( ULONG n = 0UL; n < nObjCount; n++ )
+ for( sal_uLong n = 0UL; n < nObjCount; n++ )
{
if( GetObject( n ) != rMtf.GetObject( n ) )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -314,22 +314,22 @@ BOOL GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const
sal_Bool GDIMetaFile::IsEqual( const GDIMetaFile& rMtf ) const
{
- const ULONG nObjCount = Count();
- BOOL bRet = FALSE;
+ const sal_uLong nObjCount = Count();
+ sal_Bool bRet = sal_False;
if( this == &rMtf )
- bRet = TRUE;
+ bRet = sal_True;
else if( rMtf.GetActionCount() == nObjCount &&
rMtf.GetPrefSize() == aPrefSize &&
rMtf.GetPrefMapMode() == aPrefMapMode )
{
- bRet = TRUE;
+ bRet = sal_True;
- for( ULONG n = 0UL; n < nObjCount; n++ )
+ for( sal_uLong n = 0UL; n < nObjCount; n++ )
{
if(!((MetaAction*)GetObject( n ))->IsEqual(*((MetaAction*)rMtf.GetObject( n ))))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -356,7 +356,7 @@ void GDIMetaFile::Clear()
// ------------------------------------------------------------------------
-void GDIMetaFile::Linker( OutputDevice* pOut, BOOL bLink )
+void GDIMetaFile::Linker( OutputDevice* pOut, sal_Bool bLink )
{
if( bLink )
{
@@ -405,23 +405,23 @@ void GDIMetaFile::Record( OutputDevice* pOut )
Last();
pOutDev = pOut;
- bRecord = TRUE;
- Linker( pOut, TRUE );
+ bRecord = sal_True;
+ Linker( pOut, sal_True );
}
// ------------------------------------------------------------------------
-void GDIMetaFile::Play( GDIMetaFile& rMtf, ULONG nPos )
+void GDIMetaFile::Play( GDIMetaFile& rMtf, sal_uLong nPos )
{
if ( !bRecord && !rMtf.bRecord )
{
MetaAction* pAction = GetCurAction();
- const ULONG nObjCount = Count();
+ const sal_uLong nObjCount = Count();
if( nPos > nObjCount )
nPos = nObjCount;
- for( ULONG nCurPos = GetCurPos(); nCurPos < nPos; nCurPos++ )
+ for( sal_uLong nCurPos = GetCurPos(); nCurPos < nPos; nCurPos++ )
{
if( !Hook() )
{
@@ -436,13 +436,13 @@ void GDIMetaFile::Play( GDIMetaFile& rMtf, ULONG nPos )
// ------------------------------------------------------------------------
-void GDIMetaFile::Play( OutputDevice* pOut, ULONG nPos )
+void GDIMetaFile::Play( OutputDevice* pOut, sal_uLong nPos )
{
if( !bRecord )
{
MetaAction* pAction = GetCurAction();
- const ULONG nObjCount = Count();
- ULONG i = 0, nSyncCount = ( pOut->GetOutDevType() == OUTDEV_WINDOW ) ? 0x000000ff : 0xffffffff;
+ const sal_uLong nObjCount = Count();
+ sal_uLong i = 0, nSyncCount = ( pOut->GetOutDevType() == OUTDEV_WINDOW ) ? 0x000000ff : 0xffffffff;
if( nPos > nObjCount )
nPos = nObjCount;
@@ -455,7 +455,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, ULONG nPos )
pOut->SetLayoutMode( 0 );
pOut->SetDigitLanguage( 0 );
- for( ULONG nCurPos = GetCurPos(); nCurPos < nPos; nCurPos++ )
+ for( sal_uLong nCurPos = GetCurPos(); nCurPos < nPos; nCurPos++ )
{
if( !Hook() )
{
@@ -476,7 +476,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, ULONG nPos )
// ------------------------------------------------------------------------
void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
- const Size& rSize, ULONG nPos )
+ const Size& rSize, sal_uLong nPos )
{
Region aDrawClipRegion;
MapMode aDrawMap( GetPrefMapMode() );
@@ -537,19 +537,19 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
// ------------------------------------------------------------------------
-void GDIMetaFile::Pause( BOOL _bPause )
+void GDIMetaFile::Pause( sal_Bool _bPause )
{
if( bRecord )
{
if( _bPause )
{
if( !bPause )
- Linker( pOutDev, FALSE );
+ Linker( pOutDev, sal_False );
}
else
{
if( bPause )
- Linker( pOutDev, TRUE );
+ Linker( pOutDev, sal_True );
}
bPause = _bPause;
@@ -562,12 +562,12 @@ void GDIMetaFile::Stop()
{
if( bRecord )
{
- bRecord = FALSE;
+ bRecord = sal_False;
if( !bPause )
- Linker( pOutDev, FALSE );
+ Linker( pOutDev, sal_False );
else
- bPause = FALSE;
+ bPause = sal_False;
}
}
@@ -589,7 +589,7 @@ void GDIMetaFile::WindEnd()
// ------------------------------------------------------------------------
-void GDIMetaFile::Wind( ULONG nActionPos )
+void GDIMetaFile::Wind( sal_uLong nActionPos )
{
if( !bRecord )
Seek( nActionPos );
@@ -626,7 +626,7 @@ void GDIMetaFile::AddAction( MetaAction* pAction )
// ------------------------------------------------------------------------
-void GDIMetaFile::AddAction( MetaAction* pAction, ULONG nPos )
+void GDIMetaFile::AddAction( MetaAction* pAction, sal_uLong nPos )
{
Insert( pAction, nPos );
@@ -640,7 +640,7 @@ void GDIMetaFile::AddAction( MetaAction* pAction, ULONG nPos )
// ------------------------------------------------------------------------
// @since #110496#
-void GDIMetaFile::RemoveAction( ULONG nPos )
+void GDIMetaFile::RemoveAction( sal_uLong nPos )
{
Remove( nPos );
@@ -650,14 +650,14 @@ void GDIMetaFile::RemoveAction( ULONG nPos )
// ------------------------------------------------------------------------
-MetaAction* GDIMetaFile::CopyAction( ULONG nPos ) const
+MetaAction* GDIMetaFile::CopyAction( sal_uLong nPos ) const
{
return ( (MetaAction*) GetObject( nPos ) )->Clone();
}
// ------------------------------------------------------------------------
-ULONG GDIMetaFile::GetActionPos( const String& rLabel )
+sal_uLong GDIMetaFile::GetActionPos( const String& rLabel )
{
ImpLabel* pLabel = NULL;
@@ -671,9 +671,9 @@ ULONG GDIMetaFile::GetActionPos( const String& rLabel )
// ------------------------------------------------------------------------
-BOOL GDIMetaFile::InsertLabel( const String& rLabel, ULONG nActionPos )
+sal_Bool GDIMetaFile::InsertLabel( const String& rLabel, sal_uLong nActionPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !pLabelList )
pLabelList = new ImpLabelList;
@@ -681,7 +681,7 @@ BOOL GDIMetaFile::InsertLabel( const String& rLabel, ULONG nActionPos )
if( pLabelList->ImplGetLabelPos( rLabel ) == METAFILE_LABEL_NOTFOUND )
{
pLabelList->ImplInsert( new ImpLabel( rLabel, nActionPos ) );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -693,7 +693,7 @@ void GDIMetaFile::RemoveLabel( const String& rLabel )
{
if( pLabelList )
{
- const ULONG nLabelPos = pLabelList->ImplGetLabelPos( rLabel );
+ const sal_uLong nLabelPos = pLabelList->ImplGetLabelPos( rLabel );
if( nLabelPos != METAFILE_LABEL_NOTFOUND )
delete pLabelList->ImplRemove( nLabelPos );
@@ -706,7 +706,7 @@ void GDIMetaFile::RenameLabel( const String& rLabel, const String& rNewLabel )
{
if( pLabelList )
{
- const ULONG nLabelPos = pLabelList->ImplGetLabelPos( rLabel );
+ const sal_uLong nLabelPos = pLabelList->ImplGetLabelPos( rLabel );
if ( nLabelPos != METAFILE_LABEL_NOTFOUND )
pLabelList->ImplGetLabel( nLabelPos )->aLabelName = rNewLabel;
@@ -715,14 +715,14 @@ void GDIMetaFile::RenameLabel( const String& rLabel, const String& rNewLabel )
// ------------------------------------------------------------------------
-ULONG GDIMetaFile::GetLabelCount() const
+sal_uLong GDIMetaFile::GetLabelCount() const
{
return( pLabelList ? pLabelList->ImplCount() : 0UL );
}
// ------------------------------------------------------------------------
-String GDIMetaFile::GetLabel( ULONG nLabel )
+String GDIMetaFile::GetLabel( sal_uLong nLabel )
{
String aString;
@@ -739,12 +739,12 @@ String GDIMetaFile::GetLabel( ULONG nLabel )
// ------------------------------------------------------------------------
-BOOL GDIMetaFile::SaveStatus()
+sal_Bool GDIMetaFile::SaveStatus()
{
if ( bRecord )
{
if ( bPause )
- Linker( pOutDev, TRUE );
+ Linker( pOutDev, sal_True );
AddAction( new MetaLineColorAction( pOutDev->GetLineColor(),
pOutDev->IsLineColor() ) );
@@ -765,22 +765,22 @@ BOOL GDIMetaFile::SaveStatus()
pOutDev->IsClipRegion() ) );
if ( bPause )
- Linker( pOutDev, FALSE );
+ Linker( pOutDev, sal_False );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// ------------------------------------------------------------------------
-BOOL GDIMetaFile::Mirror( ULONG nMirrorFlags )
+sal_Bool GDIMetaFile::Mirror( sal_uLong nMirrorFlags )
{
const Size aOldPrefSize( GetPrefSize() );
long nMoveX, nMoveY;
double fScaleX, fScaleY;
- BOOL bRet;
+ sal_Bool bRet;
if( nMirrorFlags & MTF_MIRROR_HORZ )
nMoveX = VOS_ABS( aOldPrefSize.Width() ) - 1, fScaleX = -1.0;
@@ -797,10 +797,10 @@ BOOL GDIMetaFile::Mirror( ULONG nMirrorFlags )
Scale( fScaleX, fScaleY );
Move( nMoveX, nMoveY );
SetPrefSize( aOldPrefSize );
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -813,7 +813,7 @@ void GDIMetaFile::Move( long nX, long nY )
Size aOffset( aBaseOffset );
VirtualDevice aMapVDev;
- aMapVDev.EnableOutput( FALSE );
+ aMapVDev.EnableOutput( sal_False );
aMapVDev.SetMapMode( GetPrefMapMode() );
for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
@@ -847,7 +847,7 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
Size aOffset( aBaseOffset );
VirtualDevice aMapVDev;
- aMapVDev.EnableOutput( FALSE );
+ aMapVDev.EnableOutput( sal_False );
aMapVDev.SetReferenceDevice( nDPIX, nDPIY );
aMapVDev.SetMapMode( GetPrefMapMode() );
@@ -921,7 +921,7 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect )
Rectangle aCurRect( i_rClipRect );
VirtualDevice aMapVDev;
- aMapVDev.EnableOutput( FALSE );
+ aMapVDev.EnableOutput( sal_False );
aMapVDev.SetMapMode( GetPrefMapMode() );
for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
@@ -941,7 +941,7 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect )
Region aNewReg( aCurRect );
if( pOldAct->IsClipping() )
aNewReg.Intersect( pOldAct->GetRegion() );
- MetaClipRegionAction* pNewAct = new MetaClipRegionAction( aNewReg, TRUE );
+ MetaClipRegionAction* pNewAct = new MetaClipRegionAction( aNewReg, sal_True );
Replace( pNewAct, GetCurPos() );
pOldAct->Delete();
}
@@ -996,7 +996,7 @@ void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf,
// #105055# Generate comment, GradientEx and Gradient actions
// (within DrawGradient)
VirtualDevice aVDev( rMapDev, 0 );
- aVDev.EnableOutput( FALSE );
+ aVDev.EnableOutput( sal_False );
GDIMetaFile aGradMtf;
aGradMtf.Record( &aVDev );
@@ -1031,7 +1031,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
aPoly.Rotate( Point(), fSin, fCos );
- aMapVDev.EnableOutput( FALSE );
+ aMapVDev.EnableOutput( sal_False );
aMapVDev.SetMapMode( GetPrefMapMode() );
const Rectangle aNewBound( aPoly.GetBoundRect() );
@@ -1044,7 +1044,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
for( MetaAction* pAction = (MetaAction*) First(); pAction; pAction = (MetaAction*) Next() )
{
- const USHORT nActionType = pAction->GetType();
+ const sal_uInt16 nActionType = pAction->GetType();
switch( nActionType )
{
@@ -1261,7 +1261,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
// skip everything, except gradientex action
while( pAction )
{
- const USHORT nType = pAction->GetType();
+ const sal_uInt16 nType = pAction->GetType();
if( META_GRADIENTEX_ACTION == nType )
{
@@ -1312,7 +1312,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
aStroke.setPath( ImplGetRotatedPolygon( aPath, aRotAnchor, aRotOffset, fSin, fCos ) );
aDest << aStroke;
aMtf.AddAction( new MetaCommentAction( "XPATHSTROKE_SEQ_BEGIN", 0,
- static_cast<const BYTE*>( aDest.GetData()), aDest.Tell() ) );
+ static_cast<const sal_uInt8*>( aDest.GetData()), aDest.Tell() ) );
}
else
{
@@ -1323,7 +1323,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
aFill.setPath( ImplGetRotatedPolyPolygon( aPath, aRotAnchor, aRotOffset, fSin, fCos ) );
aDest << aFill;
aMtf.AddAction( new MetaCommentAction( "XPATHFILL_SEQ_BEGIN", 0,
- static_cast<const BYTE*>( aDest.GetData()), aDest.Tell() ) );
+ static_cast<const sal_uInt8*>( aDest.GetData()), aDest.Tell() ) );
}
}
}
@@ -1343,7 +1343,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
MetaHatchAction* pAct = (MetaHatchAction*) pAction;
Hatch aHatch( pAct->GetHatch() );
- aHatch.SetAngle( aHatch.GetAngle() + (USHORT) nAngle10 );
+ aHatch.SetAngle( aHatch.GetAngle() + (sal_uInt16) nAngle10 );
aMtf.AddAction( new MetaHatchAction( ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ),
aHatch ) );
}
@@ -1388,7 +1388,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction;
if( pAct->IsClipping() && pAct->GetRegion().HasPolyPolygon() )
- aMtf.AddAction( new MetaClipRegionAction( Region( ImplGetRotatedPolyPolygon( pAct->GetRegion().GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ), TRUE ) );
+ aMtf.AddAction( new MetaClipRegionAction( Region( ImplGetRotatedPolyPolygon( pAct->GetRegion().GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ), sal_True ) );
else
{
pAction->Duplicate();
@@ -1431,7 +1431,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
MetaFontAction* pAct = (MetaFontAction*) pAction;
Font aFont( pAct->GetFont() );
- aFont.SetOrientation( aFont.GetOrientation() + (USHORT) nAngle10 );
+ aFont.SetOrientation( aFont.GetOrientation() + (sal_uInt16) nAngle10 );
aMtf.AddAction( new MetaFontAction( aFont ) );
}
break;
@@ -1498,17 +1498,17 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
GDIMetaFile aMtf;
VirtualDevice aMapVDev( i_rReference );
- aMapVDev.EnableOutput( FALSE );
+ aMapVDev.EnableOutput( sal_False );
aMapVDev.SetMapMode( GetPrefMapMode() );
std::vector<Rectangle> aClipStack( 1, Rectangle() );
- std::vector<USHORT> aPushFlagStack;
+ std::vector<sal_uInt16> aPushFlagStack;
Rectangle aBound;
for( MetaAction* pAction = (MetaAction*) First(); pAction; pAction = (MetaAction*) Next() )
{
- const USHORT nActionType = pAction->GetType();
+ const sal_uInt16 nActionType = pAction->GetType();
switch( nActionType )
{
@@ -1934,7 +1934,7 @@ BitmapEx GDIMetaFile::ImplBmpAdjustFnc( const BitmapEx& rBmpEx, const void* pBmp
Color GDIMetaFile::ImplColConvertFnc( const Color& rColor, const void* pColParam )
{
- BYTE cLum = rColor.GetLuminance();
+ sal_uInt8 cLum = rColor.GetLuminance();
if( MTF_CONVERSION_1BIT_THRESHOLD == ( (const ImplColConvertParam*) pColParam )->eConversion )
cLum = ( cLum < 128 ) ? 0 : 255;
@@ -1985,9 +1985,9 @@ BitmapEx GDIMetaFile::ImplBmpMonoFnc( const BitmapEx& rBmpEx, const void* pBmpPa
Color GDIMetaFile::ImplColReplaceFnc( const Color& rColor, const void* pColParam )
{
- const ULONG nR = rColor.GetRed(), nG = rColor.GetGreen(), nB = rColor.GetBlue();
+ const sal_uLong nR = rColor.GetRed(), nG = rColor.GetGreen(), nB = rColor.GetBlue();
- for( ULONG i = 0; i < ( (const ImplColReplaceParam*) pColParam )->nCount; i++ )
+ for( sal_uLong i = 0; i < ( (const ImplColReplaceParam*) pColParam )->nCount; i++ )
{
if( ( ( (const ImplColReplaceParam*) pColParam )->pMinR[ i ] <= nR ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMaxR[ i ] >= nR ) &&
@@ -2027,7 +2027,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
for( MetaAction* pAction = (MetaAction*) First(); pAction; pAction = (MetaAction*) Next() )
{
- const USHORT nType = pAction->GetType();
+ const sal_uInt16 nType = pAction->GetType();
switch( nType )
{
@@ -2045,7 +2045,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
if( !pAct->IsSetting() )
pAct->Duplicate();
else
- pAct = new MetaLineColorAction( pFncCol( pAct->GetColor(), pColParam ), TRUE );
+ pAct = new MetaLineColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True );
aMtf.Insert( pAct, LIST_APPEND );
}
@@ -2058,7 +2058,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
if( !pAct->IsSetting() )
pAct->Duplicate();
else
- pAct = new MetaFillColorAction( pFncCol( pAct->GetColor(), pColParam ), TRUE );
+ pAct = new MetaFillColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True );
aMtf.Insert( pAct, LIST_APPEND );
}
@@ -2078,7 +2078,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
if( !pAct->IsSetting() )
pAct->Duplicate();
else
- pAct = new MetaTextFillColorAction( pFncCol( pAct->GetColor(), pColParam ), TRUE );
+ pAct = new MetaTextFillColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True );
aMtf.Insert( pAct, LIST_APPEND );
}
@@ -2091,7 +2091,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
if( !pAct->IsSetting() )
pAct->Duplicate();
else
- pAct = new MetaTextLineColorAction( pFncCol( pAct->GetColor(), pColParam ), TRUE );
+ pAct = new MetaTextLineColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True );
aMtf.Insert( pAct, LIST_APPEND );
}
@@ -2104,7 +2104,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
if( !pAct->IsSetting() )
pAct->Duplicate();
else
- pAct = new MetaOverlineColorAction( pFncCol( pAct->GetColor(), pColParam ), TRUE );
+ pAct = new MetaOverlineColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True );
aMtf.Insert( pAct, LIST_APPEND );
}
@@ -2285,7 +2285,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
short nChannelRPercent, short nChannelGPercent,
- short nChannelBPercent, double fGamma, BOOL bInvert )
+ short nChannelBPercent, double fGamma, sal_Bool bInvert )
{
// nothing to do? => return quickly
if( nLuminancePercent || nContrastPercent ||
@@ -2296,9 +2296,9 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
ImplColAdjustParam aColParam;
ImplBmpAdjustParam aBmpParam;
- aColParam.pMapR = new BYTE[ 256 ];
- aColParam.pMapG = new BYTE[ 256 ];
- aColParam.pMapB = new BYTE[ 256 ];
+ aColParam.pMapR = new sal_uInt8[ 256 ];
+ aColParam.pMapG = new sal_uInt8[ 256 ];
+ aColParam.pMapB = new sal_uInt8[ 256 ];
// calculate slope
if( nContrastPercent >= 0 )
@@ -2316,14 +2316,14 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
// calculate gamma value
fGamma = ( fGamma <= 0.0 || fGamma > 10.0 ) ? 1.0 : ( 1.0 / fGamma );
- const BOOL bGamma = ( fGamma != 1.0 );
+ const sal_Bool bGamma = ( fGamma != 1.0 );
// create mapping table
for( long nX = 0L; nX < 256L; nX++ )
{
- aColParam.pMapR[ nX ] = (BYTE) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
- aColParam.pMapG[ nX ] = (BYTE) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
- aColParam.pMapB[ nX ] = (BYTE) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
+ aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
+ aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
+ aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
if( bGamma )
{
@@ -2376,41 +2376,41 @@ void GDIMetaFile::Convert( MtfConversion eConversion )
// ------------------------------------------------------------------------
-void GDIMetaFile::ReplaceColors( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol )
+void GDIMetaFile::ReplaceColors( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol )
{
ReplaceColors( &rSearchColor, &rReplaceColor, 1, &nTol );
}
// ------------------------------------------------------------------------
-void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pReplaceColors, ULONG nColorCount, ULONG* pTols )
+void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, sal_uLong* pTols )
{
ImplColReplaceParam aColParam;
ImplBmpReplaceParam aBmpParam;
- aColParam.pMinR = new ULONG[ nColorCount ];
- aColParam.pMaxR = new ULONG[ nColorCount ];
- aColParam.pMinG = new ULONG[ nColorCount ];
- aColParam.pMaxG = new ULONG[ nColorCount ];
- aColParam.pMinB = new ULONG[ nColorCount ];
- aColParam.pMaxB = new ULONG[ nColorCount ];
+ aColParam.pMinR = new sal_uLong[ nColorCount ];
+ aColParam.pMaxR = new sal_uLong[ nColorCount ];
+ aColParam.pMinG = new sal_uLong[ nColorCount ];
+ aColParam.pMaxG = new sal_uLong[ nColorCount ];
+ aColParam.pMinB = new sal_uLong[ nColorCount ];
+ aColParam.pMaxB = new sal_uLong[ nColorCount ];
- for( ULONG i = 0; i < nColorCount; i++ )
+ for( sal_uLong i = 0; i < nColorCount; i++ )
{
const long nTol = pTols ? ( pTols[ i ] * 255 ) / 100 : 0;
long nVal;
nVal = pSearchColors[ i ].GetRed();
- aColParam.pMinR[ i ] = (ULONG) Max( nVal - nTol, 0L );
- aColParam.pMaxR[ i ] = (ULONG) Min( nVal + nTol, 255L );
+ aColParam.pMinR[ i ] = (sal_uLong) Max( nVal - nTol, 0L );
+ aColParam.pMaxR[ i ] = (sal_uLong) Min( nVal + nTol, 255L );
nVal = pSearchColors[ i ].GetGreen();
- aColParam.pMinG[ i ] = (ULONG) Max( nVal - nTol, 0L );
- aColParam.pMaxG[ i ] = (ULONG) Min( nVal + nTol, 255L );
+ aColParam.pMinG[ i ] = (sal_uLong) Max( nVal - nTol, 0L );
+ aColParam.pMaxG[ i ] = (sal_uLong) Min( nVal + nTol, 255L );
nVal = pSearchColors[ i ].GetBlue();
- aColParam.pMinB[ i ] = (ULONG) Max( nVal - nTol, 0L );
- aColParam.pMaxB[ i ] = (ULONG) Min( nVal + nTol, 255L );
+ aColParam.pMinB[ i ] = (sal_uLong) Max( nVal - nTol, 0L );
+ aColParam.pMaxB[ i ] = (sal_uLong) Min( nVal + nTol, 255L );
}
aColParam.pDstCols = pReplaceColors;
@@ -2450,16 +2450,16 @@ GDIMetaFile GDIMetaFile::GetMonochromeMtf( const Color& rColor ) const
// ------------------------------------------------------------------------
-ULONG GDIMetaFile::GetChecksum() const
+sal_uLong GDIMetaFile::GetChecksum() const
{
GDIMetaFile aMtf;
SvMemoryStream aMemStm( 65535, 65535 );
ImplMetaWriteData aWriteData; aWriteData.meActualCharSet = aMemStm.GetStreamCharSet();
SVBT16 aBT16;
SVBT32 aBT32;
- ULONG nCrc = 0;
+ sal_uLong nCrc = 0;
- for( ULONG i = 0, nObjCount = GetActionCount(); i < nObjCount; i++ )
+ for( sal_uLong i = 0, nObjCount = GetActionCount(); i < nObjCount; i++ )
{
MetaAction* pAction = GetAction( i );
@@ -2730,11 +2730,11 @@ ULONG GDIMetaFile::GetChecksum() const
// ------------------------------------------------------------------------
-ULONG GDIMetaFile::GetSizeBytes() const
+sal_uLong GDIMetaFile::GetSizeBytes() const
{
- ULONG nSizeBytes = 0;
+ sal_uLong nSizeBytes = 0;
- for( ULONG i = 0, nObjCount = GetActionCount(); i < nObjCount; ++i )
+ for( sal_uLong i = 0, nObjCount = GetActionCount(); i < nObjCount; ++i )
{
MetaAction* pAction = GetAction( i );
@@ -2762,7 +2762,7 @@ ULONG GDIMetaFile::GetSizeBytes() const
{
const PolyPolygon& rPolyPoly = ( (MetaPolyPolygonAction*) pAction )->GetPolyPolygon();
- for( USHORT n = 0; n < rPolyPoly.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rPolyPoly.Count(); ++n )
nSizeBytes += ( rPolyPoly[ n ].GetSize() * sizeof( Point ) );
}
break;
@@ -2796,8 +2796,8 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
if( !rIStm.GetError() )
{
char aId[ 7 ];
- ULONG nStmPos = rIStm.Tell();
- USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ sal_uLong nStmPos = rIStm.Tell();
+ sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -2810,8 +2810,8 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
// new format
VersionCompat* pCompat;
MetaAction* pAction;
- UINT32 nStmCompressMode = 0;
- UINT32 nCount = 0;
+ sal_uInt32 nStmCompressMode = 0;
+ sal_uInt32 nCount = 0;
pCompat = new VersionCompat( rIStm, STREAM_READ );
@@ -2825,7 +2825,7 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
ImplMetaReadData aReadData;
aReadData.meActualCharSet = rIStm.GetStreamCharSet();
- for( UINT32 nAction = 0UL; ( nAction < nCount ) && !rIStm.IsEof(); nAction++ )
+ for( sal_uInt32 nAction = 0UL; ( nAction < nCount ) && !rIStm.IsEof(); nAction++ )
{
pAction = MetaAction::ReadMetaAction( rIStm, &aReadData );
@@ -2883,8 +2883,8 @@ SvStream& GDIMetaFile::Read( SvStream& rIStm )
SvStream& GDIMetaFile::Write( SvStream& rOStm )
{
VersionCompat* pCompat;
- const UINT32 nStmCompressMode = rOStm.GetCompressMode();
- USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ const sal_uInt32 nStmCompressMode = rOStm.GetCompressMode();
+ sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rOStm.Write( "VCLMTF", 6 );
@@ -2894,7 +2894,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
rOStm << nStmCompressMode;
rOStm << aPrefMapMode;
rOStm << aPrefSize;
- rOStm << (UINT32) GetActionCount();
+ rOStm << (sal_uInt32) GetActionCount();
delete pCompat;
@@ -2915,7 +2915,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
// ------------------------------------------------------------------------
-BOOL GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
+sal_Bool GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
BitmapEx& rBmpEx,
const BitmapEx* pOverlay,
const Rectangle* pOverlayRect ) const
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index 60ad94a63273..1a476f1b5420 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -64,7 +64,7 @@ GfxLink::GfxLink( const GfxLink& rGfxLink ) :
// ------------------------------------------------------------------------
-GfxLink::GfxLink( BYTE* pBuf, sal_uInt32 nSize, GfxLinkType nType, BOOL bOwns ) :
+GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, sal_Bool bOwns ) :
mpImpData( new ImpGfxLink )
{
DBG_ASSERT( (pBuf != NULL && nSize) || (!bOwns && nSize == 0),
@@ -166,7 +166,7 @@ GfxLinkType GfxLink::GetType() const
// ------------------------------------------------------------------------
-BOOL GfxLink::IsNative() const
+sal_Bool GfxLink::IsNative() const
{
return( meType >= GFX_LINK_FIRST_NATIVE_ID && meType <= GFX_LINK_LAST_NATIVE_ID );
}
@@ -180,7 +180,7 @@ sal_uInt32 GfxLink::GetDataSize() const
// ------------------------------------------------------------------------
-const BYTE* GfxLink::GetData() const
+const sal_uInt8* GfxLink::GetData() const
{
if( IsSwappedOut() )
( (GfxLink*) this )->SwapIn();
@@ -234,20 +234,20 @@ bool GfxLink::IsPrefMapModeValid()
// ------------------------------------------------------------------------
-BOOL GfxLink::LoadNative( Graphic& rGraphic )
+sal_Bool GfxLink::LoadNative( Graphic& rGraphic )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( IsNative() && mnBufSize )
{
- const BYTE* pData = GetData();
+ const sal_uInt8* pData = GetData();
if( pData )
{
SvMemoryStream aMemStm;
- ULONG nCvtType;
+ sal_uLong nCvtType;
- aMemStm.SetBuffer( (char*) pData, mnBufSize, FALSE, mnBufSize );
+ aMemStm.SetBuffer( (char*) pData, mnBufSize, sal_False, mnBufSize );
switch( meType )
{
@@ -263,7 +263,7 @@ BOOL GfxLink::LoadNative( Graphic& rGraphic )
}
if( nCvtType && ( GraphicConverter::Import( aMemStm, rGraphic, nCvtType ) == ERRCODE_NONE ) )
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -310,7 +310,7 @@ void GfxLink::SwapIn()
// ------------------------------------------------------------------------
-BOOL GfxLink::ExportNative( SvStream& rOStream ) const
+sal_Bool GfxLink::ExportNative( SvStream& rOStream ) const
{
if( GetDataSize() )
{
@@ -330,7 +330,7 @@ SvStream& operator<<( SvStream& rOStream, const GfxLink& rGfxLink )
VersionCompat* pCompat = new VersionCompat( rOStream, STREAM_WRITE, 2 );
// Version 1
- rOStream << (UINT16) rGfxLink.GetType() << rGfxLink.GetDataSize() << rGfxLink.GetUserId();
+ rOStream << (sal_uInt16) rGfxLink.GetType() << rGfxLink.GetDataSize() << rGfxLink.GetUserId();
// Version 2
rOStream << rGfxLink.GetPrefSize() << rGfxLink.GetPrefMapMode();
@@ -356,8 +356,8 @@ SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink)
MapMode aMapMode;
sal_uInt32 nSize;
sal_uInt32 nUserId;
- UINT16 nType;
- BYTE* pBuf;
+ sal_uInt16 nType;
+ sal_uInt8* pBuf;
bool bMapAndSizeValid( false );
VersionCompat* pCompat = new VersionCompat( rIStream, STREAM_READ );
@@ -372,10 +372,10 @@ SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink)
delete pCompat;
- pBuf = new BYTE[ nSize ];
+ pBuf = new sal_uInt8[ nSize ];
rIStream.Read( pBuf, nSize );
- rGfxLink = GfxLink( pBuf, nSize, (GfxLinkType) nType, TRUE );
+ rGfxLink = GfxLink( pBuf, nSize, (GfxLinkType) nType, sal_True );
rGfxLink.SetUserId( nUserId );
if( bMapAndSizeValid )
@@ -391,7 +391,7 @@ SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink)
// - ImpSwap -
// -----------
-ImpSwap::ImpSwap( BYTE* pData, ULONG nDataSize ) :
+ImpSwap::ImpSwap( sal_uInt8* pData, sal_uLong nDataSize ) :
mnDataSize( nDataSize ),
mnRefCount( 1UL )
{
@@ -429,16 +429,16 @@ ImpSwap::~ImpSwap()
// ------------------------------------------------------------------------
-BYTE* ImpSwap::GetData() const
+sal_uInt8* ImpSwap::GetData() const
{
- BYTE* pData;
+ sal_uInt8* pData;
if( IsSwapped() )
{
SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( maURL, STREAM_READWRITE );
if( pIStm )
{
- pData = new BYTE[ mnDataSize ];
+ pData = new sal_uInt8[ mnDataSize ];
pIStm->Read( pData, mnDataSize );
sal_Bool bError = ( ERRCODE_NONE != pIStm->GetError() );
delete pIStm;
@@ -459,7 +459,7 @@ BYTE* ImpSwap::GetData() const
void ImpSwap::WriteTo( SvStream& rOStm ) const
{
- BYTE* pData = GetData();
+ sal_uInt8* pData = GetData();
if( pData )
{
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index 9856e2213d85..9f4f91c38e60 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -174,7 +174,7 @@ void Gradient::SetEndColor( const Color& rColor )
// -----------------------------------------------------------------------
-void Gradient::SetAngle( USHORT nAngle )
+void Gradient::SetAngle( sal_uInt16 nAngle )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -184,7 +184,7 @@ void Gradient::SetAngle( USHORT nAngle )
// -----------------------------------------------------------------------
-void Gradient::SetBorder( USHORT nBorder )
+void Gradient::SetBorder( sal_uInt16 nBorder )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -194,7 +194,7 @@ void Gradient::SetBorder( USHORT nBorder )
// -----------------------------------------------------------------------
-void Gradient::SetOfsX( USHORT nOfsX )
+void Gradient::SetOfsX( sal_uInt16 nOfsX )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -204,7 +204,7 @@ void Gradient::SetOfsX( USHORT nOfsX )
// -----------------------------------------------------------------------
-void Gradient::SetOfsY( USHORT nOfsY )
+void Gradient::SetOfsY( sal_uInt16 nOfsY )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -214,7 +214,7 @@ void Gradient::SetOfsY( USHORT nOfsY )
// -----------------------------------------------------------------------
-void Gradient::SetStartIntensity( USHORT nIntens )
+void Gradient::SetStartIntensity( sal_uInt16 nIntens )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -224,7 +224,7 @@ void Gradient::SetStartIntensity( USHORT nIntens )
// -----------------------------------------------------------------------
-void Gradient::SetEndIntensity( USHORT nIntens )
+void Gradient::SetEndIntensity( sal_uInt16 nIntens )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -234,7 +234,7 @@ void Gradient::SetEndIntensity( USHORT nIntens )
// -----------------------------------------------------------------------
-void Gradient::SetSteps( USHORT nSteps )
+void Gradient::SetSteps( sal_uInt16 nSteps )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -265,13 +265,13 @@ Gradient& Gradient::operator=( const Gradient& rGradient )
// -----------------------------------------------------------------------
-BOOL Gradient::operator==( const Gradient& rGradient ) const
+sal_Bool Gradient::operator==( const Gradient& rGradient ) const
{
DBG_CHKTHIS( Gradient, NULL );
DBG_CHKOBJ( &rGradient, Gradient, NULL );
if ( mpImplGradient == rGradient.mpImplGradient )
- return TRUE;
+ return sal_True;
if ( (mpImplGradient->meStyle == rGradient.mpImplGradient->meStyle) ||
(mpImplGradient->mnAngle == rGradient.mpImplGradient->mnAngle) ||
@@ -283,15 +283,15 @@ BOOL Gradient::operator==( const Gradient& rGradient ) const
(mpImplGradient->mnIntensityEnd == rGradient.mpImplGradient->mnIntensityEnd) ||
(mpImplGradient->maStartColor == rGradient.mpImplGradient->maStartColor) ||
(mpImplGradient->maEndColor == rGradient.mpImplGradient->maEndColor) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
SvStream& operator>>( SvStream& rIStm, Impl_Gradient& rImpl_Gradient )
{
VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
rIStm >> nTmp16; rImpl_Gradient.meStyle = (GradientStyle) nTmp16;
@@ -314,7 +314,7 @@ SvStream& operator<<( SvStream& rOStm, const Impl_Gradient& rImpl_Gradient )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
- rOStm << (UINT16) rImpl_Gradient.meStyle <<
+ rOStm << (sal_uInt16) rImpl_Gradient.meStyle <<
rImpl_Gradient.maStartColor <<
rImpl_Gradient.maEndColor <<
rImpl_Gradient.mnAngle <<
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 790c3d43bb85..1a8201706212 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -59,11 +59,11 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText,
Font* pFont, const Bitmap* pBitmap, const BitmapEx* pBitmapEx,
const Point& rDestPt, const Size& rDestSize )
{
- USHORT nPixel = (USHORT) pOutDev->PixelToLogic( Size( 1, 1 ) ).Width();
- USHORT nPixelWidth = nPixel;
+ sal_uInt16 nPixel = (sal_uInt16) pOutDev->PixelToLogic( Size( 1, 1 ) ).Width();
+ sal_uInt16 nPixelWidth = nPixel;
Point aPoint( rDestPt.X() + nPixelWidth, rDestPt.Y() + nPixelWidth );
Size aSize( rDestSize.Width() - ( nPixelWidth << 1 ), rDestSize.Height() - ( nPixelWidth << 1 ) );
- BOOL bFilled = ( pBitmap != NULL || pBitmapEx != NULL || pFont != NULL );
+ sal_Bool bFilled = ( pBitmap != NULL || pBitmapEx != NULL || pFont != NULL );
Rectangle aBorderRect( aPoint, aSize );
pOutDev->Push();
@@ -138,8 +138,8 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText,
if ( nTextWidth <= nWidth || aSz.Height() <= nThreshold )
{
- USHORT nStart = 0;
- USHORT nLen = 0;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nLen = 0;
while( nStart < pText->Len() && pText->GetChar( nStart ) == ' ' )
nStart++;
@@ -147,7 +147,7 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText,
nLen++;
while( nStart < pText->Len() && nLines-- )
{
- USHORT nNext = nLen;
+ sal_uInt16 nNext = nLen;
do
{
while ( nStart+nNext < pText->Len() && pText->GetChar( nStart+nNext ) == ' ' )
@@ -161,14 +161,14 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText,
}
while ( nStart+nNext < pText->Len() );
- USHORT n = nLen;
+ sal_uInt16 n = nLen;
nTextWidth = pOutDev->GetTextWidth( *pText, nStart, n );
while( nTextWidth > aSize.Width() )
nTextWidth = pOutDev->GetTextWidth( *pText, nStart, --n );
pOutDev->DrawText( aPoint, *pText, nStart, n );
aPoint.Y() += nTextHeight;
- nStart = sal::static_int_cast<USHORT>(nStart + nLen);
+ nStart = sal::static_int_cast<sal_uInt16>(nStart + nLen);
nLen = nNext-nLen;
while( nStart < pText->Len() && pText->GetChar( nStart ) == ' ' )
{
@@ -334,21 +334,21 @@ Graphic& Graphic::operator=( const Graphic& rGraphic )
// ------------------------------------------------------------------------
-BOOL Graphic::operator==( const Graphic& rGraphic ) const
+sal_Bool Graphic::operator==( const Graphic& rGraphic ) const
{
return( *mpImpGraphic == *rGraphic.mpImpGraphic );
}
// ------------------------------------------------------------------------
-BOOL Graphic::operator!=( const Graphic& rGraphic ) const
+sal_Bool Graphic::operator!=( const Graphic& rGraphic ) const
{
return( *mpImpGraphic != *rGraphic.mpImpGraphic );
}
// ------------------------------------------------------------------------
-BOOL Graphic::operator!() const
+sal_Bool Graphic::operator!() const
{
return( GRAPHIC_NONE == mpImpGraphic->ImplGetType() );
}
@@ -399,28 +399,28 @@ void Graphic::SetDefaultType()
// ------------------------------------------------------------------------
-BOOL Graphic::IsSupportedGraphic() const
+sal_Bool Graphic::IsSupportedGraphic() const
{
return mpImpGraphic->ImplIsSupportedGraphic();
}
// ------------------------------------------------------------------------
-BOOL Graphic::IsTransparent() const
+sal_Bool Graphic::IsTransparent() const
{
return mpImpGraphic->ImplIsTransparent();
}
// ------------------------------------------------------------------------
-BOOL Graphic::IsAlpha() const
+sal_Bool Graphic::IsAlpha() const
{
return mpImpGraphic->ImplIsAlpha();
}
// ------------------------------------------------------------------------
-BOOL Graphic::IsAnimated() const
+sal_Bool Graphic::IsAnimated() const
{
return mpImpGraphic->ImplIsAnimated();
}
@@ -531,7 +531,7 @@ Size Graphic::GetSizePixel( const OutputDevice* pRefDevice ) const
// ------------------------------------------------------------------
-ULONG Graphic::GetSizeBytes() const
+sal_uLong Graphic::GetSizeBytes() const
{
return mpImpGraphic->ImplGetSizeBytes();
}
@@ -615,7 +615,7 @@ Link Graphic::GetAnimationNotifyHdl() const
// ------------------------------------------------------------------------
-ULONG Graphic::GetAnimationLoopCount() const
+sal_uLong Graphic::GetAnimationLoopCount() const
{
return mpImpGraphic->ImplGetAnimationLoopCount();
}
@@ -650,20 +650,20 @@ void Graphic::SetContext( GraphicReader* pReader )
// ------------------------------------------------------------------------
-USHORT Graphic::GetGraphicsCompressMode( SvStream& rIStm )
+sal_uInt16 Graphic::GetGraphicsCompressMode( SvStream& rIStm )
{
- const ULONG nPos = rIStm.Tell();
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
- UINT32 nTmp32;
- UINT16 nTmp16;
- USHORT nCompressMode = COMPRESSMODE_NONE;
+ const sal_uLong nPos = rIStm.Tell();
+ const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ sal_uInt32 nTmp32;
+ sal_uInt16 nTmp16;
+ sal_uInt16 nCompressMode = COMPRESSMODE_NONE;
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rIStm >> nTmp32;
// is it a swapped graphic with a bitmap?
- rIStm.SeekRel( (nTmp32 == (UINT32) GRAPHIC_BITMAP ) ? 40 : -4 );
+ rIStm.SeekRel( (nTmp32 == (sal_uInt32) GRAPHIC_BITMAP ) ? 40 : -4 );
// try to read bitmap id
rIStm >> nTmp16;
@@ -688,7 +688,7 @@ USHORT Graphic::GetGraphicsCompressMode( SvStream& rIStm )
// ------------------------------------------------------------------------
-void Graphic::SetDocFileName( const String& rName, ULONG nFilePos )
+void Graphic::SetDocFileName( const String& rName, sal_uLong nFilePos )
{
mpImpGraphic->ImplSetDocFileName( rName, nFilePos );
}
@@ -702,14 +702,14 @@ const String& Graphic::GetDocFileName() const
// ------------------------------------------------------------------------
-ULONG Graphic::GetDocFilePos() const
+sal_uLong Graphic::GetDocFilePos() const
{
return mpImpGraphic->ImplGetDocFilePos();
}
// ------------------------------------------------------------------------
-BOOL Graphic::ReadEmbedded( SvStream& rIStream, BOOL bSwap )
+sal_Bool Graphic::ReadEmbedded( SvStream& rIStream, sal_Bool bSwap )
{
ImplTestRefCount();
return mpImpGraphic->ImplReadEmbedded( rIStream, bSwap );
@@ -717,7 +717,7 @@ BOOL Graphic::ReadEmbedded( SvStream& rIStream, BOOL bSwap )
// ------------------------------------------------------------------------
-BOOL Graphic::WriteEmbedded( SvStream& rOStream )
+sal_Bool Graphic::WriteEmbedded( SvStream& rOStream )
{
ImplTestRefCount();
return mpImpGraphic->ImplWriteEmbedded( rOStream );
@@ -725,7 +725,7 @@ BOOL Graphic::WriteEmbedded( SvStream& rOStream )
// ------------------------------------------------------------------------
-BOOL Graphic::SwapOut()
+sal_Bool Graphic::SwapOut()
{
ImplTestRefCount();
return mpImpGraphic->ImplSwapOut();
@@ -733,7 +733,7 @@ BOOL Graphic::SwapOut()
// ------------------------------------------------------------------------
-BOOL Graphic::SwapOut( SvStream* pOStream )
+sal_Bool Graphic::SwapOut( SvStream* pOStream )
{
ImplTestRefCount();
return mpImpGraphic->ImplSwapOut( pOStream );
@@ -741,7 +741,7 @@ BOOL Graphic::SwapOut( SvStream* pOStream )
// ------------------------------------------------------------------------
-BOOL Graphic::SwapIn()
+sal_Bool Graphic::SwapIn()
{
ImplTestRefCount();
return mpImpGraphic->ImplSwapIn();
@@ -749,7 +749,7 @@ BOOL Graphic::SwapIn()
// ------------------------------------------------------------------------
-BOOL Graphic::SwapIn( SvStream* pStrm )
+sal_Bool Graphic::SwapIn( SvStream* pStrm )
{
ImplTestRefCount();
return mpImpGraphic->ImplSwapIn( pStrm );
@@ -757,7 +757,7 @@ BOOL Graphic::SwapIn( SvStream* pStrm )
// ------------------------------------------------------------------------
-BOOL Graphic::IsSwapOut() const
+sal_Bool Graphic::IsSwapOut() const
{
return mpImpGraphic->ImplIsSwapOut();
}
@@ -779,21 +779,21 @@ GfxLink Graphic::GetLink() const
// ------------------------------------------------------------------------
-BOOL Graphic::IsLink() const
+sal_Bool Graphic::IsLink() const
{
return mpImpGraphic->ImplIsLink();
}
// ------------------------------------------------------------------------
-ULONG Graphic::GetChecksum() const
+sal_uLong Graphic::GetChecksum() const
{
return mpImpGraphic->ImplGetChecksum();
}
// ------------------------------------------------------------------------
-BOOL Graphic::ExportNative( SvStream& rOStream ) const
+sal_Bool Graphic::ExportNative( SvStream& rOStream ) const
{
return mpImpGraphic->ImplExportNative( rOStream );
}
diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx
index 83c0cd628cdb..5ef9ed038163 100644
--- a/vcl/source/gdi/graphictools.cxx
+++ b/vcl/source/gdi/graphictools.cxx
@@ -34,7 +34,7 @@
static ::rtl::OString polyToString( const Polygon& rPoly )
{
::rtl::OString aStr;
- USHORT nVertex;
+ sal_uInt16 nVertex;
for(nVertex=0; nVertex<rPoly.GetSize(); ++nVertex)
{
aStr += "(";
@@ -66,7 +66,7 @@ static ::rtl::OString polyToString( const Polygon& rPoly )
static ::rtl::OString polyPolyToString( const PolyPolygon& rPolyPoly )
{
::rtl::OString aStr;
- USHORT nPoly;
+ sal_uInt16 nPoly;
for(nPoly=0; nPoly<rPolyPoly.Count(); ++nPoly)
{
const Polygon& rPoly = rPolyPoly[nPoly];
@@ -327,9 +327,9 @@ SvStream& operator<<( SvStream& rOStm, const SvtGraphicStroke& rClass )
rClass.maEndArrow.Write( rOStm );
rOStm << rClass.mfTransparency;
rOStm << rClass.mfStrokeWidth;
- UINT16 nTmp = sal::static_int_cast<UINT16>( rClass.maCapType );
+ sal_uInt16 nTmp = sal::static_int_cast<sal_uInt16>( rClass.maCapType );
rOStm << nTmp;
- nTmp = sal::static_int_cast<UINT16>( rClass.maJoinType );
+ nTmp = sal::static_int_cast<sal_uInt16>( rClass.maJoinType );
rOStm << nTmp;
rOStm << rClass.mfMiterLimit;
@@ -350,7 +350,7 @@ SvStream& operator>>( SvStream& rIStm, SvtGraphicStroke& rClass )
rClass.maEndArrow.Read( rIStm );
rIStm >> rClass.mfTransparency;
rIStm >> rClass.mfStrokeWidth;
- UINT16 nTmp;
+ sal_uInt16 nTmp;
rIStm >> nTmp;
rClass.maCapType = SvtGraphicStroke::CapType(nTmp);
rIStm >> nTmp;
@@ -706,19 +706,19 @@ SvStream& operator<<( SvStream& rOStm, const SvtGraphicFill& rClass )
rClass.maPath.Write( rOStm );
rOStm << rClass.maFillColor;
rOStm << rClass.mfTransparency;
- UINT16 nTmp = sal::static_int_cast<UINT16>( rClass.maFillRule );
+ sal_uInt16 nTmp = sal::static_int_cast<sal_uInt16>( rClass.maFillRule );
rOStm << nTmp;
- nTmp = sal::static_int_cast<UINT16>( rClass.maFillType );
+ nTmp = sal::static_int_cast<sal_uInt16>( rClass.maFillType );
rOStm << nTmp;
int i;
for(i=0; i<SvtGraphicFill::Transform::MatrixSize; ++i)
rOStm << rClass.maFillTransform.matrix[i];
nTmp = rClass.mbTiling;
rOStm << nTmp;
- nTmp = sal::static_int_cast<UINT16>( rClass.maHatchType );
+ nTmp = sal::static_int_cast<sal_uInt16>( rClass.maHatchType );
rOStm << nTmp;
rOStm << rClass.maHatchColor;
- nTmp = sal::static_int_cast<UINT16>( rClass.maGradientType );
+ nTmp = sal::static_int_cast<sal_uInt16>( rClass.maGradientType );
rOStm << nTmp;
rOStm << rClass.maGradient1stColor;
rOStm << rClass.maGradient2ndColor;
@@ -735,7 +735,7 @@ SvStream& operator>>( SvStream& rIStm, SvtGraphicFill& rClass )
rClass.maPath.Read( rIStm );
rIStm >> rClass.maFillColor;
rIStm >> rClass.mfTransparency;
- UINT16 nTmp;
+ sal_uInt16 nTmp;
rIStm >> nTmp;
rClass.maFillRule = SvtGraphicFill::FillRule( nTmp );
rIStm >> nTmp;
diff --git a/vcl/source/gdi/hatch.cxx b/vcl/source/gdi/hatch.cxx
index 3a8b51bf3022..b226c0f06936 100644
--- a/vcl/source/gdi/hatch.cxx
+++ b/vcl/source/gdi/hatch.cxx
@@ -83,7 +83,7 @@ Hatch::Hatch( const Hatch& rHatch )
// -----------------------------------------------------------------------
Hatch::Hatch( HatchStyle eStyle, const Color& rColor,
- long nDistance, USHORT nAngle10 )
+ long nDistance, sal_uInt16 nAngle10 )
{
DBG_CTOR( Hatch, NULL );
mpImplHatch = new ImplHatch;
@@ -120,7 +120,7 @@ Hatch& Hatch::operator=( const Hatch& rHatch )
// -----------------------------------------------------------------------
-BOOL Hatch::operator==( const Hatch& rHatch ) const
+sal_Bool Hatch::operator==( const Hatch& rHatch ) const
{
DBG_CHKTHIS( Hatch, NULL );
DBG_CHKOBJ( &rHatch, Hatch, NULL );
@@ -174,7 +174,7 @@ void Hatch::SetDistance( long nDistance )
// -----------------------------------------------------------------------
-void Hatch::SetAngle( USHORT nAngle10 )
+void Hatch::SetAngle( sal_uInt16 nAngle10 )
{
DBG_CHKTHIS( Hatch, NULL );
ImplMakeUnique();
@@ -186,7 +186,7 @@ void Hatch::SetAngle( USHORT nAngle10 )
SvStream& operator>>( SvStream& rIStm, ImplHatch& rImplHatch )
{
VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
rIStm >> nTmp16; rImplHatch.meStyle = (HatchStyle) nTmp16;
rIStm >> rImplHatch.maColor >> rImplHatch.mnDistance >> rImplHatch.mnAngle;
@@ -200,7 +200,7 @@ SvStream& operator<<( SvStream& rOStm, const ImplHatch& rImplHatch )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
- rOStm << (UINT16) rImplHatch.meStyle << rImplHatch.maColor;
+ rOStm << (sal_uInt16) rImplHatch.meStyle << rImplHatch.maColor;
rOStm << rImplHatch.mnDistance << rImplHatch.mnAngle;
return rOStm;
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index e79308b2664e..ee6060b7d8f3 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -86,7 +86,7 @@ Image::Image( const ResId& rResId ) :
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
BitmapEx aBmpEx;
- ULONG nObjMask = pResMgr->ReadLong();
+ sal_uLong nObjMask = pResMgr->ReadLong();
if( nObjMask & RSC_IMAGE_IMAGEBITMAP )
{
@@ -293,7 +293,7 @@ Image Image::GetColorTransformedImage( ImageColorTransform eColorTransform ) con
{
Color* pSrcColors = NULL;
Color* pDstColors = NULL;
- ULONG nColorCount = 0;
+ sal_uLong nColorCount = 0;
Image::GetColorTransformArrays( eColorTransform, pSrcColors, pDstColors, nColorCount );
@@ -334,7 +334,7 @@ void Image::Invert()
// -----------------------------------------------------------------------
void Image::GetColorTransformArrays( ImageColorTransform eColorTransform,
- Color*& rpSrcColor, Color*& rpDstColor, ULONG& rColorCount )
+ Color*& rpSrcColor, Color*& rpDstColor, sal_uLong& rColorCount )
{
if( IMAGECOLORTRANSFORM_HIGHCONTRAST == eColorTransform )
{
@@ -381,7 +381,7 @@ Image& Image::operator=( const Image& rImage )
// -----------------------------------------------------------------------
-BOOL Image::operator==( const Image& rImage ) const
+sal_Bool Image::operator==( const Image& rImage ) const
{
DBG_CHKTHIS( Image, NULL );
DBG_CHKOBJ( &rImage, Image, NULL );
@@ -419,7 +419,7 @@ BOOL Image::operator==( const Image& rImage ) const
// - ImageList -
// -------------
-ImageList::ImageList( USHORT nInit, USHORT nGrow ) :
+ImageList::ImageList( sal_uInt16 nInit, sal_uInt16 nGrow ) :
mpImplData( NULL ),
mnInitSize( nInit ),
mnGrowSize( nGrow )
@@ -446,7 +446,7 @@ ImageList::ImageList( const ResId& rResId ) :
{
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
- ULONG nObjMask = pResMgr->ReadLong();
+ sal_uLong nObjMask = pResMgr->ReadLong();
const String aPrefix( pResMgr->ReadString() );
::boost::scoped_ptr< Color > spMaskColor;
@@ -462,13 +462,13 @@ ImageList::ImageList( const ResId& rResId ) :
}
sal_Int32 nCount = pResMgr->ReadLong();
- ImplInit( static_cast< USHORT >( nCount ), Size() );
+ ImplInit( static_cast< sal_uInt16 >( nCount ), Size() );
BitmapEx aEmpty;
for( sal_Int32 i = 0; i < nCount; ++i )
{
rtl::OUString aName = pResMgr->ReadString();
- USHORT nId = static_cast< USHORT >( pResMgr->ReadLong() );
+ sal_uInt16 nId = static_cast< sal_uInt16 >( pResMgr->ReadLong() );
mpImplData->AddImage( aName, nId, aEmpty );
}
@@ -490,14 +490,14 @@ ImageList::ImageList( const ::std::vector< ::rtl::OUString >& rNameVector,
DBG_CTOR( ImageList, NULL );
- ImplInit( sal::static_int_cast< USHORT >( rNameVector.size() ), Size() );
+ ImplInit( sal::static_int_cast< sal_uInt16 >( rNameVector.size() ), Size() );
mpImplData->maPrefix = rPrefix;
for( sal_uInt32 i = 0; i < rNameVector.size(); ++i )
{
// fprintf (stderr, "List %p [%d]: '%s'\n",
// this, i, rtl::OUStringToOString( rNameVector[i], RTL_TEXTENCODING_UTF8 ).getStr() );
- mpImplData->AddImage( rNameVector[ i ], static_cast< USHORT >( i ) + 1, BitmapEx() );
+ mpImplData->AddImage( rNameVector[ i ], static_cast< sal_uInt16 >( i ) + 1, BitmapEx() );
}
}
@@ -524,7 +524,7 @@ ImageList::~ImageList()
delete mpImplData;
}
-void ImageList::ImplInit( USHORT nItems, const Size &rSize )
+void ImageList::ImplInit( sal_uInt16 nItems, const Size &rSize )
{
mpImplData = new ImplImageList;
mpImplData->mnRefCount = 1;
@@ -579,13 +579,13 @@ void ImageList::ImplMakeUnique()
BitmapEx ImageList::GetAsHorizontalStrip() const
{
Size aSize( mpImplData->maImageSize );
- USHORT nCount = GetImageCount();
+ sal_uInt16 nCount = GetImageCount();
if( !nCount )
return BitmapEx();
aSize.Width() *= nCount;
// Load any stragglers
- for (USHORT nIdx = 0; nIdx < nCount; nIdx++)
+ for (sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++)
{
ImageAryData *pData = mpImplData->maImages[ nIdx ];
if( pData->IsLoadable() )
@@ -603,7 +603,7 @@ BitmapEx ImageList::GetAsHorizontalStrip() const
aResult = BitmapEx( aPixels );
Rectangle aSrcRect( Point( 0, 0 ), mpImplData->maImageSize );
- for (USHORT nIdx = 0; nIdx < nCount; nIdx++)
+ for (sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++)
{
Rectangle aDestRect( Point( nIdx * mpImplData->maImageSize.Width(), 0 ),
mpImplData->maImageSize );
@@ -619,7 +619,7 @@ BitmapEx ImageList::GetAsHorizontalStrip() const
void ImageList::InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
const std::vector< rtl::OUString > &rNameVector )
{
- USHORT nItems = sal::static_int_cast< USHORT >( rNameVector.size() );
+ sal_uInt16 nItems = sal::static_int_cast< sal_uInt16 >( rNameVector.size() );
// fprintf (stderr, "InsertFromHorizontalStrip (1) [%d items]\n", nItems);
@@ -632,7 +632,7 @@ void ImageList::InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
aSize.Width() /= nItems;
ImplInit( nItems, aSize );
- for (USHORT nIdx = 0; nIdx < nItems; nIdx++)
+ for (sal_uInt16 nIdx = 0; nIdx < nItems; nIdx++)
{
BitmapEx aBitmap( rBitmapEx, Point( nIdx * aSize.Width(), 0 ), aSize );
mpImplData->AddImage( rNameVector[ nIdx ], nIdx + 1, aBitmap );
@@ -642,11 +642,11 @@ void ImageList::InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
// -----------------------------------------------------------------------
void ImageList::InsertFromHorizontalBitmap( const ResId& rResId,
- USHORT nCount,
+ sal_uInt16 nCount,
const Color *pMaskColor,
const Color *pSearchColors,
const Color *pReplaceColors,
- ULONG nColorCount)
+ sal_uLong nColorCount)
{
BitmapEx aBmpEx( rResId );
if (!aBmpEx.IsTransparent())
@@ -665,7 +665,7 @@ void ImageList::InsertFromHorizontalBitmap( const ResId& rResId,
// -----------------------------------------------------------------------
-USHORT ImageList::ImplGetImageId( const ::rtl::OUString& rImageName ) const
+sal_uInt16 ImageList::ImplGetImageId( const ::rtl::OUString& rImageName ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -678,7 +678,7 @@ USHORT ImageList::ImplGetImageId( const ::rtl::OUString& rImageName ) const
// -----------------------------------------------------------------------
-void ImageList::AddImage( USHORT nId, const Image& rImage )
+void ImageList::AddImage( sal_uInt16 nId, const Image& rImage )
{
DBG_CHKTHIS( ImageList, NULL );
DBG_CHKOBJ( &rImage, Image, NULL );
@@ -708,7 +708,7 @@ void ImageList::AddImage( const ::rtl::OUString& rImageName, const Image& rImage
// -----------------------------------------------------------------------
-void ImageList::ReplaceImage( USHORT nId, const Image& rImage )
+void ImageList::ReplaceImage( sal_uInt16 nId, const Image& rImage )
{
DBG_CHKTHIS( ImageList, NULL );
DBG_CHKOBJ( &rImage, Image, NULL );
@@ -722,7 +722,7 @@ void ImageList::ReplaceImage( USHORT nId, const Image& rImage )
void ImageList::ReplaceImage( const ::rtl::OUString& rImageName, const Image& rImage )
{
- const USHORT nId = ImplGetImageId( rImageName );
+ const sal_uInt16 nId = ImplGetImageId( rImageName );
if( nId )
{
@@ -736,14 +736,14 @@ void ImageList::ReplaceImage( const ::rtl::OUString& rImageName, const Image& rI
// -----------------------------------------------------------------------
-void ImageList::ReplaceImage( USHORT nId, USHORT nReplaceId )
+void ImageList::ReplaceImage( sal_uInt16 nId, sal_uInt16 nReplaceId )
{
DBG_CHKTHIS( ImageList, NULL );
DBG_ASSERT( GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND, "ImageList::ReplaceImage(): Unknown nId" );
DBG_ASSERT( GetImagePos( nReplaceId ) != IMAGELIST_IMAGE_NOTFOUND, "ImageList::ReplaceImage(): Unknown nReplaceId" );
- ULONG nPosDest = GetImagePos( nId );
- ULONG nPosSrc = GetImagePos( nReplaceId );
+ sal_uLong nPosDest = GetImagePos( nId );
+ sal_uLong nPosSrc = GetImagePos( nReplaceId );
if( nPosDest != IMAGELIST_IMAGE_NOTFOUND &&
nPosSrc != IMAGELIST_IMAGE_NOTFOUND )
{
@@ -756,7 +756,7 @@ void ImageList::ReplaceImage( USHORT nId, USHORT nReplaceId )
void ImageList::ReplaceImage( const ::rtl::OUString& rImageName, const ::rtl::OUString& rReplaceName )
{
- const USHORT nId1 = ImplGetImageId( rImageName ), nId2 = ImplGetImageId( rReplaceName );
+ const sal_uInt16 nId1 = ImplGetImageId( rImageName ), nId2 = ImplGetImageId( rReplaceName );
if( nId1 && nId2 )
ReplaceImage( nId1, nId2 );
@@ -764,7 +764,7 @@ void ImageList::ReplaceImage( const ::rtl::OUString& rImageName, const ::rtl::OU
// -----------------------------------------------------------------------
-void ImageList::RemoveImage( USHORT nId )
+void ImageList::RemoveImage( sal_uInt16 nId )
{
DBG_CHKTHIS( ImageList, NULL );
@@ -772,7 +772,7 @@ void ImageList::RemoveImage( USHORT nId )
{
if( mpImplData->maImages[ i ]->mnId == nId )
{
- mpImplData->RemoveImage( static_cast< USHORT >( i ) );
+ mpImplData->RemoveImage( static_cast< sal_uInt16 >( i ) );
break;
}
}
@@ -782,7 +782,7 @@ void ImageList::RemoveImage( USHORT nId )
void ImageList::RemoveImage( const ::rtl::OUString& rImageName )
{
- const USHORT nId = ImplGetImageId( rImageName );
+ const sal_uInt16 nId = ImplGetImageId( rImageName );
if( nId )
RemoveImage( nId );
@@ -790,7 +790,7 @@ void ImageList::RemoveImage( const ::rtl::OUString& rImageName )
// -----------------------------------------------------------------------
-Image ImageList::GetImage( USHORT nId ) const
+Image ImageList::GetImage( sal_uInt16 nId ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -854,16 +854,16 @@ void ImageList::Clear()
// -----------------------------------------------------------------------
-USHORT ImageList::GetImageCount() const
+sal_uInt16 ImageList::GetImageCount() const
{
DBG_CHKTHIS( ImageList, NULL );
- return mpImplData ? static_cast< USHORT >( mpImplData->maImages.size() ) : 0;
+ return mpImplData ? static_cast< sal_uInt16 >( mpImplData->maImages.size() ) : 0;
}
// -----------------------------------------------------------------------
-USHORT ImageList::GetImagePos( USHORT nId ) const
+sal_uInt16 ImageList::GetImagePos( sal_uInt16 nId ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -872,21 +872,21 @@ USHORT ImageList::GetImagePos( USHORT nId ) const
for( sal_uInt32 i = 0; i < mpImplData->maImages.size(); ++i )
{
if (mpImplData->maImages[ i ]->mnId == nId)
- return static_cast< USHORT >( i );
+ return static_cast< sal_uInt16 >( i );
}
}
return IMAGELIST_IMAGE_NOTFOUND;
}
-bool ImageList::HasImageAtPos( USHORT nId ) const
+bool ImageList::HasImageAtPos( sal_uInt16 nId ) const
{
return GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND;
}
// -----------------------------------------------------------------------
-USHORT ImageList::GetImagePos( const ::rtl::OUString& rImageName ) const
+sal_uInt16 ImageList::GetImagePos( const ::rtl::OUString& rImageName ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -895,7 +895,7 @@ USHORT ImageList::GetImagePos( const ::rtl::OUString& rImageName ) const
for( sal_uInt32 i = 0; i < mpImplData->maImages.size(); i++ )
{
if (mpImplData->maImages[i]->maName == rImageName)
- return static_cast< USHORT >( i );
+ return static_cast< sal_uInt16 >( i );
}
}
@@ -904,7 +904,7 @@ USHORT ImageList::GetImagePos( const ::rtl::OUString& rImageName ) const
// -----------------------------------------------------------------------
-USHORT ImageList::GetImageId( USHORT nPos ) const
+sal_uInt16 ImageList::GetImageId( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -916,13 +916,13 @@ USHORT ImageList::GetImageId( USHORT nPos ) const
// -----------------------------------------------------------------------
-void ImageList::GetImageIds( ::std::vector< USHORT >& rIds ) const
+void ImageList::GetImageIds( ::std::vector< sal_uInt16 >& rIds ) const
{
RTL_LOGFILE_CONTEXT( aLog, "vcl: ImageList::GetImageIds" );
DBG_CHKTHIS( ImageList, NULL );
- rIds = ::std::vector< USHORT >();
+ rIds = ::std::vector< sal_uInt16 >();
if( mpImplData )
{
@@ -933,7 +933,7 @@ void ImageList::GetImageIds( ::std::vector< USHORT >& rIds ) const
// -----------------------------------------------------------------------
-::rtl::OUString ImageList::GetImageName( USHORT nPos ) const
+::rtl::OUString ImageList::GetImageName( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -1010,7 +1010,7 @@ ImageList& ImageList::operator=( const ImageList& rImageList )
// -----------------------------------------------------------------------
-BOOL ImageList::operator==( const ImageList& rImageList ) const
+sal_Bool ImageList::operator==( const ImageList& rImageList ) const
{
DBG_CHKTHIS( ImageList, NULL );
DBG_CHKOBJ( &rImageList, ImageList, NULL );
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 7762087dc605..aaaca451ebe3 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -39,7 +39,7 @@
ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
const Point& rPt, const Size& rSz,
- ULONG nExtraData,
+ sal_uLong nExtraData,
OutputDevice* pFirstFrameOutDev ) :
mpParent ( pParent ),
mpOut ( pFirstFrameOutDev ? pFirstFrameOutDev : pOut ),
@@ -51,8 +51,8 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
mpBackground ( new VirtualDevice ),
mpRestore ( new VirtualDevice ),
meLastDisposal ( DISPOSE_BACK ),
- mbPause ( FALSE ),
- mbMarked ( FALSE ),
+ mbPause ( sal_False ),
+ mbMarked ( sal_False ),
mbHMirr ( maSz.Width() < 0L ),
mbVMirr ( maSz.Height() < 0L )
{
@@ -118,17 +118,17 @@ ImplAnimView::~ImplAnimView()
// ------------------------------------------------------------------------
-BOOL ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const
+sal_Bool ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nExtraData )
{
if( ( mnExtraData == nExtraData ) && ( !pOut || ( pOut == mpOut ) ) )
- bRet = TRUE;
+ bRet = sal_True;
}
else if( !pOut || ( pOut == mpOut ) )
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -174,15 +174,15 @@ void ImplAnimView::ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix,
// ------------------------------------------------------------------------
-void ImplAnimView::ImplDrawToPos( ULONG nPos )
+void ImplAnimView::ImplDrawToPos( sal_uLong nPos )
{
VirtualDevice aVDev;
Region* pOldClip = !maClip.IsNull() ? new Region( mpOut->GetClipRegion() ) : NULL;
- aVDev.SetOutputSizePixel( maSzPix, FALSE );
- nPos = Min( nPos, (ULONG) mpParent->Count() - 1UL );
+ aVDev.SetOutputSizePixel( maSzPix, sal_False );
+ nPos = Min( nPos, (sal_uLong) mpParent->Count() - 1UL );
- for( ULONG i = 0UL; i <= nPos; i++ )
+ for( sal_uLong i = 0UL; i <= nPos; i++ )
ImplDraw( i, &aVDev );
if( pOldClip )
@@ -199,20 +199,20 @@ void ImplAnimView::ImplDrawToPos( ULONG nPos )
// ------------------------------------------------------------------------
-void ImplAnimView::ImplDraw( ULONG nPos )
+void ImplAnimView::ImplDraw( sal_uLong nPos )
{
ImplDraw( nPos, NULL );
}
// ------------------------------------------------------------------------
-void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
+void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev )
{
Rectangle aOutRect( mpOut->PixelToLogic( Point() ), mpOut->GetOutputSize() );
// check, if output lies out of display
if( aOutRect.Intersection( Rectangle( maDispPt, maDispSz ) ).IsEmpty() )
- ImplSetMarked( TRUE );
+ ImplSetMarked( sal_True );
else if( !mbPause )
{
VirtualDevice* pDev;
@@ -220,8 +220,8 @@ void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
Point aBmpPosPix;
Size aSizePix;
Size aBmpSizePix;
- const ULONG nLastPos = mpParent->Count() - 1;
- const AnimationBitmap& rAnm = mpParent->Get( (USHORT) ( mnActPos = Min( nPos, nLastPos ) ) );
+ const sal_uLong nLastPos = mpParent->Count() - 1;
+ const AnimationBitmap& rAnm = mpParent->Get( (sal_uInt16) ( mnActPos = Min( nPos, nLastPos ) ) );
ImplGetPosSize( rAnm, aPosPix, aSizePix );
@@ -253,7 +253,7 @@ void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
if( !pVDev )
{
pDev = new VirtualDevice;
- pDev->SetOutputSizePixel( maSzPix, FALSE );
+ pDev->SetOutputSizePixel( maSzPix, sal_False );
pDev->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut );
}
else
@@ -284,10 +284,10 @@ void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
// ==> ggf. in eine Bitmap stecken, ansonsten SaveBitmap
// aus Speichergruenden loeschen
if( ( meLastDisposal == DISPOSE_BACK ) || ( meLastDisposal == DISPOSE_NOT ) )
- mpRestore->SetOutputSizePixel( Size( 1, 1 ), FALSE );
+ mpRestore->SetOutputSizePixel( Size( 1, 1 ), sal_False );
else
{
- mpRestore->SetOutputSizePixel( maRestSz, FALSE );
+ mpRestore->SetOutputSizePixel( maRestSz, sal_False );
mpRestore->DrawOutDev( Point(), maRestSz, aPosPix, aSizePix, *pDev );
}
@@ -320,7 +320,7 @@ void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
void ImplAnimView::ImplRepaint()
{
- const BOOL bOldPause = mbPause;
+ const sal_Bool bOldPause = mbPause;
if( mpOut->GetOutDevType() == OUTDEV_WINDOW )
{
@@ -333,7 +333,7 @@ void ImplAnimView::ImplRepaint()
else
mpBackground->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut );
- mbPause = FALSE;
+ mbPause = sal_False;
ImplDrawToPos( mnActPos );
mbPause = bOldPause;
}
diff --git a/vcl/source/gdi/impanmvw.hxx b/vcl/source/gdi/impanmvw.hxx
index 69403c0f6928..69ae35fe1c6e 100644
--- a/vcl/source/gdi/impanmvw.hxx
+++ b/vcl/source/gdi/impanmvw.hxx
@@ -57,27 +57,27 @@ private:
Region maClip;
VirtualDevice* mpBackground;
VirtualDevice* mpRestore;
- ULONG mnActPos;
+ sal_uLong mnActPos;
Disposal meLastDisposal;
- BOOL mbPause;
- BOOL mbFirst;
- BOOL mbMarked;
- BOOL mbHMirr;
- BOOL mbVMirr;
+ sal_Bool mbPause;
+ sal_Bool mbFirst;
+ sal_Bool mbMarked;
+ sal_Bool mbHMirr;
+ sal_Bool mbVMirr;
void ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix );
- void ImplDraw( ULONG nPos, VirtualDevice* pVDev );
+ void ImplDraw( sal_uLong nPos, VirtualDevice* pVDev );
public:
ImplAnimView( Animation* pParent, OutputDevice* pOut,
- const Point& rPt, const Size& rSz, ULONG nExtraData,
+ const Point& rPt, const Size& rSz, sal_uLong nExtraData,
OutputDevice* pFirstFrameOutDev = NULL );
~ImplAnimView();
- BOOL ImplMatches( OutputDevice* pOut, long nExtraData ) const;
- void ImplDrawToPos( ULONG nPos );
- void ImplDraw( ULONG nPos );
+ sal_Bool ImplMatches( OutputDevice* pOut, long nExtraData ) const;
+ void ImplDrawToPos( sal_uLong nPos );
+ void ImplDraw( sal_uLong nPos );
void ImplRepaint();
AInfo* ImplCreateAInfo() const;
@@ -86,11 +86,11 @@ public:
const Size& ImplGetOutSize() const { return maSz; }
const Size& ImplGetOutSizePix() const { return maSzPix; }
- void ImplPause( BOOL bPause ) { mbPause = bPause; }
- BOOL ImplIsPause() const { return mbPause; }
+ void ImplPause( sal_Bool bPause ) { mbPause = bPause; }
+ sal_Bool ImplIsPause() const { return mbPause; }
- void ImplSetMarked( BOOL bMarked ) { mbMarked = bMarked; }
- BOOL ImplIsMarked() const { return mbMarked; }
+ void ImplSetMarked( sal_Bool bMarked ) { mbMarked = bMarked; }
+ sal_Bool ImplIsMarked() const { return mbMarked; }
};
#endif
diff --git a/vcl/source/gdi/impbmp.cxx b/vcl/source/gdi/impbmp.cxx
index 3e328b7db7a4..af39ed615874 100644
--- a/vcl/source/gdi/impbmp.cxx
+++ b/vcl/source/gdi/impbmp.cxx
@@ -65,7 +65,7 @@ void ImpBitmap::ImplSetSalBitmap( SalBitmap* pBitmap )
// -----------------------------------------------------------------------
-BOOL ImpBitmap::ImplCreate( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal )
+sal_Bool ImpBitmap::ImplCreate( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal )
{
maSourceSize = rSize;
return mpSalBitmap->Create( rSize, nBitCount, rPal );
@@ -73,7 +73,7 @@ BOOL ImpBitmap::ImplCreate( const Size& rSize, USHORT nBitCount, const BitmapPal
// -----------------------------------------------------------------------
-BOOL ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap )
+sal_Bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap )
{
maSourceSize = rImpBitmap.maSourceSize;
mnChecksum = rImpBitmap.mnChecksum;
@@ -82,14 +82,14 @@ BOOL ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap )
// -----------------------------------------------------------------------
-BOOL ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics )
+sal_Bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics )
{
return mpSalBitmap->Create( *rImpBitmap.mpSalBitmap, pGraphics );
}
// -----------------------------------------------------------------------
-BOOL ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, USHORT nNewBitCount )
+sal_Bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, sal_uInt16 nNewBitCount )
{
return mpSalBitmap->Create( *rImpBitmap.mpSalBitmap, nNewBitCount );
}
@@ -110,22 +110,22 @@ Size ImpBitmap::ImplGetSize() const
// -----------------------------------------------------------------------
-USHORT ImpBitmap::ImplGetBitCount() const
+sal_uInt16 ImpBitmap::ImplGetBitCount() const
{
- USHORT nBitCount = mpSalBitmap->GetBitCount();
+ sal_uInt16 nBitCount = mpSalBitmap->GetBitCount();
return( ( nBitCount <= 1 ) ? 1 : ( nBitCount <= 4 ) ? 4 : ( nBitCount <= 8 ) ? 8 : 24 );
}
// -----------------------------------------------------------------------
-BitmapBuffer* ImpBitmap::ImplAcquireBuffer( BOOL bReadOnly )
+BitmapBuffer* ImpBitmap::ImplAcquireBuffer( sal_Bool bReadOnly )
{
return mpSalBitmap->AcquireBuffer( bReadOnly );
}
// -----------------------------------------------------------------------
-void ImpBitmap::ImplReleaseBuffer( BitmapBuffer* pBuffer, BOOL bReadOnly )
+void ImpBitmap::ImplReleaseBuffer( BitmapBuffer* pBuffer, sal_Bool bReadOnly )
{
mpSalBitmap->ReleaseBuffer( pBuffer, bReadOnly );
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 397a5d6b704a..500ba9549b9e 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -70,7 +70,7 @@
struct ImpSwapFile
{
INetURLObject aSwapURL;
- ULONG nRefCount;
+ sal_uLong nRefCount;
};
// -----------------
@@ -90,15 +90,15 @@ GraphicReader::~GraphicReader()
// ------------------------------------------------------------------------
-BOOL GraphicReader::IsPreviewModeEnabled() const
+sal_Bool GraphicReader::IsPreviewModeEnabled() const
{
if( !mpReaderData )
- return FALSE;
+ return sal_False;
if( mpReaderData->maPreviewSize.Width() )
- return TRUE;
+ return sal_True;
if( mpReaderData->maPreviewSize.Height() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
// ------------------------------------------------------------------------
@@ -141,8 +141,8 @@ ImpGraphic::ImpGraphic() :
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mbSwapOut ( sal_False ),
+ mbSwapUnderway ( sal_False )
{
}
@@ -159,7 +159,7 @@ ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
mnSizeBytes ( rImpGraphic.mnSizeBytes ),
mnRefCount ( 1UL ),
mbSwapOut ( rImpGraphic.mbSwapOut ),
- mbSwapUnderway ( FALSE )
+ mbSwapUnderway ( sal_False )
{
if( mpSwapFile )
mpSwapFile->nRefCount++;
@@ -190,8 +190,8 @@ ImpGraphic::ImpGraphic( const Bitmap& rBitmap ) :
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mbSwapOut ( sal_False ),
+ mbSwapUnderway ( sal_False )
{
}
@@ -207,8 +207,8 @@ ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) :
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mbSwapOut ( sal_False ),
+ mbSwapUnderway ( sal_False )
{
}
@@ -224,8 +224,8 @@ ImpGraphic::ImpGraphic( const Animation& rAnimation ) :
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mbSwapOut ( sal_False ),
+ mbSwapUnderway ( sal_False )
{
}
@@ -241,8 +241,8 @@ ImpGraphic::ImpGraphic( const GDIMetaFile& rMtf ) :
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mbSwapOut ( sal_False ),
+ mbSwapUnderway ( sal_False )
{
}
@@ -252,7 +252,7 @@ ImpGraphic::~ImpGraphic()
{
ImplClear();
- if( (ULONG) mpContext > 1UL )
+ if( (sal_uLong) mpContext > 1UL )
delete mpContext;
}
@@ -306,24 +306,24 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic )
// ------------------------------------------------------------------------
-BOOL ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
+sal_Bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( this == &rImpGraphic )
- bRet = TRUE;
+ bRet = sal_True;
else if( !ImplIsSwapOut() && ( rImpGraphic.meType == meType ) )
{
switch( meType )
{
case( GRAPHIC_NONE ):
- bRet = TRUE;
+ bRet = sal_True;
break;
case( GRAPHIC_GDIMETAFILE ):
{
if( rImpGraphic.maMetaFile == maMetaFile )
- bRet = TRUE;
+ bRet = sal_True;
}
break;
@@ -332,10 +332,10 @@ BOOL ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
if( mpAnimation )
{
if( rImpGraphic.mpAnimation && ( *rImpGraphic.mpAnimation == *mpAnimation ) )
- bRet = TRUE;
+ bRet = sal_True;
}
else if( !rImpGraphic.mpAnimation && ( rImpGraphic.maEx == maEx ) )
- bRet = TRUE;
+ bRet = sal_True;
}
break;
@@ -349,7 +349,7 @@ BOOL ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
// ------------------------------------------------------------------------
-void ImpGraphic::ImplClearGraphics( BOOL bCreateSwapInfo )
+void ImpGraphic::ImplClearGraphics( sal_Bool bCreateSwapInfo )
{
if( bCreateSwapInfo && !ImplIsSwapOut() )
{
@@ -411,12 +411,12 @@ void ImpGraphic::ImplClear()
mpSwapFile = NULL;
}
- mbSwapOut = FALSE;
+ mbSwapOut = sal_False;
mnDocFilePos = 0UL;
maDocFileURLStr.Erase();
// cleanup
- ImplClearGraphics( FALSE );
+ ImplClearGraphics( sal_False );
meType = GRAPHIC_NONE;
mnSizeBytes = 0;
}
@@ -438,42 +438,42 @@ void ImpGraphic::ImplSetDefaultType()
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplIsSupportedGraphic() const
+sal_Bool ImpGraphic::ImplIsSupportedGraphic() const
{
return( meType != GRAPHIC_NONE );
}
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplIsTransparent() const
+sal_Bool ImpGraphic::ImplIsTransparent() const
{
- BOOL bRet;
+ sal_Bool bRet;
if( meType == GRAPHIC_BITMAP )
bRet = ( mpAnimation ? mpAnimation->IsTransparent() : maEx.IsTransparent() );
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplIsAlpha() const
+sal_Bool ImpGraphic::ImplIsAlpha() const
{
- BOOL bRet;
+ sal_Bool bRet;
if( meType == GRAPHIC_BITMAP )
bRet = ( NULL == mpAnimation ) && maEx.IsAlpha();
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplIsAnimated() const
+sal_Bool ImpGraphic::ImplIsAnimated() const
{
return( mpAnimation != NULL );
}
@@ -729,7 +729,7 @@ void ImpGraphic::ImplSetPrefMapMode( const MapMode& rPrefMapMode )
// ------------------------------------------------------------------------
-ULONG ImpGraphic::ImplGetSizeBytes() const
+sal_uLong ImpGraphic::ImplGetSizeBytes() const
{
if( 0 == mnSizeBytes )
{
@@ -856,7 +856,7 @@ Link ImpGraphic::ImplGetAnimationNotifyHdl() const
// ------------------------------------------------------------------------
-ULONG ImpGraphic::ImplGetAnimationLoopCount() const
+sal_uLong ImpGraphic::ImplGetAnimationLoopCount() const
{
return( mpAnimation ? mpAnimation->GetLoopCount() : 0UL );
}
@@ -892,7 +892,7 @@ void ImpGraphic::ImplSetContext( GraphicReader* pReader )
// ------------------------------------------------------------------------
-void ImpGraphic::ImplSetDocFileName( const String& rName, ULONG nFilePos )
+void ImpGraphic::ImplSetDocFileName( const String& rName, sal_uLong nFilePos )
{
const INetURLObject aURL( rName );
@@ -911,29 +911,29 @@ const String& ImpGraphic::ImplGetDocFileName() const
// ------------------------------------------------------------------------
-ULONG ImpGraphic::ImplGetDocFilePos() const
+sal_uLong ImpGraphic::ImplGetDocFilePos() const
{
return mnDocFilePos;
}
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
+sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap )
{
MapMode aMapMode;
Size aSize;
- const ULONG nStartPos = rIStm.Tell();
+ const sal_uLong nStartPos = rIStm.Tell();
sal_uInt32 nId;
- ULONG nHeaderLen;
+ sal_uLong nHeaderLen;
long nType;
long nLen;
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
- BOOL bRet = FALSE;
+ const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ sal_Bool bRet = sal_False;
if( !mbSwapUnderway )
{
const String aTempURLStr( maDocFileURLStr );
- const ULONG nTempPos = mnDocFilePos;
+ const sal_uLong nTempPos = mnDocFilePos;
ImplClear();
@@ -1018,7 +1018,7 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
if( maDocFileURLStr.Len() )
{
rIStm.Seek( nStartPos + nHeaderLen + nLen );
- bRet = mbSwapOut = TRUE;
+ bRet = mbSwapOut = sal_True;
}
else
{
@@ -1031,9 +1031,9 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
if( pOStm )
{
- ULONG nFullLen = nHeaderLen + nLen;
- ULONG nPartLen = Min( nFullLen, (ULONG) GRAPHIC_MAXPARTLEN );
- BYTE* pBuffer = (BYTE*) rtl_allocateMemory( nPartLen );
+ sal_uLong nFullLen = nHeaderLen + nLen;
+ sal_uLong nPartLen = Min( nFullLen, (sal_uLong) GRAPHIC_MAXPARTLEN );
+ sal_uInt8* pBuffer = (sal_uInt8*) rtl_allocateMemory( nPartLen );
pOStm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1053,12 +1053,12 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
}
rtl_freeMemory( pBuffer );
- ULONG nReadErr = rIStm.GetError(), nWriteErr = pOStm->GetError();
+ sal_uLong nReadErr = rIStm.GetError(), nWriteErr = pOStm->GetError();
delete pOStm, pOStm = NULL;
if( !nReadErr && !nWriteErr )
{
- bRet = mbSwapOut = TRUE;
+ bRet = mbSwapOut = sal_True;
mpSwapFile = new ImpSwapFile;
mpSwapFile->nRefCount = 1;
mpSwapFile->aSwapURL = aTmpURL;
@@ -1101,9 +1101,9 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
else if( meType >= SYS_WINMETAFILE && meType <= SYS_MACMETAFILE )
{
Graphic aSysGraphic;
- ULONG nCvtType;
+ sal_uLong nCvtType;
- switch( sal::static_int_cast<ULONG>(meType) )
+ switch( sal::static_int_cast<sal_uLong>(meType) )
{
case( SYS_WINMETAFILE ):
case( SYS_WNTMETAFILE ): nCvtType = CVT_WMF; break;
@@ -1131,7 +1131,7 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
}
}
else
- bRet = TRUE;
+ bRet = sal_True;
rIStm.SetNumberFormatInt( nOldFormat );
@@ -1140,16 +1140,16 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
+sal_Bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( ( meType != GRAPHIC_NONE ) && ( meType != GRAPHIC_DEFAULT ) && !ImplIsSwapOut() )
{
const MapMode aMapMode( ImplGetPrefMapMode() );
const Size aSize( ImplGetPrefSize() );
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
- ULONG nDataFieldPos;
+ const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
+ sal_uLong nDataFieldPos;
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1196,18 +1196,18 @@ BOOL ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
// write data block
if( !rOStm.GetError() )
{
- const ULONG nDataStart = rOStm.Tell();
+ const sal_uLong nDataStart = rOStm.Tell();
if( ImplIsSupportedGraphic() )
rOStm << *this;
if( !rOStm.GetError() )
{
- const ULONG nStmPos2 = rOStm.Tell();
+ const sal_uLong nStmPos2 = rOStm.Tell();
rOStm.Seek( nDataFieldPos );
rOStm << (long) ( nStmPos2 - nDataStart );
rOStm.Seek( nStmPos2 );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -1219,9 +1219,9 @@ BOOL ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplSwapOut()
+sal_Bool ImpGraphic::ImplSwapOut()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !ImplIsSwapOut() )
{
@@ -1239,7 +1239,7 @@ BOOL ImpGraphic::ImplSwapOut()
pOStm->SetVersion( SOFFICE_FILEFORMAT_50 );
pOStm->SetCompressMode( COMPRESSMODE_NATIVE );
- if( ( bRet = ImplSwapOut( pOStm ) ) == TRUE )
+ if( ( bRet = ImplSwapOut( pOStm ) ) == sal_True )
{
mpSwapFile = new ImpSwapFile;
mpSwapFile->nRefCount = 1;
@@ -1277,8 +1277,8 @@ BOOL ImpGraphic::ImplSwapOut()
}
else
{
- ImplClearGraphics( TRUE );
- bRet = mbSwapOut = TRUE;
+ ImplClearGraphics( sal_True );
+ bRet = mbSwapOut = sal_True;
}
}
@@ -1287,9 +1287,9 @@ BOOL ImpGraphic::ImplSwapOut()
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplSwapOut( SvStream* pOStm )
+sal_Bool ImpGraphic::ImplSwapOut( SvStream* pOStm )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pOStm )
{
@@ -1301,15 +1301,15 @@ BOOL ImpGraphic::ImplSwapOut( SvStream* pOStm )
if( !pOStm->GetError() )
{
- ImplClearGraphics( TRUE );
- bRet = mbSwapOut = TRUE;
+ ImplClearGraphics( sal_True );
+ bRet = mbSwapOut = sal_True;
}
}
}
else
{
- ImplClearGraphics( TRUE );
- bRet = mbSwapOut = TRUE;
+ ImplClearGraphics( sal_True );
+ bRet = mbSwapOut = sal_True;
}
return bRet;
@@ -1317,9 +1317,9 @@ BOOL ImpGraphic::ImplSwapOut( SvStream* pOStm )
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplSwapIn()
+sal_Bool ImpGraphic::ImplSwapIn()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( ImplIsSwapOut() )
{
@@ -1386,9 +1386,9 @@ BOOL ImpGraphic::ImplSwapIn()
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplSwapIn( SvStream* pIStm )
+sal_Bool ImpGraphic::ImplSwapIn( SvStream* pIStm )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pIStm )
{
@@ -1396,14 +1396,14 @@ BOOL ImpGraphic::ImplSwapIn( SvStream* pIStm )
if( !pIStm->GetError() )
{
- mbSwapUnderway = TRUE;
+ mbSwapUnderway = sal_True;
bRet = ImplReadEmbedded( *pIStm );
- mbSwapUnderway = FALSE;
+ mbSwapUnderway = sal_False;
if( !bRet )
ImplClear();
else
- mbSwapOut = FALSE;
+ mbSwapOut = sal_False;
}
}
@@ -1412,7 +1412,7 @@ BOOL ImpGraphic::ImplSwapIn( SvStream* pIStm )
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplIsSwapOut() const
+sal_Bool ImpGraphic::ImplIsSwapOut() const
{
return mbSwapOut;
}
@@ -1437,16 +1437,16 @@ GfxLink ImpGraphic::ImplGetLink()
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplIsLink() const
+sal_Bool ImpGraphic::ImplIsLink() const
{
- return ( mpGfxLink != NULL ) ? TRUE : FALSE;
+ return ( mpGfxLink != NULL ) ? sal_True : sal_False;
}
// ------------------------------------------------------------------------
-ULONG ImpGraphic::ImplGetChecksum() const
+sal_uLong ImpGraphic::ImplGetChecksum() const
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if( ImplIsSupportedGraphic() && !ImplIsSwapOut() )
{
@@ -1475,9 +1475,9 @@ ULONG ImpGraphic::ImplGetChecksum() const
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplExportNative( SvStream& rOStm ) const
+sal_Bool ImpGraphic::ImplExportNative( SvStream& rOStm ) const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
if( !rOStm.GetError() )
{
@@ -1504,7 +1504,7 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
{
if( !rIStm.GetError() )
{
- const ULONG nStmPos1 = rIStm.Tell();
+ const sal_uLong nStmPos1 = rIStm.Tell();
sal_uInt32 nTmp;
if ( !rImpGraphic.mbSwapUnderway )
@@ -1538,7 +1538,7 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
if( !rIStm.GetError() && aLink.LoadNative( aGraphic ) )
{
// set link only, if no other link was set
- const BOOL bSetLink = ( rImpGraphic.mpGfxLink == NULL );
+ const sal_Bool bSetLink = ( rImpGraphic.mpGfxLink == NULL );
// assign graphic
rImpGraphic = *aGraphic.ImplGetImpGraphic();
@@ -1561,7 +1561,7 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
else
{
BitmapEx aBmpEx;
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
rIStm.SeekRel( -4 );
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1569,8 +1569,8 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
if( !rIStm.GetError() )
{
- UINT32 nMagic1(0), nMagic2(0);
- ULONG nActPos = rIStm.Tell();
+ sal_uInt32 nMagic1(0), nMagic2(0);
+ sal_uLong nActPos = rIStm.Tell();
rIStm >> nMagic1 >> nMagic2;
rIStm.Seek( nActPos );
@@ -1640,7 +1640,7 @@ SvStream& operator<<( SvStream& rOStm, const ImpGraphic& rImpGraphic )
else
{
// own format
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
switch( rImpGraphic.ImplGetType() )
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index 3105850c4fbf..0d0af3365c00 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -65,7 +65,7 @@ ImageAryData::ImageAryData( const ImageAryData& rData ) :
}
ImageAryData::ImageAryData( const rtl::OUString &aName,
- USHORT nId, const BitmapEx &aBitmap )
+ sal_uInt16 nId, const BitmapEx &aBitmap )
: maName( aName ), mnId( nId ), maBitmapEx( aBitmap )
{
}
@@ -117,7 +117,7 @@ ImplImageList::~ImplImageList()
}
void ImplImageList::AddImage( const ::rtl::OUString &aName,
- USHORT nId, const BitmapEx &aBitmapEx )
+ sal_uInt16 nId, const BitmapEx &aBitmapEx )
{
ImageAryData *pImg = new ImageAryData( aName, nId, aBitmapEx );
maImages.push_back( pImg );
@@ -125,7 +125,7 @@ void ImplImageList::AddImage( const ::rtl::OUString &aName,
maNameHash [ aName ] = pImg;
}
-void ImplImageList::RemoveImage( USHORT nPos )
+void ImplImageList::RemoveImage( sal_uInt16 nPos )
{
ImageAryData *pImg = maImages[ nPos ];
if( pImg->maName.getLength() )
@@ -133,9 +133,9 @@ void ImplImageList::RemoveImage( USHORT nPos )
maImages.erase( maImages.begin() + nPos );
}
-USHORT ImplImageList::GetImageCount() const
+sal_uInt16 ImplImageList::GetImageCount() const
{
- return sal::static_int_cast< USHORT >( maImages.size() );
+ return sal::static_int_cast< sal_uInt16 >( maImages.size() );
}
// -----------------
@@ -159,7 +159,7 @@ ImplImageData::~ImplImageData()
// - ImplImageData -
// -----------------
-BOOL ImplImageData::IsEqual( const ImplImageData& rData )
+sal_Bool ImplImageData::IsEqual( const ImplImageData& rData )
{
return( maBmpEx == rData.maBmpEx );
}
@@ -211,7 +211,7 @@ ImplImageBmp::~ImplImageBmp()
// -----------------------------------------------------------------------
-void ImplImageBmp::Create( long nItemWidth, long nItemHeight, USHORT nInitSize )
+void ImplImageBmp::Create( long nItemWidth, long nItemHeight, sal_uInt16 nInitSize )
{
const Size aTotalSize( nInitSize * nItemWidth, nItemHeight );
@@ -225,13 +225,13 @@ void ImplImageBmp::Create( long nItemWidth, long nItemHeight, USHORT nInitSize )
mnSize = nInitSize;
delete[] mpInfoAry;
- mpInfoAry = new BYTE[ mnSize ];
+ mpInfoAry = new sal_uInt8[ mnSize ];
memset( mpInfoAry, 0, mnSize );
}
// -----------------------------------------------------------------------
-void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHeight, USHORT nInitSize )
+void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHeight, sal_uInt16 nInitSize )
{
maBmpEx = rBmpEx;
maDisabledBmpEx.SetEmpty();
@@ -243,7 +243,7 @@ void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHe
mnSize = nInitSize;
delete[] mpInfoAry;
- mpInfoAry = new BYTE[ mnSize ];
+ mpInfoAry = new sal_uInt8[ mnSize ];
memset( mpInfoAry,
rBmpEx.IsAlpha() ? IMPSYSIMAGEITEM_ALPHA : ( rBmpEx.IsTransparent() ? IMPSYSIMAGEITEM_MASK : 0 ),
mnSize );
@@ -251,11 +251,11 @@ void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHe
// -----------------------------------------------------------------------
-void ImplImageBmp::Expand( USHORT nGrowSize )
+void ImplImageBmp::Expand( sal_uInt16 nGrowSize )
{
- const ULONG nDX = nGrowSize * maSize.Width();
- const USHORT nOldSize = mnSize;
- BYTE* pNewAry = new BYTE[ mnSize = sal::static_int_cast<USHORT>(mnSize+nGrowSize) ];
+ const sal_uLong nDX = nGrowSize * maSize.Width();
+ const sal_uInt16 nOldSize = mnSize;
+ sal_uInt8* pNewAry = new sal_uInt8[ mnSize = sal::static_int_cast<sal_uInt16>(mnSize+nGrowSize) ];
maBmpEx.Expand( nDX, 0UL );
@@ -283,7 +283,7 @@ void ImplImageBmp::Invert()
// -----------------------------------------------------------------------
-void ImplImageBmp::Replace( USHORT nPos, USHORT nSrcPos )
+void ImplImageBmp::Replace( sal_uInt16 nPos, sal_uInt16 nSrcPos )
{
const Point aSrcPos( nSrcPos * maSize.Width(), 0L ), aPos( nPos * maSize.Width(), 0L );
const Rectangle aSrcRect( aSrcPos, maSize );
@@ -302,7 +302,7 @@ void ImplImageBmp::Replace( USHORT nPos, USHORT nSrcPos )
// -----------------------------------------------------------------------
-void ImplImageBmp::Replace( USHORT nPos, const ImplImageBmp& rImageBmp, USHORT nSrcPos )
+void ImplImageBmp::Replace( sal_uInt16 nPos, const ImplImageBmp& rImageBmp, sal_uInt16 nSrcPos )
{
const Point aSrcPos( nSrcPos * maSize.Width(), 0L ), aPos( nPos * maSize.Width(), 0L );
const Rectangle aSrcRect( aSrcPos, maSize );
@@ -319,7 +319,7 @@ void ImplImageBmp::Replace( USHORT nPos, const ImplImageBmp& rImageBmp, USHORT n
// -----------------------------------------------------------------------
-void ImplImageBmp::Replace( USHORT nPos, const BitmapEx& rBmpEx )
+void ImplImageBmp::Replace( sal_uInt16 nPos, const BitmapEx& rBmpEx )
{
const Point aNullPos, aPos( nPos * maSize.Width(), 0L );
const Rectangle aSrcRect( aNullPos, maSize );
@@ -337,7 +337,7 @@ void ImplImageBmp::Replace( USHORT nPos, const BitmapEx& rBmpEx )
// -----------------------------------------------------------------------
-void ImplImageBmp::ReplaceColors( const Color* pSrcColors, const Color* pDstColors, ULONG nColorCount )
+void ImplImageBmp::ReplaceColors( const Color* pSrcColors, const Color* pDstColors, sal_uLong nColorCount )
{
maBmpEx.Replace( pSrcColors, pDstColors, nColorCount );
delete mpDisplayBmp;
@@ -355,7 +355,7 @@ void ImplImageBmp::ColorTransform( BmpColorMode eColorMode )
// -----------------------------------------------------------------------
-BitmapEx ImplImageBmp::GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const
+BitmapEx ImplImageBmp::GetBitmapEx( sal_uInt16 nPosCount, sal_uInt16* pPosAry ) const
{
const Bitmap aNewBmp( Size( nPosCount * maSize.Width(), maSize.Height() ), maBmpEx.GetBitmap().GetBitCount() );
BitmapEx aRet;
@@ -370,7 +370,7 @@ BitmapEx ImplImageBmp::GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const
else
aRet = BitmapEx( aNewBmp );
- for( USHORT i = 0; i < nPosCount; i++ )
+ for( sal_uInt16 i = 0; i < nPosCount; i++ )
{
const Point aSrcPos( pPosAry[ i ] * maSize.Width(), 0L );
const Point aPos( i * maSize.Width(), 0L );
@@ -385,8 +385,8 @@ BitmapEx ImplImageBmp::GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const
// -----------------------------------------------------------------------
-void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
- const Point& rPos, USHORT nStyle,
+void ImplImageBmp::Draw( sal_uInt16 nPos, OutputDevice* pOutDev,
+ const Point& rPos, sal_uInt16 nStyle,
const Size* pSize )
{
if( pOutDev->IsDeviceOutputNecessary() )
@@ -438,9 +438,9 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
BitmapColor aCol;
const long nW = pAcc->Width();
const long nH = pAcc->Height();
- BYTE* pMapR = new BYTE[ 256 ];
- BYTE* pMapG = new BYTE[ 256 ];
- BYTE* pMapB = new BYTE[ 256 ];
+ sal_uInt8* pMapR = new sal_uInt8[ 256 ];
+ sal_uInt8* pMapG = new sal_uInt8[ 256 ];
+ sal_uInt8* pMapB = new sal_uInt8[ 256 ];
long nX, nY;
if( nStyle & IMAGE_DRAW_HIGHLIGHT )
@@ -448,20 +448,20 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
else
aColor = rSettings.GetDeactiveColor();
- const BYTE cR = aColor.GetRed();
- const BYTE cG = aColor.GetGreen();
- const BYTE cB = aColor.GetBlue();
+ const sal_uInt8 cR = aColor.GetRed();
+ const sal_uInt8 cG = aColor.GetGreen();
+ const sal_uInt8 cB = aColor.GetBlue();
for( nX = 0L; nX < 256L; nX++ )
{
- pMapR[ nX ] = (BYTE) ( ( ( nY = ( nX + cR ) >> 1 ) > 255 ) ? 255 : nY );
- pMapG[ nX ] = (BYTE) ( ( ( nY = ( nX + cG ) >> 1 ) > 255 ) ? 255 : nY );
- pMapB[ nX ] = (BYTE) ( ( ( nY = ( nX + cB ) >> 1 ) > 255 ) ? 255 : nY );
+ pMapR[ nX ] = (sal_uInt8) ( ( ( nY = ( nX + cR ) >> 1 ) > 255 ) ? 255 : nY );
+ pMapG[ nX ] = (sal_uInt8) ( ( ( nY = ( nX + cG ) >> 1 ) > 255 ) ? 255 : nY );
+ pMapB[ nX ] = (sal_uInt8) ( ( ( nY = ( nX + cB ) >> 1 ) > 255 ) ? 255 : nY );
}
if( pAcc->HasPalette() )
{
- for( USHORT i = 0, nCount = pAcc->GetPaletteEntryCount(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = pAcc->GetPaletteEntryCount(); i < nCount; i++ )
{
const BitmapColor& rCol = pAcc->GetPaletteColor( i );
aCol.SetRed( pMapR[ rCol.GetRed() ] );
@@ -517,7 +517,7 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
}
else
{
- BYTE cErase = 128;
+ sal_uInt8 cErase = 128;
aTmpBmpEx = BitmapEx( aTmpBmp, AlphaMask( aTmpBmp.GetSizePixel(), &cErase ) );
}
}
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 0846f5567200..f405c3e4b602 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -111,23 +111,23 @@ static ChainMove aImplMoveOuter[ 8 ] = {
struct ImplColorSet
{
BitmapColor maColor;
- USHORT mnIndex;
- BOOL mbSet;
+ sal_uInt16 mnIndex;
+ sal_Bool mbSet;
- BOOL operator<( const ImplColorSet& rSet ) const;
- BOOL operator>( const ImplColorSet& rSet ) const;
+ sal_Bool operator<( const ImplColorSet& rSet ) const;
+ sal_Bool operator>( const ImplColorSet& rSet ) const;
};
// ----------------------------------------------------------------------------
-inline BOOL ImplColorSet::operator<( const ImplColorSet& rSet ) const
+inline sal_Bool ImplColorSet::operator<( const ImplColorSet& rSet ) const
{
return( mbSet && ( !rSet.mbSet || ( maColor.GetLuminance() > rSet.maColor.GetLuminance() ) ) );
}
// ----------------------------------------------------------------------------
-inline BOOL ImplColorSet::operator>( const ImplColorSet& rSet ) const
+inline sal_Bool ImplColorSet::operator>( const ImplColorSet& rSet ) const
{
return( !mbSet || ( rSet.mbSet && maColor.GetLuminance() < rSet.maColor.GetLuminance() ) );
}
@@ -142,8 +142,8 @@ extern "C" int __LOADONCALLAPI ImplColorSetCmpFnc( const void* p1, const void* p
if( pSet1->mbSet && pSet2->mbSet )
{
- const BYTE cLum1 = pSet1->maColor.GetLuminance();
- const BYTE cLum2 = pSet2->maColor.GetLuminance();
+ const sal_uInt8 cLum1 = pSet1->maColor.GetLuminance();
+ const sal_uInt8 cLum2 = pSet2->maColor.GetLuminance();
nRet = ( ( cLum1 > cLum2 ) ? -1 : ( ( cLum1 == cLum2 ) ? 0 : 1 ) );
}
else if( pSet1->mbSet )
@@ -163,21 +163,21 @@ extern "C" int __LOADONCALLAPI ImplColorSetCmpFnc( const void* p1, const void* p
class ImplPointArray
{
Point* mpArray;
- ULONG mnSize;
- ULONG mnRealSize;
+ sal_uLong mnSize;
+ sal_uLong mnRealSize;
public:
ImplPointArray();
~ImplPointArray();
- void ImplSetSize( ULONG nSize );
+ void ImplSetSize( sal_uLong nSize );
- ULONG ImplGetRealSize() const { return mnRealSize; }
- void ImplSetRealSize( ULONG nRealSize ) { mnRealSize = nRealSize; }
+ sal_uLong ImplGetRealSize() const { return mnRealSize; }
+ void ImplSetRealSize( sal_uLong nRealSize ) { mnRealSize = nRealSize; }
- inline Point& operator[]( ULONG nPos );
- inline const Point& operator[]( ULONG nPos ) const;
+ inline Point& operator[]( sal_uLong nPos );
+ inline const Point& operator[]( sal_uLong nPos ) const;
void ImplCreatePoly( Polygon& rPoly ) const;
};
@@ -202,9 +202,9 @@ ImplPointArray::~ImplPointArray()
// -----------------------------------------------------------------------------
-void ImplPointArray::ImplSetSize( ULONG nSize )
+void ImplPointArray::ImplSetSize( sal_uLong nSize )
{
- const ULONG nTotal = nSize * sizeof( Point );
+ const sal_uLong nTotal = nSize * sizeof( Point );
mnSize = nSize;
mnRealSize = 0UL;
@@ -218,7 +218,7 @@ void ImplPointArray::ImplSetSize( ULONG nSize )
// -----------------------------------------------------------------------------
-inline Point& ImplPointArray::operator[]( ULONG nPos )
+inline Point& ImplPointArray::operator[]( sal_uLong nPos )
{
DBG_ASSERT( nPos < mnSize, "ImplPointArray::operator[]: nPos out of range!" );
return mpArray[ nPos ];
@@ -226,7 +226,7 @@ inline Point& ImplPointArray::operator[]( ULONG nPos )
// -----------------------------------------------------------------------------
-inline const Point& ImplPointArray::operator[]( ULONG nPos ) const
+inline const Point& ImplPointArray::operator[]( sal_uLong nPos ) const
{
DBG_ASSERT( nPos < mnSize, "ImplPointArray::operator[]: nPos out of range!" );
return mpArray[ nPos ];
@@ -236,7 +236,7 @@ inline const Point& ImplPointArray::operator[]( ULONG nPos ) const
void ImplPointArray::ImplCreatePoly( Polygon& rPoly ) const
{
- rPoly = Polygon( sal::static_int_cast<USHORT>(mnRealSize), mpArray );
+ rPoly = Polygon( sal::static_int_cast<sal_uInt16>(mnRealSize), mpArray );
}
// ---------------
@@ -262,12 +262,12 @@ public:
inline long Width() const { return mnWidth; }
inline long Height() const { return mnHeight; }
- inline void Set( long nY, long nX, BYTE cVal );
- inline BYTE Get( long nY, long nX ) const;
+ inline void Set( long nY, long nX, sal_uInt8 cVal );
+ inline sal_uInt8 Get( long nY, long nX ) const;
- inline BOOL IsFree( long nY, long nX ) const;
- inline BOOL IsCont( long nY, long nX ) const;
- inline BOOL IsDone( long nY, long nX ) const;
+ inline sal_Bool IsFree( long nY, long nX ) const;
+ inline sal_Bool IsCont( long nY, long nX ) const;
+ inline sal_Bool IsDone( long nY, long nX ) const;
};
@@ -299,36 +299,36 @@ ImplVectMap::~ImplVectMap()
// -----------------------------------------------------------------------------
-inline void ImplVectMap::Set( long nY, long nX, BYTE cVal )
+inline void ImplVectMap::Set( long nY, long nX, sal_uInt8 cVal )
{
- const BYTE cShift = sal::static_int_cast<BYTE>(6 - ( ( nX & 3 ) << 1 ));
+ const sal_uInt8 cShift = sal::static_int_cast<sal_uInt8>(6 - ( ( nX & 3 ) << 1 ));
( ( mpScan[ nY ][ nX >> 2 ] ) &= ~( 3 << cShift ) ) |= ( cVal << cShift );
}
// -----------------------------------------------------------------------------
-inline BYTE ImplVectMap::Get( long nY, long nX ) const
+inline sal_uInt8 ImplVectMap::Get( long nY, long nX ) const
{
- return sal::static_int_cast<BYTE>( ( ( mpScan[ nY ][ nX >> 2 ] ) >> ( 6 - ( ( nX & 3 ) << 1 ) ) ) & 3 );
+ return sal::static_int_cast<sal_uInt8>( ( ( mpScan[ nY ][ nX >> 2 ] ) >> ( 6 - ( ( nX & 3 ) << 1 ) ) ) & 3 );
}
// -----------------------------------------------------------------------------
-inline BOOL ImplVectMap::IsFree( long nY, long nX ) const
+inline sal_Bool ImplVectMap::IsFree( long nY, long nX ) const
{
return( VECT_FREE_INDEX == Get( nY, nX ) );
}
// -----------------------------------------------------------------------------
-inline BOOL ImplVectMap::IsCont( long nY, long nX ) const
+inline sal_Bool ImplVectMap::IsCont( long nY, long nX ) const
{
return( VECT_CONT_INDEX == Get( nY, nX ) );
}
// -----------------------------------------------------------------------------
-inline BOOL ImplVectMap::IsDone( long nY, long nX ) const
+inline sal_Bool ImplVectMap::IsDone( long nY, long nX ) const
{
return( VECT_DONE_INDEX == Get( nY, nX ) );
}
@@ -343,10 +343,10 @@ private:
Polygon maPoly;
Point maStartPt;
- ULONG mnArraySize;
- ULONG mnCount;
+ sal_uLong mnArraySize;
+ sal_uLong mnCount;
long mnResize;
- BYTE* mpCodes;
+ sal_uInt8* mpCodes;
void ImplGetSpace();
@@ -357,25 +357,25 @@ private:
public:
- ImplChain( ULONG nInitCount = 1024UL, long nResize = -1L );
+ ImplChain( sal_uLong nInitCount = 1024UL, long nResize = -1L );
~ImplChain();
void ImplBeginAdd( const Point& rStartPt );
- inline void ImplAdd( BYTE nCode );
- void ImplEndAdd( ULONG nTypeFlag );
+ inline void ImplAdd( sal_uInt8 nCode );
+ void ImplEndAdd( sal_uLong nTypeFlag );
const Polygon& ImplGetPoly() { return maPoly; }
};
// -----------------------------------------------------------------------------
-ImplChain::ImplChain( ULONG nInitCount, long nResize ) :
+ImplChain::ImplChain( sal_uLong nInitCount, long nResize ) :
mnArraySize ( nInitCount ),
mnCount ( 0UL ),
mnResize ( nResize )
{
DBG_ASSERT( nInitCount && nResize, "ImplChain::ImplChain(): invalid parameters!" );
- mpCodes = new BYTE[ mnArraySize ];
+ mpCodes = new sal_uInt8[ mnArraySize ];
}
// -----------------------------------------------------------------------------
@@ -389,11 +389,11 @@ ImplChain::~ImplChain()
void ImplChain::ImplGetSpace()
{
- const ULONG nOldArraySize = mnArraySize;
- BYTE* pNewCodes;
+ const sal_uLong nOldArraySize = mnArraySize;
+ sal_uInt8* pNewCodes;
- mnArraySize = ( mnResize < 0L ) ? ( mnArraySize << 1UL ) : ( mnArraySize + (ULONG) mnResize );
- pNewCodes = new BYTE[ mnArraySize ];
+ mnArraySize = ( mnResize < 0L ) ? ( mnArraySize << 1UL ) : ( mnArraySize + (sal_uLong) mnResize );
+ pNewCodes = new sal_uInt8[ mnArraySize ];
memcpy( pNewCodes, mpCodes, nOldArraySize );
delete[] mpCodes;
mpCodes = pNewCodes;
@@ -410,7 +410,7 @@ void ImplChain::ImplBeginAdd( const Point& rStartPt )
// -----------------------------------------------------------------------------
-inline void ImplChain::ImplAdd( BYTE nCode )
+inline void ImplChain::ImplAdd( sal_uInt8 nCode )
{
if( mnCount == mnArraySize )
ImplGetSpace();
@@ -420,7 +420,7 @@ inline void ImplChain::ImplAdd( BYTE nCode )
// -----------------------------------------------------------------------------
-void ImplChain::ImplEndAdd( ULONG nFlag )
+void ImplChain::ImplEndAdd( sal_uLong nFlag )
{
if( mnCount )
{
@@ -435,15 +435,15 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
nFirstY = nLastY = maStartPt.Y();
aArr.ImplSetSize( mnCount << 1 );
- USHORT i, nPolyPos;
+ sal_uInt16 i, nPolyPos;
for( i = 0, nPolyPos = 0; i < ( mnCount - 1 ); i++ )
{
- const BYTE cMove = mpCodes[ i ];
- const BYTE cNextMove = mpCodes[ i + 1 ];
+ const sal_uInt8 cMove = mpCodes[ i ];
+ const sal_uInt8 cNextMove = mpCodes[ i + 1 ];
const ChainMove& rMove = aImplMove[ cMove ];
const ChainMove& rMoveInner = aImplMoveInner[ cMove ];
// Point& rPt = aArr[ nPolyPos ];
- BOOL bDone = TRUE;
+ sal_Bool bDone = sal_True;
nLastX += rMove.nDX;
nLastY += rMove.nDY;
@@ -501,7 +501,7 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
aArr[ nPolyPos++ ].Y() = nLastY - 1;
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
else if( cMove == 7 && cNextMove == 0 )
{
@@ -520,7 +520,7 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
aArr[ nPolyPos++ ].Y() = nLastY;
}
else
- bDone = FALSE;
+ bDone = sal_False;
if( !bDone )
{
@@ -542,15 +542,15 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
nFirstY = nLastY = maStartPt.Y();
aArr.ImplSetSize( mnCount << 1 );
- USHORT i, nPolyPos;
+ sal_uInt16 i, nPolyPos;
for( i = 0, nPolyPos = 0; i < ( mnCount - 1 ); i++ )
{
- const BYTE cMove = mpCodes[ i ];
- const BYTE cNextMove = mpCodes[ i + 1 ];
+ const sal_uInt8 cMove = mpCodes[ i ];
+ const sal_uInt8 cNextMove = mpCodes[ i + 1 ];
const ChainMove& rMove = aImplMove[ cMove ];
const ChainMove& rMoveOuter = aImplMoveOuter[ cMove ];
// Point& rPt = aArr[ nPolyPos ];
- BOOL bDone = TRUE;
+ sal_Bool bDone = sal_True;
nLastX += rMove.nDX;
nLastY += rMove.nDY;
@@ -608,7 +608,7 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
aArr[ nPolyPos++ ].Y() = nLastY - 1;
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
else if( cMove == 7 && cNextMove == 3 )
{
@@ -627,7 +627,7 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
aArr[ nPolyPos++ ].Y() = nLastY + 1;
}
else
- bDone = FALSE;
+ bDone = sal_False;
if( !bDone )
{
@@ -647,7 +647,7 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
aArr.ImplSetSize( mnCount + 1 );
aArr[ 0 ] = Point( nLastX, nLastY );
- for( ULONG i = 0; i < mnCount; )
+ for( sal_uLong i = 0; i < mnCount; )
{
const ChainMove& rMove = aImplMove[ mpCodes[ i ] ];
aArr[ ++i ] = Point( nLastX += rMove.nDX, nLastY += rMove.nDY );
@@ -670,9 +670,9 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
ImplPointArray aNewArr2;
Point* pLast;
Point* pLeast;
- ULONG nNewPos;
- ULONG nCount = rArr.ImplGetRealSize();
- ULONG n;
+ sal_uLong nNewPos;
+ sal_uLong nCount = rArr.ImplGetRealSize();
+ sal_uLong n;
// pass 1
aNewArr1.ImplSetSize( nCount );
@@ -739,10 +739,10 @@ ImplVectorizer::~ImplVectorizer()
// -----------------------------------------------------------------------------
-BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
- BYTE cReduce, ULONG nFlags, const Link* pProgress )
+sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
+ sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
VECT_PROGRESS( pProgress, 0 );
@@ -756,9 +756,9 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
double fPercentStep_2 = 0.0;
const long nWidth = pRAcc->Width();
const long nHeight = pRAcc->Height();
- const USHORT nColorCount = pRAcc->GetPaletteEntryCount();
- USHORT n;
- ImplColorSet* pColorSet = (ImplColorSet*) new BYTE[ 256 * sizeof( ImplColorSet ) ];
+ const sal_uInt16 nColorCount = pRAcc->GetPaletteEntryCount();
+ sal_uInt16 n;
+ ImplColorSet* pColorSet = (ImplColorSet*) new sal_uInt8[ 256 * sizeof( ImplColorSet ) ];
memset( pColorSet, 0, 256 * sizeof( ImplColorSet ) );
rMtf.Clear();
@@ -785,11 +785,11 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
VECT_PROGRESS( pProgress, FRound( fPercent += 10.0 ) );
- for( USHORT i = 0; i < n; i++ )
+ for( sal_uInt16 i = 0; i < n; i++ )
{
const BitmapColor aBmpCol( pRAcc->GetPaletteColor( pColorSet[ i ].mnIndex ) );
const Color aFindColor( aBmpCol.GetRed(), aBmpCol.GetGreen(), aBmpCol.GetBlue() );
-// const BYTE cLum = aFindColor.GetLuminance();
+// const sal_uInt8 cLum = aFindColor.GetLuminance();
ImplVectMap* pMap = ImplExpand( pRAcc, aFindColor );
VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) );
@@ -809,8 +809,8 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
if( aPolyPoly.Count() )
{
- rMtf.AddAction( new MetaLineColorAction( aFindColor, TRUE ) );
- rMtf.AddAction( new MetaFillColorAction( aFindColor, TRUE ) );
+ rMtf.AddAction( new MetaLineColorAction( aFindColor, sal_True ) );
+ rMtf.AddAction( new MetaFillColorAction( aFindColor, sal_True ) );
rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) );
}
}
@@ -819,7 +819,7 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) );
}
- delete[] (BYTE*) pColorSet;
+ delete[] (sal_uInt8*) pColorSet;
if( rMtf.GetActionCount() )
{
@@ -831,7 +831,7 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
rMtf.SetPrefSize( Size( nWidth + 2, nHeight + 2 ) );
rMtf.Move( 1, 1 );
rMtf.Scale( aLogSize1.Width(), aLogSize1.Height() );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -844,14 +844,14 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
// -----------------------------------------------------------------------------
-BOOL ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
+sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
PolyPolygon& rPolyPoly,
- ULONG nFlags, const Link* pProgress )
+ sal_uLong nFlags, const Link* pProgress )
{
Bitmap* pBmp = new Bitmap( rMonoBmp );
BitmapReadAccess* pRAcc;
ImplVectMap* pMap;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
VECT_PROGRESS( pProgress, 10 );
@@ -925,13 +925,13 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
// put outmost polygon to the front
if( nFirstPoly > 0 )
{
- const Polygon aFirst( rPolyPoly.GetObject( static_cast< USHORT >( nFirstPoly ) ) );
+ const Polygon aFirst( rPolyPoly.GetObject( static_cast< sal_uInt16 >( nFirstPoly ) ) );
- rPolyPoly.Remove( static_cast< USHORT >( nFirstPoly ) );
+ rPolyPoly.Remove( static_cast< sal_uInt16 >( nFirstPoly ) );
rPolyPoly.Insert( aFirst, 0 );
}
- bRet = TRUE;
+ bRet = sal_True;
}
VECT_PROGRESS( pProgress, 100 );
@@ -947,14 +947,14 @@ void ImplVectorizer::ImplLimitPolyPoly( PolyPolygon& rPolyPoly )
{
PolyPolygon aNewPolyPoly;
long nReduce = 0;
- USHORT nNewCount;
+ sal_uInt16 nNewCount;
do
{
aNewPolyPoly.Clear();
nReduce++;
- for( USHORT i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
{
const Rectangle aBound( rPolyPoly[ i ].GetBoundRect() );
@@ -1068,14 +1068,14 @@ ImplVectMap* ImplVectorizer::ImplExpand( BitmapReadAccess* pRAcc, const Color& r
// -----------------------------------------------------------------------------
-void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, BYTE cReduce, ULONG nFlags )
+void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags )
{
const long nWidth = pMap->Width(), nHeight= pMap->Height();
for( long nY = 0L; nY < nHeight; nY++ )
{
long nX = 0L;
- BOOL bInner = TRUE;
+ sal_Bool bInner = sal_True;
while( nX < nWidth )
{
@@ -1137,15 +1137,15 @@ void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, B
// -----------------------------------------------------------------------------
-BOOL ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain )
+sal_Bool ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain )
{
long nActX = rStartPt.X();
long nActY = rStartPt.Y();
long nTryX;
long nTryY;
- ULONG nFound;
- ULONG nLastDir = 0UL;
- ULONG nDir;
+ sal_uLong nFound;
+ sal_uLong nLastDir = 0UL;
+ sal_uLong nDir;
do
{
@@ -1157,7 +1157,7 @@ BOOL ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, Im
if( pMap->IsCont( nTryY, nTryX ) )
{
- rChain.ImplAdd( (BYTE) nLastDir );
+ rChain.ImplAdd( (sal_uInt8) nLastDir );
pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX );
nFound = 1UL;
}
@@ -1174,7 +1174,7 @@ BOOL ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, Im
if( pMap->IsCont( nTryY, nTryX ) )
{
- rChain.ImplAdd( (BYTE) nDir );
+ rChain.ImplAdd( (sal_uInt8) nDir );
pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX );
nFound = 1UL;
nLastDir = nDir;
@@ -1186,19 +1186,19 @@ BOOL ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, Im
}
while( nFound );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL ImplVectorizer::ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const
+sal_Bool ImplVectorizer::ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const
{
if( pMap->IsDone( nY - 1L, nX ) )
- return TRUE;
+ return sal_True;
else if( pMap->IsDone( nY + 1L, nX ) )
- return FALSE;
+ return sal_False;
else if( pMap->IsDone( nY - 1L, nX - 1L ) || pMap->IsDone( nY - 1L, nX + 1L ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx
index b21a9df2eb7a..86fef6a04083 100644
--- a/vcl/source/gdi/impvect.hxx
+++ b/vcl/source/gdi/impvect.hxx
@@ -44,9 +44,9 @@ class ImplVectorizer
private:
ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor );
- void ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, BYTE cReduce, ULONG nFlags );
- BOOL ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
- BOOL ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const;
+ void ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags );
+ sal_Bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
+ sal_Bool ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const;
void ImplLimitPolyPoly( PolyPolygon& rPolyPoly );
public:
@@ -54,10 +54,10 @@ public:
ImplVectorizer();
~ImplVectorizer();
- BOOL ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
- BYTE cReduce, ULONG nFlags, const Link* pProgress );
- BOOL ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly,
- ULONG nFlags, const Link* pProgress );
+ sal_Bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
+ sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress );
+ sal_Bool ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly,
+ sal_uLong nFlags, const Link* pProgress );
};
#endif
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 2bc0addaa93c..ff3c9a20ef06 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -40,8 +40,8 @@
DBG_NAME( JobSetup )
#define JOBSET_FILEFORMAT2 3780
-#define JOBSET_FILE364_SYSTEM ((USHORT)0xFFFF)
-#define JOBSET_FILE605_SYSTEM ((USHORT)0xFFFE)
+#define JOBSET_FILE364_SYSTEM ((sal_uInt16)0xFFFF)
+#define JOBSET_FILE605_SYSTEM ((sal_uInt16)0xFFFE)
struct ImplOldJobSetupData
{
@@ -96,7 +96,7 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
mnDriverDataLen = rJobSetup.mnDriverDataLen;
if ( rJobSetup.mpDriverData )
{
- mpDriverData = (BYTE*)rtl_allocateMemory( mnDriverDataLen );
+ mpDriverData = (sal_uInt8*)rtl_allocateMemory( mnDriverDataLen );
memcpy( mpDriverData, rJobSetup.mpDriverData, mnDriverDataLen );
}
else
@@ -259,16 +259,16 @@ JobSetup& JobSetup::operator=( const JobSetup& rJobSetup )
// -----------------------------------------------------------------------
-BOOL JobSetup::operator==( const JobSetup& rJobSetup ) const
+sal_Bool JobSetup::operator==( const JobSetup& rJobSetup ) const
{
DBG_CHKTHIS( JobSetup, NULL );
DBG_CHKOBJ( &rJobSetup, JobSetup, NULL );
if ( mpData == rJobSetup.mpData )
- return TRUE;
+ return sal_True;
if ( !mpData || !rJobSetup.mpData )
- return FALSE;
+ return sal_False;
ImplJobSetup* pData1 = mpData;
ImplJobSetup* pData2 = rJobSetup.mpData;
@@ -285,9 +285,9 @@ BOOL JobSetup::operator==( const JobSetup& rJobSetup ) const
(memcmp( pData1->mpDriverData, pData2->mpDriverData, pData1->mnDriverDataLen ) == 0) &&
(pData1->maValueMap == pData2->maValueMap)
)
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -299,8 +299,8 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
// Zur Zeit haben wir noch kein neues FileFormat
// if ( rIStream.GetVersion() < JOBSET_FILEFORMAT2 )
{
- USHORT nLen;
- USHORT nSystem;
+ sal_uInt16 nLen;
+ sal_uInt16 nSystem;
sal_Size nFirstPos = rIStream.Tell();
rIStream >> nLen;
if ( !nLen )
@@ -333,7 +333,7 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
nSystem == JOBSET_FILE605_SYSTEM )
{
Impl364JobSetupData* pOldJobData = (Impl364JobSetupData*)(pTempBuf + sizeof( ImplOldJobSetupData ));
- USHORT nOldJobDataSize = SVBT16ToShort( pOldJobData->nSize );
+ sal_uInt16 nOldJobDataSize = SVBT16ToShort( pOldJobData->nSize );
pJobData->mnSystem = SVBT16ToShort( pOldJobData->nSystem );
pJobData->mnDriverDataLen = SVBT32ToUInt32( pOldJobData->nDriverDataLen );
pJobData->meOrientation = (Orientation)SVBT16ToShort( pOldJobData->nOrientation );
@@ -344,8 +344,8 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
pJobData->mnPaperHeight = (long)SVBT32ToUInt32( pOldJobData->nPaperHeight );
if ( pJobData->mnDriverDataLen )
{
- BYTE* pDriverData = ((BYTE*)pOldJobData) + nOldJobDataSize;
- pJobData->mpDriverData = (BYTE*)rtl_allocateMemory( pJobData->mnDriverDataLen );
+ sal_uInt8* pDriverData = ((sal_uInt8*)pOldJobData) + nOldJobDataSize;
+ pJobData->mpDriverData = (sal_uInt8*)rtl_allocateMemory( pJobData->mnDriverDataLen );
memcpy( pJobData->mpDriverData, pDriverData, pJobData->mnDriverDataLen );
}
if( nSystem == JOBSET_FILE605_SYSTEM )
@@ -396,24 +396,24 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
// Zur Zeit haben wir noch kein neues FileFormat
// if ( rOStream.GetVersion() < JOBSET_FILEFORMAT2 )
{
- USHORT nLen = 0;
+ sal_uInt16 nLen = 0;
if ( !rJobSetup.mpData )
rOStream << nLen;
else
{
- USHORT nSystem = JOBSET_FILE605_SYSTEM;
+ sal_uInt16 nSystem = JOBSET_FILE605_SYSTEM;
const ImplJobSetup* pJobData = rJobSetup.ImplGetConstData();
Impl364JobSetupData aOldJobData;
- USHORT nOldJobDataSize = sizeof( aOldJobData );
+ sal_uInt16 nOldJobDataSize = sizeof( aOldJobData );
ShortToSVBT16( nOldJobDataSize, aOldJobData.nSize );
ShortToSVBT16( pJobData->mnSystem, aOldJobData.nSystem );
UInt32ToSVBT32( pJobData->mnDriverDataLen, aOldJobData.nDriverDataLen );
- ShortToSVBT16( (USHORT)(pJobData->meOrientation), aOldJobData.nOrientation );
+ ShortToSVBT16( (sal_uInt16)(pJobData->meOrientation), aOldJobData.nOrientation );
ShortToSVBT16( pJobData->mnPaperBin, aOldJobData.nPaperBin );
- ShortToSVBT16( (USHORT)(pJobData->mePaperFormat), aOldJobData.nPaperFormat );
- UInt32ToSVBT32( (ULONG)(pJobData->mnPaperWidth), aOldJobData.nPaperWidth );
- UInt32ToSVBT32( (ULONG)(pJobData->mnPaperHeight), aOldJobData.nPaperHeight );
+ ShortToSVBT16( (sal_uInt16)(pJobData->mePaperFormat), aOldJobData.nPaperFormat );
+ UInt32ToSVBT32( (sal_uLong)(pJobData->mnPaperWidth), aOldJobData.nPaperWidth );
+ UInt32ToSVBT32( (sal_uLong)(pJobData->mnPaperHeight), aOldJobData.nPaperHeight );
ImplOldJobSetupData aOldData;
memset( &aOldData, 0, sizeof( aOldData ) );
@@ -442,7 +442,7 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
case DUPLEX_SHORTEDGE: rOStream.WriteByteString( "DUPLEX_SHORTEDGE" );break;
case DUPLEX_LONGEDGE: rOStream.WriteByteString( "DUPLEX_LONGEDGE" );break;
}
- nLen = sal::static_int_cast<USHORT>(rOStream.Tell() - nPos);
+ nLen = sal::static_int_cast<sal_uInt16>(rOStream.Tell() - nPos);
rOStream.Seek( nPos );
rOStream << nLen;
rOStream.Seek( nPos + nLen );
diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx
index 3c642388fc86..ebd55a48f593 100644
--- a/vcl/source/gdi/lineinfo.cxx
+++ b/vcl/source/gdi/lineinfo.cxx
@@ -133,7 +133,7 @@ LineInfo& LineInfo::operator=( const LineInfo& rLineInfo )
// -----------------------------------------------------------------------
-BOOL LineInfo::operator==( const LineInfo& rLineInfo ) const
+sal_Bool LineInfo::operator==( const LineInfo& rLineInfo ) const
{
DBG_CHKTHIS( LineInfo, NULL );
DBG_CHKOBJ( &rLineInfo, LineInfo, NULL );
@@ -175,7 +175,7 @@ void LineInfo::SetWidth( long nWidth )
// -----------------------------------------------------------------------
-void LineInfo::SetDashCount( USHORT nDashCount )
+void LineInfo::SetDashCount( sal_uInt16 nDashCount )
{
DBG_CHKTHIS( LineInfo, NULL );
ImplMakeUnique();
@@ -193,7 +193,7 @@ void LineInfo::SetDashLen( long nDashLen )
// -----------------------------------------------------------------------
-void LineInfo::SetDotCount( USHORT nDotCount )
+void LineInfo::SetDotCount( sal_uInt16 nDotCount )
{
DBG_CHKTHIS( LineInfo, NULL );
ImplMakeUnique();
@@ -236,7 +236,7 @@ void LineInfo::SetLineJoin(basegfx::B2DLineJoin eLineJoin)
SvStream& operator>>( SvStream& rIStm, ImplLineInfo& rImplLineInfo )
{
VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
rIStm >> nTmp16; rImplLineInfo.meStyle = (LineStyle) nTmp16;
rIStm >> rImplLineInfo.mnWidth;
@@ -265,7 +265,7 @@ SvStream& operator<<( SvStream& rOStm, const ImplLineInfo& rImplLineInfo )
VersionCompat aCompat( rOStm, STREAM_WRITE, 3 );
// version 1
- rOStm << (UINT16) rImplLineInfo.meStyle << rImplLineInfo.mnWidth;
+ rOStm << (sal_uInt16) rImplLineInfo.meStyle << rImplLineInfo.mnWidth;
// since version2
rOStm << rImplLineInfo.mnDashCount << rImplLineInfo.mnDashLen;
@@ -273,7 +273,7 @@ SvStream& operator<<( SvStream& rOStm, const ImplLineInfo& rImplLineInfo )
rOStm << rImplLineInfo.mnDistance;
// since version3
- rOStm << (UINT16) rImplLineInfo.meLineJoin;
+ rOStm << (sal_uInt16) rImplLineInfo.meLineJoin;
return rOStm;
}
diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx
index 34f0f473c7f8..5eff28d559a7 100644
--- a/vcl/source/gdi/mapmod.cxx
+++ b/vcl/source/gdi/mapmod.cxx
@@ -45,7 +45,7 @@ ImplMapMode::ImplMapMode() :
{
mnRefCount = 1;
meUnit = MAP_PIXEL;
- mbSimple = FALSE;
+ mbSimple = sal_False;
}
// -----------------------------------------------------------------------
@@ -57,7 +57,7 @@ ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) :
{
mnRefCount = 1;
meUnit = rImplMapMode.meUnit;
- mbSimple = FALSE;
+ mbSimple = sal_False;
}
// -----------------------------------------------------------------------
@@ -65,7 +65,7 @@ ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) :
SvStream& operator>>( SvStream& rIStm, ImplMapMode& rImplMapMode )
{
VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
rIStm >> nTmp16; rImplMapMode.meUnit = (MapUnit) nTmp16;
rIStm >> rImplMapMode.maOrigin >> rImplMapMode.maScaleX >>
@@ -80,7 +80,7 @@ SvStream& operator<<( SvStream& rOStm, const ImplMapMode& rImplMapMode )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
- rOStm << (UINT16) rImplMapMode.meUnit <<
+ rOStm << (sal_uInt16) rImplMapMode.meUnit <<
rImplMapMode.maOrigin <<
rImplMapMode.maScaleX <<
rImplMapMode.maScaleY <<
@@ -106,7 +106,7 @@ ImplMapMode* ImplMapMode::ImplGetStaticMapMode( MapUnit eUnit )
pImplMapMode->maScaleX = aDefFraction;
pImplMapMode->maScaleY = aDefFraction;
pImplMapMode->meUnit = eUnit;
- pImplMapMode->mbSimple = TRUE;
+ pImplMapMode->mbSimple = sal_True;
}
return pImplMapMode;
@@ -259,40 +259,40 @@ MapMode& MapMode::operator=( const MapMode& rMapMode )
// -----------------------------------------------------------------------
-BOOL MapMode::operator==( const MapMode& rMapMode ) const
+sal_Bool MapMode::operator==( const MapMode& rMapMode ) const
{
DBG_CHKTHIS( MapMode, NULL );
DBG_CHKOBJ( &rMapMode, MapMode, NULL );
if ( mpImplMapMode == rMapMode.mpImplMapMode )
- return TRUE;
+ return sal_True;
if ( (mpImplMapMode->meUnit == rMapMode.mpImplMapMode->meUnit) &&
(mpImplMapMode->maOrigin == rMapMode.mpImplMapMode->maOrigin) &&
(mpImplMapMode->maScaleX == rMapMode.mpImplMapMode->maScaleX) &&
(mpImplMapMode->maScaleY == rMapMode.mpImplMapMode->maScaleY) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL MapMode::IsDefault() const
+sal_Bool MapMode::IsDefault() const
{
DBG_CHKTHIS( MapMode, NULL );
ImplMapMode* pDefMapMode = ImplMapMode::ImplGetStaticMapMode( MAP_PIXEL );
if ( mpImplMapMode == pDefMapMode )
- return TRUE;
+ return sal_True;
if ( (mpImplMapMode->meUnit == pDefMapMode->meUnit) &&
(mpImplMapMode->maOrigin == pDefMapMode->maOrigin) &&
(mpImplMapMode->maScaleX == pDefMapMode->maScaleX) &&
(mpImplMapMode->maScaleY == pDefMapMode->maScaleY) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index f398888a33b6..eab6af8444e5 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -65,7 +65,7 @@ inline void ImplScaleRect( Rectangle& rRect, double fScaleX, double fScaleY )
inline void ImplScalePoly( Polygon& rPoly, double fScaleX, double fScaleY )
{
- for( USHORT i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
ImplScalePoint( rPoly[ i ], fScaleX, fScaleY );
}
@@ -102,7 +102,7 @@ MetaAction::MetaAction() :
// ------------------------------------------------------------------------
-MetaAction::MetaAction( USHORT nType ) :
+MetaAction::MetaAction( sal_uInt16 nType ) :
mnRefCount( 1 ),
mnType( nType )
{
@@ -175,7 +175,7 @@ void MetaAction::Read( SvStream& rIStm, ImplMetaReadData* )
MetaAction* MetaAction::ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData )
{
MetaAction* pAction = NULL;
- UINT16 nType;
+ sal_uInt16 nType;
rIStm >> nType;
@@ -308,7 +308,7 @@ void MetaPixelAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
rOStm << maPt;
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
}
// ------------------------------------------------------------------------
@@ -317,7 +317,7 @@ void MetaPixelAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
rIStm >> maPt;
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
}
// ========================================================================
@@ -1132,7 +1132,7 @@ void MetaPolyPolygonAction::Move( long nHorzMove, long nVertMove )
void MetaPolyPolygonAction::Scale( double fScaleX, double fScaleY )
{
- for( USHORT i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
}
@@ -1205,7 +1205,7 @@ IMPL_META_ACTION( Text, META_TEXT_ACTION )
// ------------------------------------------------------------------------
MetaTextAction::MetaTextAction( const Point& rPt, const XubString& rStr,
- USHORT nIndex, USHORT nLen ) :
+ sal_uInt16 nIndex, sal_uInt16 nLen ) :
MetaAction ( META_TEXT_ACTION ),
maPt ( rPt ),
maStr ( rStr ),
@@ -1314,7 +1314,7 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
{
if( rAction.mpDXAry )
{
- const ULONG nAryLen = mnLen;
+ const sal_uLong nAryLen = mnLen;
mpDXAry = new sal_Int32[ nAryLen ];
memcpy( mpDXAry, rAction.mpDXAry, nAryLen * sizeof( sal_Int32 ) );
@@ -1328,15 +1328,15 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
const XubString& rStr,
const sal_Int32* pDXAry,
- USHORT nIndex,
- USHORT nLen ) :
+ sal_uInt16 nIndex,
+ sal_uInt16 nLen ) :
MetaAction ( META_TEXTARRAY_ACTION ),
maStartPt ( rStartPt ),
maStr ( rStr ),
mnIndex ( nIndex ),
mnLen ( ( nLen == STRING_LEN ) ? rStr.Len() : nLen )
{
- const ULONG nAryLen = pDXAry ? mnLen : 0;
+ const sal_uLong nAryLen = pDXAry ? mnLen : 0;
if( nAryLen )
{
@@ -1385,7 +1385,7 @@ void MetaTextArrayAction::Scale( double fScaleX, double fScaleY )
if ( mpDXAry && mnLen )
{
- for ( USHORT i = 0, nCount = mnLen; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mnLen; i < nCount; i++ )
mpDXAry[ i ] = FRound( mpDXAry[ i ] * fabs(fScaleX) );
}
}
@@ -1414,7 +1414,7 @@ void MetaTextArrayAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
rOStm << mnLen;
rOStm << nAryLen;
- for( ULONG i = 0UL; i < nAryLen; i++ )
+ for( sal_uLong i = 0UL; i < nAryLen; i++ )
rOStm << mpDXAry[ i ];
sal_uInt16 j, nLen = maStr.Len(); // version 2
@@ -1456,7 +1456,7 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
mpDXAry = new (std::nothrow)sal_Int32[ mnLen ];
if ( mpDXAry )
{
- ULONG i;
+ sal_uLong i;
for( i = 0UL; i < nAryLen; i++ )
rIStm >> mpDXAry[ i ];
@@ -1498,7 +1498,7 @@ IMPL_META_ACTION( StretchText, META_STRETCHTEXT_ACTION )
MetaStretchTextAction::MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
const XubString& rStr,
- USHORT nIndex, USHORT nLen ) :
+ sal_uInt16 nIndex, sal_uInt16 nLen ) :
MetaAction ( META_STRETCHTEXT_ACTION ),
maPt ( rPt ),
maStr ( rStr ),
@@ -1536,7 +1536,7 @@ void MetaStretchTextAction::Move( long nHorzMove, long nVertMove )
void MetaStretchTextAction::Scale( double fScaleX, double fScaleY )
{
ImplScalePoint( maPt, fScaleX, fScaleY );
- mnWidth = (ULONG)FRound( mnWidth * fabs(fScaleX) );
+ mnWidth = (sal_uLong)FRound( mnWidth * fabs(fScaleX) );
}
// ------------------------------------------------------------------------
@@ -1598,7 +1598,7 @@ IMPL_META_ACTION( TextRect, META_TEXTRECT_ACTION )
// ------------------------------------------------------------------------
MetaTextRectAction::MetaTextRectAction( const Rectangle& rRect,
- const XubString& rStr, USHORT nStyle ) :
+ const XubString& rStr, sal_uInt16 nStyle ) :
MetaAction ( META_TEXTRECT_ACTION ),
maRect ( rRect ),
maStr ( rStr ),
@@ -2456,7 +2456,7 @@ void MetaMaskScalePartAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
rOStm << maBmp;
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
rOStm << maDstPt << maDstSz << maSrcPt << maSrcSz;
}
}
@@ -2467,7 +2467,7 @@ void MetaMaskScalePartAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
rIStm >> maBmp;
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
rIStm >> maDstPt >> maDstSz >> maSrcPt >> maSrcSz;
}
@@ -2588,7 +2588,7 @@ void MetaGradientExAction::Move( long nHorzMove, long nVertMove )
void MetaGradientExAction::Scale( double fScaleX, double fScaleY )
{
- for( USHORT i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
}
@@ -2662,7 +2662,7 @@ void MetaHatchAction::Move( long nHorzMove, long nVertMove )
void MetaHatchAction::Scale( double fScaleX, double fScaleY )
{
- for( USHORT i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
}
@@ -2770,7 +2770,7 @@ IMPL_META_ACTION( ClipRegion, META_CLIPREGION_ACTION )
// ------------------------------------------------------------------------
-MetaClipRegionAction::MetaClipRegionAction( const Region& rRegion, BOOL bClip ) :
+MetaClipRegionAction::MetaClipRegionAction( const Region& rRegion, sal_Bool bClip ) :
MetaAction ( META_CLIPREGION_ACTION ),
maRegion ( rRegion ),
mbClip ( bClip )
@@ -3031,7 +3031,7 @@ IMPL_META_ACTION( LineColor, META_LINECOLOR_ACTION )
// ------------------------------------------------------------------------
-MetaLineColorAction::MetaLineColorAction( const Color& rColor, BOOL bSet ) :
+MetaLineColorAction::MetaLineColorAction( const Color& rColor, sal_Bool bSet ) :
MetaAction ( META_LINECOLOR_ACTION ),
maColor ( rColor ),
mbSet ( bSet )
@@ -3070,7 +3070,7 @@ sal_Bool MetaLineColorAction::Compare( const MetaAction& rMetaAction ) const
void MetaLineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
rOStm << mbSet;
}
@@ -3079,7 +3079,7 @@ void MetaLineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
rIStm >> mbSet;
}
@@ -3089,7 +3089,7 @@ IMPL_META_ACTION( FillColor, META_FILLCOLOR_ACTION )
// ------------------------------------------------------------------------
-MetaFillColorAction::MetaFillColorAction( const Color& rColor, BOOL bSet ) :
+MetaFillColorAction::MetaFillColorAction( const Color& rColor, sal_Bool bSet ) :
MetaAction ( META_FILLCOLOR_ACTION ),
maColor ( rColor ),
mbSet ( bSet )
@@ -3128,7 +3128,7 @@ sal_Bool MetaFillColorAction::Compare( const MetaAction& rMetaAction ) const
void MetaFillColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
rOStm << mbSet;
}
@@ -3137,7 +3137,7 @@ void MetaFillColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
rIStm >> mbSet;
}
@@ -3181,7 +3181,7 @@ sal_Bool MetaTextColorAction::Compare( const MetaAction& rMetaAction ) const
void MetaTextColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
}
// ------------------------------------------------------------------------
@@ -3189,7 +3189,7 @@ void MetaTextColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaTextColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
}
// ========================================================================
@@ -3198,7 +3198,7 @@ IMPL_META_ACTION( TextFillColor, META_TEXTFILLCOLOR_ACTION )
// ------------------------------------------------------------------------
-MetaTextFillColorAction::MetaTextFillColorAction( const Color& rColor, BOOL bSet ) :
+MetaTextFillColorAction::MetaTextFillColorAction( const Color& rColor, sal_Bool bSet ) :
MetaAction ( META_TEXTFILLCOLOR_ACTION ),
maColor ( rColor ),
mbSet ( bSet )
@@ -3237,7 +3237,7 @@ sal_Bool MetaTextFillColorAction::Compare( const MetaAction& rMetaAction ) const
void MetaTextFillColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
rOStm << mbSet;
}
@@ -3246,7 +3246,7 @@ void MetaTextFillColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaTextFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
rIStm >> mbSet;
}
@@ -3256,7 +3256,7 @@ IMPL_META_ACTION( TextLineColor, META_TEXTLINECOLOR_ACTION )
// ------------------------------------------------------------------------
-MetaTextLineColorAction::MetaTextLineColorAction( const Color& rColor, BOOL bSet ) :
+MetaTextLineColorAction::MetaTextLineColorAction( const Color& rColor, sal_Bool bSet ) :
MetaAction ( META_TEXTLINECOLOR_ACTION ),
maColor ( rColor ),
mbSet ( bSet )
@@ -3295,7 +3295,7 @@ sal_Bool MetaTextLineColorAction::Compare( const MetaAction& rMetaAction ) const
void MetaTextLineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
rOStm << mbSet;
}
@@ -3304,7 +3304,7 @@ void MetaTextLineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaTextLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
rIStm >> mbSet;
}
@@ -3314,7 +3314,7 @@ IMPL_META_ACTION( OverlineColor, META_OVERLINECOLOR_ACTION )
// ------------------------------------------------------------------------
-MetaOverlineColorAction::MetaOverlineColorAction( const Color& rColor, BOOL bSet ) :
+MetaOverlineColorAction::MetaOverlineColorAction( const Color& rColor, sal_Bool bSet ) :
MetaAction ( META_OVERLINECOLOR_ACTION ),
maColor ( rColor ),
mbSet ( bSet )
@@ -3353,7 +3353,7 @@ sal_Bool MetaOverlineColorAction::Compare( const MetaAction& rMetaAction ) const
void MetaOverlineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
rOStm << mbSet;
}
@@ -3362,7 +3362,7 @@ void MetaOverlineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaOverlineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
rIStm >> mbSet;
}
@@ -3406,14 +3406,14 @@ sal_Bool MetaTextAlignAction::Compare( const MetaAction& rMetaAction ) const
void MetaTextAlignAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- rOStm << (UINT16) maAlign;
+ rOStm << (sal_uInt16) maAlign;
}
// ------------------------------------------------------------------------
void MetaTextAlignAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
COMPAT( rIStm );
rIStm >> nTmp16; maAlign = (TextAlign) nTmp16;
@@ -3563,7 +3563,7 @@ IMPL_META_ACTION( Push, META_PUSH_ACTION )
// ------------------------------------------------------------------------
-MetaPushAction::MetaPushAction( USHORT nFlags ) :
+MetaPushAction::MetaPushAction( sal_uInt16 nFlags ) :
MetaAction ( META_PUSH_ACTION ),
mnFlags ( nFlags )
{
@@ -3682,14 +3682,14 @@ sal_Bool MetaRasterOpAction::Compare( const MetaAction& rMetaAction ) const
void MetaRasterOpAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- rOStm << (UINT16) meRasterOp;
+ rOStm << (sal_uInt16) meRasterOp;
}
// ------------------------------------------------------------------------
void MetaRasterOpAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
COMPAT( rIStm );
rIStm >> nTmp16; meRasterOp = (RasterOp) nTmp16;
@@ -3701,7 +3701,7 @@ IMPL_META_ACTION( Transparent, META_TRANSPARENT_ACTION )
// ------------------------------------------------------------------------
-MetaTransparentAction::MetaTransparentAction( const PolyPolygon& rPolyPoly, USHORT nTransPercent ) :
+MetaTransparentAction::MetaTransparentAction( const PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent ) :
MetaAction ( META_TRANSPARENT_ACTION ),
maPolyPoly ( rPolyPoly ),
mnTransPercent ( nTransPercent )
@@ -3735,7 +3735,7 @@ void MetaTransparentAction::Move( long nHorzMove, long nVertMove )
void MetaTransparentAction::Scale( double fScaleX, double fScaleY )
{
- for( USHORT i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
}
@@ -3942,7 +3942,7 @@ IMPL_META_ACTION( RefPoint, META_REFPOINT_ACTION )
// ------------------------------------------------------------------------
-MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, BOOL bSet ) :
+MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, sal_Bool bSet ) :
MetaAction ( META_REFPOINT_ACTION ),
maRefPoint ( rRefPoint ),
mbSet ( bSet )
@@ -4013,7 +4013,7 @@ MetaCommentAction::MetaCommentAction( const MetaCommentAction& rAct ) :
// ------------------------------------------------------------------------
-MetaCommentAction::MetaCommentAction( const ByteString& rComment, sal_Int32 nValue, const BYTE* pData, sal_uInt32 nDataSize ) :
+MetaCommentAction::MetaCommentAction( const ByteString& rComment, sal_Int32 nValue, const sal_uInt8* pData, sal_uInt32 nDataSize ) :
MetaAction ( META_COMMENT_ACTION ),
maComment ( rComment ),
mnValue ( nValue )
@@ -4023,7 +4023,7 @@ MetaCommentAction::MetaCommentAction( const ByteString& rComment, sal_Int32 nVal
// ------------------------------------------------------------------------
-MetaCommentAction::MetaCommentAction( const BYTE* pData, sal_uInt32 nDataSize ) :
+MetaCommentAction::MetaCommentAction( const sal_uInt8* pData, sal_uInt32 nDataSize ) :
MetaAction ( META_COMMENT_ACTION ),
mnValue ( 0L )
{
@@ -4040,11 +4040,11 @@ MetaCommentAction::~MetaCommentAction()
// ------------------------------------------------------------------------
-void MetaCommentAction::ImplInitDynamicData( const BYTE* pData, sal_uInt32 nDataSize )
+void MetaCommentAction::ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize )
{
if ( nDataSize && pData )
{
- mnDataSize = nDataSize, mpData = new BYTE[ mnDataSize ];
+ mnDataSize = nDataSize, mpData = new sal_uInt8[ mnDataSize ];
memcpy( mpData, pData, mnDataSize );
}
else
@@ -4103,7 +4103,7 @@ void MetaCommentAction::Move( long nXMove, long nYMove )
aDest << aFill;
}
delete[] mpData;
- ImplInitDynamicData( static_cast<const BYTE*>( aDest.GetData() ), aDest.Tell() );
+ ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
}
}
}
@@ -4145,7 +4145,7 @@ void MetaCommentAction::Scale( double fXScale, double fYScale )
aDest << aFill;
}
delete[] mpData;
- ImplInitDynamicData( static_cast<const BYTE*>( aDest.GetData() ), aDest.Tell() );
+ ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
}
}
}
@@ -4184,7 +4184,7 @@ void MetaCommentAction::Read( SvStream& rIStm, ImplMetaReadData* )
if( mnDataSize )
{
- mpData = new BYTE[ mnDataSize ];
+ mpData = new sal_uInt8[ mnDataSize ];
rIStm.Read( mpData, mnDataSize );
}
else
diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx
index 6d225ad7e0dc..01f88e9d8860 100644
--- a/vcl/source/gdi/metric.cxx
+++ b/vcl/source/gdi/metric.cxx
@@ -126,15 +126,15 @@ FontInfo& FontInfo::operator=( const FontInfo& rInfo )
// -----------------------------------------------------------------------
-BOOL FontInfo::operator==( const FontInfo& rInfo ) const
+sal_Bool FontInfo::operator==( const FontInfo& rInfo ) const
{
if( !Font::operator==( rInfo ) )
- return FALSE;
+ return sal_False;
if( mpImplMetric == rInfo.mpImplMetric )
- return TRUE;
+ return sal_True;
if( *mpImplMetric == *rInfo.mpImplMetric )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -146,28 +146,28 @@ FontType FontInfo::GetType() const
// -----------------------------------------------------------------------
-BOOL FontInfo::IsDeviceFont() const
+sal_Bool FontInfo::IsDeviceFont() const
{
return mpImplMetric->IsDeviceFont();
}
// -----------------------------------------------------------------------
-BOOL FontInfo::SupportsLatin() const
+sal_Bool FontInfo::SupportsLatin() const
{
return mpImplMetric->SupportsLatin();
}
// -----------------------------------------------------------------------
-BOOL FontInfo::SupportsCJK() const
+sal_Bool FontInfo::SupportsCJK() const
{
return mpImplMetric->SupportsCJK();
}
// -----------------------------------------------------------------------
-BOOL FontInfo::SupportsCTL() const
+sal_Bool FontInfo::SupportsCTL() const
{
return mpImplMetric->SupportsCTL();
}
@@ -230,7 +230,7 @@ FontMetric& FontMetric::operator =( const FontMetric& rMetric )
// -----------------------------------------------------------------------
-BOOL FontMetric::operator==( const FontMetric& rMetric ) const
+sal_Bool FontMetric::operator==( const FontMetric& rMetric ) const
{
return FontInfo::operator==( rMetric );
}
@@ -239,7 +239,7 @@ BOOL FontMetric::operator==( const FontMetric& rMetric ) const
CmapResult::CmapResult( bool bSymbolic,
const sal_uInt32* pRangeCodes, int nRangeCount,
- const int* pStartGlyphs, const USHORT* pExtraGlyphIds )
+ const int* pStartGlyphs, const sal_uInt16* pExtraGlyphIds )
: mpRangeCodes( pRangeCodes)
, mpStartGlyphs( pStartGlyphs)
, mpGlyphIds( pExtraGlyphIds)
@@ -627,7 +627,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
sal_uInt32* pCodePairs = NULL;
int* pStartGlyphs = NULL;
- typedef std::vector<USHORT> U16Vector;
+ typedef std::vector<sal_uInt16> U16Vector;
U16Vector aGlyphIdArray;
aGlyphIdArray.reserve( 0x1000 );
aGlyphIdArray.push_back( 0 );
@@ -665,7 +665,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
const unsigned char* pGlyphIdPtr = pOffsetBase + 2*i + nRangeOffset;
for( sal_uInt32 c = cMinChar; c <= cMaxChar; ++c, pGlyphIdPtr+=2 ) {
const int nGlyphIndex = GetUShort( pGlyphIdPtr ) + nGlyphDelta;
- aGlyphIdArray.push_back( static_cast<USHORT>(nGlyphIndex) );
+ aGlyphIdArray.push_back( static_cast<sal_uInt16>(nGlyphIndex) );
}
}
}
@@ -814,11 +814,11 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
// prepare the glyphid-array if needed
// TODO: merge ranges if they are close enough?
- USHORT* pGlyphIds = NULL;
+ sal_uInt16* pGlyphIds = NULL;
if( !aGlyphIdArray.empty())
{
- pGlyphIds = new USHORT[ aGlyphIdArray.size() ];
- USHORT* pOut = pGlyphIds;
+ pGlyphIds = new sal_uInt16[ aGlyphIdArray.size() ];
+ sal_uInt16* pOut = pGlyphIds;
U16Vector::const_iterator it = aGlyphIdArray.begin();
while( it != aGlyphIdArray.end() )
*(pOut++) = *(it++);
@@ -876,14 +876,14 @@ void FontCharMap::Reset( const ImplFontCharMap* pNewMap )
// -----------------------------------------------------------------------
-BOOL FontCharMap::IsDefaultMap() const
+sal_Bool FontCharMap::IsDefaultMap() const
{
return mpImpl->IsDefaultMap();
}
// -----------------------------------------------------------------------
-BOOL FontCharMap::HasChar( sal_uInt32 cChar ) const
+sal_Bool FontCharMap::HasChar( sal_uInt32 cChar ) const
{
return mpImpl->HasChar( cChar );
}
diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx
index 0660728fc8a5..658856dbe100 100644
--- a/vcl/source/gdi/octree.cxx
+++ b/vcl/source/gdi/octree.cxx
@@ -36,18 +36,18 @@
// - pMask -
// ---------
-static BYTE pImplMask[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
+static sal_uInt8 pImplMask[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
// -------------
// - NodeCache -
// -------------
-ImpNodeCache::ImpNodeCache( const ULONG nInitSize ) :
+ImpNodeCache::ImpNodeCache( const sal_uLong nInitSize ) :
pActNode( NULL )
{
- const ULONG nSize = nInitSize + 4;
+ const sal_uLong nSize = nInitSize + 4;
- for( ULONG i = 0; i < nSize; i++ )
+ for( sal_uLong i = 0; i < nSize; i++ )
{
OctreeNode* pNewNode = new NODE;
@@ -73,7 +73,7 @@ ImpNodeCache::~ImpNodeCache()
// - Octree -
// ----------
-Octree::Octree( ULONG nColors ) :
+Octree::Octree( sal_uLong nColors ) :
nMax ( nColors ),
nLeafCount ( 0L ),
pTree ( NULL ),
@@ -85,7 +85,7 @@ Octree::Octree( ULONG nColors ) :
// ------------------------------------------------------------------------
-Octree::Octree( const BitmapReadAccess& rReadAcc, ULONG nColors ) :
+Octree::Octree( const BitmapReadAccess& rReadAcc, sal_uLong nColors ) :
nMax ( nColors ),
nLeafCount ( 0L ),
pTree ( NULL ),
@@ -166,7 +166,7 @@ void Octree::ImplCreateOctree()
void Octree::ImplDeleteOctree( PPNODE ppNode )
{
- for ( ULONG i = 0UL; i < 8UL; i++ )
+ for ( sal_uLong i = 0UL; i < 8UL; i++ )
{
if ( (*ppNode)->pChild[ i ] )
ImplDeleteOctree( &(*ppNode)->pChild[ i ] );
@@ -204,9 +204,9 @@ void Octree::ImplAdd( PPNODE ppNode )
}
else
{
- const ULONG nShift = 7 - nLevel;
- const BYTE cMask = pImplMask[ nLevel ];
- const ULONG nIndex = ( ( ( pColor->GetRed() & cMask ) >> nShift ) << 2 ) |
+ const sal_uLong nShift = 7 - nLevel;
+ const sal_uInt8 cMask = pImplMask[ nLevel ];
+ const sal_uLong nIndex = ( ( ( pColor->GetRed() & cMask ) >> nShift ) << 2 ) |
( ( ( pColor->GetGreen() & cMask ) >> nShift ) << 1 ) |
( ( pColor->GetBlue() & cMask ) >> nShift );
@@ -219,12 +219,12 @@ void Octree::ImplAdd( PPNODE ppNode )
void Octree::ImplReduce()
{
- ULONG i;
+ sal_uLong i;
PNODE pNode;
- ULONG nRedSum = 0L;
- ULONG nGreenSum = 0L;
- ULONG nBlueSum = 0L;
- ULONG nChilds = 0L;
+ sal_uLong nRedSum = 0L;
+ sal_uLong nGreenSum = 0L;
+ sal_uLong nBlueSum = 0L;
+ sal_uLong nChilds = 0L;
for ( i = OCTREE_BITS - 1; i && !pReduce[i]; i-- ) {}
@@ -248,7 +248,7 @@ void Octree::ImplReduce()
}
}
- pNode->bLeaf = TRUE;
+ pNode->bLeaf = sal_True;
pNode->nRed = nRedSum;
pNode->nGreen = nGreenSum;
pNode->nBlue = nBlueSum;
@@ -262,11 +262,11 @@ void Octree::CreatePalette( PNODE pNode )
if( pNode->bLeaf )
{
pNode->nPalIndex = nPalIndex;
- aPal[ nPalIndex++ ] = BitmapColor( (BYTE) ( (double) pNode->nRed / pNode->nCount ),
- (BYTE) ( (double) pNode->nGreen / pNode->nCount ),
- (BYTE) ( (double) pNode->nBlue / pNode->nCount ) );
+ aPal[ nPalIndex++ ] = BitmapColor( (sal_uInt8) ( (double) pNode->nRed / pNode->nCount ),
+ (sal_uInt8) ( (double) pNode->nGreen / pNode->nCount ),
+ (sal_uInt8) ( (double) pNode->nBlue / pNode->nCount ) );
}
- else for( ULONG i = 0UL; i < 8UL; i++ )
+ else for( sal_uLong i = 0UL; i < 8UL; i++ )
if( pNode->pChild[ i ] )
CreatePalette( pNode->pChild[ i ] );
@@ -280,9 +280,9 @@ void Octree::GetPalIndex( PNODE pNode )
nPalIndex = pNode->nPalIndex;
else
{
- const ULONG nShift = 7 - nLevel;
- const BYTE cMask = pImplMask[ nLevel++ ];
- const ULONG nIndex = ( ( ( pColor->GetRed() & cMask ) >> nShift ) << 2 ) |
+ const sal_uLong nShift = 7 - nLevel;
+ const sal_uInt8 cMask = pImplMask[ nLevel++ ];
+ const sal_uLong nIndex = ( ( ( pColor->GetRed() & cMask ) >> nShift ) << 2 ) |
( ( ( pColor->GetGreen() & cMask ) >> nShift ) << 1 ) |
( ( pColor->GetBlue() & cMask ) >> nShift );
@@ -297,27 +297,27 @@ void Octree::GetPalIndex( PNODE pNode )
InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
nBits( 8 - OCTREE_BITS )
{
- ULONG* cdp;
- BYTE* crgbp;
- const ULONG nColorMax = 1 << OCTREE_BITS;
- const ULONG xsqr = 1 << ( nBits << 1 );
- const ULONG xsqr2 = xsqr << 1;
- const ULONG nColors = rPal.GetEntryCount();
+ sal_uLong* cdp;
+ sal_uInt8* crgbp;
+ const sal_uLong nColorMax = 1 << OCTREE_BITS;
+ const sal_uLong xsqr = 1 << ( nBits << 1 );
+ const sal_uLong xsqr2 = xsqr << 1;
+ const sal_uLong nColors = rPal.GetEntryCount();
const long x = 1L << nBits;
const long x2 = x >> 1L;
- ULONG r, g, b;
+ sal_uLong r, g, b;
long rxx, gxx, bxx;
long rdist, gdist, bdist;
long crinc, cginc, cbinc;
ImplCreateBuffers( nColorMax );
- for( ULONG nIndex = 0; nIndex < nColors; nIndex++ )
+ for( sal_uLong nIndex = 0; nIndex < nColors; nIndex++ )
{
- const BitmapColor& rColor = rPal[ (USHORT) nIndex ];
- const BYTE cRed = rColor.GetRed();
- const BYTE cGreen = rColor.GetGreen();
- const BYTE cBlue = rColor.GetBlue();
+ const BitmapColor& rColor = rPal[ (sal_uInt16) nIndex ];
+ const sal_uInt8 cRed = rColor.GetRed();
+ const sal_uInt8 cGreen = rColor.GetGreen();
+ const sal_uInt8 cBlue = rColor.GetBlue();
rdist = cRed - x2;
gdist = cGreen - x2;
@@ -328,7 +328,7 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
cginc = ( xsqr - ( cGreen << nBits ) ) << 1L;
cbinc = ( xsqr - ( cBlue << nBits ) ) << 1L;
- cdp = (ULONG*) pBuffer;
+ cdp = (sal_uLong*) pBuffer;
crgbp = pMap;
for( r = 0, rxx = crinc; r < nColorMax; rdist += rxx, r++, rxx += xsqr2 )
@@ -339,7 +339,7 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
if ( !nIndex || ( (long) *cdp ) > bdist )
{
*cdp = bdist;
- *crgbp = (BYTE) nIndex;
+ *crgbp = (sal_uInt8) nIndex;
}
}
}
@@ -356,14 +356,14 @@ InverseColorMap::~InverseColorMap()
// ------------------------------------------------------------------------
-void InverseColorMap::ImplCreateBuffers( const ULONG nMax )
+void InverseColorMap::ImplCreateBuffers( const sal_uLong nMax )
{
- const ULONG nCount = nMax * nMax * nMax;
- const ULONG nSize = nCount * sizeof( ULONG );
+ const sal_uLong nCount = nMax * nMax * nMax;
+ const sal_uLong nSize = nCount * sizeof( sal_uLong );
- pMap = (BYTE*) rtl_allocateMemory( nCount );
+ pMap = (sal_uInt8*) rtl_allocateMemory( nCount );
memset( pMap, 0x00, nCount );
- pBuffer = (BYTE*) rtl_allocateMemory( nSize );
+ pBuffer = (sal_uInt8*) rtl_allocateMemory( nSize );
memset( pBuffer, 0xff, nSize );
}
diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index 7be953358e35..b5ecb0761949 100755
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -122,9 +122,9 @@ struct ImplObjStack
Point* mpRefPoint;
TextAlign meTextAlign;
RasterOp meRasterOp;
- ULONG mnTextLayoutMode;
+ sal_uLong mnTextLayoutMode;
LanguageType meTextLanguage;
- USHORT mnFlags;
+ sal_uInt16 mnFlags;
};
// -----------------------------------------------------------------------
@@ -232,7 +232,7 @@ Polygon ImplSubdivideBezier( const Polygon& rPoly )
PolyPolygon ImplSubdivideBezier( const PolyPolygon& rPolyPoly )
{
- USHORT i, nPolys = rPolyPoly.Count();
+ sal_uInt16 i, nPolys = rPolyPoly.Count();
PolyPolygon aPolyPoly( nPolys );
for( i=0; i<nPolys; ++i )
aPolyPoly.Insert( ImplSubdivideBezier( rPolyPoly.GetObject(i) ) );
@@ -243,7 +243,7 @@ PolyPolygon ImplSubdivideBezier( const PolyPolygon& rPolyPoly )
// =======================================================================
// #100127# Extracted from OutputDevice::DrawPolyPolygon()
-void OutputDevice::ImplDrawPolyPolygon( USHORT nPoly, const PolyPolygon& rPolyPoly )
+void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const PolyPolygon& rPolyPoly )
{
// AW: This crashes on empty PolyPolygons, avoid that
if(!nPoly)
@@ -251,28 +251,28 @@ void OutputDevice::ImplDrawPolyPolygon( USHORT nPoly, const PolyPolygon& rPolyPo
sal_uInt32 aStackAry1[OUTDEV_POLYPOLY_STACKBUF];
PCONSTSALPOINT aStackAry2[OUTDEV_POLYPOLY_STACKBUF];
- BYTE* aStackAry3[OUTDEV_POLYPOLY_STACKBUF];
+ sal_uInt8* aStackAry3[OUTDEV_POLYPOLY_STACKBUF];
sal_uInt32* pPointAry;
PCONSTSALPOINT* pPointAryAry;
- const BYTE** pFlagAryAry;
- USHORT i = 0, j = 0, last = 0;
- BOOL bHaveBezier = sal_False;
+ const sal_uInt8** pFlagAryAry;
+ sal_uInt16 i = 0, j = 0, last = 0;
+ sal_Bool bHaveBezier = sal_False;
if ( nPoly > OUTDEV_POLYPOLY_STACKBUF )
{
pPointAry = new sal_uInt32[nPoly];
pPointAryAry = new PCONSTSALPOINT[nPoly];
- pFlagAryAry = new const BYTE*[nPoly];
+ pFlagAryAry = new const sal_uInt8*[nPoly];
}
else
{
pPointAry = aStackAry1;
pPointAryAry = aStackAry2;
- pFlagAryAry = (const BYTE**)aStackAry3;
+ pFlagAryAry = (const sal_uInt8**)aStackAry3;
}
do
{
const Polygon& rPoly = rPolyPoly.GetObject( i );
- USHORT nSize = rPoly.GetSize();
+ sal_uInt16 nSize = rPoly.GetSize();
if ( nSize )
{
pPointAry[j] = nSize;
@@ -376,33 +376,33 @@ OutputDevice::OutputDevice() :
mnTextLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT;
meOutDevType = OUTDEV_DONTKNOW;
meOutDevViewType = OUTDEV_VIEWTYPE_DONTKNOW;
- mbMap = FALSE;
- mbMapIsDefault = TRUE;
- mbClipRegion = FALSE;
- mbBackground = FALSE;
- mbOutput = TRUE;
- mbDevOutput = FALSE;
- mbOutputClipped = FALSE;
+ mbMap = sal_False;
+ mbMapIsDefault = sal_True;
+ mbClipRegion = sal_False;
+ mbBackground = sal_False;
+ mbOutput = sal_True;
+ mbDevOutput = sal_False;
+ mbOutputClipped = sal_False;
maTextColor = Color( COL_BLACK );
maOverlineColor = Color( COL_TRANSPARENT );
meTextAlign = maFont.GetAlign();
meRasterOp = ROP_OVERPAINT;
mnAntialiasing = 0;
meTextLanguage = 0; // TODO: get default from configuration?
- mbLineColor = TRUE;
- mbFillColor = TRUE;
- mbInitLineColor = TRUE;
- mbInitFillColor = TRUE;
- mbInitFont = TRUE;
- mbInitTextColor = TRUE;
- mbInitClipRegion = TRUE;
- mbClipRegionSet = FALSE;
- mbKerning = FALSE;
- mbNewFont = TRUE;
- mbTextLines = FALSE;
- mbTextSpecial = FALSE;
- mbRefPoint = FALSE;
- mbEnableRTL = FALSE; // mirroring must be explicitly allowed (typically for windows only)
+ mbLineColor = sal_True;
+ mbFillColor = sal_True;
+ mbInitLineColor = sal_True;
+ mbInitFillColor = sal_True;
+ mbInitFont = sal_True;
+ mbInitTextColor = sal_True;
+ mbInitClipRegion = sal_True;
+ mbClipRegionSet = sal_False;
+ mbKerning = sal_False;
+ mbNewFont = sal_True;
+ mbTextLines = sal_False;
+ mbTextSpecial = sal_False;
+ mbRefPoint = sal_False;
+ mbEnableRTL = sal_False; // mirroring must be explicitly allowed (typically for windows only)
// struct ImplMapRes
maMapRes.mnMapOfsX = 0;
@@ -426,7 +426,7 @@ OutputDevice::~OutputDevice()
if ( GetUnoGraphicsList() )
{
- UnoWrapperBase* pWrapper = Application::GetUnoWrapper( FALSE );
+ UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_False );
if ( pWrapper )
pWrapper->ReleaseAllGraphics( this );
delete mpUnoGraphicsList;
@@ -493,7 +493,7 @@ bool OutputDevice::supportsOperation( OutDevSupportType eType ) const
// -----------------------------------------------------------------------
-void OutputDevice::EnableRTL( BOOL bEnable )
+void OutputDevice::EnableRTL( sal_Bool bEnable )
{
mbEnableRTL = (bEnable != 0);
if( meOutDevType == OUTDEV_VIRDEV )
@@ -518,11 +518,11 @@ void OutputDevice::EnableRTL( BOOL bEnable )
mpAlphaVDev->EnableRTL( bEnable );
}
-BOOL OutputDevice::ImplHasMirroredGraphics()
+sal_Bool OutputDevice::ImplHasMirroredGraphics()
{
// HOTFIX for #i55719#
if( meOutDevType == OUTDEV_PRINTER )
- return FALSE;
+ return sal_False;
return ( ImplGetGraphics() && (mpGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL) );
}
@@ -551,7 +551,7 @@ void OutputDevice::ImplReMirror( Region &rRegion ) const
long nWidth;
long nHeight;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
Region aMirroredRegion;
bRegionRect = rRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -573,13 +573,13 @@ int OutputDevice::ImplGetGraphics() const
DBG_TESTSOLARMUTEX();
if ( mpGraphics )
- return TRUE;
+ return sal_True;
- mbInitLineColor = TRUE;
- mbInitFillColor = TRUE;
- mbInitFont = TRUE;
- mbInitTextColor = TRUE;
- mbInitClipRegion = TRUE;
+ mbInitLineColor = sal_True;
+ mbInitFillColor = sal_True;
+ mbInitFont = sal_True;
+ mbInitTextColor = sal_True;
+ mbInitClipRegion = sal_True;
ImplSVData* pSVData = ImplGetSVData();
if ( meOutDevType == OUTDEV_WINDOW )
@@ -603,7 +603,7 @@ int OutputDevice::ImplGetGraphics() const
{
// steal the wingraphics from the other outdev
mpGraphics = pReleaseOutDev->mpGraphics;
- pReleaseOutDev->ImplReleaseGraphics( FALSE );
+ pReleaseOutDev->ImplReleaseGraphics( sal_False );
}
else
{
@@ -713,15 +713,15 @@ int OutputDevice::ImplGetGraphics() const
{
mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp), ROP_INVERT == meRasterOp );
mpGraphics->setAntiAliasB2DDraw(mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void OutputDevice::ImplReleaseGraphics( BOOL bRelease )
+void OutputDevice::ImplReleaseGraphics( sal_Bool bRelease )
{
DBG_TESTSOLARMUTEX();
@@ -877,7 +877,7 @@ void OutputDevice::ImplInvalidateViewTransform()
// -----------------------------------------------------------------------
-BOOL OutputDevice::ImplIsRecordLayout() const
+sal_Bool OutputDevice::ImplIsRecordLayout() const
{
return mpOutDevData && mpOutDevData->mpRecordLayout;
}
@@ -918,7 +918,7 @@ void OutputDevice::ImplInitLineColor()
else
mpGraphics->SetLineColor();
- mbInitLineColor = FALSE;
+ mbInitLineColor = sal_False;
}
// -----------------------------------------------------------------------
@@ -941,7 +941,7 @@ void OutputDevice::ImplInitFillColor()
else
mpGraphics->SetFillColor();
- mbInitFillColor = FALSE;
+ mbInitFillColor = sal_False;
}
// -----------------------------------------------------------------------
@@ -971,27 +971,27 @@ void OutputDevice::ImplInitClipRegion()
if ( mbClipRegion )
aRegion.Intersect( ImplPixelToDevicePixel( maRegion ) );
if ( aRegion.IsEmpty() )
- mbOutputClipped = TRUE;
+ mbOutputClipped = sal_True;
else
{
- mbOutputClipped = FALSE;
+ mbOutputClipped = sal_False;
ImplSelectClipRegion( aRegion );
}
- mbClipRegionSet = TRUE;
+ mbClipRegionSet = sal_True;
}
else
{
if ( mbClipRegion )
{
if ( maRegion.IsEmpty() )
- mbOutputClipped = TRUE;
+ mbOutputClipped = sal_True;
else
{
- mbOutputClipped = FALSE;
+ mbOutputClipped = sal_False;
// #102532# Respect output offset also for clip region
Region aRegion( ImplPixelToDevicePixel( maRegion ) );
- const BOOL bClipDeviceBounds( ! GetPDFWriter()
+ const bool bClipDeviceBounds( ! GetPDFWriter()
&& GetOutDevType() != OUTDEV_PRINTER );
if( bClipDeviceBounds )
{
@@ -1006,21 +1006,21 @@ void OutputDevice::ImplInitClipRegion()
ImplSelectClipRegion( aRegion );
}
- mbClipRegionSet = TRUE;
+ mbClipRegionSet = sal_True;
}
else
{
if ( mbClipRegionSet )
{
mpGraphics->ResetClipRegion();
- mbClipRegionSet = FALSE;
+ mbClipRegionSet = sal_False;
}
- mbOutputClipped = FALSE;
+ mbOutputClipped = sal_False;
}
}
- mbInitClipRegion = FALSE;
+ mbInitClipRegion = sal_False;
}
// -----------------------------------------------------------------------
@@ -1034,15 +1034,15 @@ void OutputDevice::ImplSetClipRegion( const Region* pRegion )
if ( mbClipRegion )
{
maRegion = Region( REGION_NULL );
- mbClipRegion = FALSE;
- mbInitClipRegion = TRUE;
+ mbClipRegion = sal_False;
+ mbInitClipRegion = sal_True;
}
}
else
{
maRegion = *pRegion;
- mbClipRegion = TRUE;
- mbInitClipRegion = TRUE;
+ mbClipRegion = sal_True;
+ mbInitClipRegion = sal_True;
}
}
@@ -1054,7 +1054,7 @@ void OutputDevice::SetClipRegion()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaClipRegionAction( Region(), FALSE ) );
+ mpMetaFile->AddAction( new MetaClipRegionAction( Region(), sal_False ) );
ImplSetClipRegion( NULL );
@@ -1071,7 +1071,7 @@ void OutputDevice::SetClipRegion( const Region& rRegion )
DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaClipRegionAction( rRegion, TRUE ) );
+ mpMetaFile->AddAction( new MetaClipRegionAction( rRegion, sal_True ) );
if ( rRegion.GetType() == REGION_NULL )
ImplSetClipRegion( NULL );
@@ -1131,7 +1131,7 @@ void OutputDevice::MoveClipRegion( long nHorzMove, long nVertMove )
maRegion.Move( ImplLogicWidthToDevicePixel( nHorzMove ),
ImplLogicHeightToDevicePixel( nVertMove ) );
- mbInitClipRegion = TRUE;
+ mbInitClipRegion = sal_True;
}
if( mpAlphaVDev )
@@ -1150,8 +1150,8 @@ void OutputDevice::IntersectClipRegion( const Rectangle& rRect )
Rectangle aRect = LogicToPixel( rRect );
maRegion.Intersect( aRect );
- mbClipRegion = TRUE;
- mbInitClipRegion = TRUE;
+ mbClipRegion = sal_True;
+ mbInitClipRegion = sal_True;
if( mpAlphaVDev )
mpAlphaVDev->IntersectClipRegion( rRect );
@@ -1174,8 +1174,8 @@ void OutputDevice::IntersectClipRegion( const Region& rRegion )
Region aRegion = LogicToPixel( rRegion );
maRegion.Intersect( aRegion );
- mbClipRegion = TRUE;
- mbInitClipRegion = TRUE;
+ mbClipRegion = sal_True;
+ mbInitClipRegion = sal_True;
}
if( mpAlphaVDev )
@@ -1184,7 +1184,7 @@ void OutputDevice::IntersectClipRegion( const Region& rRegion )
// -----------------------------------------------------------------------
-void OutputDevice::SetDrawMode( ULONG nDrawMode )
+void OutputDevice::SetDrawMode( sal_uLong nDrawMode )
{
DBG_TRACE1( "OutputDevice::SetDrawMode( %lx )", nDrawMode );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -1208,7 +1208,7 @@ void OutputDevice::SetRasterOp( RasterOp eRasterOp )
if ( meRasterOp != eRasterOp )
{
meRasterOp = eRasterOp;
- mbInitLineColor = mbInitFillColor = TRUE;
+ mbInitLineColor = mbInitFillColor = sal_True;
if( mpGraphics || ImplGetGraphics() )
mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp), ROP_INVERT == meRasterOp );
@@ -1226,12 +1226,12 @@ void OutputDevice::SetLineColor()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaLineColorAction( Color(), FALSE ) );
+ mpMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) );
if ( mbLineColor )
{
- mbInitLineColor = TRUE;
- mbLineColor = FALSE;
+ mbInitLineColor = sal_True;
+ mbLineColor = sal_False;
maLineColor = Color( COL_TRANSPARENT );
}
@@ -1264,7 +1264,7 @@ void OutputDevice::SetLineColor( const Color& rColor )
}
else if( mnDrawMode & DRAWMODE_GRAYLINE )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if( mnDrawMode & DRAWMODE_SETTINGSLINE )
@@ -1282,14 +1282,14 @@ void OutputDevice::SetLineColor( const Color& rColor )
}
if( mpMetaFile )
- mpMetaFile->AddAction( new MetaLineColorAction( aColor, TRUE ) );
+ mpMetaFile->AddAction( new MetaLineColorAction( aColor, sal_True ) );
if( ImplIsColorTransparent( aColor ) )
{
if ( mbLineColor )
{
- mbInitLineColor = TRUE;
- mbLineColor = FALSE;
+ mbInitLineColor = sal_True;
+ mbLineColor = sal_False;
maLineColor = Color( COL_TRANSPARENT );
}
}
@@ -1297,8 +1297,8 @@ void OutputDevice::SetLineColor( const Color& rColor )
{
if( maLineColor != aColor )
{
- mbInitLineColor = TRUE;
- mbLineColor = TRUE;
+ mbInitLineColor = sal_True;
+ mbLineColor = sal_True;
maLineColor = aColor;
}
}
@@ -1315,12 +1315,12 @@ void OutputDevice::SetFillColor()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaFillColorAction( Color(), FALSE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color(), sal_False ) );
if ( mbFillColor )
{
- mbInitFillColor = TRUE;
- mbFillColor = FALSE;
+ mbInitFillColor = sal_True;
+ mbFillColor = sal_False;
maFillColor = Color( COL_TRANSPARENT );
}
@@ -1353,7 +1353,7 @@ void OutputDevice::SetFillColor( const Color& rColor )
}
else if( mnDrawMode & DRAWMODE_GRAYFILL )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if( mnDrawMode & DRAWMODE_NOFILL )
@@ -1375,14 +1375,14 @@ void OutputDevice::SetFillColor( const Color& rColor )
}
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaFillColorAction( aColor, TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( aColor, sal_True ) );
if ( ImplIsColorTransparent( aColor ) )
{
if ( mbFillColor )
{
- mbInitFillColor = TRUE;
- mbFillColor = FALSE;
+ mbInitFillColor = sal_True;
+ mbFillColor = sal_False;
maFillColor = Color( COL_TRANSPARENT );
}
}
@@ -1390,8 +1390,8 @@ void OutputDevice::SetFillColor( const Color& rColor )
{
if ( maFillColor != aColor )
{
- mbInitFillColor = TRUE;
- mbFillColor = TRUE;
+ mbInitFillColor = sal_True;
+ mbFillColor = sal_True;
maFillColor = aColor;
}
}
@@ -1408,7 +1408,7 @@ void OutputDevice::SetBackground()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
maBackground = Wallpaper();
- mbBackground = FALSE;
+ mbBackground = sal_False;
if( mpAlphaVDev )
mpAlphaVDev->SetBackground();
@@ -1424,9 +1424,9 @@ void OutputDevice::SetBackground( const Wallpaper& rBackground )
maBackground = rBackground;
if( rBackground.GetStyle() == WALLPAPER_NULL )
- mbBackground = FALSE;
+ mbBackground = sal_False;
else
- mbBackground = TRUE;
+ mbBackground = sal_True;
if( mpAlphaVDev )
mpAlphaVDev->SetBackground( rBackground );
@@ -1440,9 +1440,9 @@ void OutputDevice::SetRefPoint()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaRefPointAction( Point(), FALSE ) );
+ mpMetaFile->AddAction( new MetaRefPointAction( Point(), sal_False ) );
- mbRefPoint = FALSE;
+ mbRefPoint = sal_False;
maRefPoint.X() = maRefPoint.Y() = 0L;
if( mpAlphaVDev )
@@ -1457,9 +1457,9 @@ void OutputDevice::SetRefPoint( const Point& rRefPoint )
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaRefPointAction( rRefPoint, TRUE ) );
+ mpMetaFile->AddAction( new MetaRefPointAction( rRefPoint, sal_True ) );
- mbRefPoint = TRUE;
+ mbRefPoint = sal_True;
maRefPoint = rRefPoint;
if( mpAlphaVDev )
@@ -1770,7 +1770,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
if( mpMetaFile )
mpMetaFile->AddAction( new MetaPolyLineAction( rPoly ) );
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
if ( !IsDeviceOutputNecessary() || !mbLineColor || (nPoints < 2) || ImplIsRecordLayout() )
return;
@@ -1820,7 +1820,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
// #100127# Forward beziers to sal, if any
if( aPoly.HasFlags() )
{
- const BYTE* pFlgAry = aPoly.GetConstFlagAry();
+ const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry();
if( !mpGraphics->DrawPolyLineBezier( nPoints, pPtAry, pFlgAry, this ) )
{
aPoly = ImplSubdivideBezier(aPoly);
@@ -1868,7 +1868,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo
void OutputDevice::ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineInfo& rLineInfo)
{
- USHORT nPoints(rPoly.GetSize());
+ sal_uInt16 nPoints(rPoly.GetSize());
if ( !IsDeviceOutputNecessary() || !mbLineColor || ( nPoints < 2 ) || ( LINE_NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() )
return;
@@ -1940,7 +1940,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
if( mpMetaFile )
mpMetaFile->AddAction( new MetaPolygonAction( rPoly ) );
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || (nPoints < 2) || ImplIsRecordLayout() )
return;
@@ -2003,7 +2003,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
// #100127# Forward beziers to sal, if any
if( aPoly.HasFlags() )
{
- const BYTE* pFlgAry = aPoly.GetConstFlagAry();
+ const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry();
if( !mpGraphics->DrawPolygonBezier( nPoints, pPtAry, pFlgAry, this ) )
{
aPoly = ImplSubdivideBezier(aPoly);
@@ -2030,7 +2030,7 @@ void OutputDevice::DrawPolyPolygon( const PolyPolygon& rPolyPoly )
if( mpMetaFile )
mpMetaFile->AddAction( new MetaPolyPolygonAction( rPolyPoly ) );
- USHORT nPoly = rPolyPoly.Count();
+ sal_uInt16 nPoly = rPolyPoly.Count();
if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || !nPoly || ImplIsRecordLayout() )
return;
@@ -2376,7 +2376,7 @@ sal_uInt32 OutputDevice::GetGCStackDepth() const
// -----------------------------------------------------------------------
-void OutputDevice::Push( USHORT nFlags )
+void OutputDevice::Push( sal_uInt16 nFlags )
{
DBG_TRACE( "OutputDevice::Push()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -2566,7 +2566,7 @@ void OutputDevice::SetConnectMetaFile( GDIMetaFile* pMtf )
// -----------------------------------------------------------------------
-void OutputDevice::EnableOutput( BOOL bEnable )
+void OutputDevice::EnableOutput( sal_Bool bEnable )
{
mbOutput = (bEnable != 0);
@@ -2586,7 +2586,7 @@ void OutputDevice::SetSettings( const AllSettings& rSettings )
// -----------------------------------------------------------------------
-USHORT OutputDevice::GetBitCount() const
+sal_uInt16 OutputDevice::GetBitCount() const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -2600,12 +2600,12 @@ USHORT OutputDevice::GetBitCount() const
return 0;
}
- return (USHORT)mpGraphics->GetBitCount();
+ return (sal_uInt16)mpGraphics->GetBitCount();
}
// -----------------------------------------------------------------------
-USHORT OutputDevice::GetAlphaBitCount() const
+sal_uInt16 OutputDevice::GetAlphaBitCount() const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -2620,17 +2620,17 @@ USHORT OutputDevice::GetAlphaBitCount() const
// -----------------------------------------------------------------------
-ULONG OutputDevice::GetColorCount() const
+sal_uLong OutputDevice::GetColorCount() const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- const USHORT nBitCount = GetBitCount();
- return( ( nBitCount > 31 ) ? ULONG_MAX : ( ( (ULONG) 1 ) << nBitCount) );
+ const sal_uInt16 nBitCount = GetBitCount();
+ return( ( nBitCount > 31 ) ? ULONG_MAX : ( ( (sal_uLong) 1 ) << nBitCount) );
}
// -----------------------------------------------------------------------
-BOOL OutputDevice::HasAlpha()
+sal_Bool OutputDevice::HasAlpha()
{
return mpAlphaVDev != NULL;
}
diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx
index 06dcd73cc3d4..6d98f79dcaaa 100755
--- a/vcl/source/gdi/outdev2.cxx
+++ b/vcl/source/gdi/outdev2.cxx
@@ -87,17 +87,17 @@ DBG_NAMEEX( OutputDevice )
// - externals -
// -------------
-extern ULONG nVCLRLut[ 6 ];
-extern ULONG nVCLGLut[ 6 ];
-extern ULONG nVCLBLut[ 6 ];
-extern ULONG nVCLDitherLut[ 256 ];
-extern ULONG nVCLLut[ 256 ];
+extern sal_uLong nVCLRLut[ 6 ];
+extern sal_uLong nVCLGLut[ 6 ];
+extern sal_uLong nVCLBLut[ 6 ];
+extern sal_uLong nVCLDitherLut[ 256 ];
+extern sal_uLong nVCLLut[ 256 ];
// =======================================================================
-ULONG ImplAdjustTwoRect( TwoRect& rTwoRect, const Size& rSizePix )
+sal_uLong ImplAdjustTwoRect( TwoRect& rTwoRect, const Size& rSizePix )
{
- ULONG nMirrFlags = 0;
+ sal_uLong nMirrFlags = 0;
if ( rTwoRect.mnDestWidth < 0 )
{
@@ -389,7 +389,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
void OutputDevice::CopyArea( const Point& rDestPt,
const Point& rSrcPt, const Size& rSrcSize,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
DBG_TRACE( "OutputDevice::CopyArea()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -434,7 +434,7 @@ void OutputDevice::CopyArea( const Point& rDestPt,
((Window*)this)->ImplMoveAllInvalidateRegions( aSrcRect,
aPosAry.mnDestX-aPosAry.mnSrcX,
aPosAry.mnDestY-aPosAry.mnSrcY,
- FALSE );
+ sal_False );
mpGraphics->CopyArea( aPosAry.mnDestX, aPosAry.mnDestY,
aPosAry.mnSrcX, aPosAry.mnSrcY,
@@ -464,10 +464,10 @@ void OutputDevice::ImplDrawFrameDev( const Point& rPt, const Point& rDevPt, cons
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
GDIMetaFile* pOldMetaFile = mpMetaFile;
- BOOL bOldMap = mbMap;
+ sal_Bool bOldMap = mbMap;
RasterOp eOldROP = GetRasterOp();
mpMetaFile = NULL;
- mbMap = FALSE;
+ mbMap = sal_False;
SetRasterOp( ROP_OVERPAINT );
if ( !IsDeviceOutputNecessary() )
@@ -497,7 +497,7 @@ void OutputDevice::ImplDrawFrameDev( const Point& rPt, const Point& rDevPt, cons
ImplDrawOutDevDirect( &rOutDev, &aPosAry );
// Dafuer sorgen, das ClipRegion neu berechnet und gesetzt wird
- mbInitClipRegion = TRUE;
+ mbInitClipRegion = sal_True;
SetRasterOp( eOldROP );
mbMap = bOldMap;
@@ -511,8 +511,8 @@ void OutputDevice::ImplGetFrameDev( const Point& rPt, const Point& rDevPt, const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- BOOL bOldMap = mbMap;
- mbMap = FALSE;
+ sal_Bool bOldMap = mbMap;
+ mbMap = sal_False;
rDev.DrawOutDev( rDevPt, rDevSize, rPt, rDevSize, *this );
mbMap = bOldMap;
}
@@ -578,7 +578,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
- const Bitmap& rBitmap, const ULONG nAction )
+ const Bitmap& rBitmap, const sal_uLong nAction )
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -596,7 +596,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
{
if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP ) )
{
- BYTE cCmpVal;
+ sal_uInt8 cCmpVal;
if ( mnDrawMode & DRAWMODE_BLACKBITMAP )
cCmpVal = ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 0x80 : 0;
@@ -655,7 +655,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
aPosAry.mnDestWidth = ImplLogicWidthToDevicePixel( rDestSize.Width() );
aPosAry.mnDestHeight = ImplLogicHeightToDevicePixel( rDestSize.Height() );
- const ULONG nMirrFlags = ImplAdjustTwoRect( aPosAry, aBmp.GetSizePixel() );
+ const sal_uLong nMirrFlags = ImplAdjustTwoRect( aPosAry, aBmp.GetSizePixel() );
if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
{
@@ -789,7 +789,7 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
- const BitmapEx& rBitmapEx, const ULONG nAction )
+ const BitmapEx& rBitmapEx, const sal_uLong nAction )
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -808,7 +808,7 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP ) )
{
Bitmap aColorBmp( aBmpEx.GetSizePixel(), ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 4 : 1 );
- BYTE cCmpVal;
+ sal_uInt8 cCmpVal;
if ( mnDrawMode & DRAWMODE_BLACKBITMAP )
cCmpVal = ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 0x80 : 0;
@@ -902,7 +902,7 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
aPosAry.mnDestWidth = ImplLogicWidthToDevicePixel( rDestSize.Width() );
aPosAry.mnDestHeight = ImplLogicHeightToDevicePixel( rDestSize.Height() );
- const ULONG nMirrFlags = ImplAdjustTwoRect( aPosAry, aBmpEx.GetSizePixel() );
+ const sal_uLong nMirrFlags = ImplAdjustTwoRect( aPosAry, aBmpEx.GetSizePixel() );
if( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
{
@@ -1096,7 +1096,7 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize,
void OutputDevice::ImplDrawMask( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const Bitmap& rBitmap, const Color& rMaskColor,
- const ULONG nAction )
+ const sal_uLong nAction )
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -1150,7 +1150,7 @@ void OutputDevice::ImplDrawMask( const Point& rDestPt, const Size& rDestSize,
aPosAry.mnDestHeight = ImplLogicHeightToDevicePixel( rDestSize.Height() );
// spiegeln via Koordinaten wollen wir nicht
- const ULONG nMirrFlags = ImplAdjustTwoRect( aPosAry, pImpBmp->ImplGetSize() );
+ const sal_uLong nMirrFlags = ImplAdjustTwoRect( aPosAry, pImpBmp->ImplGetSize() );
// check if output is necessary
if( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
@@ -1173,7 +1173,7 @@ void OutputDevice::ImplDrawMask( const Point& rDestPt, const Size& rDestSize,
// ------------------------------------------------------------------
-void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, USHORT nStyle )
+void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, sal_uInt16 nStyle )
{
DBG_ASSERT( GetOutDevType() != OUTDEV_PRINTER, "DrawImage(): Images can't be drawn on any mprinter" );
@@ -1210,7 +1210,7 @@ void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, USHORT nSt
// ------------------------------------------------------------------
void OutputDevice::DrawImage( const Point& rPos, const Size& rSize,
- const Image& rImage, USHORT nStyle )
+ const Image& rImage, sal_uInt16 nStyle )
{
DBG_ASSERT( GetOutDevType() != OUTDEV_PRINTER, "DrawImage(): Images can't be drawn on any mprinter" );
@@ -1261,14 +1261,14 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
if ( nWidth && nHeight )
{
Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
- BOOL bClipped = FALSE;
+ sal_Bool bClipped = sal_False;
// X-Koordinate ausserhalb des Bereichs?
if ( nX < mnOutOffX )
{
nWidth -= ( mnOutOffX - nX );
nX = mnOutOffX;
- bClipped = TRUE;
+ bClipped = sal_True;
}
// Y-Koordinate ausserhalb des Bereichs?
@@ -1276,21 +1276,21 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
{
nHeight -= ( mnOutOffY - nY );
nY = mnOutOffY;
- bClipped = TRUE;
+ bClipped = sal_True;
}
// Breite ausserhalb des Bereichs?
if ( (nWidth + nX) > (mnOutWidth + mnOutOffX) )
{
nWidth = mnOutOffX + mnOutWidth - nX;
- bClipped = TRUE;
+ bClipped = sal_True;
}
// Hoehe ausserhalb des Bereichs?
if ( (nHeight + nY) > (mnOutHeight + mnOutOffY) )
{
nHeight = mnOutOffY + mnOutHeight - nY;
- bClipped = TRUE;
+ bClipped = sal_True;
}
if ( bClipped )
@@ -1322,10 +1322,10 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
aBmp = aVDev.GetBitmap( Point(), aVDev.GetOutputSizePixel() );
}
else
- bClipped = FALSE;
+ bClipped = sal_False;
}
else
- bClipped = FALSE;
+ bClipped = sal_False;
}
if ( !bClipped )
@@ -1373,8 +1373,8 @@ void OutputDevice::ImplGetFrameBitmap( const Point& rDestPt, const Size& rSize,
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- BOOL bOldMap = mbMap;
- ((OutputDevice*)this)->mbMap = FALSE;
+ sal_Bool bOldMap = mbMap;
+ ((OutputDevice*)this)->mbMap = sal_False;
rBitmap = GetBitmap( rDestPt, rSize );
((OutputDevice*)this)->mbMap = bOldMap;
}
@@ -1412,7 +1412,7 @@ Color* OutputDevice::GetPixel( const Polygon& rPts ) const
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
Color* pColors = NULL;
- const USHORT nSize = rPts.GetSize();
+ const sal_uInt16 nSize = rPts.GetSize();
if( nSize )
{
@@ -1425,7 +1425,7 @@ Color* OutputDevice::GetPixel( const Polygon& rPts ) const
{
pColors = new Color[ nSize ];
- for( USHORT i = 0; i < nSize; i++ )
+ for( sal_uInt16 i = 0; i < nSize; i++ )
{
Color& rCol = pColors[ i ];
const Point& rPt = rPts[ i ];
@@ -1504,7 +1504,7 @@ void OutputDevice::DrawPixel( const Point& rPt, const Color& rColor )
}
else if( mnDrawMode & DRAWMODE_GRAYLINE )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if( mnDrawMode & DRAWMODE_SETTINGSLINE )
@@ -1559,12 +1559,12 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color* pColors )
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
DBG_ASSERT( pColors, "OutputDevice::DrawPixel: No color array specified" );
- const USHORT nSize = rPts.GetSize();
+ const sal_uInt16 nSize = rPts.GetSize();
if ( nSize )
{
if ( mpMetaFile )
- for ( USHORT i = 0; i < nSize; i++ )
+ for ( sal_uInt16 i = 0; i < nSize; i++ )
mpMetaFile->AddAction( new MetaPixelAction( rPts[ i ], pColors[ i ] ) );
if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() )
@@ -1579,7 +1579,7 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color* pColors )
if ( mbOutputClipped )
return;
- for ( USHORT i = 0; i < nSize; i++ )
+ for ( sal_uInt16 i = 0; i < nSize; i++ )
{
const Point aPt( ImplLogicToDevicePixel( rPts[ i ] ) );
mpGraphics->DrawPixel( aPt.X(), aPt.Y(), ImplColorToSal( pColors[ i ] ), this );
@@ -1598,10 +1598,10 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color& rColor )
{
if( rColor != COL_TRANSPARENT && ! ImplIsRecordLayout() )
{
- const USHORT nSize = rPts.GetSize();
+ const sal_uInt16 nSize = rPts.GetSize();
Color* pColArray = new Color[ nSize ];
- for( USHORT i = 0; i < nSize; i++ )
+ for( sal_uInt16 i = 0; i < nSize; i++ )
pColArray[ i ] = rColor;
DrawPixel( rPts, pColArray );
@@ -1616,11 +1616,11 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color& rColor )
namespace
{
- BYTE lcl_calcColor( const BYTE nSourceColor, const BYTE nSourceOpaq, const BYTE nDestColor )
+ sal_uInt8 lcl_calcColor( const sal_uInt8 nSourceColor, const sal_uInt8 nSourceOpaq, const sal_uInt8 nDestColor )
{
int c = ( (int)nDestColor * ( 255 - nSourceOpaq ) )
+ (int)nSourceOpaq * (int)nSourceColor;
- return BYTE( c / 255 );
+ return sal_uInt8( c / 255 );
}
}
@@ -1644,8 +1644,8 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
OSL_ENSURE(mpAlphaVDev,
"ImplBlendWithAlpha(): call me only with valid alpha VDev!" );
- BOOL bOldMapMode( mpAlphaVDev->IsMapModeEnabled() );
- mpAlphaVDev->EnableMapMode(FALSE);
+ sal_Bool bOldMapMode( mpAlphaVDev->IsMapModeEnabled() );
+ mpAlphaVDev->EnableMapMode(sal_False);
Bitmap aAlphaBitmap( mpAlphaVDev->GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) );
BitmapWriteAccess* pAlphaW = aAlphaBitmap.AcquireWriteAccess();
@@ -1667,18 +1667,18 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ )
{
const long nMapX = pMapX[ nX ];
- const ULONG nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
+ const sal_uLong nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
aSrcCol = pP->GetColor( nMapY, nMapX );
aDstCol = pB->GetColor( nY, nX );
- const BYTE nSrcOpaq = 255 - pA->GetPixel( nMapY, nMapX ).GetBlueOrIndex();
- const BYTE nDstOpaq = 255 - pAlphaW->GetPixel( nY, nX ).GetBlueOrIndex();
+ const sal_uInt8 nSrcOpaq = 255 - pA->GetPixel( nMapY, nMapX ).GetBlueOrIndex();
+ const sal_uInt8 nDstOpaq = 255 - pAlphaW->GetPixel( nY, nX ).GetBlueOrIndex();
aDstCol.SetRed( lcl_calcColor( aSrcCol.GetRed(), nSrcOpaq, aDstCol.GetRed() ) );
aDstCol.SetBlue( lcl_calcColor( aSrcCol.GetBlue(), nSrcOpaq, aDstCol.GetBlue() ) );
aDstCol.SetGreen( lcl_calcColor( aSrcCol.GetGreen(), nSrcOpaq, aDstCol.GetGreen() ) );
- aIndex.SetIndex( (BYTE) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) >> 16UL ] +
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) >> 16UL ] +
nVCLGLut[ ( nVCLLut[ aDstCol.GetGreen() ] + nD ) >> 16UL ] +
nVCLBLut[ ( nVCLLut[ aDstCol.GetBlue() ] + nD ) >> 16UL ] ) );
pW->SetPixel( nY, nX, aIndex );
@@ -1687,9 +1687,9 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
// the inverse alpha space (with 255 meaning
// opaque), otherwise, transitivity is not
// achieved.
- const BYTE nSrcAlpha = 255-COLOR_CHANNEL_MERGE( 255, (BYTE)nDstOpaq, nSrcOpaq );
+ const sal_uInt8 nSrcAlpha = 255-COLOR_CHANNEL_MERGE( 255, (sal_uInt8)nDstOpaq, nSrcOpaq );
- aIndex.SetIndex( (BYTE) ( nVCLRLut[ ( nVCLLut[ nSrcAlpha ] + nD ) >> 16UL ] +
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ nSrcAlpha ] + nD ) >> 16UL ] +
nVCLGLut[ ( nVCLLut[ nSrcAlpha ] + nD ) >> 16UL ] +
nVCLBLut[ ( nVCLLut[ nSrcAlpha ] + nD ) >> 16UL ] ) );
pAlphaW->SetPixel( nY, nX, aIndex );
@@ -1716,8 +1716,8 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
aSrcCol = pP->GetColor( nMapY, nMapX );
aDstCol = pB->GetColor( nY, nX );
- const BYTE nSrcOpaq = 255 - pA->GetPixel( nMapY, nMapX ).GetBlueOrIndex();
- const BYTE nDstOpaq = 255 - pAlphaW->GetPixel( nY, nX ).GetBlueOrIndex();
+ const sal_uInt8 nSrcOpaq = 255 - pA->GetPixel( nMapY, nMapX ).GetBlueOrIndex();
+ const sal_uInt8 nDstOpaq = 255 - pAlphaW->GetPixel( nY, nX ).GetBlueOrIndex();
aDstCol.SetRed( lcl_calcColor( aSrcCol.GetRed(), nSrcOpaq, aDstCol.GetRed() ) );
aDstCol.SetBlue( lcl_calcColor( aSrcCol.GetBlue(), nSrcOpaq, aDstCol.GetBlue() ) );
@@ -1729,7 +1729,7 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
// the inverse alpha space (with 255 meaning
// opaque), otherwise, transitivity is not
// achieved.
- const BYTE nSrcAlpha = 255-COLOR_CHANNEL_MERGE( 255, (BYTE)nDstOpaq, nSrcOpaq );
+ const sal_uInt8 nSrcAlpha = 255-COLOR_CHANNEL_MERGE( 255, (sal_uInt8)nDstOpaq, nSrcOpaq );
pAlphaW->SetPixel( nY, nX, Color(nSrcAlpha, nSrcAlpha, nSrcAlpha) );
}
@@ -1784,11 +1784,11 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ )
{
const long nMapX = pMapX[ nX ];
- const ULONG nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
+ const sal_uLong nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
aDstCol = pB->GetColor( nY, nX );
- aDstCol.Merge( pP->GetColor( nMapY, nMapX ), (BYTE) pA->GetPixel( nMapY, nMapX ) );
- aIndex.SetIndex( (BYTE) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) >> 16UL ] +
+ aDstCol.Merge( pP->GetColor( nMapY, nMapX ), (sal_uInt8) pA->GetPixel( nMapY, nMapX ) );
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) >> 16UL ] +
nVCLGLut[ ( nVCLLut[ aDstCol.GetGreen() ] + nD ) >> 16UL ] +
nVCLBLut[ ( nVCLLut[ aDstCol.GetBlue() ] + nD ) >> 16UL ] ) );
pW->SetPixel( nY, nX, aIndex );
@@ -1923,7 +1923,7 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
Point aOutPt( LogicToPixel( rDestPt ) );
Size aOutSz( LogicToPixel( rDestSize ) );
Rectangle aDstRect( aNullPt, GetOutputSizePixel() );
- const BOOL bHMirr = aOutSz.Width() < 0, bVMirr = aOutSz.Height() < 0;
+ const sal_Bool bHMirr = aOutSz.Width() < 0, bVMirr = aOutSz.Height() < 0;
if( OUTDEV_WINDOW == meOutDevType )
{
@@ -1972,7 +1972,7 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
&& !aBmpRect.Intersection( Rectangle( rSrcPtPixel, rSrcSizePixel ) ).IsEmpty() )
{
GDIMetaFile* pOldMetaFile = mpMetaFile; mpMetaFile = NULL;
- const BOOL bOldMap = mbMap; mbMap = FALSE;
+ const sal_Bool bOldMap = mbMap; mbMap = sal_False;
Bitmap aBmp( GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) );
// #109044# The generated bitmap need not necessarily be
@@ -2097,7 +2097,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
if( !rBmp.IsEmpty() && aSrcRect.GetWidth() && aSrcRect.GetHeight() && aDestSz.Width() && aDestSz.Height() )
{
Bitmap aPaint( rBmp ), aMask( rMask );
- ULONG nMirrFlags = 0UL;
+ sal_uLong nMirrFlags = 0UL;
if( aMask.GetBitCount() > 1 )
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
@@ -2144,9 +2144,9 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
long nX, nY, nWorkX, nWorkY, nWorkWidth, nWorkHeight;
long* pMapX = new long[ nSrcWidth + 1 ];
long* pMapY = new long[ nSrcHeight + 1 ];
- const BOOL bOldMap = mbMap;
+ const sal_Bool bOldMap = mbMap;
- mbMap = FALSE;
+ mbMap = sal_False;
// create forward mapping tables
for( nX = 0L; nX <= nSrcWidth; nX++ )
@@ -2158,7 +2158,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
// walk through all rectangles of mask
Region aWorkRgn( aMask.CreateRegion( COL_BLACK, Rectangle( Point(), aMask.GetSizePixel() ) ) );
ImplRegionInfo aInfo;
- BOOL bRgnRect = aWorkRgn.ImplGetFirstRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
+ sal_Bool bRgnRect = aWorkRgn.ImplGetFirstRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
while( bRgnRect )
{
@@ -2195,7 +2195,7 @@ void OutputDevice::ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
if( !rMask.IsEmpty() && aSrcRect.GetWidth() && aSrcRect.GetHeight() && aDestSz.Width() && aDestSz.Height() )
{
Bitmap aMask( rMask );
- ULONG nMirrFlags = 0UL;
+ sal_uLong nMirrFlags = 0UL;
if( aMask.GetBitCount() > 1 )
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
@@ -2230,10 +2230,10 @@ void OutputDevice::ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
long* pMapX = new long[ nSrcWidth + 1 ];
long* pMapY = new long[ nSrcHeight + 1 ];
GDIMetaFile* pOldMetaFile = mpMetaFile;
- const BOOL bOldMap = mbMap;
+ const sal_Bool bOldMap = mbMap;
mpMetaFile = NULL;
- mbMap = FALSE;
+ mbMap = sal_False;
Push( PUSH_FILLCOLOR | PUSH_LINECOLOR );
SetLineColor( rMaskColor );
SetFillColor( rMaskColor );
@@ -2250,7 +2250,7 @@ void OutputDevice::ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
// walk through all rectangles of mask
Region aWorkRgn( aMask.CreateRegion( COL_BLACK, Rectangle( Point(), aMask.GetSizePixel() ) ) );
ImplRegionInfo aInfo;
- BOOL bRgnRect = aWorkRgn.ImplGetFirstRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
+ sal_Bool bRgnRect = aWorkRgn.ImplGetFirstRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
while( bRgnRect )
{
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index c693ee7dcd37..10f618d6e7c1 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -225,7 +225,7 @@ void OutputDevice::ImplUpdateFontData( bool bNewFontLists )
if( mpFontCache && mpFontCache != pSVData->maGDIData.mpScreenFontCache )
delete mpFontCache;
mpFontList = mpPDFWriter->filterDevFontList( pSVData->maGDIData.mpScreenFontList );
- mpFontCache = new ImplFontCache( FALSE );
+ mpFontCache = new ImplFontCache( sal_False );
}
else
{
@@ -317,7 +317,7 @@ void ImplFreeOutDevFontData()
void OutputDevice::BeginFontSubstitution()
{
ImplSVData* pSVData = ImplGetSVData();
- pSVData->maGDIData.mbFontSubChanged = FALSE;
+ pSVData->maGDIData.mbFontSubChanged = sal_False;
}
// -----------------------------------------------------------------------
@@ -333,7 +333,7 @@ void OutputDevice::EndFontSubstitution()
DataChangedEvent aDCEvt( DATACHANGED_FONTSUBSTITUTION );
pApp->DataChanged( aDCEvt );
pApp->NotifyAllWindows( aDCEvt );
- pSVData->maGDIData.mbFontSubChanged = FALSE;
+ pSVData->maGDIData.mbFontSubChanged = sal_False;
}
}
@@ -341,19 +341,19 @@ void OutputDevice::EndFontSubstitution()
void OutputDevice::AddFontSubstitute( const XubString& rFontName,
const XubString& rReplaceFontName,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
ImplDirectFontSubstitution*& rpSubst = ImplGetSVData()->maGDIData.mpDirectFontSubst;
if( !rpSubst )
rpSubst = new ImplDirectFontSubstitution();
rpSubst->AddFontSubstitute( rFontName, rReplaceFontName, nFlags );
- ImplGetSVData()->maGDIData.mbFontSubChanged = TRUE;
+ ImplGetSVData()->maGDIData.mbFontSubChanged = sal_True;
}
// -----------------------------------------------------------------------
void ImplDirectFontSubstitution::AddFontSubstitute( const String& rFontName,
- const String& rSubstFontName, USHORT nFlags )
+ const String& rSubstFontName, sal_uInt16 nFlags )
{
maFontSubstList.push_back( ImplFontSubstEntry( rFontName, rSubstFontName, nFlags ) );
}
@@ -361,7 +361,7 @@ void ImplDirectFontSubstitution::AddFontSubstitute( const String& rFontName,
// -----------------------------------------------------------------------
ImplFontSubstEntry::ImplFontSubstEntry( const String& rFontName,
- const String& rSubstFontName, USHORT nSubstFlags )
+ const String& rSubstFontName, sal_uInt16 nSubstFlags )
: maName( rFontName )
, maReplaceName( rSubstFontName )
, mnFlags( nSubstFlags )
@@ -376,7 +376,7 @@ ImplFontSubstEntry::ImplFontSubstEntry( const String& rFontName,
void OutputDevice::ImplAddDevFontSubstitute( const XubString& rFontName,
const XubString& rReplaceFontName,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
ImplInitOutDevData();
mpOutDevData->maDevFontSubst.AddFontSubstitute( rFontName, rReplaceFontName, nFlags );
@@ -384,7 +384,7 @@ void OutputDevice::ImplAddDevFontSubstitute( const XubString& rFontName,
// -----------------------------------------------------------------------
-void OutputDevice::RemoveFontSubstitute( USHORT n )
+void OutputDevice::RemoveFontSubstitute( sal_uInt16 n )
{
ImplDirectFontSubstitution* pSubst = ImplGetSVData()->maGDIData.mpDirectFontSubst;
if( pSubst )
@@ -403,21 +403,21 @@ void ImplDirectFontSubstitution::RemoveFontSubstitute( int nIndex )
// -----------------------------------------------------------------------
-USHORT OutputDevice::GetFontSubstituteCount()
+sal_uInt16 OutputDevice::GetFontSubstituteCount()
{
const ImplDirectFontSubstitution* pSubst = ImplGetSVData()->maGDIData.mpDirectFontSubst;
if( !pSubst )
return 0;
int nCount = pSubst->GetFontSubstituteCount();
- return (USHORT)nCount;
+ return (sal_uInt16)nCount;
}
// -----------------------------------------------------------------------
-void OutputDevice::GetFontSubstitute( USHORT n,
+void OutputDevice::GetFontSubstitute( sal_uInt16 n,
XubString& rFontName,
XubString& rReplaceFontName,
- USHORT& rFlags )
+ sal_uInt16& rFlags )
{
const ImplDirectFontSubstitution* pSubst = ImplGetSVData()->maGDIData.mpDirectFontSubst;
if( pSubst )
@@ -427,7 +427,7 @@ void OutputDevice::GetFontSubstitute( USHORT n,
// -----------------------------------------------------------------------
bool ImplDirectFontSubstitution::GetFontSubstitute( int nIndex,
- String& rFontName, String& rSubstFontName, USHORT& rFlags ) const
+ String& rFontName, String& rSubstFontName, sal_uInt16& rFlags ) const
{
FontSubstList::const_iterator it = maFontSubstList.begin();
for( int nCount = 0; (it != maFontSubstList.end()) && (nCount++ != nIndex); ++it ) ;
@@ -444,7 +444,7 @@ bool ImplDirectFontSubstitution::GetFontSubstitute( int nIndex,
// -----------------------------------------------------------------------
bool ImplDirectFontSubstitution::FindFontSubstitute( String& rSubstName,
- const String& rSearchName, USHORT nFlags ) const
+ const String& rSearchName, sal_uInt16 nFlags ) const
{
// TODO: get rid of O(N) searches
FontSubstList::const_iterator it = maFontSubstList.begin();
@@ -465,7 +465,7 @@ bool ImplDirectFontSubstitution::FindFontSubstitute( String& rSubstName,
// -----------------------------------------------------------------------
static void ImplFontSubstitute( String& rFontName,
- USHORT nFlags, ImplDirectFontSubstitution* pDevSpecific )
+ sal_uInt16 nFlags, ImplDirectFontSubstitution* pDevSpecific )
{
#ifdef DBG_UTIL
String aTempName = rFontName;
@@ -496,8 +496,8 @@ static void ImplFontSubstitute( String& rFontName,
// -----------------------------------------------------------------------
-Font OutputDevice::GetDefaultFont( USHORT nType, LanguageType eLang,
- ULONG nFlags, const OutputDevice* pOutDev )
+Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang,
+ sal_uLong nFlags, const OutputDevice* pOutDev )
{
DBG_TRACE( "OutputDevice::GetDefaultFont()" );
@@ -730,7 +730,7 @@ static unsigned ImplIsCJKFont( const String& rFontName )
// -----------------------------------------------------------------------
-static void ImplCalcType( ULONG& rType, FontWeight& rWeight, FontWidth& rWidth,
+static void ImplCalcType( sal_uLong& rType, FontWeight& rWeight, FontWidth& rWidth,
FontFamily eFamily, const FontNameAttr* pFontAttr )
{
if ( eFamily != FAMILY_DONTKNOW )
@@ -1646,7 +1646,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindBySubstFontAttr( const utl::FontNa
}
// use known attributes from the configuration to find a matching substitute
- const ULONG nSearchType = rFontAttr.Type;
+ const sal_uLong nSearchType = rFontAttr.Type;
if( nSearchType != 0 )
{
const FontWeight eSearchWeight = rFontAttr.Weight;
@@ -1699,7 +1699,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByLocale( com::sun::star::lang::Lo
// -----------------------------------------------------------------------
-ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( ULONG nSearchType,
+ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( sal_uLong nSearchType,
FontWeight eSearchWeight, FontWidth eSearchWidth, FontFamily /*eSearchFamily*/,
FontItalic eSearchItalic, const String& rSearchFamilyName ) const
{
@@ -1717,7 +1717,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( ULONG nSearchType,
long nTestMatch;
long nBestMatch = 40000;
- ULONG nBestType = 0;
+ sal_uLong nBestType = 0;
DevFontList::const_iterator it = maDevFontList.begin();
for(; it != maDevFontList.end(); ++it )
@@ -1725,7 +1725,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( ULONG nSearchType,
ImplDevFontListData* pData = (*it).second;
// Get all information about the matching font
- ULONG nMatchType = pData->mnMatchType;
+ sal_uLong nMatchType = pData->mnMatchType;
FontWeight eMatchWeight= pData->meMatchWeight;
FontWidth eMatchWidth = pData->meMatchWidth;
@@ -2436,7 +2436,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( ImplFontSelectData& rFSD,
// test if a font in the token list is available
// substitute the font if this was requested
- USHORT nSubstFlags = FONT_SUBSTITUTE_ALWAYS;
+ sal_uInt16 nSubstFlags = FONT_SUBSTITUTE_ALWAYS;
if ( bPrinter )
nSubstFlags |= FONT_SUBSTITUTE_SCREENONLY;
@@ -2565,7 +2565,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( ImplFontSelectData& rFSD,
String aSearchFamilyName;
FontWeight eSearchWeight = rFSD.meWeight;
FontWidth eSearchWidth = rFSD.meWidthType;
- ULONG nSearchType = 0;
+ sal_uLong nSearchType = 0;
FontSubstConfiguration::getMapName( aSearchName, aSearchShortName, aSearchFamilyName,
eSearchWeight, eSearchWidth, nSearchType );
@@ -2637,7 +2637,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( ImplFontSelectData& rFSD,
String aTempShortName;
String aTempFamilyName;
- ULONG nTempType = 0;
+ sal_uLong nTempType = 0;
FontWeight eTempWeight = rFSD.meWeight;
FontWidth eTempWidth = WIDTH_DONTKNOW;
FontSubstConfiguration::getMapName( aSearchName, aTempShortName, aTempFamilyName,
@@ -2897,17 +2897,17 @@ FontEmphasisMark OutputDevice::ImplGetEmphasisMarkStyle( const Font& rFont )
// -----------------------------------------------------------------------
-BOOL OutputDevice::ImplIsUnderlineAbove( const Font& rFont )
+sal_Bool OutputDevice::ImplIsUnderlineAbove( const Font& rFont )
{
if ( !rFont.IsVertical() )
- return FALSE;
+ return sal_False;
if( (LANGUAGE_JAPANESE == rFont.GetLanguage())
|| (LANGUAGE_JAPANESE == rFont.GetCJKContextLanguage()) )
// the underline is right for Japanese only
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
// =======================================================================
@@ -2972,7 +2972,7 @@ void OutputDevice::ImplInitTextColor()
if ( mbInitTextColor )
{
mpGraphics->SetTextColor( ImplColorToSal( GetTextColor() ) );
- mbInitTextColor = FALSE;
+ mbInitTextColor = sal_False;
}
}
@@ -3029,9 +3029,9 @@ bool OutputDevice::ImplNewFont() const
ImplFontEntry* pFontEntry = mpFontEntry;
// mark when lower layers need to get involved
- mbNewFont = FALSE;
+ mbNewFont = sal_False;
if( pFontEntry != pOldEntry )
- mbInitFont = TRUE;
+ mbInitFont = sal_True;
// select font when it has not been initialized yet
if ( !pFontEntry->mbInit )
@@ -3132,10 +3132,10 @@ bool OutputDevice::ImplNewFont() const
{
Size aOrigSize = maFont.GetSize();
const_cast<Font&>(maFont).SetSize( Size( nNewWidth, aSize.Height() ) );
- mbMap = FALSE;
- mbNewFont = TRUE;
+ mbMap = sal_False;
+ mbNewFont = sal_True;
ImplNewFont(); // recurse once using stretched width
- mbMap = TRUE;
+ mbMap = sal_True;
const_cast<Font&>(maFont).SetSize( aOrigSize );
}
}
@@ -3224,10 +3224,10 @@ void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout )
if ( mbLineColor || mbInitLineColor )
{
mpGraphics->SetLineColor();
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
}
mpGraphics->SetFillColor( ImplColorToSal( GetTextFillColor() ) );
- mbInitFillColor = TRUE;
+ mbInitFillColor = sal_True;
ImplDrawTextRect( nX, nY, 0, -(mpFontEntry->maMetric.mnAscent + mnEmphasisAscent),
nWidth,
@@ -3493,7 +3493,7 @@ static void ImplDrawWavePixel( long nOriginX, long nOriginY,
short nOrientation,
SalGraphics* pGraphics,
OutputDevice* pOutDev,
- BOOL bDrawPixAsRect,
+ sal_Bool bDrawPixAsRect,
long nPixWidth, long nPixHeight )
{
@@ -3529,7 +3529,7 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
if ( (nLineWidth == 1) && (nHeight == 1) )
{
mpGraphics->SetLineColor( ImplColorToSal( rColor ) );
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
long nEndX = nStartX+nWidth;
long nEndY = nStartY;
@@ -3552,28 +3552,28 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
long i;
long nPixWidth;
long nPixHeight;
- BOOL bDrawPixAsRect;
+ sal_Bool bDrawPixAsRect;
// Auf Druckern die Pixel per DrawRect() ausgeben
if ( (GetOutDevType() == OUTDEV_PRINTER) || (nLineWidth > 1) )
{
if ( mbLineColor || mbInitLineColor )
{
mpGraphics->SetLineColor();
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
}
mpGraphics->SetFillColor( ImplColorToSal( rColor ) );
- mbInitFillColor = TRUE;
- bDrawPixAsRect = TRUE;
+ mbInitFillColor = sal_True;
+ bDrawPixAsRect = sal_True;
nPixWidth = nLineWidth;
nPixHeight = ((nLineWidth*mnDPIX)+(mnDPIY/2))/mnDPIY;
}
else
{
mpGraphics->SetLineColor( ImplColorToSal( rColor ) );
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
nPixWidth = 1;
nPixHeight = 1;
- bDrawPixAsRect = FALSE;
+ bDrawPixAsRect = sal_False;
}
if ( !nDiffY )
@@ -3641,7 +3641,7 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY,
long nDistX, long nDistY, long nWidth,
FontUnderline eTextLine,
Color aColor,
- BOOL bIsAbove )
+ sal_Bool bIsAbove )
{
ImplFontEntry* pFontEntry = mpFontEntry;
long nLineHeight;
@@ -3705,7 +3705,7 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
long nDistX, long nDistY, long nWidth,
FontUnderline eTextLine,
Color aColor,
- BOOL bIsAbove )
+ sal_Bool bIsAbove )
{
ImplFontEntry* pFontEntry = mpFontEntry;
long nLineHeight = 0;
@@ -3776,10 +3776,10 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
if ( mbLineColor || mbInitLineColor )
{
mpGraphics->SetLineColor();
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
}
mpGraphics->SetFillColor( ImplColorToSal( aColor ) );
- mbInitFillColor = TRUE;
+ mbInitFillColor = sal_True;
long nLeft = nDistX;
@@ -3972,10 +3972,10 @@ void OutputDevice::ImplDrawStrikeoutLine( long nBaseX, long nBaseY,
if ( mbLineColor || mbInitLineColor )
{
mpGraphics->SetLineColor();
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
}
mpGraphics->SetFillColor( ImplColorToSal( aColor ) );
- mbInitFillColor = TRUE;
+ mbInitFillColor = sal_True;
const long& nLeft = nDistX;
@@ -4057,7 +4057,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
nBaseY += nDistY;
// strikeout text has to be left aligned
- ULONG nOrigTLM = mnTextLayoutMode;
+ sal_uLong nOrigTLM = mnTextLayoutMode;
mnTextLayoutMode = TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_COMPLEX_DISABLED;
pLayout = ImplLayout( aStrikeoutText, 0, STRING_LEN );
mnTextLayoutMode = nOrigTLM;
@@ -4085,7 +4085,7 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY,
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline,
- BOOL bUnderlineAbove )
+ sal_Bool bUnderlineAbove )
{
if ( !nWidth )
return;
@@ -4093,9 +4093,9 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY,
Color aStrikeoutColor = GetTextColor();
Color aUnderlineColor = GetTextLineColor();
Color aOverlineColor = GetOverlineColor();
- BOOL bStrikeoutDone = FALSE;
- BOOL bUnderlineDone = FALSE;
- BOOL bOverlineDone = FALSE;
+ sal_Bool bStrikeoutDone = sal_False;
+ sal_Bool bUnderlineDone = sal_False;
+ sal_Bool bOverlineDone = sal_False;
if ( IsRTLEnabled() )
{
@@ -4118,29 +4118,29 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY,
(eUnderline == UNDERLINE_BOLDWAVE) )
{
ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove );
- bUnderlineDone = TRUE;
+ bUnderlineDone = sal_True;
}
if ( (eOverline == UNDERLINE_SMALLWAVE) ||
(eOverline == UNDERLINE_WAVE) ||
(eOverline == UNDERLINE_DOUBLEWAVE) ||
(eOverline == UNDERLINE_BOLDWAVE) )
{
- ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, TRUE );
- bOverlineDone = TRUE;
+ ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, sal_True );
+ bOverlineDone = sal_True;
}
if ( (eStrikeout == STRIKEOUT_SLASH) ||
(eStrikeout == STRIKEOUT_X) )
{
ImplDrawStrikeoutChar( nX, nY, nDistX, 0, nWidth, eStrikeout, aStrikeoutColor );
- bStrikeoutDone = TRUE;
+ bStrikeoutDone = sal_True;
}
if ( !bUnderlineDone )
ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove );
if ( !bOverlineDone )
- ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, TRUE );
+ ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, sal_True );
if ( !bStrikeoutDone )
ImplDrawStrikeoutLine( nX, nY, nDistX, 0, nWidth, eStrikeout, aStrikeoutColor );
@@ -4149,7 +4149,7 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY,
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout,
- FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, BOOL bWordLine, BOOL bUnderlineAbove )
+ FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, sal_Bool bWordLine, sal_Bool bUnderlineAbove )
{
if( bWordLine )
{
@@ -4222,18 +4222,18 @@ void OutputDevice::ImplDrawMnemonicLine( long nX, long nY, long nWidth )
nX = nBaseX - nWidth - (nX - nBaseX - 1);
}
- ImplDrawTextLine( nX, nY, 0, nWidth, STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE, FALSE );
+ ImplDrawTextLine( nX, nY, 0, nWidth, STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE, sal_False );
}
// -----------------------------------------------------------------------
-void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, BOOL& rPolyLine,
+void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, sal_Bool& rPolyLine,
Rectangle& rRect1, Rectangle& rRect2,
long& rYOff, long& rWidth,
FontEmphasisMark eEmphasis,
long nHeight, short /*nOrient*/ )
{
- static const BYTE aAccentPolyFlags[24] =
+ static const sal_uInt8 aAccentPolyFlags[24] =
{
0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 0, 2, 0, 2, 2
};
@@ -4268,7 +4268,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, BOOL& rPolyLine,
rWidth = 0;
rYOff = 0;
- rPolyLine = FALSE;
+ rPolyLine = sal_False;
if ( !nHeight )
return;
@@ -4309,7 +4309,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, BOOL& rPolyLine,
// BorderWidth is 15%
long nBorder = (nDotSize*150)/1000;
if ( nBorder <= 1 )
- rPolyLine = TRUE;
+ rPolyLine = sal_True;
else
{
Polygon aPoly2( Point( nRad, nRad ),
@@ -4383,7 +4383,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, BOOL& rPolyLine,
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY,
- const PolyPolygon& rPolyPoly, BOOL bPolyLine,
+ const PolyPolygon& rPolyPoly, sal_Bool bPolyLine,
const Rectangle& rRect1, const Rectangle& rRect2 )
{
// TODO: pass nWidth as width of this mark
@@ -4435,10 +4435,10 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
Color aOldColor = GetTextColor();
Color aOldLineColor = GetLineColor();
Color aOldFillColor = GetFillColor();
- BOOL bOldMap = mbMap;
+ sal_Bool bOldMap = mbMap;
GDIMetaFile* pOldMetaFile = mpMetaFile;
mpMetaFile = NULL;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont );
PolyPolygon aPolyPoly;
@@ -4447,7 +4447,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
long nEmphasisYOff;
long nEmphasisWidth;
long nEmphasisHeight;
- BOOL bPolyLine;
+ sal_Bool bPolyLine;
if ( nEmphasisMark & EMPHASISMARK_POS_BELOW )
nEmphasisHeight = mnEmphasisDescent;
@@ -4571,12 +4571,12 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
GDIMetaFile* pOldMetaFile = mpMetaFile;
long nOldOffX = mnOutOffX;
long nOldOffY = mnOutOffY;
- BOOL bOldMap = mbMap;
+ sal_Bool bOldMap = mbMap;
mnOutOffX = 0L;
mnOutOffY = 0L;
mpMetaFile = NULL;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
DrawMask( aPoint, aBmp, GetTextColor() );
@@ -4590,7 +4590,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
// -----------------------------------------------------------------------
-void OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, BOOL bTextLines )
+void OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, sal_Bool bTextLines )
{
if( mpFontEntry->mnOwnOrientation )
if( ImplDrawRotateText( rSalLayout ) )
@@ -4784,7 +4784,7 @@ void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
long nWidth, const XubString& rStr,
- USHORT nStyle, const ::vcl::ITextLayout& _rLayout )
+ sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout )
{
DBG_ASSERTWARNING( nWidth >= 0, "ImplGetTextLines: nWidth <= 0!" );
@@ -4854,10 +4854,10 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
// sal_uInt16 nWordStart = nBreakPos;
// sal_uInt16 nBreakPos_OLD = nBreakPos;
sal_uInt16 nWordStart = nPos;
- sal_uInt16 nWordEnd = (USHORT) aBoundary.endPos;
+ sal_uInt16 nWordEnd = (sal_uInt16) aBoundary.endPos;
DBG_ASSERT( nWordEnd > nWordStart, "ImpBreakLine: Start >= End?" );
- USHORT nWordLen = nWordEnd - nWordStart;
+ sal_uInt16 nWordLen = nWordEnd - nWordStart;
if ( ( nWordEnd >= nSoftBreak ) && ( nWordLen > 3 ) )
{
// #104415# May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD
@@ -4940,7 +4940,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
else
{
// fallback to something really simple
- USHORT nSpacePos = STRING_LEN;
+ sal_uInt16 nSpacePos = STRING_LEN;
long nW = 0;
do
{
@@ -4982,7 +4982,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
}
}
#ifdef DBG_UTIL
- for ( USHORT nL = 0; nL < rLineInfo.Count(); nL++ )
+ for ( sal_uInt16 nL = 0; nL < rLineInfo.Count(); nL++ )
{
ImplTextLineInfo* pLine = rLineInfo.GetLine( nL );
String aLine( rStr, pLine->GetIndex(), pLine->GetLen() );
@@ -4996,12 +4996,12 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
// =======================================================================
-void OutputDevice::SetAntialiasing( USHORT nMode )
+void OutputDevice::SetAntialiasing( sal_uInt16 nMode )
{
if ( mnAntialiasing != nMode )
{
mnAntialiasing = nMode;
- mbInitFont = TRUE;
+ mbInitFont = sal_True;
if(mpGraphics)
{
@@ -5035,7 +5035,7 @@ void OutputDevice::SetFont( const Font& rNewFont )
aTextColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYTEXT )
{
- const UINT8 cLum = aTextColor.GetLuminance();
+ const sal_uInt8 cLum = aTextColor.GetLuminance();
aTextColor = Color( cLum, cLum, cLum );
}
else if ( mnDrawMode & DRAWMODE_SETTINGSTEXT )
@@ -5050,7 +5050,7 @@ void OutputDevice::SetFont( const Font& rNewFont )
aFont.SetColor( aTextColor );
- BOOL bTransFill = aFont.IsTransparent();
+ sal_Bool bTransFill = aFont.IsTransparent();
if ( !bTransFill )
{
Color aTextFillColor( aFont.GetFillColor() );
@@ -5061,7 +5061,7 @@ void OutputDevice::SetFont( const Font& rNewFont )
aTextFillColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYFILL )
{
- const UINT8 cLum = aTextFillColor.GetLuminance();
+ const sal_uInt8 cLum = aTextFillColor.GetLuminance();
aTextFillColor = Color( cLum, cLum, cLum );
}
else if( mnDrawMode & DRAWMODE_SETTINGSFILL )
@@ -5069,7 +5069,7 @@ void OutputDevice::SetFont( const Font& rNewFont )
else if ( mnDrawMode & DRAWMODE_NOFILL )
{
aTextFillColor = Color( COL_TRANSPARENT );
- bTransFill = TRUE;
+ bTransFill = sal_True;
}
if ( !bTransFill && (mnDrawMode & DRAWMODE_GHOSTEDFILL) )
@@ -5107,12 +5107,12 @@ void OutputDevice::SetFont( const Font& rNewFont )
&& (aFont.GetColor() != maFont.GetColor() || aFont.GetColor() != maTextColor ) )
{
maTextColor = aFont.GetColor();
- mbInitTextColor = TRUE;
+ mbInitTextColor = sal_True;
if( mpMetaFile )
mpMetaFile->AddAction( new MetaTextColorAction( aFont.GetColor() ) );
}
maFont = aFont;
- mbNewFont = TRUE;
+ mbNewFont = sal_True;
if( mpAlphaVDev )
{
@@ -5133,7 +5133,7 @@ void OutputDevice::SetFont( const Font& rNewFont )
// -----------------------------------------------------------------------
-void OutputDevice::SetLayoutMode( ULONG nTextLayoutMode )
+void OutputDevice::SetLayoutMode( sal_uLong nTextLayoutMode )
{
DBG_TRACE( "OutputDevice::SetTextLayoutMode()" );
@@ -5180,7 +5180,7 @@ void OutputDevice::SetTextColor( const Color& rColor )
aColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYTEXT )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if ( mnDrawMode & DRAWMODE_SETTINGSTEXT )
@@ -5200,7 +5200,7 @@ void OutputDevice::SetTextColor( const Color& rColor )
if ( maTextColor != aColor )
{
maTextColor = aColor;
- mbInitTextColor = TRUE;
+ mbInitTextColor = sal_True;
}
if( mpAlphaVDev )
@@ -5215,12 +5215,12 @@ void OutputDevice::SetTextFillColor()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaTextFillColorAction( Color(), FALSE ) );
+ mpMetaFile->AddAction( new MetaTextFillColorAction( Color(), sal_False ) );
if ( maFont.GetColor() != Color( COL_TRANSPARENT ) )
maFont.SetFillColor( Color( COL_TRANSPARENT ) );
if ( !maFont.IsTransparent() )
- maFont.SetTransparent( TRUE );
+ maFont.SetTransparent( sal_True );
if( mpAlphaVDev )
mpAlphaVDev->SetTextFillColor();
@@ -5234,7 +5234,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
Color aColor( rColor );
- BOOL bTransFill = ImplIsColorTransparent( aColor ) ? TRUE : FALSE;
+ sal_Bool bTransFill = ImplIsColorTransparent( aColor ) ? sal_True : sal_False;
if ( !bTransFill )
{
@@ -5248,7 +5248,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
aColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYFILL )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if( mnDrawMode & DRAWMODE_SETTINGSFILL )
@@ -5256,7 +5256,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
else if ( mnDrawMode & DRAWMODE_NOFILL )
{
aColor = Color( COL_TRANSPARENT );
- bTransFill = TRUE;
+ bTransFill = sal_True;
}
if ( !bTransFill && (mnDrawMode & DRAWMODE_GHOSTEDFILL) )
@@ -5269,7 +5269,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
}
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaTextFillColorAction( aColor, TRUE ) );
+ mpMetaFile->AddAction( new MetaTextFillColorAction( aColor, sal_True ) );
if ( maFont.GetFillColor() != aColor )
maFont.SetFillColor( aColor );
@@ -5298,7 +5298,7 @@ void OutputDevice::SetTextLineColor()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaTextLineColorAction( Color(), FALSE ) );
+ mpMetaFile->AddAction( new MetaTextLineColorAction( Color(), sal_False ) );
maTextLineColor = Color( COL_TRANSPARENT );
@@ -5325,7 +5325,7 @@ void OutputDevice::SetTextLineColor( const Color& rColor )
aColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYTEXT )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if ( mnDrawMode & DRAWMODE_SETTINGSTEXT )
@@ -5341,7 +5341,7 @@ void OutputDevice::SetTextLineColor( const Color& rColor )
}
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaTextLineColorAction( aColor, TRUE ) );
+ mpMetaFile->AddAction( new MetaTextLineColorAction( aColor, sal_True ) );
maTextLineColor = aColor;
@@ -5357,7 +5357,7 @@ void OutputDevice::SetOverlineColor()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaOverlineColorAction( Color(), FALSE ) );
+ mpMetaFile->AddAction( new MetaOverlineColorAction( Color(), sal_False ) );
maOverlineColor = Color( COL_TRANSPARENT );
@@ -5384,7 +5384,7 @@ void OutputDevice::SetOverlineColor( const Color& rColor )
aColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYTEXT )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if ( mnDrawMode & DRAWMODE_SETTINGSTEXT )
@@ -5400,7 +5400,7 @@ void OutputDevice::SetOverlineColor( const Color& rColor )
}
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaOverlineColorAction( aColor, TRUE ) );
+ mpMetaFile->AddAction( new MetaOverlineColorAction( aColor, sal_True ) );
maOverlineColor = aColor;
@@ -5422,7 +5422,7 @@ void OutputDevice::SetTextAlign( TextAlign eAlign )
if ( maFont.GetAlign() != eAlign )
{
maFont.SetAlign( eAlign );
- mbNewFont = TRUE;
+ mbNewFont = sal_True;
}
if( mpAlphaVDev )
@@ -5435,7 +5435,7 @@ void OutputDevice::DrawTextLine( const Point& rPos, long nWidth,
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline,
- BOOL bUnderlineAbove )
+ sal_Bool bUnderlineAbove )
{
DBG_TRACE( "OutputDevice::DrawTextLine()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -5478,7 +5478,7 @@ void OutputDevice::DrawTextLine( const Point& rPos, long nWidth,
// ------------------------------------------------------------------------
-BOOL OutputDevice::IsTextUnderlineAbove( const Font& rFont )
+sal_Bool OutputDevice::IsTextUnderlineAbove( const Font& rFont )
{
return ImplIsUnderlineAbove( rFont );
}
@@ -5486,7 +5486,7 @@ BOOL OutputDevice::IsTextUnderlineAbove( const Font& rFont )
// ------------------------------------------------------------------------
void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos,
- USHORT nStyle )
+ sal_uInt16 nStyle )
{
DBG_TRACE( "OutputDevice::DrawWaveLine()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -5714,7 +5714,7 @@ long OutputDevice::GetTextArray( const String& rStr, sal_Int32* pDXAry,
if( nIndex >= rStr.Len() )
return 0;
- if( (ULONG)nIndex+nLen >= rStr.Len() )
+ if( (sal_uLong)nIndex+nLen >= rStr.Len() )
nLen = rStr.Len() - nIndex;
// do layout
@@ -5756,14 +5756,14 @@ long OutputDevice::GetTextArray( const String& rStr, sal_Int32* pDXAry,
bool OutputDevice::GetCaretPositions( const XubString& rStr, sal_Int32* pCaretXArray,
xub_StrLen nIndex, xub_StrLen nLen,
sal_Int32* pDXAry, long nLayoutWidth,
- BOOL bCellBreaking ) const
+ sal_Bool bCellBreaking ) const
{
DBG_TRACE( "OutputDevice::GetCaretPositions()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if( nIndex >= rStr.Len() )
return false;
- if( (ULONG)nIndex+nLen >= rStr.Len() )
+ if( (sal_uLong)nIndex+nLen >= rStr.Len() )
nLen = rStr.Len() - nIndex;
// layout complex text
@@ -5822,7 +5822,7 @@ bool OutputDevice::GetCaretPositions( const XubString& rStr, sal_Int32* pCaretXA
// -----------------------------------------------------------------------
-void OutputDevice::DrawStretchText( const Point& rStartPt, ULONG nWidth,
+void OutputDevice::DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
const String& rStr,
xub_StrLen nIndex, xub_StrLen nLen )
{
@@ -5854,7 +5854,7 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( String& rStr,
{
// get string length for calculating extents
xub_StrLen nEndIndex = rStr.Len();
- if( (ULONG)nMinIndex + nLen < nEndIndex )
+ if( (sal_uLong)nMinIndex + nLen < nEndIndex )
nEndIndex = nMinIndex + nLen;
// don't bother if there is nothing to do
@@ -5923,7 +5923,7 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( String& rStr,
sal_UCS4 cChar = GetLocalizedChar( *pStr, meTextLanguage );
if( cChar != *pStr )
// TODO: are the localized digit surrogates?
- rStr.SetChar( static_cast<USHORT>(pStr - pBase),
+ rStr.SetChar( static_cast<sal_uInt16>(pStr - pBase),
static_cast<sal_Unicode>(cChar) );
}
}
@@ -6221,7 +6221,7 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetTextIsRTL(
+sal_Bool OutputDevice::GetTextIsRTL(
const String& rString,
xub_StrLen nIndex, xub_StrLen nLen ) const
{
@@ -6230,14 +6230,14 @@ BOOL OutputDevice::GetTextIsRTL(
bool bRTL = false;
int nCharPos = -1;
aArgs.GetNextPos( &nCharPos, &bRTL );
- return (nCharPos != nIndex) ? TRUE : FALSE;
+ return (nCharPos != nIndex) ? sal_True : sal_False;
}
// -----------------------------------------------------------------------
xub_StrLen OutputDevice::GetTextBreak( const String& rStr, long nTextWidth,
xub_StrLen nIndex, xub_StrLen nLen,
- long nCharExtra, BOOL /*TODO: bCellBreaking*/ ) const
+ long nCharExtra, sal_Bool /*TODO: bCellBreaking*/ ) const
{
DBG_TRACE( "OutputDevice::GetTextBreak()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -6331,17 +6331,17 @@ xub_StrLen OutputDevice::GetTextBreak( const String& rStr, long nTextWidth,
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& rRect,
- const String& rOrigStr, USHORT nStyle,
+ const String& rOrigStr, sal_uInt16 nStyle,
MetricVector* pVector, String* pDisplayText,
::vcl::ITextLayout& _rLayout )
{
Color aOldTextColor;
Color aOldTextFillColor;
- BOOL bRestoreFillColor = false;
+ sal_Bool bRestoreFillColor = false;
if ( (nStyle & TEXT_DRAW_DISABLE) && ! pVector )
{
- BOOL bHighContrastBlack = FALSE;
- BOOL bHighContrastWhite = FALSE;
+ sal_Bool bHighContrastBlack = sal_False;
+ sal_Bool bHighContrastWhite = sal_False;
const StyleSettings& rStyleSettings( rTargetDevice.GetSettings().GetStyleSettings() );
if( rStyleSettings.GetHighContrastMode() )
{
@@ -6361,7 +6361,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
aOldTextColor = rTargetDevice.GetTextColor();
if ( rTargetDevice.IsTextFillColor() )
{
- bRestoreFillColor = TRUE;
+ bRestoreFillColor = sal_True;
aOldTextFillColor = rTargetDevice.GetTextFillColor();
}
if( bHighContrastBlack )
@@ -6490,7 +6490,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
long nMnemonicWidth;
sal_Int32* pCaretXArray = (sal_Int32*) alloca( 2 * sizeof(sal_Int32) * nLineLen );
- /*BOOL bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray,
+ /*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray,
nIndex, nLineLen );
long lc_x1 = pCaretXArray[2*(nMnemonicPos - nIndex)];
long lc_x2 = pCaretXArray[2*(nMnemonicPos - nIndex)+1];
@@ -6561,7 +6561,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
if ( nMnemonicPos != STRING_NOTFOUND )
{
sal_Int32* pCaretXArray = (sal_Int32*) alloca( 2 * sizeof(sal_Int32) * aStr.Len() );
- /*BOOL bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray, 0, aStr.Len() );
+ /*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray, 0, aStr.Len() );
long lc_x1 = pCaretXArray[2*(nMnemonicPos)];
long lc_x2 = pCaretXArray[2*(nMnemonicPos)+1];
nMnemonicWidth = rTargetDevice.ImplLogicWidthToDevicePixel( ::abs((int)(lc_x1 - lc_x2)) );
@@ -6606,7 +6606,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
void OutputDevice::AddTextRectActions( const Rectangle& rRect,
const String& rOrigStr,
- USHORT nStyle,
+ sal_uInt16 nStyle,
GDIMetaFile& rMtf )
{
DBG_TRACE( "OutputDevice::AddTextRectActions( const Rectangle& )" );
@@ -6623,11 +6623,11 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect,
// temporarily swap in passed mtf for action generation, and
// disable output generation.
- const BOOL bOutputEnabled( IsOutputEnabled() );
+ const sal_Bool bOutputEnabled( IsOutputEnabled() );
GDIMetaFile* pMtf = mpMetaFile;
mpMetaFile = &rMtf;
- EnableOutput( FALSE );
+ EnableOutput( sal_False );
// #i47157# Factored out to ImplDrawTextRect(), to be shared
// between us and DrawText()
@@ -6641,7 +6641,7 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect,
// -----------------------------------------------------------------------
-void OutputDevice::DrawText( const Rectangle& rRect, const String& rOrigStr, USHORT nStyle,
+void OutputDevice::DrawText( const Rectangle& rRect, const String& rOrigStr, sal_uInt16 nStyle,
MetricVector* pVector, String* pDisplayText,
::vcl::ITextLayout* _pTextLayout )
{
@@ -6690,7 +6690,7 @@ void OutputDevice::DrawText( const Rectangle& rRect, const String& rOrigStr, USH
// -----------------------------------------------------------------------
Rectangle OutputDevice::GetTextRect( const Rectangle& rRect,
- const XubString& rStr, USHORT nStyle,
+ const XubString& rStr, sal_uInt16 nStyle,
TextRectInfo* pInfo,
const ::vcl::ITextLayout* _pTextLayout ) const
{
@@ -6720,7 +6720,7 @@ Rectangle OutputDevice::GetTextRect( const Rectangle& rRect,
nFormatLines = aMultiLineInfo.Count();
if ( !nTextHeight )
nTextHeight = 1;
- nLines = (USHORT)(aRect.GetHeight()/nTextHeight);
+ nLines = (sal_uInt16)(aRect.GetHeight()/nTextHeight);
if ( pInfo )
pInfo->mnLineCount = nFormatLines;
if ( !nLines )
@@ -6734,13 +6734,13 @@ Rectangle OutputDevice::GetTextRect( const Rectangle& rRect,
else
{
if ( pInfo )
- pInfo->mbEllipsis = TRUE;
+ pInfo->mbEllipsis = sal_True;
nMaxWidth = nWidth;
}
}
if ( pInfo )
{
- BOOL bMaxWidth = nMaxWidth == 0;
+ sal_Bool bMaxWidth = nMaxWidth == 0;
pInfo->mnMaxWidth = 0;
for ( i = 0; i < nLines; i++ )
{
@@ -6775,7 +6775,7 @@ Rectangle OutputDevice::GetTextRect( const Rectangle& rRect,
if ( (nMaxWidth > nWidth) && (nStyle & TEXT_DRAW_ELLIPSIS) )
{
if ( pInfo )
- pInfo->mbEllipsis = TRUE;
+ pInfo->mbEllipsis = sal_True;
nMaxWidth = nWidth;
}
}
@@ -6806,22 +6806,22 @@ Rectangle OutputDevice::GetTextRect( const Rectangle& rRect,
// -----------------------------------------------------------------------
-static BOOL ImplIsCharIn( xub_Unicode c, const sal_Char* pStr )
+static sal_Bool ImplIsCharIn( xub_Unicode c, const sal_Char* pStr )
{
while ( *pStr )
{
if ( *pStr == c )
- return TRUE;
+ return sal_True;
pStr++;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
String OutputDevice::GetEllipsisString( const String& rOrigStr, long nMaxWidth,
- USHORT nStyle ) const
+ sal_uInt16 nStyle ) const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
DefaultTextLayout aTextLayout( *const_cast< OutputDevice* >( this ) );
@@ -6831,7 +6831,7 @@ String OutputDevice::GetEllipsisString( const String& rOrigStr, long nMaxWidth,
// -----------------------------------------------------------------------
String OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice, const XubString& rOrigStr, long nMaxWidth,
- USHORT nStyle, const ::vcl::ITextLayout& _rLayout )
+ sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout )
{
DBG_TRACE( "OutputDevice::ImplGetEllipsisString()" );
@@ -6900,7 +6900,7 @@ String OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice, c
aStr = OutputDevice::ImplGetEllipsisString( rTargetDevice, aStr, nMaxWidth, nStyle | TEXT_DRAW_ENDELLIPSIS, _rLayout );
else
{
- USHORT nFirstContent = 0;
+ sal_uInt16 nFirstContent = 0;
while ( nFirstContent < nLastContent )
{
nFirstContent++;
@@ -6964,7 +6964,7 @@ String OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice, c
void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
xub_StrLen nIndex, xub_StrLen nLen,
- USHORT nStyle, MetricVector* pVector, String* pDisplayText )
+ sal_uInt16 nStyle, MetricVector* pVector, String* pDisplayText )
{
DBG_TRACE( "OutputDevice::DrawCtrlText()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -6983,7 +6983,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
if( nIndex >= rStr.Len() )
return;
- if( (ULONG)nIndex+nLen >= rStr.Len() )
+ if( (sal_uLong)nIndex+nLen >= rStr.Len() )
nLen = rStr.Len() - nIndex;
XubString aStr = rStr;
@@ -7005,7 +7005,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
--nLen;
DBG_ASSERT( nMnemonicPos < (nIndex+nLen), "Mnemonic underline marker after last character" );
}
- BOOL bInvalidPos = FALSE;
+ sal_Bool bInvalidPos = sal_False;
if( nMnemonicPos >= nLen )
{
@@ -7013,12 +7013,12 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
// may occur in BiDi-Strings: the '~' is sometimes found behind the last char
// due to some strange BiDi text editors
// ->place the underline behind the string to indicate a failure
- bInvalidPos = TRUE;
+ bInvalidPos = sal_True;
nMnemonicPos = nLen-1;
}
sal_Int32* pCaretXArray = (sal_Int32*)alloca( 2 * sizeof(sal_Int32) * nLen );
- /*BOOL bRet =*/ GetCaretPositions( aStr, pCaretXArray, nIndex, nLen );
+ /*sal_Bool bRet =*/ GetCaretPositions( aStr, pCaretXArray, nIndex, nLen );
long lc_x1 = pCaretXArray[ 2*(nMnemonicPos - nIndex) ];
long lc_x2 = pCaretXArray[ 2*(nMnemonicPos - nIndex)+1 ];
nMnemonicWidth = ::abs((int)(lc_x1 - lc_x2));
@@ -7038,9 +7038,9 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
{
Color aOldTextColor;
Color aOldTextFillColor;
- BOOL bRestoreFillColor;
- BOOL bHighContrastBlack = FALSE;
- BOOL bHighContrastWhite = FALSE;
+ sal_Bool bRestoreFillColor;
+ sal_Bool bHighContrastBlack = sal_False;
+ sal_Bool bHighContrastWhite = sal_False;
const StyleSettings& rStyleSettings( GetSettings().GetStyleSettings() );
if( rStyleSettings.GetHighContrastMode() )
{
@@ -7056,11 +7056,11 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
aOldTextColor = GetTextColor();
if ( IsTextFillColor() )
{
- bRestoreFillColor = TRUE;
+ bRestoreFillColor = sal_True;
aOldTextFillColor = GetTextFillColor();
}
else
- bRestoreFillColor = FALSE;
+ bRestoreFillColor = sal_False;
if( bHighContrastBlack )
SetTextColor( COL_GREEN );
@@ -7097,7 +7097,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
long OutputDevice::GetCtrlTextWidth( const String& rStr,
xub_StrLen nIndex, xub_StrLen nLen,
- USHORT nStyle ) const
+ sal_uInt16 nStyle ) const
{
DBG_TRACE( "OutputDevice::GetCtrlTextSize()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -7111,7 +7111,7 @@ long OutputDevice::GetCtrlTextWidth( const String& rStr,
if ( nMnemonicPos < nIndex )
nIndex--;
else if ( (nLen < STRING_LEN) &&
- (nMnemonicPos >= nIndex) && (nMnemonicPos < (ULONG)(nIndex+nLen)) )
+ (nMnemonicPos >= nIndex) && (nMnemonicPos < (sal_uLong)(nIndex+nLen)) )
nLen--;
}
return GetTextWidth( aStr, nIndex, nLen );
@@ -7200,7 +7200,7 @@ FontInfo OutputDevice::GetDevFont( int nDevFontIndex ) const
// -----------------------------------------------------------------------
-BOOL OutputDevice::AddTempDevFont( const String& rFileURL, const String& rFontName )
+sal_Bool OutputDevice::AddTempDevFont( const String& rFileURL, const String& rFontName )
{
DBG_TRACE( "OutputDevice::AddTempDevFont()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -7208,17 +7208,17 @@ BOOL OutputDevice::AddTempDevFont( const String& rFileURL, const String& rFontNa
ImplInitFontList();
if( !mpGraphics && !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
bool bRC = mpGraphics->AddTempDevFont( mpFontList, rFileURL, rFontName );
if( !bRC )
- return FALSE;
+ return sal_False;
if( mpAlphaVDev )
mpAlphaVDev->AddTempDevFont( rFileURL, rFontName );
mpFontCache->Invalidate();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -7272,7 +7272,7 @@ Size OutputDevice::GetDevFontSize( const Font& rFont, int nSizeIndex ) const
// -----------------------------------------------------------------------
-BOOL OutputDevice::IsFontAvailable( const String& rFontName ) const
+sal_Bool OutputDevice::IsFontAvailable( const String& rFontName ) const
{
DBG_TRACE( "OutputDevice::IsFontAvailable()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -7492,7 +7492,7 @@ xub_StrLen OutputDevice::ValidateKashidas ( const String& rTxt,
// TODO: best is to get rid of this method completely
-ULONG OutputDevice::GetKerningPairCount() const
+sal_uLong OutputDevice::GetKerningPairCount() const
{
DBG_TRACE( "OutputDevice::GetKerningPairCount()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -7518,7 +7518,7 @@ inline bool CmpKernData( const KerningPair& a, const KerningPair& b )
}
// TODO: best is to get rid of this method completely
-void OutputDevice::GetKerningPairs( ULONG nRequestedPairs, KerningPair* pKernPairs ) const
+void OutputDevice::GetKerningPairs( sal_uLong nRequestedPairs, KerningPair* pKernPairs ) const
{
DBG_TRACE( "OutputDevice::GetKerningPairs()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -7540,7 +7540,7 @@ void OutputDevice::GetKerningPairs( ULONG nRequestedPairs, KerningPair* pKernPai
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const String& rStr,
+sal_Bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const String& rStr,
int nIndex, int nLen, int nBase, MetricVector& rVector )
{
DBG_TRACE( "OutputDevice::GetGlyphBoundRect_CTL()" );
@@ -7565,14 +7565,14 @@ BOOL OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const String& rStr,
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetTextBoundRect( Rectangle& rRect,
+sal_Bool OutputDevice::GetTextBoundRect( Rectangle& rRect,
const String& rStr, xub_StrLen nBase, xub_StrLen nIndex, xub_StrLen nLen,
- ULONG nLayoutWidth, const sal_Int32* pDXAry ) const
+ sal_uLong nLayoutWidth, const sal_Int32* pDXAry ) const
{
DBG_TRACE( "OutputDevice::GetTextBoundRect()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
rRect.SetEmpty();
SalLayout* pSalLayout = NULL;
@@ -7636,8 +7636,8 @@ BOOL OutputDevice::GetTextBoundRect( Rectangle& rRect,
// so we need a monochrome virtual device with matching font
VirtualDevice aVDev( 1 );
Font aFont( GetFont() );
- aFont.SetShadow( FALSE );
- aFont.SetOutline( FALSE );
+ aFont.SetShadow( sal_False );
+ aFont.SetOutline( sal_False );
aFont.SetRelief( RELIEF_NONE );
aFont.SetOrientation( 0 );
aFont.SetSize( Size( mpFontEntry->maFontSelData.mnWidth, mpFontEntry->maFontSelData.mnHeight ) );
@@ -7670,7 +7670,7 @@ BOOL OutputDevice::GetTextBoundRect( Rectangle& rRect,
Bitmap aBmp = aVDev.GetBitmap( Point(), aOutSize );
BitmapReadAccess* pAcc = aBmp.AcquireReadAccess();
if( !pAcc )
- return FALSE;
+ return sal_False;
const BitmapColor aBlack( pAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
const long nW = pAcc->Width();
const long nH = pAcc->Height();
@@ -7735,17 +7735,17 @@ BOOL OutputDevice::GetTextBoundRect( Rectangle& rRect,
aTopLeft.X() = ImplDevicePixelToLogicWidth( aTopLeft.X() );
aTopLeft.Y() = ImplDevicePixelToLogicHeight( aTopLeft.Y() );
rRect = Rectangle( aTopLeft, aSize );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
+sal_Bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
const String& rStr, xub_StrLen nBase, xub_StrLen nIndex, xub_StrLen nLen,
- BOOL bOptimize, ULONG nTWidth, const sal_Int32* pDXArray ) const
+ sal_Bool bOptimize, sal_uLong nTWidth, const sal_Int32* pDXArray ) const
{
// the fonts need to be initialized
if( mbNewFont )
@@ -7753,9 +7753,9 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
if( mbInitFont )
ImplInitFont();
if( !mpFontEntry )
- return FALSE;
+ return sal_False;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
rVector.clear();
if( nLen == STRING_LEN )
nLen = rStr.Len() - nIndex;
@@ -7763,11 +7763,11 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
// we want to get the Rectangle in logical units, so to
// avoid rounding errors we just size the font in logical units
- BOOL bOldMap = mbMap;
+ sal_Bool bOldMap = mbMap;
if( bOldMap )
{
- const_cast<OutputDevice&>(*this).mbMap = FALSE;
- const_cast<OutputDevice&>(*this).mbNewFont = TRUE;
+ const_cast<OutputDevice&>(*this).mbMap = sal_False;
+ const_cast<OutputDevice&>(*this).mbNewFont = sal_True;
}
SalLayout* pSalLayout = NULL;
@@ -7827,7 +7827,7 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
{
// restore original font size and map mode
const_cast<OutputDevice&>(*this).mbMap = bOldMap;
- const_cast<OutputDevice&>(*this).mbNewFont = TRUE;
+ const_cast<OutputDevice&>(*this).mbNewFont = sal_True;
}
if( bRet || (OUTDEV_PRINTER == meOutDevType) || !mpFontEntry )
@@ -7874,7 +7874,7 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
pSalLayout->Release();
if( !nWidth || !nHeight )
- return TRUE;
+ return sal_True;
double fScaleX = static_cast< double >(nOrgWidth) / nWidth;
double fScaleY = static_cast< double >(nOrgHeight) / nHeight;
@@ -7931,10 +7931,10 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
else
{
// convert units to logical width
- for (USHORT j = 0; j < aPolyPoly.Count(); ++j)
+ for (sal_uInt16 j = 0; j < aPolyPoly.Count(); ++j)
{
Polygon& rPoly = aPolyPoly[j];
- for (USHORT k = 0; k < rPoly.GetSize(); ++k)
+ for (sal_uInt16 k = 0; k < rPoly.GetSize(); ++k)
{
Point& rPt = rPoly[k];
rPt -= aOffset;
@@ -7972,9 +7972,9 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
+sal_Bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
const String& rStr, xub_StrLen nBase, xub_StrLen nIndex,
- xub_StrLen nLen, BOOL bOptimize, ULONG nTWidth, const sal_Int32* pDXArray ) const
+ xub_StrLen nLen, sal_Bool bOptimize, sal_uLong nTWidth, const sal_Int32* pDXArray ) const
{
rResultVector.clear();
@@ -7982,7 +7982,7 @@ BOOL OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
::basegfx::B2DPolyPolygonVector aB2DPolyPolyVector;
if( !GetTextOutlines( aB2DPolyPolyVector, rStr, nBase, nIndex, nLen,
bOptimize, nTWidth, pDXArray ) )
- return FALSE;
+ return sal_False;
// convert to a tool polypolygon vector
rResultVector.reserve( aB2DPolyPolyVector.size() );
@@ -7990,14 +7990,14 @@ BOOL OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
for(; aIt != aB2DPolyPolyVector.end(); ++aIt )
rResultVector.push_back(PolyPolygon(*aIt)); // #i76339#
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly,
+sal_Bool OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly,
const String& rStr, xub_StrLen nBase, xub_StrLen nIndex, xub_StrLen nLen,
- BOOL bOptimize, ULONG nTWidth, const sal_Int32* pDXArray ) const
+ sal_Bool bOptimize, sal_uLong nTWidth, const sal_Int32* pDXArray ) const
{
rPolyPoly.Clear();
@@ -8005,7 +8005,7 @@ BOOL OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly,
::basegfx::B2DPolyPolygonVector aB2DPolyPolyVector;
if( !GetTextOutlines( aB2DPolyPolyVector, rStr, nBase, nIndex, nLen,
bOptimize, nTWidth, pDXArray ) )
- return FALSE;
+ return sal_False;
// convert and merge into a tool polypolygon
::basegfx::B2DPolyPolygonVector::const_iterator aIt = aB2DPolyPolyVector.begin();
@@ -8013,25 +8013,25 @@ BOOL OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly,
for( unsigned int i = 0; i < aIt->count(); ++i )
rPolyPoly.Insert(Polygon((*aIt).getB2DPolygon( i ))); // #i76339#
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
+sal_Bool OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
{
rFontCharMap.Reset();
// we need a graphics
if( !mpGraphics && !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
if( mbNewFont )
ImplNewFont();
if( mbInitFont )
ImplInitFont();
if( !mpFontEntry )
- return FALSE;
+ return sal_False;
#ifdef ENABLE_IFC_CACHE // a little font charmap cache helps considerably
static const int NMAXITEMS = 16;
@@ -8071,8 +8071,8 @@ BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
}
if( rFontCharMap.IsDefaultMap() )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -8083,7 +8083,7 @@ xub_StrLen OutputDevice::HasGlyphs( const Font& rTempFont, const String& rStr,
if( nIndex >= rStr.Len() )
return nIndex;
xub_StrLen nEnd = nIndex + nLen;
- if( (ULONG)nIndex+nLen > rStr.Len() )
+ if( (sal_uLong)nIndex+nLen > rStr.Len() )
nEnd = rStr.Len();
DBG_ASSERT( nIndex < nEnd, "StartPos >= EndPos?" );
@@ -8093,11 +8093,11 @@ xub_StrLen OutputDevice::HasGlyphs( const Font& rTempFont, const String& rStr,
const Font aOrigFont = GetFont();
const_cast<OutputDevice&>(*this).SetFont( rTempFont );
FontCharMap aFontCharMap;
- BOOL bRet = GetFontCharMap( aFontCharMap );
+ sal_Bool bRet = GetFontCharMap( aFontCharMap );
const_cast<OutputDevice&>(*this).SetFont( aOrigFont );
// if fontmap is unknown assume it doesn't have the glyphs
- if( bRet == FALSE )
+ if( bRet == sal_False )
return nIndex;
const sal_Unicode* pStr = rStr.GetBuffer();
diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index 8ad02ed2d818..a18b7ff48413 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -86,7 +86,7 @@ void OutputDevice::ImplDrawPolygon( const Polygon& rPoly, const PolyPolygon* pCl
ImplDrawPolyPolygon( rPoly, pClipPolyPoly );
else
{
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
if ( nPoints < 2 )
return;
@@ -113,7 +113,7 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
if( pPolyPoly->Count() == 1 )
{
const Polygon rPoly = pPolyPoly->GetObject( 0 );
- USHORT nSize = rPoly.GetSize();
+ sal_uInt16 nSize = rPoly.GetSize();
if( nSize >= 2 )
{
@@ -123,14 +123,14 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
}
else if( pPolyPoly->Count() )
{
- USHORT nCount = pPolyPoly->Count();
+ sal_uInt16 nCount = pPolyPoly->Count();
sal_uInt32* pPointAry = new sal_uInt32[nCount];
PCONSTSALPOINT* pPointAryAry = new PCONSTSALPOINT[nCount];
- USHORT i = 0;
+ sal_uInt16 i = 0;
do
{
const Polygon& rPoly = pPolyPoly->GetObject( i );
- USHORT nSize = rPoly.GetSize();
+ sal_uInt16 nSize = rPoly.GetSize();
if ( nSize )
{
pPointAry[i] = nSize;
@@ -157,21 +157,21 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
// -----------------------------------------------------------------------
-inline UINT8 ImplGetGradientColorValue( long nValue )
+inline sal_uInt8 ImplGetGradientColorValue( long nValue )
{
if ( nValue < 0 )
return 0;
else if ( nValue > 0xFF )
return 0xFF;
else
- return (UINT8)nValue;
+ return (sal_uInt8)nValue;
}
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
const Gradient& rGradient,
- BOOL bMtf, const PolyPolygon* pClipPolyPoly )
+ sal_Bool bMtf, const PolyPolygon* pClipPolyPoly )
{
// rotiertes BoundRect ausrechnen
Rectangle aRect = rRect;
@@ -179,7 +179,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
aRect.Top()--;
aRect.Right()++;
aRect.Bottom()++;
- USHORT nAngle = rGradient.GetAngle() % 3600;
+ sal_uInt16 nAngle = rGradient.GetAngle() % 3600;
double fAngle = nAngle * F_PI1800;
double fWidth = aRect.GetWidth();
double fHeight = aRect.GetHeight();
@@ -198,18 +198,18 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
Point aCenter = rRect.Center();
Rectangle aFullRect = aRect;
long nBorder = (long)rGradient.GetBorder() * aRect.GetHeight() / 100;
- BOOL bLinear;
+ sal_Bool bLinear;
// Rand berechnen und Rechteck neu setzen fuer linearen Farbverlauf
if ( rGradient.GetStyle() == GRADIENT_LINEAR )
{
- bLinear = TRUE;
+ bLinear = sal_True;
aRect.Top() += nBorder;
}
// Rand berechnen und Rechteck neu setzen fuer axiale Farbverlauf
else
{
- bLinear = FALSE;
+ bLinear = sal_False;
nBorder >>= 1;
aRect.Top() += nBorder;
@@ -297,9 +297,9 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
double fScanInc = (double)aRect.GetHeight() / (double)nSteps;
// Startfarbe berechnen und setzen
- UINT8 nRed;
- UINT8 nGreen;
- UINT8 nBlue;
+ sal_uInt8 nRed;
+ sal_uInt8 nGreen;
+ sal_uInt8 nBlue;
long nSteps2;
long nStepsHalf = 0;
if ( bLinear )
@@ -307,23 +307,23 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
// Um 1 erhoeht, um die Border innerhalb der Schleife
// zeichnen zu koennen
nSteps2 = nSteps + 1;
- nRed = (UINT8)nStartRed;
- nGreen = (UINT8)nStartGreen;
- nBlue = (UINT8)nStartBlue;
+ nRed = (sal_uInt8)nStartRed;
+ nGreen = (sal_uInt8)nStartGreen;
+ nBlue = (sal_uInt8)nStartBlue;
}
else
{
// Um 2 erhoeht, um die Border innerhalb der Schleife
// zeichnen zu koennen
nSteps2 = nSteps + 2;
- nRed = (UINT8)nEndRed;
- nGreen = (UINT8)nEndGreen;
- nBlue = (UINT8)nEndBlue;
+ nRed = (sal_uInt8)nEndRed;
+ nGreen = (sal_uInt8)nEndGreen;
+ nBlue = (sal_uInt8)nEndBlue;
nStepsHalf = nSteps >> 1;
}
if ( bMtf )
- mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) );
else
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
@@ -384,9 +384,9 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
// on.
if ( i >= nSteps )
{
- nRed = (UINT8)nEndRed;
- nGreen = (UINT8)nEndGreen;
- nBlue = (UINT8)nEndBlue;
+ nRed = (sal_uInt8)nEndRed;
+ nGreen = (sal_uInt8)nEndGreen;
+ nBlue = (sal_uInt8)nEndBlue;
}
else
{
@@ -408,7 +408,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
}
if ( bMtf )
- mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) );
else
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
}
@@ -418,7 +418,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
const Gradient& rGradient,
- BOOL bMtf, const PolyPolygon* pClipPolyPoly )
+ sal_Bool bMtf, const PolyPolygon* pClipPolyPoly )
{
// Feststellen ob Ausgabe ueber Polygon oder PolyPolygon
// Bei Rasteroperationen ungleich Overpaint immer PolyPolygone,
@@ -442,7 +442,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
long nGreenSteps = nEndGreen - nStartGreen;
long nBlueSteps = nEndBlue - nStartBlue;
long nStepCount = rGradient.GetSteps();
- USHORT nAngle = rGradient.GetAngle() % 3600;
+ sal_uInt16 nAngle = rGradient.GetAngle() % 3600;
if( (meRasterOp != ROP_OVERPAINT) || (meOutDevType != OUTDEV_WINDOW) || bMtf )
pPolyPoly = new PolyPolygon( 2 );
@@ -548,11 +548,11 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
double fScanRight = aRect.Right();
double fScanBottom = aRect.Bottom();
double fScanInc = (double) nMinRect / (double) nSteps * 0.5;
- UINT8 nRed = (UINT8) nStartRed, nGreen = (UINT8) nStartGreen, nBlue = (UINT8) nStartBlue;
+ sal_uInt8 nRed = (sal_uInt8) nStartRed, nGreen = (sal_uInt8) nStartGreen, nBlue = (sal_uInt8) nStartBlue;
bool bPaintLastPolygon( false ); // #107349# Paint last polygon only if loop has generated any output
if( bMtf )
- mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) );
else
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
@@ -620,7 +620,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
// the one painted in the window outdev path below. To get
// matching colors, have to delay color setting here.
if( bMtf )
- mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) );
else
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
}
@@ -628,7 +628,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
{
// #107349# Set fill color _before_ geometry painting
if( bMtf )
- mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) );
else
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
@@ -655,7 +655,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
if( bMtf )
{
- mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) );
mpMetaFile->AddAction( new MetaPolygonAction( rPoly ) );
}
else
@@ -715,7 +715,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
if ( mnDrawMode & DRAWMODE_GRAYGRADIENT )
{
- BYTE cStartLum = aStartCol.GetLuminance(), cEndLum = aEndCol.GetLuminance();
+ sal_uInt8 cStartLum = aStartCol.GetLuminance(), cEndLum = aEndCol.GetLuminance();
aStartCol = Color( cStartLum, cStartLum, cStartLum );
aEndCol = Color( cEndLum, cEndLum, cEndLum );
}
@@ -775,19 +775,19 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
if ( mbLineColor || mbInitLineColor )
{
mpGraphics->SetLineColor();
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
}
- mbInitFillColor = TRUE;
+ mbInitFillColor = sal_True;
// calculate step count if neccessary
if ( !aGradient.GetSteps() )
aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT );
if( aGradient.GetStyle() == GRADIENT_LINEAR || aGradient.GetStyle() == GRADIENT_AXIAL )
- ImplDrawLinearGradient( aRect, aGradient, FALSE, NULL );
+ ImplDrawLinearGradient( aRect, aGradient, sal_False, NULL );
else
- ImplDrawComplexGradient( aRect, aGradient, FALSE, NULL );
+ ImplDrawComplexGradient( aRect, aGradient, sal_False, NULL );
}
Pop();
@@ -863,9 +863,9 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
}
else
{
- const BOOL bOldOutput = IsOutputEnabled();
+ const sal_Bool bOldOutput = IsOutputEnabled();
- EnableOutput( FALSE );
+ EnableOutput( sal_False );
Push( PUSH_RASTEROP );
SetRasterOp( ROP_XOR );
DrawGradient( aRect, rGradient );
@@ -893,7 +893,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if ( mnDrawMode & DRAWMODE_GRAYGRADIENT )
{
- BYTE cStartLum = aStartCol.GetLuminance(), cEndLum = aEndCol.GetLuminance();
+ sal_uInt8 cStartLum = aStartCol.GetLuminance(), cEndLum = aEndCol.GetLuminance();
aStartCol = Color( cStartLum, cStartLum, cStartLum );
aEndCol = Color( cEndLum, cEndLum, cEndLum );
}
@@ -940,19 +940,19 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( mbLineColor || mbInitLineColor )
{
mpGraphics->SetLineColor();
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
}
- mbInitFillColor = TRUE;
+ mbInitFillColor = sal_True;
// calculate step count if neccessary
if ( !aGradient.GetSteps() )
aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT );
if( aGradient.GetStyle() == GRADIENT_LINEAR || aGradient.GetStyle() == GRADIENT_AXIAL )
- ImplDrawLinearGradient( aRect, aGradient, FALSE, &aClipPolyPoly );
+ ImplDrawLinearGradient( aRect, aGradient, sal_False, &aClipPolyPoly );
else
- ImplDrawComplexGradient( aRect, aGradient, FALSE, &aClipPolyPoly );
+ ImplDrawComplexGradient( aRect, aGradient, sal_False, &aClipPolyPoly );
}
}
}
@@ -994,9 +994,9 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( pVDev->SetOutputSizePixel( aDstSize) )
{
MapMode aVDevMap;
- const BOOL bOldMap = mbMap;
+ const sal_Bool bOldMap = mbMap;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
pVDev->DrawOutDev( Point(), aDstSize, aDstRect.TopLeft(), aDstSize, *this );
pVDev->SetRasterOp( ROP_XOR );
@@ -1045,7 +1045,7 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r
mpMetaFile = &rMtf;
mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) );
mpMetaFile->AddAction( new MetaISectRectClipRegionAction( aRect ) );
- mpMetaFile->AddAction( new MetaLineColorAction( Color(), FALSE ) );
+ mpMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) );
// because we draw with no border line, we have to expand gradient
// rect to avoid missing lines on the right and bottom edge
@@ -1059,9 +1059,9 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r
aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT );
if( aGradient.GetStyle() == GRADIENT_LINEAR || aGradient.GetStyle() == GRADIENT_AXIAL )
- ImplDrawLinearGradient( aRect, aGradient, TRUE, NULL );
+ ImplDrawLinearGradient( aRect, aGradient, sal_True, NULL );
else
- ImplDrawComplexGradient( aRect, aGradient, TRUE, NULL );
+ ImplDrawComplexGradient( aRect, aGradient, sal_True, NULL );
mpMetaFile->AddAction( new MetaPopAction() );
mpMetaFile = pOldMtf;
@@ -1089,7 +1089,7 @@ void OutputDevice::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
aColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYLINE )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if( mnDrawMode & DRAWMODE_SETTINGSLINE )
@@ -1126,17 +1126,17 @@ void OutputDevice::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
{
PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
GDIMetaFile* pOldMetaFile = mpMetaFile;
- BOOL bOldMap = mbMap;
+ sal_Bool bOldMap = mbMap;
aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME );
aHatch.SetDistance( ImplLogicWidthToDevicePixel( aHatch.GetDistance() ) );
mpMetaFile = NULL;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
Push( PUSH_LINECOLOR );
SetLineColor( aHatch.GetColor() );
ImplInitLineColor();
- ImplDrawHatch( aPolyPoly, aHatch, FALSE );
+ ImplDrawHatch( aPolyPoly, aHatch, sal_False );
Pop();
EnableMapMode( bOldMap );
mpMetaFile = pOldMetaFile;
@@ -1162,8 +1162,8 @@ void OutputDevice::AddHatchActions( const PolyPolygon& rPolyPoly, const Hatch& r
mpMetaFile = &rMtf;
mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) );
- mpMetaFile->AddAction( new MetaLineColorAction( rHatch.GetColor(), TRUE ) );
- ImplDrawHatch( aPolyPoly, rHatch, TRUE );
+ mpMetaFile->AddAction( new MetaLineColorAction( rHatch.GetColor(), sal_True ) );
+ ImplDrawHatch( aPolyPoly, rHatch, sal_True );
mpMetaFile->AddAction( new MetaPopAction() );
mpMetaFile = pOldMtf;
}
@@ -1171,7 +1171,7 @@ void OutputDevice::AddHatchActions( const PolyPolygon& rPolyPoly, const Hatch& r
// -----------------------------------------------------------------------
-void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, BOOL bMtf )
+void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, sal_Bool bMtf )
{
Rectangle aRect( rPolyPoly.GetBoundRect() );
const long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 );
@@ -1222,7 +1222,7 @@ void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHa
// -----------------------------------------------------------------------
-void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHORT nAngle10,
+void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10,
Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 )
{
Point aRef;
@@ -1333,14 +1333,14 @@ void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHO
// ------------------------------------------------------------------------
void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly,
- Point* pPtBuffer, BOOL bMtf )
+ Point* pPtBuffer, sal_Bool bMtf )
{
double fX, fY;
long nAdd, nPCounter = 0;
for( long nPoly = 0, nPolyCount = rPolyPoly.Count(); nPoly < nPolyCount; nPoly++ )
{
- const Polygon& rPoly = rPolyPoly[ (USHORT) nPoly ];
+ const Polygon& rPoly = rPolyPoly[ (sal_uInt16) nPoly ];
if( rPoly.GetSize() > 1 )
{
@@ -1348,7 +1348,7 @@ void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPol
for( long i = 1, nCount = rPoly.GetSize(); i <= nCount; i++ )
{
- aCurSegment.SetEnd( rPoly[ (USHORT)( i % nCount ) ] );
+ aCurSegment.SetEnd( rPoly[ (sal_uInt16)( i % nCount ) ] );
nAdd = 0;
if( rLine.Intersection( aCurSegment, fX, fY ) )
@@ -1356,7 +1356,7 @@ void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPol
if( ( fabs( fX - aCurSegment.GetStart().X() ) <= 0.0000001 ) &&
( fabs( fY - aCurSegment.GetStart().Y() ) <= 0.0000001 ) )
{
- const Line aPrevSegment( rPoly[ (USHORT)( ( i > 1 ) ? ( i - 2 ) : ( nCount - 1 ) ) ], aCurSegment.GetStart() );
+ const Line aPrevSegment( rPoly[ (sal_uInt16)( ( i > 1 ) ? ( i - 2 ) : ( nCount - 1 ) ) ], aCurSegment.GetStart() );
const double fPrevDistance = rLine.GetDistance( aPrevSegment.GetStart() );
const double fCurDistance = rLine.GetDistance( aCurSegment.GetEnd() );
@@ -1369,7 +1369,7 @@ void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPol
else if( ( fabs( fX - aCurSegment.GetEnd().X() ) <= 0.0000001 ) &&
( fabs( fY - aCurSegment.GetEnd().Y() ) <= 0.0000001 ) )
{
- const Line aNextSegment( aCurSegment.GetEnd(), rPoly[ (USHORT)( ( i + 1 ) % nCount ) ] );
+ const Line aNextSegment( aCurSegment.GetEnd(), rPoly[ (sal_uInt16)( ( i + 1 ) % nCount ) ] );
if( ( fabs( rLine.GetDistance( aNextSegment.GetEnd() ) ) <= 0.0000001 ) &&
( rLine.GetDistance( aCurSegment.GetStart() ) > 0.0 ) )
diff --git a/vcl/source/gdi/outdev5.cxx b/vcl/source/gdi/outdev5.cxx
index d42723215c55..627f75e88282 100644
--- a/vcl/source/gdi/outdev5.cxx
+++ b/vcl/source/gdi/outdev5.cxx
@@ -50,7 +50,7 @@ DBG_NAMEEX( OutputDevice )
// =======================================================================
void OutputDevice::DrawRect( const Rectangle& rRect,
- ULONG nHorzRound, ULONG nVertRound )
+ sal_uLong nHorzRound, sal_uLong nVertRound )
{
DBG_TRACE( "OutputDevice::DrawRoundRect()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index 5b8d228bb141..eb4b76fb4b41 100644
--- a/vcl/source/gdi/outdev6.cxx
+++ b/vcl/source/gdi/outdev6.cxx
@@ -59,7 +59,7 @@ DBG_NAMEEX( OutputDevice )
// ------------------------------------------------------------------------
-void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, ULONG nFlags )
+void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLong nFlags )
{
DBG_TRACE( "OutputDevice::DrawGrid()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -117,8 +117,8 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, ULONG nF
if( mbInitFillColor )
ImplInitFillColor();
- const BOOL bOldMap = mbMap;
- EnableMapMode( FALSE );
+ const sal_Bool bOldMap = mbMap;
+ EnableMapMode( sal_False );
if( nFlags & GRID_DOTS )
{
@@ -233,7 +233,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly,
// ------------------------------------------------------------------------
void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
- USHORT nTransparencePercent )
+ sal_uInt16 nTransparencePercent )
{
DBG_TRACE( "OutputDevice::DrawTransparent()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -355,7 +355,7 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
const Size aDPISize( LogicToPixel( Size( 1, 1 ), MAP_INCH ) );
const long nBaseExtent = Max( FRound( aDPISize.Width() / 300. ), 1L );
long nMove;
- const USHORT nTrans = ( nTransparencePercent < 13 ) ? 0 :
+ const sal_uInt16 nTrans = ( nTransparencePercent < 13 ) ? 0 :
( nTransparencePercent < 38 ) ? 25 :
( nTransparencePercent < 63 ) ? 50 :
( nTransparencePercent < 88 ) ? 75 : 100;
@@ -376,8 +376,8 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
Push( PUSH_CLIPREGION | PUSH_LINECOLOR );
IntersectClipRegion( rPolyPoly );
SetLineColor( GetFillColor() );
- const BOOL bOldMap = mbMap;
- EnableMapMode( FALSE );
+ const sal_Bool bOldMap = mbMap;
+ EnableMapMode( sal_False );
if(nMove)
{
@@ -464,16 +464,16 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
{
VirtualDevice aVDev( *this, 1 );
const Size aDstSz( aDstRect.GetSize() );
- const BYTE cTrans = (BYTE) MinMax( FRound( nTransparencePercent * 2.55 ), 0, 255 );
+ const sal_uInt8 cTrans = (sal_uInt8) MinMax( FRound( nTransparencePercent * 2.55 ), 0, 255 );
if( aDstRect.Left() || aDstRect.Top() )
aPolyPoly.Move( -aDstRect.Left(), -aDstRect.Top() );
if( aVDev.SetOutputSizePixel( aDstSz ) )
{
- const BOOL bOldMap = mbMap;
+ const sal_Bool bOldMap = mbMap;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
aVDev.SetLineColor( COL_BLACK );
aVDev.SetFillColor( COL_BLACK );
@@ -501,25 +501,25 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
if( aPaint.GetBitCount() <= 8 )
{
const BitmapPalette& rPal = pW->GetPalette();
- const USHORT nCount = rPal.GetEntryCount();
- BitmapColor* pMap = (BitmapColor*) new BYTE[ nCount * sizeof( BitmapColor ) ];
+ const sal_uInt16 nCount = rPal.GetEntryCount();
+ BitmapColor* pMap = (BitmapColor*) new sal_uInt8[ nCount * sizeof( BitmapColor ) ];
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
BitmapColor aCol( rPal[ i ] );
- pMap[ i ] = BitmapColor( (BYTE) rPal.GetBestIndex( aCol.Merge( aFillCol, cTrans ) ) );
+ pMap[ i ] = BitmapColor( (sal_uInt8) rPal.GetBestIndex( aCol.Merge( aFillCol, cTrans ) ) );
}
if( pR->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
pW->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL )
{
- const BYTE cBlack = aBlack.GetIndex();
+ const sal_uInt8 cBlack = aBlack.GetIndex();
for( nY = 0; nY < nHeight; nY++ )
{
Scanline pWScan = pW->GetScanline( nY );
Scanline pRScan = pR->GetScanline( nY );
- BYTE cBit = 128;
+ sal_uInt8 cBit = 128;
for( nX = 0; nX < nWidth; nX++, cBit >>= 1, pWScan++ )
{
@@ -527,7 +527,7 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
cBit = 128, pRScan++;
if( ( *pRScan & cBit ) == cBlack )
- *pWScan = (BYTE) pMap[ *pWScan ].GetIndex();
+ *pWScan = (sal_uInt8) pMap[ *pWScan ].GetIndex();
}
}
}
@@ -539,20 +539,20 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
pW->SetPixel( nY, nX, pMap[ pW->GetPixel( nY, nX ).GetIndex() ] );
}
- delete[] (BYTE*) pMap;
+ delete[] (sal_uInt8*) pMap;
}
else
{
if( pR->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
pW->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_BGR )
{
- const BYTE cBlack = aBlack.GetIndex();
+ const sal_uInt8 cBlack = aBlack.GetIndex();
for( nY = 0; nY < nHeight; nY++ )
{
Scanline pWScan = pW->GetScanline( nY );
Scanline pRScan = pR->GetScanline( nY );
- BYTE cBit = 128;
+ sal_uInt8 cBit = 128;
for( nX = 0; nX < nWidth; nX++, cBit >>= 1, pWScan += 3 )
{
@@ -616,9 +616,9 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
if( mpAlphaVDev )
{
const Color aFillCol( mpAlphaVDev->GetFillColor() );
- mpAlphaVDev->SetFillColor( Color(sal::static_int_cast<UINT8>(255*nTransparencePercent/100),
- sal::static_int_cast<UINT8>(255*nTransparencePercent/100),
- sal::static_int_cast<UINT8>(255*nTransparencePercent/100)) );
+ mpAlphaVDev->SetFillColor( Color(sal::static_int_cast<sal_uInt8>(255*nTransparencePercent/100),
+ sal::static_int_cast<sal_uInt8>(255*nTransparencePercent/100),
+ sal::static_int_cast<sal_uInt8>(255*nTransparencePercent/100)) );
mpAlphaVDev->DrawTransparent( rPolyPoly, nTransparencePercent );
@@ -731,19 +731,19 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
AlphaMask aAlpha;
MapMode aMap( GetMapMode() );
Point aOutPos( PixelToLogic( aDstRect.TopLeft() ) );
- const BOOL bOldMap = mbMap;
+ const sal_Bool bOldMap = mbMap;
aMap.SetOrigin( Point( -aOutPos.X(), -aOutPos.Y() ) );
pVDev->SetMapMode( aMap );
- const BOOL bVDevOldMap = pVDev->IsMapModeEnabled();
+ const sal_Bool bVDevOldMap = pVDev->IsMapModeEnabled();
// create paint bitmap
( (GDIMetaFile&) rMtf ).WindStart();
( (GDIMetaFile&) rMtf ).Play( pVDev, rPos, rSize );
( (GDIMetaFile&) rMtf ).WindStart();
- pVDev->EnableMapMode( FALSE );
+ pVDev->EnableMapMode( sal_False );
aPaint = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() );
- pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( TRUE ) here!
+ pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here!
// create mask bitmap
pVDev->SetLineColor( COL_BLACK );
@@ -754,22 +754,22 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
( (GDIMetaFile&) rMtf ).WindStart();
( (GDIMetaFile&) rMtf ).Play( pVDev, rPos, rSize );
( (GDIMetaFile&) rMtf ).WindStart();
- pVDev->EnableMapMode( FALSE );
+ pVDev->EnableMapMode( sal_False );
aMask = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() );
- pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( TRUE ) here!
+ pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here!
// create alpha mask from gradient
pVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT );
pVDev->DrawGradient( Rectangle( rPos, rSize ), rTransparenceGradient );
pVDev->SetDrawMode( DRAWMODE_DEFAULT );
- pVDev->EnableMapMode( FALSE );
+ pVDev->EnableMapMode( sal_False );
pVDev->DrawMask( Point(), pVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) );
aAlpha = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() );
delete pVDev;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
DrawBitmapEx( aDstRect.TopLeft(), BitmapEx( aPaint, aAlpha ) );
EnableMapMode( bOldMap );
}
@@ -793,8 +793,8 @@ void OutputDevice::ImplDrawColorWallpaper( long nX, long nY,
Color aOldFillColor = GetFillColor();
SetLineColor();
SetFillColor( rWallpaper.GetColor() );
- BOOL bMap = mbMap;
- EnableMapMode( FALSE );
+ sal_Bool bMap = mbMap;
+ EnableMapMode( sal_False );
DrawRect( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
SetLineColor( aOldLineColor );
SetFillColor( aOldFillColor );
@@ -813,10 +813,10 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
Size aSize;
GDIMetaFile* pOldMetaFile = mpMetaFile;
const WallpaperStyle eStyle = rWallpaper.GetStyle();
- const BOOL bOldMap = mbMap;
- BOOL bDrawn = FALSE;
- BOOL bDrawGradientBackground = FALSE;
- BOOL bDrawColorBackground = FALSE;
+ const sal_Bool bOldMap = mbMap;
+ sal_Bool bDrawn = sal_False;
+ sal_Bool bDrawGradientBackground = sal_False;
+ sal_Bool bDrawColorBackground = sal_False;
if( pCached )
aBmpEx = *pCached;
@@ -825,13 +825,13 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
const long nBmpWidth = aBmpEx.GetSizePixel().Width();
const long nBmpHeight = aBmpEx.GetSizePixel().Height();
- const BOOL bTransparent = aBmpEx.IsTransparent();
+ const sal_Bool bTransparent = aBmpEx.IsTransparent();
// draw background
if( bTransparent )
{
if( rWallpaper.IsGradient() )
- bDrawGradientBackground = TRUE;
+ bDrawGradientBackground = sal_True;
else
{
if( !pCached && !rWallpaper.GetColor().GetTransparency() )
@@ -843,15 +843,15 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
aBmpEx = aVDev.GetBitmap( Point(), aVDev.GetOutputSizePixel() );
}
- bDrawColorBackground = TRUE;
+ bDrawColorBackground = sal_True;
}
}
else if( eStyle != WALLPAPER_TILE && eStyle != WALLPAPER_SCALE )
{
if( rWallpaper.IsGradient() )
- bDrawGradientBackground = TRUE;
+ bDrawGradientBackground = sal_True;
else
- bDrawColorBackground = TRUE;
+ bDrawColorBackground = sal_True;
}
// background of bitmap?
@@ -860,7 +860,7 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
else if( bDrawColorBackground && bTransparent )
{
ImplDrawColorWallpaper( nX, nY, nWidth, nHeight, rWallpaper );
- bDrawColorBackground = FALSE;
+ bDrawColorBackground = sal_False;
}
// calc pos and size
@@ -877,7 +877,7 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
}
mpMetaFile = NULL;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
Push( PUSH_CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
@@ -977,7 +977,7 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
for( long nBmpX = nStartX; nBmpX <= nRight; nBmpX += nBmpWidth )
DrawBitmapEx( Point( nBmpX, nBmpY ), aBmpEx );
- bDrawn = TRUE;
+ bDrawn = sal_True;
}
break;
}
@@ -1052,8 +1052,8 @@ void OutputDevice::ImplDrawGradientWallpaper( long nX, long nY,
{
Rectangle aBound;
GDIMetaFile* pOldMetaFile = mpMetaFile;
- const BOOL bOldMap = mbMap;
- BOOL bNeedGradient = TRUE;
+ const sal_Bool bOldMap = mbMap;
+ sal_Bool bNeedGradient = sal_True;
/*
if ( rWallpaper.IsRect() )
@@ -1063,7 +1063,7 @@ void OutputDevice::ImplDrawGradientWallpaper( long nX, long nY,
aBound = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) );
mpMetaFile = NULL;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
Push( PUSH_CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
@@ -1080,7 +1080,7 @@ void OutputDevice::ImplDrawGradientWallpaper( long nX, long nY,
if( mnOutOffX+nWidth > gradientWidth )
ImplDrawColorWallpaper( nX, nY, nWidth, nHeight, rWallpaper.GetGradient().GetEndColor() );
if( mnOutOffX > gradientWidth )
- bNeedGradient = FALSE;
+ bNeedGradient = sal_False;
else
aBound = Rectangle( Point( -mnOutOffX, nY ), Size( gradientWidth, nHeight ) );
}
@@ -1142,7 +1142,7 @@ void OutputDevice::Erase()
if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() )
return;
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
if( meOutDevType == OUTDEV_WINDOW )
{
Window* pWindow = static_cast<Window*>(this);
@@ -1226,7 +1226,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize,
aRect.Justify();
bDrawn = mpGraphics->DrawEPS( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(),
- (BYTE*) rGfxLink.GetData(), rGfxLink.GetDataSize(), this );
+ (sal_uInt8*) rGfxLink.GetData(), rGfxLink.GetDataSize(), this );
}
// else draw the substitution graphics
diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx
index b5b745b708fa..cb472762338b 100755
--- a/vcl/source/gdi/outdevnative.cxx
+++ b/vcl/source/gdi/outdevnative.cxx
@@ -102,14 +102,14 @@ PushButtonValue::~PushButtonValue()
// -----------------------------------------------------------------------
-BOOL OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPart )
+sal_Bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPart )
{
if( !lcl_enableNativeWidget( *this ) )
- return FALSE;
+ return sal_False;
if ( !mpGraphics )
if ( !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
return( mpGraphics->IsNativeControlSupported(nType, nPart) );
}
@@ -117,18 +117,18 @@ BOOL OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPar
// -----------------------------------------------------------------------
-BOOL OutputDevice::HitTestNativeControl( ControlType nType,
+sal_Bool OutputDevice::HitTestNativeControl( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
const Point& aPos,
- BOOL& rIsInside )
+ sal_Bool& rIsInside )
{
if( !lcl_enableNativeWidget( *this ) )
- return FALSE;
+ return sal_False;
if ( !mpGraphics )
if ( !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
Point aWinOffs( mnOutOffX, mnOutOffY );
Rectangle screenRegion( rControlRegion );
@@ -219,7 +219,7 @@ static boost::shared_ptr< ImplControlValue > lcl_transformControlValue( const Im
return aResult;
}
-BOOL OutputDevice::DrawNativeControl( ControlType nType,
+sal_Bool OutputDevice::DrawNativeControl( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
@@ -227,17 +227,17 @@ BOOL OutputDevice::DrawNativeControl( ControlType nType,
::rtl::OUString aCaption )
{
if( !lcl_enableNativeWidget( *this ) )
- return FALSE;
+ return sal_False;
// make sure the current clip region is initialized correctly
if ( !mpGraphics )
if ( !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
if ( mbInitClipRegion )
ImplInitClipRegion();
if ( mbOutputClipped )
- return TRUE;
+ return sal_True;
if ( mbInitLineColor )
ImplInitLineColor();
@@ -254,7 +254,7 @@ BOOL OutputDevice::DrawNativeControl( ControlType nType,
if( aTestRegion == rControlRegion )
nState |= CTRL_CACHING_ALLOWED; // control is not clipped, caching allowed
- BOOL bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this );
+ sal_Bool bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this );
return bRet;
}
@@ -262,7 +262,7 @@ BOOL OutputDevice::DrawNativeControl( ControlType nType,
// -----------------------------------------------------------------------
-BOOL OutputDevice::DrawNativeControlText(ControlType nType,
+sal_Bool OutputDevice::DrawNativeControlText(ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
@@ -270,7 +270,7 @@ BOOL OutputDevice::DrawNativeControlText(ControlType nType,
::rtl::OUString aCaption )
{
if( !lcl_enableNativeWidget( *this ) )
- return FALSE;
+ return sal_False;
// make sure the current clip region is initialized correctly
if ( !mpGraphics )
@@ -292,7 +292,7 @@ BOOL OutputDevice::DrawNativeControlText(ControlType nType,
boost::shared_ptr< ImplControlValue > aScreenCtrlValue( lcl_transformControlValue( aValue, *this ) );
Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
- BOOL bRet = mpGraphics->DrawNativeControlText(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this );
+ sal_Bool bRet = mpGraphics->DrawNativeControlText(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this );
return bRet;
}
@@ -300,7 +300,7 @@ BOOL OutputDevice::DrawNativeControlText(ControlType nType,
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetNativeControlRegion( ControlType nType,
+sal_Bool OutputDevice::GetNativeControlRegion( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
@@ -310,18 +310,18 @@ BOOL OutputDevice::GetNativeControlRegion( ControlType nType,
Rectangle &rNativeContentRegion )
{
if( !lcl_enableNativeWidget( *this ) )
- return FALSE;
+ return sal_False;
if ( !mpGraphics )
if ( !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
// Convert the coordinates from relative to Window-absolute, so we draw
// in the correct place in platform code
boost::shared_ptr< ImplControlValue > aScreenCtrlValue( lcl_transformControlValue( aValue, *this ) );
Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
- BOOL bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue,
+ sal_Bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue,
aCaption, rNativeBoundingRegion,
rNativeContentRegion, this );
if( bRet )
diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx
index 189ba4c29e59..1bdd86e13ecb 100644
--- a/vcl/source/gdi/outmap.cxx
+++ b/vcl/source/gdi/outmap.cxx
@@ -134,7 +134,7 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
{
// Schwellenwerte fuer BigInt Arithmetik berechnen
long nDenomHalfX = rMapRes.mnMapScDenomX / 2;
- ULONG nDenomX = rMapRes.mnMapScDenomX;
+ sal_uLong nDenomX = rMapRes.mnMapScDenomX;
long nProductX = nDPIX * rMapRes.mnMapScNumX;
if ( !nProductX )
@@ -145,9 +145,9 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
if ( !nDenomX )
rThresRes.mnThresPixToLogX = LONG_MAX;
else if ( nProductX >= 0 )
- rThresRes.mnThresPixToLogX = (long)(((ULONG)LONG_MAX - (ULONG)( nProductX/2)) / nDenomX);
+ rThresRes.mnThresPixToLogX = (long)(((sal_uLong)LONG_MAX - (sal_uLong)( nProductX/2)) / nDenomX);
else
- rThresRes.mnThresPixToLogX = (long)(((ULONG)LONG_MAX + (ULONG)(-nProductX/2)) / nDenomX);
+ rThresRes.mnThresPixToLogX = (long)(((sal_uLong)LONG_MAX + (sal_uLong)(-nProductX/2)) / nDenomX);
}
if ( nDPIY && (LONG_MAX / nDPIY < Abs( rMapRes.mnMapScNumY ) ) ) // #111139# avoid div by zero
@@ -159,7 +159,7 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
{
// Schwellenwerte fuer BigInt Arithmetik berechnen
long nDenomHalfY = rMapRes.mnMapScDenomY / 2;
- ULONG nDenomY = rMapRes.mnMapScDenomY;
+ sal_uLong nDenomY = rMapRes.mnMapScDenomY;
long nProductY = nDPIY * rMapRes.mnMapScNumY;
if ( !nProductY )
@@ -170,9 +170,9 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
if ( !nDenomY )
rThresRes.mnThresPixToLogY = LONG_MAX;
else if ( nProductY >= 0 )
- rThresRes.mnThresPixToLogY = (long)(((ULONG)LONG_MAX - (ULONG)( nProductY/2)) / nDenomY);
+ rThresRes.mnThresPixToLogY = (long)(((sal_uLong)LONG_MAX - (sal_uLong)( nProductY/2)) / nDenomY);
else
- rThresRes.mnThresPixToLogY = (long)(((ULONG)LONG_MAX + (ULONG)(-nProductY/2)) / nDenomY);
+ rThresRes.mnThresPixToLogY = (long)(((sal_uLong)LONG_MAX + (sal_uLong)(-nProductY/2)) / nDenomY);
}
#ifdef USE_64BIT_INTS
@@ -688,8 +688,8 @@ Polygon OutputDevice::ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const
if ( !mbMap && !mnOutOffX && !mnOutOffY )
return rLogicPoly;
- USHORT i;
- USHORT nPoints = rLogicPoly.GetSize();
+ sal_uInt16 i;
+ sal_uInt16 nPoints = rLogicPoly.GetSize();
Polygon aPoly( rLogicPoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -732,8 +732,8 @@ PolyPolygon OutputDevice::ImplLogicToDevicePixel( const PolyPolygon& rLogicPolyP
return rLogicPolyPoly;
PolyPolygon aPolyPoly( rLogicPolyPoly );
- USHORT nPoly = aPolyPoly.Count();
- for( USHORT i = 0; i < nPoly; i++ )
+ sal_uInt16 nPoly = aPolyPoly.Count();
+ for( sal_uInt16 i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
rPoly = ImplLogicToDevicePixel( rPoly );
@@ -813,7 +813,7 @@ Region OutputDevice::ImplPixelToDevicePixel( const Region& rRegion ) const
// -----------------------------------------------------------------------
-void OutputDevice::EnableMapMode( BOOL bEnable )
+void OutputDevice::EnableMapMode( sal_Bool bEnable )
{
mbMap = (bEnable != 0);
@@ -832,12 +832,12 @@ void OutputDevice::SetMapMode()
if ( mbMap || !maMapMode.IsDefault() )
{
- mbMap = FALSE;
+ mbMap = sal_False;
maMapMode = MapMode();
// create new objects (clip region werden nicht neu skaliert)
- mbNewFont = TRUE;
- mbInitFont = TRUE;
+ mbNewFont = sal_True;
+ mbInitFont = sal_True;
if ( GetOutDevType() == OUTDEV_WINDOW )
{
if ( ((Window*)this)->mpWindowImpl->mpCursor )
@@ -862,7 +862,7 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode )
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- BOOL bRelMap = (rNewMapMode.GetMapUnit() == MAP_RELATIVE);
+ sal_Bool bRelMap = (rNewMapMode.GetMapUnit() == MAP_RELATIVE);
if ( mpMetaFile )
{
@@ -881,7 +881,7 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode )
mpAlphaVDev->SetMapMode( rNewMapMode );
// Ist Default-MapMode, dann bereche nichts
- BOOL bOldMap = mbMap;
+ sal_Bool bOldMap = mbMap;
mbMap = !rNewMapMode.IsDefault();
if ( mbMap )
{
@@ -937,8 +937,8 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode )
maMapMode = rNewMapMode;
// create new objects (clip region werden nicht neu skaliert)
- mbNewFont = TRUE;
- mbInitFont = TRUE;
+ mbNewFont = sal_True;
+ mbInitFont = sal_True;
if ( GetOutDevType() == OUTDEV_WINDOW )
{
if ( ((Window*)this)->mpWindowImpl->mpCursor )
@@ -1209,8 +1209,8 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly ) const
if ( !mbMap )
return rLogicPoly;
- USHORT i;
- USHORT nPoints = rLogicPoly.GetSize();
+ sal_uInt16 i;
+ sal_uInt16 nPoints = rLogicPoly.GetSize();
Polygon aPoly( rLogicPoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1243,8 +1243,8 @@ PolyPolygon OutputDevice::LogicToPixel( const PolyPolygon& rLogicPolyPoly ) cons
return rLogicPolyPoly;
PolyPolygon aPolyPoly( rLogicPolyPoly );
- USHORT nPoly = aPolyPoly.Count();
- for( USHORT i = 0; i < nPoly; i++ )
+ sal_uInt16 nPoly = aPolyPoly.Count();
+ for( sal_uInt16 i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
rPoly = LogicToPixel( rPoly );
@@ -1305,7 +1305,7 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion ) const
long nWidth;
long nHeight;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rLogicRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1412,8 +1412,8 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly,
ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
- USHORT i;
- USHORT nPoints = rLogicPoly.GetSize();
+ sal_uInt16 i;
+ sal_uInt16 nPoints = rLogicPoly.GetSize();
Polygon aPoly( rLogicPoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1447,8 +1447,8 @@ PolyPolygon OutputDevice::LogicToPixel( const PolyPolygon& rLogicPolyPoly,
return rLogicPolyPoly;
PolyPolygon aPolyPoly( rLogicPolyPoly );
- USHORT nPoly = aPolyPoly.Count();
- for( USHORT i = 0; i < nPoly; i++ )
+ sal_uInt16 nPoly = aPolyPoly.Count();
+ for( sal_uInt16 i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
rPoly = LogicToPixel( rPoly, rMapMode );
@@ -1503,7 +1503,7 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion,
long nWidth;
long nHeight;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rLogicRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1586,8 +1586,8 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly ) const
if ( !mbMap )
return rDevicePoly;
- USHORT i;
- USHORT nPoints = rDevicePoly.GetSize();
+ sal_uInt16 i;
+ sal_uInt16 nPoints = rDevicePoly.GetSize();
Polygon aPoly( rDevicePoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1620,8 +1620,8 @@ PolyPolygon OutputDevice::PixelToLogic( const PolyPolygon& rDevicePolyPoly ) con
return rDevicePolyPoly;
PolyPolygon aPolyPoly( rDevicePolyPoly );
- USHORT nPoly = aPolyPoly.Count();
- for( USHORT i = 0; i < nPoly; i++ )
+ sal_uInt16 nPoly = aPolyPoly.Count();
+ for( sal_uInt16 i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
rPoly = PixelToLogic( rPoly );
@@ -1673,7 +1673,7 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion ) const
long nWidth;
long nHeight;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rDeviceRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1784,8 +1784,8 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly,
ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
- USHORT i;
- USHORT nPoints = rDevicePoly.GetSize();
+ sal_uInt16 i;
+ sal_uInt16 nPoints = rDevicePoly.GetSize();
Polygon aPoly( rDevicePoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1819,8 +1819,8 @@ PolyPolygon OutputDevice::PixelToLogic( const PolyPolygon& rDevicePolyPoly,
return rDevicePolyPoly;
PolyPolygon aPolyPoly( rDevicePolyPoly );
- USHORT nPoly = aPolyPoly.Count();
- for( USHORT i = 0; i < nPoly; i++ )
+ sal_uInt16 nPoly = aPolyPoly.Count();
+ for( sal_uInt16 i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
rPoly = PixelToLogic( rPoly, rMapMode );
@@ -1875,7 +1875,7 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion,
long nWidth;
long nHeight;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rDeviceRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -2191,7 +2191,7 @@ Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource,
// -----------------------------------------------------------------------
-long* OutputDevice::LogicToLogic( long* pX, USHORT nCount,
+long* OutputDevice::LogicToLogic( long* pX, sal_uInt16 nCount,
const MapMode* pMapModeSource,
const MapMode* pMapModeDest ) const
{
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 046bc4a8951d..77458d2b26fd 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -784,7 +784,7 @@ void PDFExtOutDevData::EndGroup()
mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::EndGroup );
}
void PDFExtOutDevData::EndGroup( const Graphic& rGraphic,
- BYTE nTransparency,
+ sal_uInt8 nTransparency,
const Rectangle& rOutputRect,
const Rectangle& rVisibleOutputRect )
{
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 23ce1dfa6169..445365e83dd4 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -90,7 +90,7 @@ void PDFWriter::DrawTextLine(
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline,
- BOOL bUnderlineAbove )
+ sal_Bool bUnderlineAbove )
{
((PDFWriterImpl*)pImplementation)->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove );
}
@@ -107,7 +107,7 @@ void PDFWriter::DrawTextArray(
void PDFWriter::DrawStretchText(
const Point& rStartPt,
- ULONG nWidth,
+ sal_uLong nWidth,
const XubString& rStr,
xub_StrLen nIndex,
xub_StrLen nLen )
@@ -118,7 +118,7 @@ void PDFWriter::DrawStretchText(
void PDFWriter::DrawText(
const Rectangle& rRect,
const XubString& rStr,
- USHORT nStyle )
+ sal_uInt16 nStyle )
{
((PDFWriterImpl*)pImplementation)->drawText( rRect, rStr, nStyle );
}
@@ -148,7 +148,7 @@ void PDFWriter::DrawRect( const Rectangle& rRect )
((PDFWriterImpl*)pImplementation)->drawRectangle( rRect );
}
-void PDFWriter::DrawRect( const Rectangle& rRect, ULONG nHorzRound, ULONG nVertRound )
+void PDFWriter::DrawRect( const Rectangle& rRect, sal_uLong nHorzRound, sal_uLong nVertRound )
{
((PDFWriterImpl*)pImplementation)->drawRectangle( rRect, nHorzRound, nVertRound );
}
@@ -281,7 +281,7 @@ void PDFWriter::DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpap
((PDFWriterImpl*)pImplementation)->drawWallpaper( rRect, rWallpaper );
}
-void PDFWriter::DrawTransparent( const PolyPolygon& rPolyPoly, USHORT nTransparencePercent )
+void PDFWriter::DrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent )
{
((PDFWriterImpl*)pImplementation)->drawTransparent( rPolyPoly, nTransparencePercent );
}
@@ -291,7 +291,7 @@ void PDFWriter::BeginTransparencyGroup()
((PDFWriterImpl*)pImplementation)->beginTransparencyGroup();
}
-void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, USHORT nTransparentPercent )
+void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, sal_uInt16 nTransparentPercent )
{
((PDFWriterImpl*)pImplementation)->endTransparencyGroup( rRect, nTransparentPercent );
}
@@ -301,7 +301,7 @@ void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, const Bitmap& rAlp
((PDFWriterImpl*)pImplementation)->endTransparencyGroup( rRect, rAlphaMask );
}
-void PDFWriter::Push( USHORT nFlags )
+void PDFWriter::Push( sal_uInt16 nFlags )
{
((PDFWriterImpl*)pImplementation)->push( nFlags );
}
@@ -356,12 +356,12 @@ void PDFWriter::IntersectClipRegion( const Rectangle& rRect )
((PDFWriterImpl*)pImplementation)->intersectClipRegion( rRect );
}
-void PDFWriter::SetAntialiasing( USHORT nMode )
+void PDFWriter::SetAntialiasing( sal_uInt16 nMode )
{
((PDFWriterImpl*)pImplementation)->setAntiAlias( (sal_Int32)nMode );
}
-void PDFWriter::SetLayoutMode( ULONG nMode )
+void PDFWriter::SetLayoutMode( sal_uLong nMode )
{
((PDFWriterImpl*)pImplementation)->setLayoutMode( (sal_Int32)nMode );
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index c3d6bf0d6a2a..4a37d3a5d601 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -251,7 +251,7 @@ void doTestCode()
BitmapWriteAccess* pAcc = aTransMask.AcquireWriteAccess();
for( int nX = 0; nX < 256; nX++ )
for( int nY = 0; nY < 256; nY++ )
- pAcc->SetPixel( nX, nY, BitmapColor( (BYTE)((nX+nY)/2) ) );
+ pAcc->SetPixel( nX, nY, BitmapColor( (sal_uInt8)((nX+nY)/2) ) );
aTransMask.ReleaseAccess( pAcc );
aTransMask.SetPrefMapMode( MAP_MM );
aTransMask.SetPrefSize( Size( 10, 10 ) );
@@ -1451,17 +1451,17 @@ void PDFWriterImpl::PDFPage::convertRect( Rectangle& rRect ) const
void PDFWriterImpl::PDFPage::appendPolygon( const Polygon& rPoly, OStringBuffer& rBuffer, bool bClose ) const
{
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
/*
* #108582# applications do weird things
*/
sal_uInt32 nBufLen = rBuffer.getLength();
if( nPoints > 0 )
{
- const BYTE* pFlagArray = rPoly.GetConstFlagAry();
+ const sal_uInt8* pFlagArray = rPoly.GetConstFlagAry();
appendPoint( rPoly[0], rBuffer );
rBuffer.append( " m\n" );
- for( USHORT i = 1; i < nPoints; i++ )
+ for( sal_uInt16 i = 1; i < nPoints; i++ )
{
if( pFlagArray && pFlagArray[i] == POLY_CONTROL && nPoints-i > 2 )
{
@@ -1572,8 +1572,8 @@ void PDFWriterImpl::PDFPage::appendPolygon( const basegfx::B2DPolygon& rPoly, OS
void PDFWriterImpl::PDFPage::appendPolyPolygon( const PolyPolygon& rPolyPoly, OStringBuffer& rBuffer, bool bClose ) const
{
- USHORT nPolygons = rPolyPoly.Count();
- for( USHORT n = 0; n < nPolygons; n++ )
+ sal_uInt16 nPolygons = rPolyPoly.Count();
+ for( sal_uInt16 n = 0; n < nPolygons; n++ )
appendPolygon( rPolyPoly[n], rBuffer, bClose );
}
@@ -2085,12 +2085,12 @@ bool PDFWriterImpl::compressStream( SvMemoryStream* pStream )
{
#ifndef DEBUG_DISABLE_PDFCOMPRESSION
pStream->Seek( STREAM_SEEK_TO_END );
- ULONG nEndPos = pStream->Tell();
+ sal_uLong nEndPos = pStream->Tell();
pStream->Seek( STREAM_SEEK_TO_BEGIN );
ZCodec* pCodec = new ZCodec( 0x4000, 0x4000 );
SvMemoryStream aStream;
pCodec->BeginCompression();
- pCodec->Write( aStream, (const BYTE*)pStream->GetData(), nEndPos );
+ pCodec->Write( aStream, (const sal_uInt8*)pStream->GetData(), nEndPos );
pCodec->EndCompression();
delete pCodec;
nEndPos = aStream.Tell();
@@ -2149,7 +2149,7 @@ bool PDFWriterImpl::writeBuffer( const void* pBuffer, sal_uInt64 nBytes )
sal_uInt64 nWritten;
if( m_pCodec )
{
- m_pCodec->Write( *m_pMemStream, static_cast<const BYTE*>(pBuffer), (ULONG)nBytes );
+ m_pCodec->Write( *m_pMemStream, static_cast<const sal_uInt8*>(pBuffer), (sal_uLong)nBytes );
nWritten = nBytes;
}
else
@@ -2200,7 +2200,7 @@ OutputDevice* PDFWriterImpl::getReferenceDevice()
pVDev->SetMapMode( MAP_MM );
m_pReferenceDevice->mpPDFWriter = this;
- m_pReferenceDevice->ImplUpdateFontData( TRUE );
+ m_pReferenceDevice->ImplUpdateFontData( sal_True );
}
return m_pReferenceDevice;
}
@@ -3884,7 +3884,7 @@ sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8* pEncoding,
ZCodec* pCodec = new ZCodec( 0x4000, 0x4000 );
SvMemoryStream aStream;
pCodec->BeginCompression();
- pCodec->Write( aStream, (const BYTE*)aContents.getStr(), aContents.getLength() );
+ pCodec->Write( aStream, (const sal_uInt8*)aContents.getStr(), aContents.getLength() );
pCodec->EndCompression();
delete pCodec;
#endif
@@ -7049,7 +7049,7 @@ void PDFWriterImpl::drawRelief( SalLayout& rLayout, const String& rText, bool bT
Font aSetFont = m_aCurrentPDFState.m_aFont;
aSetFont.SetRelief( RELIEF_NONE );
- aSetFont.SetShadow( FALSE );
+ aSetFont.SetShadow( sal_False );
aSetFont.SetColor( aReliefColor );
setTextLineColor( aReliefColor );
@@ -7086,8 +7086,8 @@ void PDFWriterImpl::drawShadow( SalLayout& rLayout, const String& rText, bool bT
rFont.SetColor( Color( COL_LIGHTGRAY ) );
else
rFont.SetColor( Color( COL_BLACK ) );
- rFont.SetShadow( FALSE );
- rFont.SetOutline( FALSE );
+ rFont.SetShadow( sal_False );
+ rFont.SetOutline( sal_False );
setFont( rFont );
setTextLineColor( rFont.GetColor() );
setOverlineColor( rFont.GetColor() );
@@ -7541,7 +7541,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const String& rText, bool bT
)
)
{
- BOOL bUnderlineAbove = OutputDevice::ImplIsUnderlineAbove( m_aCurrentPDFState.m_aFont );
+ sal_Bool bUnderlineAbove = OutputDevice::ImplIsUnderlineAbove( m_aCurrentPDFState.m_aFont );
if( m_aCurrentPDFState.m_aFont.IsWordLineMode() )
{
Point aPos, aStartPt;
@@ -7594,7 +7594,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const String& rText, bool bT
long nEmphYOff;
long nEmphWidth;
long nEmphHeight;
- BOOL bEmphPolyLine;
+ sal_Bool bEmphPolyLine;
FontEmphasisMark nEmphMark;
push( PUSH_ALL );
@@ -7675,7 +7675,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const String& rText, bool bT
}
void PDFWriterImpl::drawEmphasisMark( long nX, long nY,
- const PolyPolygon& rPolyPoly, BOOL bPolyLine,
+ const PolyPolygon& rPolyPoly, sal_Bool bPolyLine,
const Rectangle& rRect1, const Rectangle& rRect2 )
{
// TODO: pass nWidth as width of this mark
@@ -7745,7 +7745,7 @@ void PDFWriterImpl::drawTextArray( const Point& rPos, const String& rText, const
}
}
-void PDFWriterImpl::drawStretchText( const Point& rPos, ULONG nWidth, const String& rText, xub_StrLen nIndex, xub_StrLen nLen, bool bTextLines )
+void PDFWriterImpl::drawStretchText( const Point& rPos, sal_uLong nWidth, const String& rText, xub_StrLen nIndex, xub_StrLen nLen, bool bTextLines )
{
MARK( "drawStretchText" );
@@ -7761,7 +7761,7 @@ void PDFWriterImpl::drawStretchText( const Point& rPos, ULONG nWidth, const Stri
}
}
-void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, USHORT nStyle, bool bTextLines )
+void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, sal_uInt16 nStyle, bool bTextLines )
{
long nWidth = rRect.GetWidth();
long nHeight = rRect.GetHeight();
@@ -8305,17 +8305,17 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik
while( m_pReferenceDevice->GetTextWidth( aStrikeout ) >= nWidth )
aStrikeout.Erase( 0, 1 );
aStrikeout.Append( aStrikeoutChar );
- BOOL bShadow = m_aCurrentPDFState.m_aFont.IsShadow();
+ sal_Bool bShadow = m_aCurrentPDFState.m_aFont.IsShadow();
if ( bShadow )
{
Font aFont = m_aCurrentPDFState.m_aFont;
- aFont.SetShadow( FALSE );
+ aFont.SetShadow( sal_False );
setFont( aFont );
updateGraphicsState();
}
// strikeout string is left aligned non-CTL text
- ULONG nOrigTLM = m_pReferenceDevice->GetLayoutMode();
+ sal_uLong nOrigTLM = m_pReferenceDevice->GetLayoutMode();
m_pReferenceDevice->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG|TEXT_LAYOUT_COMPLEX_DISABLED );
drawText( rPos, aStrikeout, 0, aStrikeout.Len(), false );
m_pReferenceDevice->SetLayoutMode( nOrigTLM );
@@ -8323,7 +8323,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik
if ( bShadow )
{
Font aFont = m_aCurrentPDFState.m_aFont;
- aFont.SetShadow( TRUE );
+ aFont.SetShadow( sal_True );
setFont( aFont );
updateGraphicsState();
}
@@ -8990,7 +8990,7 @@ void PDFWriterImpl::drawPolyLine( const Polygon& rPoly )
{
MARK( "drawPolyLine" );
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
if( nPoints < 2 )
return;
@@ -9183,7 +9183,7 @@ void PDFWriterImpl::drawPolyLine( const Polygon& rPoly, const PDFWriter::ExtLine
aBoundRect.Right() += nLW;
aBoundRect.Bottom() += nLW;
}
- endTransparencyGroup( aBoundRect, (USHORT)(100.0*rInfo.m_fTransparency) );
+ endTransparencyGroup( aBoundRect, (sal_uInt16)(100.0*rInfo.m_fTransparency) );
}
}
@@ -9224,7 +9224,7 @@ void PDFWriterImpl::drawPixel( const Polygon& rPoints, const Color* pColors )
if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) && ! pColors )
return;
- USHORT nPoints = rPoints.GetSize();
+ sal_uInt16 nPoints = rPoints.GetSize();
OStringBuffer aLine( nPoints*40 );
aLine.append( "q " );
if( ! pColors )
@@ -9239,7 +9239,7 @@ void PDFWriterImpl::drawPixel( const Polygon& rPoints, const Color* pColors )
aPixel.append( ' ' );
appendDouble( 1.0/double(getReferenceDevice()->ImplGetDPIY()), aPixel );
OString aPixelStr = aPixel.makeStringAndClear();
- for( USHORT i = 0; i < nPoints; i++ )
+ for( sal_uInt16 i = 0; i < nPoints; i++ )
{
if( pColors )
{
@@ -9271,7 +9271,7 @@ bool PDFWriterImpl::writeTransparentObject( TransparencyEmit& rObject )
bool bFlateFilter = compressStream( rObject.m_pContentStream );
rObject.m_pContentStream->Seek( STREAM_SEEK_TO_END );
- ULONG nSize = rObject.m_pContentStream->Tell();
+ sal_uLong nSize = rObject.m_pContentStream->Tell();
rObject.m_pContentStream->Seek( STREAM_SEEK_TO_BEGIN );
#if OSL_DEBUG_LEVEL > 1
emitComment( "PDFWriterImpl::writeTransparentObject" );
@@ -9724,7 +9724,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
{
int nChar = 0;
//fill the encryption buffer
- for( USHORT i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
+ for( sal_uInt16 i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
{
const BitmapColor& rColor = pAccess->GetPaletteColor( i );
m_pEncryptionBuffer[nChar++] = rColor.GetRed();
@@ -9735,7 +9735,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
rtl_cipher_encodeARCFOUR( m_aCipher, m_pEncryptionBuffer, nChar, m_pEncryptionBuffer, nChar );
//now queue the data for output
nChar = 0;
- for( USHORT i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
+ for( sal_uInt16 i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
{
appendHex(m_pEncryptionBuffer[nChar++], aLine );
appendHex(m_pEncryptionBuffer[nChar++], aLine );
@@ -9745,7 +9745,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
}
else //no encryption requested (PDF/A-1a program flow drops here)
{
- for( USHORT i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
+ for( sal_uInt16 i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
{
const BitmapColor& rColor = pAccess->GetPaletteColor( i );
appendHex( rColor.GetRed(), aLine );
@@ -10232,7 +10232,7 @@ void PDFWriterImpl::drawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME );
push( PUSH_LINECOLOR );
setLineColor( rHatch.GetColor() );
- getReferenceDevice()->ImplDrawHatch( aPolyPoly, rHatch, FALSE );
+ getReferenceDevice()->ImplDrawHatch( aPolyPoly, rHatch, sal_False );
pop();
}
}
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index cef25ee49f85..c73be7c037e5 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -448,7 +448,7 @@ public:
rtl::OString m_aName;
rtl::OUString m_aDescription;
rtl::OUString m_aText;
- USHORT m_nTextStyle;
+ sal_uInt16 m_nTextStyle;
rtl::OUString m_aValue;
rtl::OString m_aDAString;
rtl::OString m_aDRDict;
@@ -1013,7 +1013,7 @@ i12626
bool checkEmitStructure();
/* draws an emphasis mark */
- void drawEmphasisMark( long nX, long nY, const PolyPolygon& rPolyPoly, BOOL bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 );
+ void drawEmphasisMark( long nX, long nY, const PolyPolygon& rPolyPoly, sal_Bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 );
/* true if PDF/A-1a or PDF/A-1b is output */
sal_Bool m_bIsPDF_A1;
@@ -1163,13 +1163,13 @@ public:
void setTextFillColor( const Color& rColor )
{
m_aGraphicsStack.front().m_aFont.SetFillColor( rColor );
- m_aGraphicsStack.front().m_aFont.SetTransparent( ImplIsColorTransparent( rColor ) ? TRUE : FALSE );
+ m_aGraphicsStack.front().m_aFont.SetTransparent( ImplIsColorTransparent( rColor ) ? sal_True : sal_False );
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateFont;
}
void setTextFillColor()
{
m_aGraphicsStack.front().m_aFont.SetFillColor( Color( COL_TRANSPARENT ) );
- m_aGraphicsStack.front().m_aFont.SetTransparent( TRUE );
+ m_aGraphicsStack.front().m_aFont.SetTransparent( sal_True );
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateFont;
}
void setTextColor( const Color& rColor )
@@ -1220,10 +1220,10 @@ public:
/* actual drawing functions */
void drawText( const Point& rPos, const String& rText, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, bool bTextLines = true );
void drawTextArray( const Point& rPos, const String& rText, const sal_Int32* pDXArray = NULL, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, bool bTextLines = true );
- void drawStretchText( const Point& rPos, ULONG nWidth, const String& rText,
+ void drawStretchText( const Point& rPos, sal_uLong nWidth, const String& rText,
xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
bool bTextLines = true );
- void drawText( const Rectangle& rRect, const String& rOrigStr, USHORT nStyle, bool bTextLines = true );
+ void drawText( const Rectangle& rRect, const String& rOrigStr, sal_uInt16 nStyle, bool bTextLines = true );
void drawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, bool bUnderlineAbove );
void drawWaveTextLine( rtl::OStringBuffer& aLine, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove );
void drawStraightTextLine( rtl::OStringBuffer& aLine, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove );
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 3912d56959da..143c55a83ab1 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -85,7 +85,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
// #i19065# Negative sizes have mirror semantics on
// OutputDevice. BitmapEx and co. have no idea about that, so
// perform that _before_ doing anything with aBitmapEx.
- ULONG nMirrorFlags(BMP_MIRROR_NONE);
+ sal_uLong nMirrorFlags(BMP_MIRROR_NONE);
if( aSize.Width() < 0 )
{
aSize.Width() *= -1;
@@ -269,7 +269,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
if ( !i_pOutDevData || !i_pOutDevData->PlaySyncPageAct( m_rOuterFace, i ) )
{
const MetaAction* pAction = aMtf.GetAction( i );
- const USHORT nType = pAction->GetType();
+ const sal_uInt16 nType = pAction->GetType();
switch( nType )
{
@@ -413,7 +413,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
if( rTransparenceGradient.GetStartColor() == rTransparenceGradient.GetEndColor() )
{
const Color aTransCol( rTransparenceGradient.GetStartColor() );
- const USHORT nTransPercent = aTransCol.GetLuminance() * 100 / 255;
+ const sal_uInt16 nTransPercent = aTransCol.GetLuminance() * 100 / 255;
m_rOuterFace.BeginTransparencyGroup();
playMetafile( aTmpMtf, NULL, i_rContext, pDummyVDev );
m_rOuterFace.EndTransparencyGroup( Rectangle( rPos, rSize ), nTransPercent );
@@ -458,9 +458,9 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
aTmpMtf.Play( pVDev, aPoint, aDstSize );
aTmpMtf.WindStart();
- pVDev->EnableMapMode( FALSE );
+ pVDev->EnableMapMode( sal_False );
aPaint = pVDev->GetBitmap( aPoint, aDstSizePixel );
- pVDev->EnableMapMode( TRUE );
+ pVDev->EnableMapMode( sal_True );
// create mask bitmap
pVDev->SetLineColor( COL_BLACK );
@@ -471,15 +471,15 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
aTmpMtf.WindStart();
aTmpMtf.Play( pVDev, aPoint, aDstSize );
aTmpMtf.WindStart();
- pVDev->EnableMapMode( FALSE );
+ pVDev->EnableMapMode( sal_False );
aMask = pVDev->GetBitmap( aPoint, aDstSizePixel );
- pVDev->EnableMapMode( TRUE );
+ pVDev->EnableMapMode( sal_True );
// create alpha mask from gradient
pVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT );
pVDev->DrawGradient( Rectangle( aPoint, aDstSize ), rTransparenceGradient );
pVDev->SetDrawMode( DRAWMODE_DEFAULT );
- pVDev->EnableMapMode( FALSE );
+ pVDev->EnableMapMode( sal_False );
pVDev->DrawMask( aPoint, aDstSizePixel, aMask, Color( COL_WHITE ) );
aAlpha = pVDev->GetBitmap( aPoint, aDstSizePixel );
implWriteBitmapEx( rPos, rSize, BitmapEx( aPaint, aAlpha ), pDummyVDev, i_rContext );
@@ -547,7 +547,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
else
{
- const BYTE* pData = pA->GetData();
+ const sal_uInt8* pData = pA->GetData();
if ( pData )
{
SvMemoryStream aMemStm( (void*)pData, pA->GetDataSize(), STREAM_READ );
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index df67c4974d47..ac6116e38234 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -72,7 +72,7 @@ namespace vcl
// ------------------------------------------------------------------------------
-static const BYTE mpDefaultColorTable[ 256 ] =
+static const sal_uInt8 mpDefaultColorTable[ 256 ] =
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
@@ -111,11 +111,11 @@ private:
AlphaMask* mpAlphaMask;
BitmapWriteAccess* mpMaskAcc;
ZCodec* mpZCodec;
- BYTE* mpInflateInBuf; // as big as the size of a scanline + alphachannel + 1
- BYTE* mpScanPrior; // pointer to the latest scanline
- BYTE* mpTransTab; // for transparency in images with palette colortype
- BYTE* mpScanCurrent; // pointer into the current scanline
- BYTE* mpColorTable; //
+ sal_uInt8* mpInflateInBuf; // as big as the size of a scanline + alphachannel + 1
+ sal_uInt8* mpScanPrior; // pointer to the latest scanline
+ sal_uInt8* mpTransTab; // for transparency in images with palette colortype
+ sal_uInt8* mpScanCurrent; // pointer into the current scanline
+ sal_uInt8* mpColorTable; //
sal_Size mnStreamSize; // estimate of PNG file size
sal_uInt32 mnChunkType; // Type of current PNG chunk
sal_Int32 mnChunkLen; // Length of current PNG chunk
@@ -131,28 +131,28 @@ private:
sal_uInt32 mnYAdd; // the increment for input images Y coords for the current pass
int mnPreviewShift; // shift to convert orig image coords into preview image coords
int mnPreviewMask; // == ((1 << mnPreviewShift) - 1)
- USHORT mnIStmOldMode;
- USHORT mnTargetDepth; // pixel depth of target bitmap
- BYTE mnTransRed;
- BYTE mnTransGreen;
- BYTE mnTransBlue;
- BYTE mnPngDepth; // pixel depth of PNG data
- BYTE mnColorType;
- BYTE mnCompressionType;
- BYTE mnFilterType;
- BYTE mnInterlaceType;
+ sal_uInt16 mnIStmOldMode;
+ sal_uInt16 mnTargetDepth; // pixel depth of target bitmap
+ sal_uInt8 mnTransRed;
+ sal_uInt8 mnTransGreen;
+ sal_uInt8 mnTransBlue;
+ sal_uInt8 mnPngDepth; // pixel depth of PNG data
+ sal_uInt8 mnColorType;
+ sal_uInt8 mnCompressionType;
+ sal_uInt8 mnFilterType;
+ sal_uInt8 mnInterlaceType;
BitmapColor mcTranspColor; // transparency mask's transparency "color"
BitmapColor mcOpaqueColor; // transparency mask's opaque "color"
- BOOL mbTransparent; // graphic includes an tRNS Chunk or an alpha Channel
- BOOL mbAlphaChannel; // is true for ColorType 4 and 6
- BOOL mbRGBTriple;
- BOOL mbPalette; // FALSE if we need a Palette
- BOOL mbGrayScale;
- BOOL mbzCodecInUse;
- BOOL mbStatus;
- BOOL mbIDAT; // TRUE if finished with enough IDAT chunks
- BOOL mbGamma; // TRUE if Gamma Correction available
- BOOL mbpHYs; // TRUE if pysical size of pixel available
+ sal_Bool mbTransparent; // graphic includes an tRNS Chunk or an alpha Channel
+ sal_Bool mbAlphaChannel; // is true for ColorType 4 and 6
+ sal_Bool mbRGBTriple;
+ sal_Bool mbPalette; // sal_False if we need a Palette
+ sal_Bool mbGrayScale;
+ sal_Bool mbzCodecInUse;
+ sal_Bool mbStatus;
+ sal_Bool mbIDAT; // sal_True if finished with enough IDAT chunks
+ sal_Bool mbGamma; // sal_True if Gamma Correction available
+ sal_Bool mbpHYs; // sal_True if pysical size of pixel available
sal_Bool mbIgnoreGammaChunk;
bool ReadNextChunk();
@@ -160,20 +160,20 @@ private:
void SkipRemainingChunks();
void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor & );
- void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, BYTE nPalIndex );
- void ImplSetTranspPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor &, BOOL bTrans );
- void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, BYTE nPalIndex, BYTE nAlpha );
- void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor&, BYTE nAlpha );
+ void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, sal_uInt8 nPalIndex );
+ void ImplSetTranspPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor &, sal_Bool bTrans );
+ void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, sal_uInt8 nPalIndex, sal_uInt8 nAlpha );
+ void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor&, sal_uInt8 nAlpha );
void ImplReadIDAT();
bool ImplPreparePass();
void ImplApplyFilter();
void ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd );
- BOOL ImplReadTransparent();
+ sal_Bool ImplReadTransparent();
void ImplGetGamma();
void ImplGetBackground();
- BYTE ImplScaleColor();
- BOOL ImplReadHeader( const Size& rPreviewSizeHint );
- BOOL ImplReadPalette();
+ sal_uInt8 ImplScaleColor();
+ sal_Bool ImplReadHeader( const Size& rPreviewSizeHint );
+ sal_Bool ImplReadPalette();
void ImplGetGrayPalette( sal_uInt16 );
sal_uInt32 ImplReadsal_uInt32();
@@ -202,8 +202,8 @@ PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
mpTransTab ( NULL ),
mpColorTable ( (sal_uInt8*) mpDefaultColorTable ),
mbzCodecInUse ( sal_False ),
- mbStatus( TRUE),
- mbIDAT( FALSE ),
+ mbStatus( sal_True),
+ mbIDAT( sal_False ),
mbGamma ( sal_False ),
mbpHYs ( sal_False ),
mbIgnoreGammaChunk ( sal_False )
@@ -383,7 +383,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
case PNGCHUNK_gAMA : // the gamma chunk must precede
{ // the 'IDAT' and also the 'PLTE'(if available )
- if ( !mbIgnoreGammaChunk && ( mbIDAT == FALSE ) )
+ if ( !mbIgnoreGammaChunk && ( mbIDAT == sal_False ) )
ImplGetGamma();
}
break;
@@ -404,7 +404,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
case PNGCHUNK_bKGD : // the background chunk must appear
{
- if ( ( mbIDAT == FALSE ) && mbPalette ) // before the 'IDAT' and after the
+ if ( ( mbIDAT == sal_False ) && mbPalette ) // before the 'IDAT' and after the
ImplGetBackground(); // PLTE(if available ) chunk.
}
break;
@@ -412,7 +412,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
case PNGCHUNK_IDAT :
{
if ( !mpInflateInBuf ) // taking care that the header has properly been read
- mbStatus = FALSE;
+ mbStatus = sal_False;
else if ( !mbIDAT ) // the gfx is finished, but there may be left a zlibCRC of about 4Bytes
ImplReadIDAT();
}
@@ -490,27 +490,27 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
// ------------------------------------------------------------------------
-BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
+sal_Bool PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
{
if( mnChunkLen < 13 )
- return FALSE;
+ return sal_False;
maOrigSize.Width() = ImplReadsal_uInt32();
maOrigSize.Height() = ImplReadsal_uInt32();
if ( !maOrigSize.Width() || !maOrigSize.Height() )
- return FALSE;
+ return sal_False;
mnPngDepth = *(maDataIter++);
mnColorType = *(maDataIter++);
mnCompressionType = *(maDataIter++);
if( mnCompressionType != 0 ) // unknown compression type
- return FALSE;
+ return sal_False;
mnFilterType = *(maDataIter++);
if( mnFilterType != 0 ) // unknown filter type
- return FALSE;
+ return sal_False;
mnInterlaceType = *(maDataIter++);
switch ( mnInterlaceType ) // filter type valid ?
@@ -522,12 +522,12 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mnPass = 0;
break;
default:
- return FALSE;
+ return sal_False;
}
- mbPalette = TRUE;
- mbIDAT = mbAlphaChannel = mbTransparent = FALSE;
- mbGrayScale = mbRGBTriple = FALSE;
+ mbPalette = sal_True;
+ mbIDAT = mbAlphaChannel = mbTransparent = sal_False;
+ mbGrayScale = mbRGBTriple = sal_False;
mnTargetDepth = mnPngDepth;
sal_uInt64 nScansize64 = ( ( static_cast< sal_uInt64 >( maOrigSize.Width() ) * mnPngDepth ) + 7 ) >> 3;
@@ -540,7 +540,7 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
{
case 2 : // 2bit target not available -> use four bits
mnTargetDepth = 4; // we have to expand the bitmap
- mbGrayScale = TRUE;
+ mbGrayScale = sal_True;
break;
case 16 :
mnTargetDepth = 8; // we have to reduce the bitmap
@@ -548,17 +548,17 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
case 1 :
case 4 :
case 8 :
- mbGrayScale = TRUE;
+ mbGrayScale = sal_True;
break;
default :
- return FALSE;
+ return sal_False;
}
}
break;
case 2 : // each pixel is an RGB triple
{
- mbRGBTriple = TRUE;
+ mbRGBTriple = sal_True;
nScansize64 *= 3;
switch ( mnPngDepth )
{
@@ -567,7 +567,7 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mnTargetDepth = 24;
break;
default :
- return FALSE;
+ return sal_False;
}
}
break;
@@ -582,10 +582,10 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
case 1 :
case 4 :
case 8 :
- mbPalette = FALSE;
+ mbPalette = sal_False;
break;
default :
- return FALSE;
+ return sal_False;
}
}
break;
@@ -593,25 +593,25 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
case 4 : // each pixel is a grayscale sample followed by an alpha sample
{
nScansize64 *= 2;
- mbAlphaChannel = TRUE;
+ mbAlphaChannel = sal_True;
switch ( mnPngDepth )
{
case 16 :
mnTargetDepth = 8; // we have to reduce the bitmap
case 8 :
- mbGrayScale = TRUE;
+ mbGrayScale = sal_True;
break;
default :
- return FALSE;
+ return sal_False;
}
}
break;
case 6 : // each pixel is an RGB triple followed by an alpha sample
{
- mbRGBTriple = TRUE;
+ mbRGBTriple = sal_True;
nScansize64 *= 4;
- mbAlphaChannel = TRUE;
+ mbAlphaChannel = sal_True;
switch (mnPngDepth )
{
case 16 : // we have to reduce the bitmap
@@ -619,13 +619,13 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mnTargetDepth = 24;
break;
default :
- return FALSE;
+ return sal_False;
}
}
break;
default :
- return FALSE;
+ return sal_False;
}
mnBPP = static_cast< sal_uInt32 >( nScansize64 / maOrigSize.Width() );
@@ -635,17 +635,17 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
nScansize64++; // each scanline includes one filterbyte
if ( nScansize64 > SAL_MAX_UINT32 )
- return FALSE;
+ return sal_False;
mnScansize = static_cast< sal_uInt32 >( nScansize64 );
// TODO: switch between both scanlines instead of copying
- mpInflateInBuf = new (std::nothrow) BYTE[ mnScansize ];
+ mpInflateInBuf = new (std::nothrow) sal_uInt8[ mnScansize ];
mpScanCurrent = mpInflateInBuf;
- mpScanPrior = new (std::nothrow) BYTE[ mnScansize ];
+ mpScanPrior = new (std::nothrow) sal_uInt8[ mnScansize ];
if ( !mpInflateInBuf || !mpScanPrior )
- return FALSE;
+ return sal_False;
// calculate target size from original size and the preview hint
if( rPreviewSizeHint.Width() || rPreviewSizeHint.Height() )
@@ -684,7 +684,7 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mpBmp = new Bitmap( maTargetSize, mnTargetDepth );
mpAcc = mpBmp->AcquireWriteAccess();
if( !mpAcc )
- return FALSE;
+ return sal_False;
mpBmp->SetSourceSizePixel( maOrigSize );
@@ -694,7 +694,7 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mpAlphaMask->Erase( 128 );
mpMaskAcc = mpAlphaMask->AcquireWriteAccess();
if( !mpMaskAcc )
- return FALSE;
+ return sal_False;
}
if ( mbGrayScale )
@@ -702,7 +702,7 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
ImplPreparePass();
- return TRUE;
+ return sal_True;
}
// ------------------------------------------------------------------------
@@ -722,38 +722,38 @@ void PNGReaderImpl::ImplGetGrayPalette( sal_uInt16 nBitDepth )
mpAcc->SetPaletteEntryCount( nPaletteEntryCount );
for ( sal_uInt32 i = 0, nStart = 0; nStart < 256; i++, nStart += nAdd )
- mpAcc->SetPaletteColor( (USHORT)i, BitmapColor( mpColorTable[ nStart ],
+ mpAcc->SetPaletteColor( (sal_uInt16)i, BitmapColor( mpColorTable[ nStart ],
mpColorTable[ nStart ], mpColorTable[ nStart ] ) );
}
// ------------------------------------------------------------------------
-BOOL PNGReaderImpl::ImplReadPalette()
+sal_Bool PNGReaderImpl::ImplReadPalette()
{
sal_uInt16 nCount = static_cast<sal_uInt16>( mnChunkLen / 3 );
if ( ( ( mnChunkLen % 3 ) == 0 ) && ( ( 0 < nCount ) && ( nCount <= 256 ) ) && mpAcc )
{
- mbPalette = TRUE;
- mpAcc->SetPaletteEntryCount( (USHORT) nCount );
+ mbPalette = sal_True;
+ mpAcc->SetPaletteEntryCount( (sal_uInt16) nCount );
for ( sal_uInt16 i = 0; i < nCount; i++ )
{
- BYTE nRed = mpColorTable[ *maDataIter++ ];
- BYTE nGreen = mpColorTable[ *maDataIter++ ];
- BYTE nBlue = mpColorTable[ *maDataIter++ ];
+ sal_uInt8 nRed = mpColorTable[ *maDataIter++ ];
+ sal_uInt8 nGreen = mpColorTable[ *maDataIter++ ];
+ sal_uInt8 nBlue = mpColorTable[ *maDataIter++ ];
mpAcc->SetPaletteColor( i, Color( nRed, nGreen, nBlue ) );
}
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
return mbStatus;
}
// ------------------------------------------------------------------------
-BOOL PNGReaderImpl::ImplReadTransparent()
+sal_Bool PNGReaderImpl::ImplReadTransparent()
{
bool bNeedAlpha = false;
@@ -792,7 +792,7 @@ BOOL PNGReaderImpl::ImplReadTransparent()
{
if ( mnChunkLen <= 256 )
{
- mpTransTab = new BYTE [ 256 ];
+ mpTransTab = new sal_uInt8 [ 256 ];
rtl_fillMemory( mpTransTab, 256, 0xff );
rtl_copyMemory( mpTransTab, &(*maDataIter), mnChunkLen );
maDataIter += mnChunkLen;
@@ -820,13 +820,13 @@ BOOL PNGReaderImpl::ImplReadTransparent()
}
mbTransparent = (mpMaskAcc != NULL);
if( !mbTransparent )
- return FALSE;
+ return sal_False;
mcOpaqueColor = BitmapColor( 0x00 );
mcTranspColor = BitmapColor( 0xFF );
mpMaskAcc->Erase( 0x00 );
}
- return TRUE;
+ return sal_True;
}
// ------------------------------------------------------------------------
@@ -842,7 +842,7 @@ void PNGReaderImpl::ImplGetGamma()
if ( fInvGamma != 1.0 )
{
- mbGamma = TRUE;
+ mbGamma = sal_True;
if ( mpColorTable == mpDefaultColorTable )
mpColorTable = new sal_uInt8[ 256 ];
@@ -865,10 +865,10 @@ void PNGReaderImpl::ImplGetBackground()
{
if ( mnChunkLen == 1 )
{
- UINT16 nCol = *maDataIter++;
+ sal_uInt16 nCol = *maDataIter++;
if ( nCol < mpAcc->GetPaletteEntryCount() )
{
- mpAcc->Erase( mpAcc->GetPaletteColor( (BYTE)nCol ) );
+ mpAcc->Erase( mpAcc->GetPaletteColor( (sal_uInt8)nCol ) );
break;
}
}
@@ -927,9 +927,9 @@ void PNGReaderImpl::ImplReadIDAT()
{
if( mnChunkLen > 0 )
{
- if ( mbzCodecInUse == FALSE )
+ if ( mbzCodecInUse == sal_False )
{
- mbzCodecInUse = TRUE;
+ mbzCodecInUse = sal_True;
mpZCodec->BeginCompression( ZCODEC_PNG_DEFAULT );
}
mpZCodec->SetBreak( mnChunkLen );
@@ -942,7 +942,7 @@ void PNGReaderImpl::ImplReadIDAT()
sal_Int32 nRead = mpZCodec->ReadAsynchron( aIStrm, mpScanCurrent, nToRead );
if ( nRead < 0 )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
if ( nRead < nToRead )
@@ -973,7 +973,7 @@ void PNGReaderImpl::ImplReadIDAT()
if( mbIDAT )
{
mpZCodec->EndCompression();
- mbzCodecInUse = FALSE;
+ mbzCodecInUse = sal_False;
}
}
@@ -1048,9 +1048,9 @@ bool PNGReaderImpl::ImplPreparePass()
void PNGReaderImpl::ImplApplyFilter()
{
OSL_ASSERT( mnScansize >= mnBPP + 1 );
- const BYTE* const pScanEnd = mpInflateInBuf + mnScansize;
+ const sal_uInt8* const pScanEnd = mpInflateInBuf + mnScansize;
- BYTE nFilterType = *mpInflateInBuf; // the filter type may change each scanline
+ sal_uInt8 nFilterType = *mpInflateInBuf; // the filter type may change each scanline
switch ( nFilterType )
{
default: // unknown Scanline Filter Type
@@ -1060,26 +1060,26 @@ void PNGReaderImpl::ImplApplyFilter()
case 1: // Scanline Filter Type "Sub"
{
- BYTE* p1 = mpInflateInBuf + 1;
- const BYTE* p2 = p1;
+ sal_uInt8* p1 = mpInflateInBuf + 1;
+ const sal_uInt8* p2 = p1;
p1 += mnBPP;
// use left pixels
do
- *p1 = static_cast<BYTE>( *p1 + *(p2++) );
+ *p1 = static_cast<sal_uInt8>( *p1 + *(p2++) );
while( ++p1 < pScanEnd );
}
break;
case 2: // Scanline Filter Type "Up"
{
- BYTE* p1 = mpInflateInBuf + 1;
- const BYTE* p2 = mpScanPrior + 1;
+ sal_uInt8* p1 = mpInflateInBuf + 1;
+ const sal_uInt8* p2 = mpScanPrior + 1;
// use pixels from prior line
while( p1 < pScanEnd )
{
- *p1 = static_cast<BYTE>( *p1 + *(p2++) );
+ *p1 = static_cast<sal_uInt8>( *p1 + *(p2++) );
++p1;
}
}
@@ -1087,18 +1087,18 @@ void PNGReaderImpl::ImplApplyFilter()
case 3: // Scanline Filter Type "Average"
{
- BYTE* p1 = mpInflateInBuf + 1;
- const BYTE* p2 = mpScanPrior + 1;
- const BYTE* p3 = p1;
+ sal_uInt8* p1 = mpInflateInBuf + 1;
+ const sal_uInt8* p2 = mpScanPrior + 1;
+ const sal_uInt8* p3 = p1;
// use one pixel from prior line
for( int n = mnBPP; --n >= 0; ++p1, ++p2)
- *p1 = static_cast<BYTE>( *p1 + (*p2 >> 1) );
+ *p1 = static_cast<sal_uInt8>( *p1 + (*p2 >> 1) );
// predict by averaging the left and prior line pixels
while( p1 < pScanEnd )
{
- *p1 = static_cast<BYTE>( *p1 + ((*(p2++) + *(p3++)) >> 1) );
+ *p1 = static_cast<sal_uInt8>( *p1 + ((*(p2++) + *(p3++)) >> 1) );
++p1;
}
}
@@ -1106,14 +1106,14 @@ void PNGReaderImpl::ImplApplyFilter()
case 4: // Scanline Filter Type "PaethPredictor"
{
- BYTE* p1 = mpInflateInBuf + 1;
- const BYTE* p2 = mpScanPrior + 1;
- const BYTE* p3 = p1;
- const BYTE* p4 = p2;
+ sal_uInt8* p1 = mpInflateInBuf + 1;
+ const sal_uInt8* p2 = mpScanPrior + 1;
+ const sal_uInt8* p3 = p1;
+ const sal_uInt8* p4 = p2;
// use one pixel from prior line
for( int n = mnBPP; --n >= 0; ++p1)
- *p1 = static_cast<BYTE>( *p1 + *(p2++) );
+ *p1 = static_cast<sal_uInt8>( *p1 + *(p2++) );
// predict by using the left and the prior line pixels
while( p1 < pScanEnd )
@@ -1138,7 +1138,7 @@ void PNGReaderImpl::ImplApplyFilter()
if( npa > npc )
na = nc;
- *p1 = static_cast<BYTE>( *p1 + na );
+ *p1 = static_cast<sal_uInt8>( *p1 + na );
++p1;
}
}
@@ -1164,7 +1164,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
// => TODO; also do this for nX here instead of in the ImplSet*Pixel() methods
const sal_uInt32 nY = mnYpos >> mnPreviewShift;
- const BYTE* pTmp = mpInflateInBuf + 1;
+ const sal_uInt8* pTmp = mpInflateInBuf + 1;
if ( mpAcc->HasPalette() ) // alphachannel is not allowed by pictures including palette entries
{
switch ( mpAcc->GetBitCount() )
@@ -1175,12 +1175,12 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
for ( sal_Int32 nX = nXStart, nShift = 0; nX < maOrigSize.Width(); nX += nXAdd )
{
- BYTE nCol;
+ sal_uInt8 nCol;
nShift = (nShift - 1) & 7;
if ( nShift == 0 )
nCol = *(pTmp++);
else
- nCol = static_cast<BYTE>( *pTmp >> nShift );
+ nCol = static_cast<sal_uInt8>( *pTmp >> nShift );
nCol &= 1;
ImplSetAlphaPixel( nY, nX, nCol, mpTransTab[ nCol ] );
@@ -1192,11 +1192,11 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
nShift = (nShift - 1) & 7;
- BYTE nCol;
+ sal_uInt8 nCol;
if ( nShift == 0 )
nCol = *(pTmp++);
else
- nCol = static_cast<BYTE>( *pTmp >> nShift );
+ nCol = static_cast<sal_uInt8>( *pTmp >> nShift );
nCol &= 1;
ImplSetPixel( nY, nX, nCol );
@@ -1228,7 +1228,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
for ( sal_Int32 nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, nXIndex++ )
{
- BYTE nCol;
+ sal_uInt8 nCol;
switch( nXIndex & 3 )
{
case 0 :
@@ -1350,7 +1350,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
break;
default :
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
}
@@ -1476,7 +1476,7 @@ void PNGReaderImpl::ImplSetPixel( sal_uInt32 nY, sal_uInt32 nX, const BitmapColo
// ------------------------------------------------------------------------
-void PNGReaderImpl::ImplSetPixel( sal_uInt32 nY, sal_uInt32 nX, BYTE nPalIndex )
+void PNGReaderImpl::ImplSetPixel( sal_uInt32 nY, sal_uInt32 nX, sal_uInt8 nPalIndex )
{
// TODO: get preview mode checks out of inner loop
if( nX & mnPreviewMask )
@@ -1488,7 +1488,7 @@ void PNGReaderImpl::ImplSetPixel( sal_uInt32 nY, sal_uInt32 nX, BYTE nPalIndex )
// ------------------------------------------------------------------------
-void PNGReaderImpl::ImplSetTranspPixel( sal_uInt32 nY, sal_uInt32 nX, const BitmapColor& rBitmapColor, BOOL bTrans )
+void PNGReaderImpl::ImplSetTranspPixel( sal_uInt32 nY, sal_uInt32 nX, const BitmapColor& rBitmapColor, sal_Bool bTrans )
{
// TODO: get preview mode checks out of inner loop
if( nX & mnPreviewMask )
@@ -1506,7 +1506,7 @@ void PNGReaderImpl::ImplSetTranspPixel( sal_uInt32 nY, sal_uInt32 nX, const Bitm
// ------------------------------------------------------------------------
void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, sal_uInt32 nX,
- BYTE nPalIndex, BYTE nAlpha )
+ sal_uInt8 nPalIndex, sal_uInt8 nAlpha )
{
// TODO: get preview mode checks out of inner loop
if( nX & mnPreviewMask )
@@ -1520,7 +1520,7 @@ void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, sal_uInt32 nX,
// ------------------------------------------------------------------------
void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, sal_uInt32 nX,
- const BitmapColor& rBitmapColor, BYTE nAlpha )
+ const BitmapColor& rBitmapColor, sal_uInt8 nAlpha )
{
// TODO: get preview mode checks out of inner loop
if( nX & mnPreviewMask )
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index 47152ea6ac11..3d814bea000e 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -88,35 +88,35 @@ private:
sal_Int32 mnCompLevel;
sal_Int32 mnInterlaced;
sal_uInt32 mnMaxChunkSize;
- BOOL mbStatus;
+ sal_Bool mbStatus;
BitmapReadAccess* mpAccess;
BitmapReadAccess* mpMaskAccess;
ZCodec* mpZCodec;
- BYTE* mpDeflateInBuf; // as big as the size of a scanline + alphachannel + 1
- BYTE* mpPreviousScan; // as big as mpDeflateInBuf
- BYTE* mpCurrentScan;
- ULONG mnDeflateInSize;
-
- ULONG mnWidth, mnHeight;
- BYTE mnBitsPerPixel;
- BYTE mnFilterType; // 0 oder 4;
- ULONG mnBBP; // bytes per pixel ( needed for filtering )
- BOOL mbTrueAlpha;
- ULONG mnCRC;
+ sal_uInt8* mpDeflateInBuf; // as big as the size of a scanline + alphachannel + 1
+ sal_uInt8* mpPreviousScan; // as big as mpDeflateInBuf
+ sal_uInt8* mpCurrentScan;
+ sal_uLong mnDeflateInSize;
+
+ sal_uLong mnWidth, mnHeight;
+ sal_uInt8 mnBitsPerPixel;
+ sal_uInt8 mnFilterType; // 0 oder 4;
+ sal_uLong mnBBP; // bytes per pixel ( needed for filtering )
+ sal_Bool mbTrueAlpha;
+ sal_uLong mnCRC;
long mnChunkDatSize;
- ULONG mnLastPercent;
+ sal_uLong mnLastPercent;
void ImplWritepHYs( const BitmapEx& rBitmapEx );
void ImplWriteIDAT();
- ULONG ImplGetFilter( ULONG nY, ULONG nXStart=0, ULONG nXAdd=1 );
+ sal_uLong ImplGetFilter( sal_uLong nY, sal_uLong nXStart=0, sal_uLong nXAdd=1 );
void ImplClearFirstScanline();
void ImplWriteTransparent();
- BOOL ImplWriteHeader();
+ sal_Bool ImplWriteHeader();
void ImplWritePalette();
- void ImplOpenChunk( ULONG nChunkType );
- void ImplWriteChunk( BYTE nNumb );
+ void ImplOpenChunk( sal_uLong nChunkType );
+ void ImplWriteChunk( sal_uInt8 nNumb );
void ImplWriteChunk( sal_uInt32 nNumb );
void ImplWriteChunk( unsigned char* pSource, sal_uInt32 nDatSize );
void ImplCloseChunk( void );
@@ -127,7 +127,7 @@ private:
PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) :
mnCompLevel ( PNG_DEF_COMPRESSION ),
- mbStatus ( TRUE ),
+ mbStatus ( sal_True ),
mpAccess ( NULL ),
mpMaskAccess ( NULL ),
mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ),
@@ -160,7 +160,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
}
}
}
- mnBitsPerPixel = (BYTE)aBmp.GetBitCount();
+ mnBitsPerPixel = (sal_uInt8)aBmp.GetBitCount();
if( rBmpEx.IsTransparent() )
{
@@ -188,14 +188,14 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
aBmp.ReleaseAccess( mpAccess );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
else
{
- mpAccess = aBmp.AcquireReadAccess(); // TRUE RGB with alphachannel
+ mpAccess = aBmp.AcquireReadAccess(); // sal_True RGB with alphachannel
if( mpAccess )
{
- if ( ( mbTrueAlpha = rBmpEx.IsAlpha() ) != FALSE )
+ if ( ( mbTrueAlpha = rBmpEx.IsAlpha() ) != sal_False )
{
AlphaMask aMask( rBmpEx.GetAlpha() );
mpMaskAccess = aMask.AcquireReadAccess();
@@ -209,7 +209,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
aMask.ReleaseAccess( mpMaskAccess );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
else
{
@@ -225,12 +225,12 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
aMask.ReleaseAccess( mpMaskAccess );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
aBmp.ReleaseAccess( mpAccess );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
}
else
@@ -249,7 +249,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
aBmp.ReleaseAccess( mpAccess );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
if ( mbStatus )
{
@@ -308,7 +308,7 @@ std::vector< vcl::PNGWriter::ChunkData >& PNGWriterImpl::GetChunks()
// ------------------------------------------------------------------------
-BOOL PNGWriterImpl::ImplWriteHeader()
+sal_Bool PNGWriterImpl::ImplWriteHeader()
{
ImplOpenChunk(PNGCHUNK_IHDR);
ImplWriteChunk( sal_uInt32( mnWidth = mpAccess->Width() ) );
@@ -316,13 +316,13 @@ BOOL PNGWriterImpl::ImplWriteHeader()
if ( mnWidth && mnHeight && mnBitsPerPixel && mbStatus )
{
- BYTE nBitDepth = mnBitsPerPixel;
+ sal_uInt8 nBitDepth = mnBitsPerPixel;
if ( mnBitsPerPixel <= 8 )
mnFilterType = 0;
else
mnFilterType = 4;
- BYTE nColorType = 2; // colortype:
+ sal_uInt8 nColorType = 2; // colortype:
// bit 0 -> palette is used
if ( mpAccess->HasPalette() ) // bit 1 -> color is used
nColorType |= 1; // bit 2 -> alpha channel is used
@@ -334,13 +334,13 @@ BOOL PNGWriterImpl::ImplWriteHeader()
ImplWriteChunk( nBitDepth );
ImplWriteChunk( nColorType ); // colortype
- ImplWriteChunk((BYTE) 0 ); // compression type
- ImplWriteChunk((BYTE) 0 ); // filter type - is not supported in this version
- ImplWriteChunk((BYTE) mnInterlaced ); // interlace type
+ ImplWriteChunk((sal_uInt8) 0 ); // compression type
+ ImplWriteChunk((sal_uInt8) 0 ); // filter type - is not supported in this version
+ ImplWriteChunk((sal_uInt8) mnInterlaced ); // interlace type
ImplCloseChunk();
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
return mbStatus;
}
@@ -348,13 +348,13 @@ BOOL PNGWriterImpl::ImplWriteHeader()
void PNGWriterImpl::ImplWritePalette()
{
- const ULONG nCount = mpAccess->GetPaletteEntryCount();
- BYTE* pTempBuf = new BYTE[ nCount*3 ];
- BYTE* pTmp = pTempBuf;
+ const sal_uLong nCount = mpAccess->GetPaletteEntryCount();
+ sal_uInt8* pTempBuf = new sal_uInt8[ nCount*3 ];
+ sal_uInt8* pTmp = pTempBuf;
ImplOpenChunk( PNGCHUNK_PLTE );
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
const BitmapColor& rColor = mpAccess->GetPaletteColor( i );
*pTmp++ = rColor.GetRed();
@@ -370,12 +370,12 @@ void PNGWriterImpl::ImplWritePalette()
void PNGWriterImpl::ImplWriteTransparent ()
{
- const ULONG nTransIndex = mpAccess->GetBestMatchingColor( BMP_COL_TRANS );
+ const sal_uLong nTransIndex = mpAccess->GetBestMatchingColor( BMP_COL_TRANS );
ImplOpenChunk( PNGCHUNK_tRNS );
- for ( ULONG n = 0UL; n <= nTransIndex; n++ )
- ImplWriteChunk( ( nTransIndex == n ) ? (BYTE) 0x0 : (BYTE) 0xff );
+ for ( sal_uLong n = 0UL; n <= nTransIndex; n++ )
+ ImplWriteChunk( ( nTransIndex == n ) ? (sal_uInt8) 0x0 : (sal_uInt8) 0xff );
ImplCloseChunk();
}
@@ -414,12 +414,12 @@ void PNGWriterImpl::ImplWriteIDAT ()
mnDeflateInSize = mnBBP * mnWidth + 1;
- mpDeflateInBuf = new BYTE[ mnDeflateInSize ];
+ mpDeflateInBuf = new sal_uInt8[ mnDeflateInSize ];
if ( mnFilterType ) // using filter type 4 we need memory for the scanline 3 times
{
- mpPreviousScan = new BYTE[ mnDeflateInSize ];
- mpCurrentScan = new BYTE[ mnDeflateInSize ];
+ mpPreviousScan = new sal_uInt8[ mnDeflateInSize ];
+ mpCurrentScan = new sal_uInt8[ mnDeflateInSize ];
ImplClearFirstScanline();
}
mpZCodec->BeginCompression( ZCODEC_PNG_DEFAULT + mnCompLevel );
@@ -427,13 +427,13 @@ void PNGWriterImpl::ImplWriteIDAT ()
SvMemoryStream aOStm;
if ( mnInterlaced == 0 )
{
- for ( ULONG nY = 0; nY < mnHeight; nY++ )
+ for ( sal_uLong nY = 0; nY < mnHeight; nY++ )
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter( nY ) );
}
else
{
// interlace mode
- ULONG nY;
+ sal_uLong nY;
for ( nY = 0; nY < mnHeight; nY+=8 ) // pass 1
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 8 ) );
ImplClearFirstScanline();
@@ -497,9 +497,9 @@ void PNGWriterImpl::ImplWriteIDAT ()
// appends to the currently used pass
// the complete size of scanline will be returned - in interlace mode zero is possible!
-ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
+sal_uLong PNGWriterImpl::ImplGetFilter ( sal_uLong nY, sal_uLong nXStart, sal_uLong nXAdd )
{
- BYTE* pDest;
+ sal_uInt8* pDest;
if ( mnFilterType )
pDest = mpCurrentScan;
@@ -516,16 +516,16 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
{
case( 1 ):
{
- ULONG nX, nXIndex;
+ sal_uLong nX, nXIndex;
for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX+=nXAdd, nXIndex++ )
{
- ULONG nShift = ( nXIndex & 7 ) ^ 7;
+ sal_uLong nShift = ( nXIndex & 7 ) ^ 7;
if ( nShift == 7)
- *pDest = (BYTE)(mpAccess->GetPixel( nY, nX ) << nShift);
+ *pDest = (sal_uInt8)(mpAccess->GetPixel( nY, nX ) << nShift);
else if ( nShift == 0 )
- *pDest++ |= (BYTE) mpAccess->GetPixel( nY, nX ) << nShift;
+ *pDest++ |= (sal_uInt8) mpAccess->GetPixel( nY, nX ) << nShift;
else
- *pDest |= (BYTE) mpAccess->GetPixel( nY, nX ) << nShift;
+ *pDest |= (sal_uInt8) mpAccess->GetPixel( nY, nX ) << nShift;
}
if ( ( nXIndex & 7 ) != 0 ) pDest++; // byte is not completely used, so the
} // bufferpointer is to correct
@@ -533,13 +533,13 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
case( 4 ):
{
- ULONG nX, nXIndex;
+ sal_uLong nX, nXIndex;
for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX+= nXAdd, nXIndex++ )
{
if( nXIndex & 1 )
- *pDest++ |= (BYTE) mpAccess->GetPixel( nY, nX );
+ *pDest++ |= (sal_uInt8) mpAccess->GetPixel( nY, nX );
else
- *pDest = (BYTE) mpAccess->GetPixel( nY, nX ) << 4;
+ *pDest = (sal_uInt8) mpAccess->GetPixel( nY, nX ) << 4;
}
if ( nXIndex & 1 ) pDest++;
}
@@ -547,13 +547,13 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
case( 8 ):
{
- for ( ULONG nX = nXStart; nX < mnWidth; nX+=nXAdd )
+ for ( sal_uLong nX = nXStart; nX < mnWidth; nX+=nXAdd )
*pDest++ = mpAccess->GetPixel( nY, nX );
}
break;
default :
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
}
@@ -563,7 +563,7 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
{
if ( mbTrueAlpha )
{
- for ( ULONG nX = nXStart; nX < mnWidth; nX += nXAdd )
+ for ( sal_uLong nX = nXStart; nX < mnWidth; nX += nXAdd )
{
const BitmapColor& rColor = mpAccess->GetPixel( nY, nX );
*pDest++ = rColor.GetRed();
@@ -576,7 +576,7 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
{
const BitmapColor aTrans( mpMaskAccess->GetBestMatchingColor( Color( COL_WHITE ) ) );
- for ( ULONG nX = nXStart; nX < mnWidth; nX+=nXAdd )
+ for ( sal_uLong nX = nXStart; nX < mnWidth; nX+=nXAdd )
{
const BitmapColor& rColor = mpAccess->GetPixel( nY, nX );
*pDest++ = rColor.GetRed();
@@ -592,7 +592,7 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
}
else
{
- for ( ULONG nX = nXStart; nX < mnWidth; nX+=nXAdd )
+ for ( sal_uLong nX = nXStart; nX < mnWidth; nX+=nXAdd )
{
const BitmapColor& rColor = mpAccess->GetPixel( nY, nX );
*pDest++ = rColor.GetRed();
@@ -609,13 +609,13 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
pDest = mpDeflateInBuf;
*pDest++ = 4; // filter type
- ULONG na, nb, nc;
+ sal_uLong na, nb, nc;
long np, npa, npb, npc;
- BYTE* p1 = mpCurrentScan + 1; // Current Pixel
- BYTE* p2 = p1 - mnBBP; // left pixel
- BYTE* p3 = mpPreviousScan; // upper pixel
- BYTE* p4 = p3 - mnBBP; // upperleft Pixel;
+ sal_uInt8* p1 = mpCurrentScan + 1; // Current Pixel
+ sal_uInt8* p2 = p1 - mnBBP; // left pixel
+ sal_uInt8* p3 = mpPreviousScan; // upper pixel
+ sal_uInt8* p4 = p3 - mnBBP; // upperleft Pixel;
while ( pDest < mpDeflateInBuf + mnDeflateInSize )
{
@@ -639,9 +639,9 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
npb =-npb;
if ( npc < 0 )
npc =-npc;
- if ( ( npa <= npb ) && ( npa <= npc ) ) *pDest++ = *p1++ - (BYTE)na;
- else if ( npb <= npc ) *pDest++ = *p1++ - (BYTE)nb;
- else *pDest++ = *p1++ - (BYTE)nc;
+ if ( ( npa <= npb ) && ( npa <= npc ) ) *pDest++ = *p1++ - (sal_uInt8)na;
+ else if ( npb <= npc ) *pDest++ = *p1++ - (sal_uInt8)nb;
+ else *pDest++ = *p1++ - (sal_uInt8)nc;
p4++;
p2++;
}
@@ -663,7 +663,7 @@ void PNGWriterImpl::ImplClearFirstScanline()
// ------------------------------------------------------------------------
-void PNGWriterImpl::ImplOpenChunk ( ULONG nChunkType )
+void PNGWriterImpl::ImplOpenChunk ( sal_uLong nChunkType )
{
maChunkSeq.resize( maChunkSeq.size() + 1 );
maChunkSeq.back().nType = nChunkType;
@@ -671,7 +671,7 @@ void PNGWriterImpl::ImplOpenChunk ( ULONG nChunkType )
// ------------------------------------------------------------------------
-void PNGWriterImpl::ImplWriteChunk ( BYTE nSource )
+void PNGWriterImpl::ImplWriteChunk ( sal_uInt8 nSource )
{
maChunkSeq.back().aData.push_back( nSource );
}
diff --git a/vcl/source/gdi/polyscan.cxx b/vcl/source/gdi/polyscan.cxx
index eb329f8c6869..7c69f79d50e6 100644
--- a/vcl/source/gdi/polyscan.cxx
+++ b/vcl/source/gdi/polyscan.cxx
@@ -121,9 +121,9 @@ void PolyScanline::Set( long nStart, long nEnd )
// ------------------------------------------------------------------------
-BOOL PolyScanline::GetFirstSegment( PolyScanSegment& rSegment )
+sal_Bool PolyScanline::GetFirstSegment( PolyScanSegment& rSegment )
{
- BOOL bRet = GetFirstX( rSegment.mnStart );
+ sal_Bool bRet = GetFirstX( rSegment.mnStart );
if( bRet && !GetNextX( rSegment.mnEnd ) )
rSegment.mnEnd = rSegment.mnStart;
@@ -133,9 +133,9 @@ BOOL PolyScanline::GetFirstSegment( PolyScanSegment& rSegment )
// ------------------------------------------------------------------------
-BOOL PolyScanline::GetNextSegment( PolyScanSegment& rSegment )
+sal_Bool PolyScanline::GetNextSegment( PolyScanSegment& rSegment )
{
- BOOL bRet = GetNextX( rSegment.mnStart );
+ sal_Bool bRet = GetNextX( rSegment.mnStart );
if( bRet && !GetNextX( rSegment.mnEnd ) )
rSegment.mnEnd = rSegment.mnStart;
@@ -152,7 +152,7 @@ PolyScanner::PolyScanner( const Rectangle& rRect )
if( !rRect.IsEmpty() )
{
Rectangle aRect( rRect );
- ULONG nHeight;
+ sal_uLong nHeight;
aRect.Justify();
mnLeft = aRect.Left();
@@ -161,7 +161,7 @@ PolyScanner::PolyScanner( const Rectangle& rRect )
mnBottom = aRect.Bottom();
mpArray = new PolyScanline[ nHeight = Height() ];
- for( ULONG i = 0UL; i < nHeight; i++ )
+ for( sal_uLong i = 0UL; i < nHeight; i++ )
mpArray[ i ].Set( mnLeft, mnRight );
}
else
@@ -181,10 +181,10 @@ PolyScanner::PolyScanner( const Polygon& rPoly )
{
long nLast = nCount - 1;
Point aFirst( rPoly[ 0 ] );
- Point aLast( rPoly[ (USHORT) nLast ] );
+ Point aLast( rPoly[ (sal_uInt16) nLast ] );
while( nLast && ( aLast == aFirst ) )
- aLast = rPoly[ (USHORT) --nLast ];
+ aLast = rPoly[ (sal_uInt16) --nLast ];
if( !nLast )
{
@@ -197,7 +197,7 @@ PolyScanner::PolyScanner( const Polygon& rPoly )
else
{
const Rectangle aRect( rPoly.GetBoundRect() );
- ULONG nHeight;
+ sal_uLong nHeight;
mnLeft = aRect.Left();
mnTop = aRect.Top();
@@ -208,7 +208,7 @@ PolyScanner::PolyScanner( const Polygon& rPoly )
for( long i = 1L; i <= nLast; i++ )
{
- const Point& rPt = rPoly[ (USHORT) i ];
+ const Point& rPt = rPoly[ (sal_uInt16) i ];
if( rPt != aLast )
{
@@ -240,7 +240,7 @@ PolyScanner::~PolyScanner()
// ------------------------------------------------------------------------
-PolyScanline* PolyScanner::operator[]( ULONG nPos ) const
+PolyScanline* PolyScanner::operator[]( sal_uLong nPos ) const
{
DBG_ASSERT( nPos < Count(), "nPos out of range!" );
return( mpArray ? ( mpArray + nPos ) : NULL );
@@ -281,7 +281,7 @@ void PolyScanner::InsertLine( const Point& rStart, const Point& rEnd )
const long nYInc = ( nStartY < nEndY ) ? 1L : -1L;
long nLastX = nStartX;
long nLastY = nStartY;
- BOOL bLast = FALSE;
+ sal_Bool bLast = sal_False;
mpArray[ nStartY - mnTop ].Insert( nStartX );
@@ -299,10 +299,10 @@ void PolyScanner::InsertLine( const Point& rStart, const Point& rEnd )
mpArray[ nLastY - mnTop ].Insert( nLastX );
mpArray[ nY - mnTop ].Insert( nX );
- bLast = FALSE;
+ bLast = sal_False;
}
else
- bLast = TRUE;
+ bLast = sal_True;
nLastX = nX;
nLastY = nY;
@@ -332,10 +332,10 @@ void PolyScanner::InsertLine( const Point& rStart, const Point& rEnd )
mpArray[ nLastY - mnTop ].Insert( nLastX );
mpArray[ nY - mnTop ].Insert( nX );
- bLast = FALSE;
+ bLast = sal_False;
}
else
- bLast = TRUE;
+ bLast = sal_True;
nLastX = nX;
nLastY = nY;
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index fe01bd44f5d3..e5e19dff3771 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -119,16 +119,16 @@ void ImplUpdateJobSetupPaper( JobSetup& rJobSetup )
// ------------------
PrinterOptions::PrinterOptions() :
- mbReduceTransparency( FALSE ),
+ mbReduceTransparency( sal_False ),
meReducedTransparencyMode( PRINTER_TRANSPARENCY_AUTO ),
- mbReduceGradients( FALSE ),
+ mbReduceGradients( sal_False ),
meReducedGradientsMode( PRINTER_GRADIENT_STRIPES ),
mnReducedGradientStepCount( 64 ),
- mbReduceBitmaps( FALSE ),
+ mbReduceBitmaps( sal_False ),
meReducedBitmapMode( PRINTER_BITMAP_NORMAL ),
mnReducedBitmapResolution( 200 ),
- mbReducedBitmapsIncludeTransparency( TRUE ),
- mbConvertToGreyscales( FALSE )
+ mbReducedBitmapsIncludeTransparency( sal_True ),
+ mbConvertToGreyscales( sal_False )
{
}
@@ -201,13 +201,13 @@ bool PrinterOptions::ReadFromConfig( bool i_bFile )
if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDGRADIENTMODE) >>= nValue )
SetReducedGradientMode( (PrinterGradientMode)nValue );
if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDGRADIENTSTEPCOUNT) >>= nValue )
- SetReducedGradientStepCount( (USHORT)nValue );
+ SetReducedGradientStepCount( (sal_uInt16)nValue );
if( xSet->getPropertyValue(PROPERTYNAME_REDUCEBITMAPS) >>= bValue )
SetReduceBitmaps( bValue );
if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDBITMAPMODE) >>= nValue )
SetReducedBitmapMode( (PrinterBitmapMode)nValue );
if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDBITMAPRESOLUTION) >>= nValue )
- SetReducedBitmapResolution( (USHORT)nValue );
+ SetReducedBitmapResolution( (sal_uInt16)nValue );
if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDBITMAPINCLUDESTRANSPARENCY) >>= bValue )
SetReducedBitmapIncludesTransparency( bValue );
if( xSet->getPropertyValue(PROPERTYNAME_CONVERTTOGREYSCALES) >>= bValue )
@@ -456,24 +456,24 @@ XubString Printer::GetDefaultPrinterName()
void Printer::ImplInitData()
{
- mbDevOutput = FALSE;
+ mbDevOutput = sal_False;
meOutDevType = OUTDEV_PRINTER;
- mbDefPrinter = FALSE;
+ mbDefPrinter = sal_False;
mnError = 0;
mnCurPage = 0;
mnCurPrintPage = 0;
mnPageQueueSize = 0;
mnCopyCount = 1;
- mbCollateCopy = FALSE;
- mbPrinting = FALSE;
- mbJobActive = FALSE;
- mbPrintFile = FALSE;
- mbInPrintPage = FALSE;
- mbNewJobSetup = FALSE;
+ mbCollateCopy = sal_False;
+ mbPrinting = sal_False;
+ mbJobActive = sal_False;
+ mbPrintFile = sal_False;
+ mbInPrintPage = sal_False;
+ mbNewJobSetup = sal_False;
mpInfoPrinter = NULL;
mpPrinter = NULL;
mpDisplayDev = NULL;
- mbIsQueuePrinter = FALSE;
+ mbIsQueuePrinter = sal_False;
mpPrinterOptions = new PrinterOptions;
// Printer in die Liste eintragen
@@ -538,7 +538,7 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
// Daten initialisieren
ImplUpdatePageData();
mpFontList = new ImplDevFontList();
- mpFontCache = new ImplFontCache( TRUE );
+ mpFontCache = new ImplFontCache( sal_True );
mpGraphics->GetDevFontList( mpFontList );
}
@@ -647,7 +647,7 @@ void Printer::ImplUpdatePageData()
void Printer::ImplUpdateFontList()
{
- ImplUpdateFontData( TRUE );
+ ImplUpdateFontData( sal_True );
}
// -----------------------------------------------------------------------
@@ -660,7 +660,7 @@ Printer::Printer()
{
ImplInit( pInfo );
if ( !IsDisplayPrinter() )
- mbDefPrinter = TRUE;
+ mbDefPrinter = sal_True;
}
else
ImplInitDisplay( NULL );
@@ -778,57 +778,57 @@ void Printer::Compat_OldPrinterMetrics( bool bSet )
mpInfoPrinter->m_bCompatMetrics = bSet;
// get new font data
- ImplUpdateFontData( TRUE );
+ ImplUpdateFontData( sal_True );
}
// -----------------------------------------------------------------------
-ULONG Printer::GetCapabilities( USHORT nType ) const
+sal_uLong Printer::GetCapabilities( sal_uInt16 nType ) const
{
if ( IsDisplayPrinter() )
- return FALSE;
+ return sal_False;
if( mpInfoPrinter )
return mpInfoPrinter->GetCapabilities( maJobSetup.ImplGetConstData(), nType );
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Printer::HasSupport( PrinterSupport eFeature ) const
+sal_Bool Printer::HasSupport( PrinterSupport eFeature ) const
{
switch ( eFeature )
{
case SUPPORT_SET_ORIENTATION:
- return (BOOL)GetCapabilities( PRINTER_CAPABILITIES_SETORIENTATION );
+ return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETORIENTATION );
case SUPPORT_SET_PAPERBIN:
- return (BOOL)GetCapabilities( PRINTER_CAPABILITIES_SETPAPERBIN );
+ return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETPAPERBIN );
case SUPPORT_SET_PAPERSIZE:
- return (BOOL)GetCapabilities( PRINTER_CAPABILITIES_SETPAPERSIZE );
+ return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETPAPERSIZE );
case SUPPORT_SET_PAPER:
- return (BOOL)GetCapabilities( PRINTER_CAPABILITIES_SETPAPER );
+ return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETPAPER );
case SUPPORT_COPY:
return (GetCapabilities( PRINTER_CAPABILITIES_COPIES ) != 0);
case SUPPORT_COLLATECOPY:
return (GetCapabilities( PRINTER_CAPABILITIES_COLLATECOPIES ) != 0);
case SUPPORT_SETUPDIALOG:
- return (BOOL)GetCapabilities( PRINTER_CAPABILITIES_SUPPORTDIALOG );
+ return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SUPPORTDIALOG );
case SUPPORT_FAX:
- return (BOOL) GetCapabilities( PRINTER_CAPABILITIES_FAX );
+ return (sal_Bool) GetCapabilities( PRINTER_CAPABILITIES_FAX );
case SUPPORT_PDF:
- return (BOOL) GetCapabilities( PRINTER_CAPABILITIES_PDF );
+ return (sal_Bool) GetCapabilities( PRINTER_CAPABILITIES_PDF );
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Printer::SetJobSetup( const JobSetup& rSetup )
+sal_Bool Printer::SetJobSetup( const JobSetup& rSetup )
{
if ( IsDisplayPrinter() || mbInPrintPage )
- return FALSE;
+ return sal_False;
JobSetup aJobSetup = rSetup;
@@ -836,60 +836,60 @@ BOOL Printer::SetJobSetup( const JobSetup& rSetup )
if ( mpInfoPrinter->SetPrinterData( aJobSetup.ImplGetData() ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Printer::Setup( Window* pWindow )
+sal_Bool Printer::Setup( Window* pWindow )
{
if ( IsDisplayPrinter() )
- return FALSE;
+ return sal_False;
if ( IsJobActive() || IsPrinting() )
- return FALSE;
+ return sal_False;
JobSetup aJobSetup = maJobSetup;
SalFrame* pFrame;
if ( !pWindow )
pWindow = ImplGetDefaultWindow();
if( !pWindow )
- return FALSE;
+ return sal_False;
pFrame = pWindow->ImplGetFrame();
ImplReleaseGraphics();
ImplSVData* pSVData = ImplGetSVData();
pSVData->maAppData.mnModalMode++;
nImplSysDialog++;
- BOOL bSetup = mpInfoPrinter->Setup( pFrame, aJobSetup.ImplGetData() );
+ sal_Bool bSetup = mpInfoPrinter->Setup( pFrame, aJobSetup.ImplGetData() );
pSVData->maAppData.mnModalMode--;
nImplSysDialog--;
if ( bSetup )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Printer::SetPrinterProps( const Printer* pPrinter )
+sal_Bool Printer::SetPrinterProps( const Printer* pPrinter )
{
if ( IsJobActive() || IsPrinting() )
- return FALSE;
+ return sal_False;
ImplSVData* pSVData = ImplGetSVData();
@@ -929,14 +929,14 @@ BOOL Printer::SetPrinterProps( const Printer* pPrinter )
mpFontCache = NULL;
mpFontList = NULL;
- mbInitFont = TRUE;
- mbNewFont = TRUE;
+ mbInitFont = sal_True;
+ mbNewFont = sal_True;
mpInfoPrinter = NULL;
}
// Neuen Printer bauen
ImplInitDisplay( NULL );
- return TRUE;
+ return sal_True;
}
// Alten Printer zerstoeren?
@@ -971,8 +971,8 @@ BOOL Printer::SetPrinterProps( const Printer* pPrinter )
delete mpFontList;
mpFontCache = NULL;
mpFontList = NULL;
- mbInitFont = TRUE;
- mbNewFont = TRUE;
+ mbInitFont = sal_True;
+ mbNewFont = sal_True;
mpInfoPrinter = NULL;
}
@@ -990,15 +990,15 @@ BOOL Printer::SetPrinterProps( const Printer* pPrinter )
else
SetJobSetup( pPrinter->GetJobSetup() );
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Printer::SetOrientation( Orientation eOrientation )
+sal_Bool Printer::SetOrientation( Orientation eOrientation )
{
if ( mbInPrintPage )
- return FALSE;
+ return sal_False;
if ( maJobSetup.ImplGetConstData()->meOrientation != eOrientation )
{
@@ -1008,26 +1008,26 @@ BOOL Printer::SetOrientation( Orientation eOrientation )
if ( IsDisplayPrinter() )
{
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
- return TRUE;
+ return sal_True;
}
ImplReleaseGraphics();
if ( mpInfoPrinter->SetData( SAL_JOBSET_ORIENTATION, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1039,10 +1039,10 @@ Orientation Printer::GetOrientation() const
// -----------------------------------------------------------------------
-BOOL Printer::SetPaperBin( USHORT nPaperBin )
+sal_Bool Printer::SetPaperBin( sal_uInt16 nPaperBin )
{
if ( mbInPrintPage )
- return FALSE;
+ return sal_False;
if ( (maJobSetup.ImplGetConstData()->mnPaperBin != nPaperBin) &&
(nPaperBin < GetPaperBinCount()) )
@@ -1053,31 +1053,31 @@ BOOL Printer::SetPaperBin( USHORT nPaperBin )
if ( IsDisplayPrinter() )
{
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
- return TRUE;
+ return sal_True;
}
ImplReleaseGraphics();
if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERBIN, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-USHORT Printer::GetPaperBin() const
+sal_uInt16 Printer::GetPaperBin() const
{
return maJobSetup.ImplGetConstData()->mnPaperBin;
}
@@ -1175,10 +1175,10 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
// -----------------------------------------------------------------------
-BOOL Printer::SetPaper( Paper ePaper )
+sal_Bool Printer::SetPaper( Paper ePaper )
{
if ( mbInPrintPage )
- return FALSE;
+ return sal_False;
if ( maJobSetup.ImplGetConstData()->mePaperFormat != ePaper )
{
@@ -1194,9 +1194,9 @@ BOOL Printer::SetPaper( Paper ePaper )
if ( IsDisplayPrinter() )
{
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
- return TRUE;
+ return sal_True;
}
ImplReleaseGraphics();
@@ -1205,30 +1205,30 @@ BOOL Printer::SetPaper( Paper ePaper )
if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERSIZE|SAL_JOBSET_ORIENTATION, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Printer::SetPaperSizeUser( const Size& rSize )
+sal_Bool Printer::SetPaperSizeUser( const Size& rSize )
{
return SetPaperSizeUser( rSize, false );
}
-BOOL Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest )
+sal_Bool Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest )
{
if ( mbInPrintPage )
- return FALSE;
+ return sal_False;
Size aPixSize = LogicToPixel( rSize );
Size aPageSize = PixelToLogic( aPixSize, MAP_100TH_MM );
@@ -1244,9 +1244,9 @@ BOOL Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest )
if ( IsDisplayPrinter() )
{
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
- return TRUE;
+ return sal_True;
}
ImplReleaseGraphics();
@@ -1256,17 +1256,17 @@ BOOL Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest )
if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERSIZE|SAL_JOBSET_ORIENTATION, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1344,10 +1344,10 @@ DuplexMode Printer::GetDuplexMode() const
// -----------------------------------------------------------------------
-BOOL Printer::SetDuplexMode( DuplexMode eDuplex )
+sal_Bool Printer::SetDuplexMode( DuplexMode eDuplex )
{
if ( mbInPrintPage )
- return FALSE;
+ return sal_False;
if ( maJobSetup.ImplGetConstData()->meDuplexMode != eDuplex )
{
@@ -1357,26 +1357,26 @@ BOOL Printer::SetDuplexMode( DuplexMode eDuplex )
if ( IsDisplayPrinter() )
{
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
- return TRUE;
+ return sal_True;
}
ImplReleaseGraphics();
if ( mpInfoPrinter->SetData( SAL_JOBSET_DUPLEXMODE, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1395,17 +1395,17 @@ Paper Printer::GetPaper() const
// -----------------------------------------------------------------------
-USHORT Printer::GetPaperBinCount() const
+sal_uInt16 Printer::GetPaperBinCount() const
{
if ( IsDisplayPrinter() )
return 0;
- return (USHORT)mpInfoPrinter->GetPaperBinCount( maJobSetup.ImplGetConstData() );
+ return (sal_uInt16)mpInfoPrinter->GetPaperBinCount( maJobSetup.ImplGetConstData() );
}
// -----------------------------------------------------------------------
-XubString Printer::GetPaperBinName( USHORT nPaperBin ) const
+XubString Printer::GetPaperBinName( sal_uInt16 nPaperBin ) const
{
if ( IsDisplayPrinter() )
return ImplGetSVEmptyStr();
@@ -1418,11 +1418,11 @@ XubString Printer::GetPaperBinName( USHORT nPaperBin ) const
// -----------------------------------------------------------------------
-BOOL Printer::SetCopyCount( USHORT nCopy, BOOL bCollate )
+sal_Bool Printer::SetCopyCount( sal_uInt16 nCopy, sal_Bool bCollate )
{
mnCopyCount = nCopy;
mbCollateCopy = bCollate;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1435,9 +1435,9 @@ void Printer::Error()
// -----------------------------------------------------------------------
-ULONG Printer::ImplSalPrinterErrorCodeToVCL( ULONG nError )
+sal_uLong Printer::ImplSalPrinterErrorCodeToVCL( sal_uLong nError )
{
- ULONG nVCLError;
+ sal_uLong nVCLError;
switch ( nError )
{
case 0:
@@ -1458,7 +1458,7 @@ ULONG Printer::ImplSalPrinterErrorCodeToVCL( ULONG nError )
void Printer::ImplEndPrint()
{
- mbPrinting = FALSE;
+ mbPrinting = sal_False;
mnCurPrintPage = 0;
maJobName.Erase();
}
@@ -1475,15 +1475,15 @@ IMPL_LINK( Printer, ImplDestroyPrinterAsync, void*, pSalPrinter )
// -----------------------------------------------------------------------
-BOOL Printer::EndJob()
+sal_Bool Printer::EndJob()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !IsJobActive() )
return bRet;
DBG_ASSERT( !mbInPrintPage, "Printer::EndJob() - StartPage() without EndPage() called" );
- mbJobActive = FALSE;
+ mbJobActive = sal_False;
if ( mpPrinter )
{
@@ -1491,13 +1491,13 @@ BOOL Printer::EndJob()
mnCurPage = 0;
- bRet = TRUE;
+ bRet = sal_True;
- mbPrinting = FALSE;
+ mbPrinting = sal_False;
mnCurPrintPage = 0;
maJobName.Erase();
- mbDevOutput = FALSE;
+ mbDevOutput = sal_False;
bRet = mpPrinter->EndJob();
// Hier den Drucker nicht asyncron zerstoeren, da es
// W95 nicht verkraftet, wenn gleichzeitig gedruckt wird
@@ -1511,34 +1511,34 @@ BOOL Printer::EndJob()
// -----------------------------------------------------------------------
-BOOL Printer::AbortJob()
+sal_Bool Printer::AbortJob()
{
// Wenn wir einen Queue-Printer haben, kann man diesen noch mit
// AbortJob() abbrechen, solange dieser noch am Drucken ist
if ( !IsJobActive() && !IsPrinting() )
- return FALSE;
+ return sal_False;
- mbJobActive = FALSE;
- mbInPrintPage = FALSE;
+ mbJobActive = sal_False;
+ mbInPrintPage = sal_False;
mpJobGraphics = NULL;
if ( mpPrinter )
{
- mbPrinting = FALSE;
+ mbPrinting = sal_False;
mnCurPage = 0;
mnCurPrintPage = 0;
maJobName.Erase();
ImplReleaseGraphics();
- mbDevOutput = FALSE;
+ mbDevOutput = sal_False;
mpPrinter->AbortJob();
Application::PostUserEvent( LINK( this, Printer, ImplDestroyPrinterAsync ), mpPrinter );
mpPrinter = NULL;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1556,12 +1556,12 @@ void Printer::ImplStartPage()
ImplReleaseGraphics();
mpJobGraphics = pGraphics;
}
- mbDevOutput = TRUE;
+ mbDevOutput = sal_True;
// PrintJob not aborted ???
if ( IsJobActive() )
{
- mbInPrintPage = TRUE;
+ mbInPrintPage = sal_True;
mnCurPage++;
mnCurPrintPage++;
}
@@ -1575,16 +1575,16 @@ void Printer::ImplEndPage()
if ( !IsJobActive() )
return;
- mbInPrintPage = FALSE;
+ mbInPrintPage = sal_False;
if ( mpPrinter )
{
mpPrinter->EndPage();
ImplReleaseGraphics();
- mbDevOutput = FALSE;
+ mbDevOutput = sal_False;
mpJobGraphics = NULL;
- mbNewJobSetup = FALSE;
+ mbNewJobSetup = sal_False;
}
}
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 62237588e923..d86df6e2816b 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -154,7 +154,7 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
if( rAct.GetType() == META_TRANSPARENT_ACTION )
{
const MetaTransparentAction* pTransAct = static_cast<const MetaTransparentAction*>(&rAct);
- USHORT nTransparency( pTransAct->GetTransparence() );
+ sal_uInt16 nTransparency( pTransAct->GetTransparence() );
// #i10613# Respect transparency for draw color
if( nTransparency )
@@ -163,16 +163,16 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
// assume white background for alpha blending
Color aLineColor( rStateOutDev.GetLineColor() );
- aLineColor.SetRed( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetRed()) / 100L ) );
- aLineColor.SetGreen( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetGreen()) / 100L ) );
- aLineColor.SetBlue( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetBlue()) / 100L ) );
- o_rMtf.AddAction( new MetaLineColorAction(aLineColor, TRUE) );
+ aLineColor.SetRed( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetRed()) / 100L ) );
+ aLineColor.SetGreen( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetGreen()) / 100L ) );
+ aLineColor.SetBlue( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetBlue()) / 100L ) );
+ o_rMtf.AddAction( new MetaLineColorAction(aLineColor, sal_True) );
Color aFillColor( rStateOutDev.GetFillColor() );
- aFillColor.SetRed( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetRed()) / 100L ) );
- aFillColor.SetGreen( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetGreen()) / 100L ) );
- aFillColor.SetBlue( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetBlue()) / 100L ) );
- o_rMtf.AddAction( new MetaFillColorAction(aFillColor, TRUE) );
+ aFillColor.SetRed( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetRed()) / 100L ) );
+ aFillColor.SetGreen( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetGreen()) / 100L ) );
+ aFillColor.SetBlue( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetBlue()) / 100L ) );
+ o_rMtf.AddAction( new MetaFillColorAction(aFillColor, sal_True) );
}
o_rMtf.AddAction( new MetaPolyPolygonAction(pTransAct->GetPolyPolygon()) );
@@ -747,7 +747,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
VirtualDevice aMapModeVDev;
aMapModeVDev.mnDPIX = mnDPIX;
aMapModeVDev.mnDPIY = mnDPIY;
- aMapModeVDev.EnableOutput(FALSE);
+ aMapModeVDev.EnableOutput(sal_False);
int nLastBgAction, nActionNum;
@@ -1192,7 +1192,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
Size aDstSzPix;
VirtualDevice aMapVDev; // here, we record only mapmode information
- aMapVDev.EnableOutput(FALSE);
+ aMapVDev.EnableOutput(sal_False);
VirtualDevice aPaintVDev; // into this one, we render.
@@ -1223,7 +1223,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
aMapVDev.mnDPIX = aPaintVDev.mnDPIX = mnDPIX;
aMapVDev.mnDPIY = aPaintVDev.mnDPIY = mnDPIY;
- aPaintVDev.EnableOutput(FALSE);
+ aPaintVDev.EnableOutput(sal_False);
// iterate over all actions
for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0;
@@ -1235,10 +1235,10 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// the current aCCList element
// (aCurr)
if( aCCList_MemberMap[nActionNum] == &(*aCurr) )
- aPaintVDev.EnableOutput(TRUE);
+ aPaintVDev.EnableOutput(sal_True);
// but process every action
- const USHORT nType( pCurrAct->GetType() );
+ const sal_uInt16 nType( pCurrAct->GetType() );
if( META_MAPMODE_ACTION == nType )
{
@@ -1273,8 +1273,8 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
Application::Reschedule();
}
- const BOOL bOldMap = mbMap;
- mbMap = aPaintVDev.mbMap = FALSE;
+ const sal_Bool bOldMap = mbMap;
+ mbMap = aPaintVDev.mbMap = sal_False;
Bitmap aBandBmp( aPaintVDev.GetBitmap( Point(), aDstSzPix ) );
@@ -1290,7 +1290,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
rOutMtf.AddAction( new MetaBmpScaleAction( aDstPtPix, aDstSzPix, aBandBmp ) );
rOutMtf.AddAction( new MetaCommentAction( "PRNSPOOL_TRANSPARENTBITMAP_END" ) );
- aPaintVDev.mbMap = TRUE;
+ aPaintVDev.mbMap = sal_True;
mbMap = bOldMap;
aMapVDev.Pop();
aPaintVDev.Pop();
@@ -1534,7 +1534,7 @@ void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const
( (long) rEndColor.GetGreen() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
const long nB = ( ( (long) rStartColor.GetBlue() * rGradient.GetStartIntensity() ) / 100L +
( (long) rEndColor.GetBlue() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
- const Color aColor( (BYTE) nR, (BYTE) nG, (BYTE) nB );
+ const Color aColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB );
pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
pOut->SetLineColor( aColor );
@@ -1577,7 +1577,7 @@ void Printer::DrawGradientEx( OutputDevice* pOut, const PolyPolygon& rPolyPoly,
( (long) rEndColor.GetGreen() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
const long nB = ( ( (long) rStartColor.GetBlue() * rGradient.GetStartIntensity() ) / 100L +
( (long) rEndColor.GetBlue() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
- const Color aColor( (BYTE) nR, (BYTE) nG, (BYTE) nB );
+ const Color aColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB );
pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
pOut->SetLineColor( aColor );
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 8207282add99..34276fafdfe5 100755
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -490,18 +490,18 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
mnError = PRINTER_OK;
if ( IsDisplayPrinter() )
- return FALSE;
+ return sal_False;
if ( IsJobActive() || IsPrinting() )
- return FALSE;
+ return sal_False;
- ULONG nCopies = mnCopyCount;
+ sal_uLong nCopies = mnCopyCount;
bool bCollateCopy = mbCollateCopy;
- bool bUserCopy = FALSE;
+ bool bUserCopy = sal_False;
if ( nCopies > 1 )
{
- ULONG nDevCopy;
+ sal_uLong nDevCopy;
if ( bCollateCopy )
nDevCopy = GetCapabilities( PRINTER_CAPABILITIES_COLLATECOPIES );
@@ -511,20 +511,20 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
// need to do copies by hand ?
if ( nCopies > nDevCopy )
{
- bUserCopy = TRUE;
+ bUserCopy = sal_True;
nCopies = 1;
- bCollateCopy = FALSE;
+ bCollateCopy = sal_False;
}
}
else
- bCollateCopy = FALSE;
+ bCollateCopy = sal_False;
ImplSVData* pSVData = ImplGetSVData();
mpPrinter = pSVData->mpDefInst->CreatePrinter( mpInfoPrinter );
if ( !mpPrinter )
- return FALSE;
+ return sal_False;
sal_Bool bSinglePrintJobs = sal_False;
beans::PropertyValue* pSingleValue = i_pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintCollateAsSingleJobs" ) ) );
@@ -540,7 +540,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
pFileValue->Value >>= aFile;
if( aFile.getLength() )
{
- mbPrintFile = TRUE;
+ mbPrintFile = sal_True;
maPrintFile = aFile;
bSinglePrintJobs = sal_False;
}
@@ -554,10 +554,10 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
maJobName = i_rJobName;
mnCurPage = 1;
mnCurPrintPage = 1;
- mbPrinting = TRUE;
+ mbPrinting = sal_True;
if( GetCapabilities( PRINTER_CAPABILITIES_USEPULLMODEL ) )
{
- mbJobActive = TRUE;
+ mbJobActive = sal_True;
// sallayer does all necessary page printing
// and also handles showing a dialog
// that also means it must call jobStarted when the dialog is finished
@@ -578,7 +578,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
pSVData->mpDefInst->DestroyPrinter( mpPrinter );
mnCurPage = 0;
mnCurPrintPage = 0;
- mbPrinting = FALSE;
+ mbPrinting = sal_False;
mpPrinter = NULL;
return false;
@@ -619,7 +619,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
i_pController->isDirectPrint(),
maJobSetup.ImplGetConstData() ) )
{
- mbJobActive = TRUE;
+ mbJobActive = sal_True;
i_pController->createProgressDialog();
int nPages = i_pController->getFilteredPageCount();
for( int nOuterIteration = 0; nOuterIteration < nOuterRepeatCount && ! bAborted; nOuterIteration++ )
@@ -656,7 +656,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
maJobName = i_rJobName;
mnCurPage = 1;
mnCurPrintPage = 1;
- mbPrinting = TRUE;
+ mbPrinting = sal_True;
}
else
bError = true;
@@ -677,7 +677,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
pSVData->mpDefInst->DestroyPrinter( mpPrinter );
mnCurPage = 0;
mnCurPrintPage = 0;
- mbPrinting = FALSE;
+ mbPrinting = sal_False;
mpPrinter = NULL;
return false;
@@ -745,7 +745,7 @@ bool PrinterController::setupPrinter( Window* i_pParent )
// get old data
Size aPaperSize( mpImplData->mpPrinter->PixelToLogic(
mpImplData->mpPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
- USHORT nPaperBin = mpImplData->mpPrinter->GetPaperBin();
+ sal_uInt16 nPaperBin = mpImplData->mpPrinter->GetPaperBin();
// call driver setup
bRet = mpImplData->mpPrinter->Setup( i_pParent );
@@ -754,7 +754,7 @@ bool PrinterController::setupPrinter( Window* i_pParent )
// was papersize or bin overridden ? if so we need to take action
Size aNewPaperSize( mpImplData->mpPrinter->PixelToLogic(
mpImplData->mpPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
- USHORT nNewPaperBin = mpImplData->mpPrinter->GetPaperBin();
+ sal_uInt16 nNewPaperBin = mpImplData->mpPrinter->GetPaperBin();
if( aNewPaperSize != aPaperSize || nNewPaperBin != nPaperBin )
{
mpImplData->maFixedPageSize = aNewPaperSize;
@@ -887,7 +887,7 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag
o_rMtf.SetPrefSize( aPageSize.aSize );
o_rMtf.SetPrefMapMode( aMapMode );
- mpImplData->mpPrinter->EnableOutput( FALSE );
+ mpImplData->mpPrinter->EnableOutput( sal_False );
o_rMtf.Record( mpImplData->mpPrinter.get() );
@@ -916,7 +916,7 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD
o_rMtf.AddAction( new MetaPushAction( PUSH_ALL ) );
// clip to page rect
- o_rMtf.AddAction( new MetaClipRegionAction( Region( i_rClipRect ), TRUE ) );
+ o_rMtf.AddAction( new MetaClipRegionAction( Region( i_rClipRect ), sal_True ) );
// append the subpage
io_rSubPage.WindStart();
@@ -933,8 +933,8 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD
o_rMtf.AddAction( new MetaMapModeAction( MapMode( MAP_100TH_MM ) ) );
Rectangle aBorderRect( i_rClipRect );
- o_rMtf.AddAction( new MetaLineColorAction( Color( COL_BLACK ), TRUE ) );
- o_rMtf.AddAction( new MetaFillColorAction( Color( COL_TRANSPARENT ), FALSE ) );
+ o_rMtf.AddAction( new MetaLineColorAction( Color( COL_BLACK ), sal_True ) );
+ o_rMtf.AddAction( new MetaFillColorAction( Color( COL_TRANSPARENT ), sal_False ) );
o_rMtf.AddAction( new MetaRectAction( aBorderRect ) );
// restore gstate
@@ -1085,9 +1085,9 @@ int PrinterController::getFilteredPageCount()
return (getPageCountProtected() * mpImplData->maMultiPage.nRepeat + (nDiv-1)) / nDiv;
}
-ULONG PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut )
+sal_uLong PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut )
{
- ULONG nRestoreDrawMode = mpImplData->mpPrinter->GetDrawMode();
+ sal_uLong nRestoreDrawMode = mpImplData->mpPrinter->GetDrawMode();
sal_Int32 nMaxBmpDPIX = mpImplData->mpPrinter->ImplGetDPIX();
sal_Int32 nMaxBmpDPIY = mpImplData->mpPrinter->ImplGetDPIY();
@@ -1185,9 +1185,9 @@ void PrinterController::printFilteredPage( int i_nPage )
}
GDIMetaFile aCleanedFile;
- ULONG nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile );
+ sal_uLong nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile );
- mpImplData->mpPrinter->EnableOutput( TRUE );
+ mpImplData->mpPrinter->EnableOutput( sal_True );
// actually print the page
mpImplData->mpPrinter->ImplStartPage();
@@ -1599,7 +1599,7 @@ void PrinterController::pushPropertiesToPrinter()
pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ) );
if( pVal )
pVal->Value >>= bCollate;
- mpImplData->mpPrinter->SetCopyCount( static_cast<USHORT>(nCopyCount), bCollate );
+ mpImplData->mpPrinter->SetCopyCount( static_cast<sal_uInt16>(nCopyCount), bCollate );
// duplex mode
pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DuplexMode" ) ) );
diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx
index 14f45b4beafd..08c94bc2ebc6 100644
--- a/vcl/source/gdi/regband.cxx
+++ b/vcl/source/gdi/regband.cxx
@@ -63,7 +63,7 @@ ImplRegionBand::ImplRegionBand( long nTop, long nBottom )
mpPrevBand = NULL;
mpFirstSep = NULL;
mpFirstBandPoint = NULL;
- mbTouched = FALSE;
+ mbTouched = sal_False;
}
// -----------------------------------------------------------------------
@@ -212,8 +212,8 @@ void ImplRegionBand::ProcessPoints()
// generate separations from lines and process union with existing
// separations
-BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
- BOOL bEndPoint, LineType eLineType )
+sal_Bool ImplRegionBand::InsertPoint( long nX, long nLineId,
+ sal_Bool bEndPoint, LineType eLineType )
{
if ( !mpFirstBandPoint )
{
@@ -223,7 +223,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
mpFirstBandPoint->mbEndPoint = bEndPoint;
mpFirstBandPoint->meLineType = eLineType;
mpFirstBandPoint->mpNextBandPoint = NULL;
- return TRUE;
+ return sal_True;
}
// look if line allready touched the band
@@ -242,8 +242,8 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
{
// if we've only got one point => replace first point
pRegionBandPoint->mnX = nX;
- pRegionBandPoint->mbEndPoint = TRUE;
- return TRUE;
+ pRegionBandPoint->mbEndPoint = sal_True;
+ return sal_True;
}
else
{
@@ -267,7 +267,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
}
}
else
- return FALSE;
+ return sal_False;
}
// use next element
@@ -298,7 +298,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
else
pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint;
- return TRUE;
+ return sal_True;
}
// use next element
@@ -317,7 +317,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
// connections to the new point
pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -351,7 +351,7 @@ void ImplRegionBand::ScaleX( double fHorzScale )
//
// combine overlaping sparations
-BOOL ImplRegionBand::OptimizeBand()
+sal_Bool ImplRegionBand::OptimizeBand()
{
ImplRegionBandSep* pPrevSep = 0;
ImplRegionBandSep* pSep = mpFirstSep;
@@ -389,7 +389,7 @@ BOOL ImplRegionBand::OptimizeBand()
pSep = pSep->mpNextSep;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -404,7 +404,7 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
mpFirstSep = new ImplRegionBandSep;
mpFirstSep->mnXLeft = nXLeft;
mpFirstSep->mnXRight = nXRight;
- mpFirstSep->mbRemoved = FALSE;
+ mpFirstSep->mbRemoved = sal_False;
mpFirstSep->mpNextSep = NULL;
return;
}
@@ -425,7 +425,7 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
pNewSep = new ImplRegionBandSep;
pNewSep->mnXLeft = nXLeft;
pNewSep->mnXRight = nXRight;
- pNewSep->mbRemoved = FALSE;
+ pNewSep->mbRemoved = sal_False;
pNewSep->mpNextSep = pSep;
if ( pSep == mpFirstSep )
@@ -452,7 +452,7 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
pNewSep = new ImplRegionBandSep;
pNewSep->mnXLeft = nXLeft;
pNewSep->mnXRight = nXRight;
- pNewSep->mbRemoved = FALSE;
+ pNewSep->mbRemoved = sal_False;
pSep->mpNextSep = pNewSep;
pNewSep->mpNextSep = NULL;
@@ -473,7 +473,7 @@ void ImplRegionBand::Intersect( long nXLeft, long nXRight )
DBG_ASSERT( nXLeft <= nXRight, "ImplRegionBand::Intersect(): nxLeft > nXRight" );
// band has been touched
- mbTouched = TRUE;
+ mbTouched = sal_True;
// band empty? -> nothing to do
if ( !mpFirstSep )
@@ -486,7 +486,7 @@ void ImplRegionBand::Intersect( long nXLeft, long nXRight )
// new separation completly outside? -> remove separation
if ( (nXRight < pSep->mnXLeft) || (nXLeft > pSep->mnXRight) )
// will be removed from the optimizer
- pSep->mbRemoved = TRUE;
+ pSep->mbRemoved = sal_True;
// new separation overlaping from left? -> reduce right boundary
if ( (nXLeft <= pSep->mnXLeft) &&
@@ -520,7 +520,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
DBG_ASSERT( nXLeft <= nXRight, "ImplRegionBand::Exclude(): nxLeft > nXRight" );
// band has been touched
- mbTouched = TRUE;
+ mbTouched = sal_True;
// band empty? -> nothing to do
if ( !mpFirstSep )
@@ -532,14 +532,14 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
- BOOL bSepProcessed = FALSE;
+ sal_Bool bSepProcessed = sal_False;
// new separation completely overlapping? -> remove separation
if ( (nXLeft <= pSep->mnXLeft) && (nXRight >= pSep->mnXRight) )
{
// will be removed from the optimizer
- pSep->mbRemoved = TRUE;
- bSepProcessed = TRUE;
+ pSep->mbRemoved = sal_True;
+ bSepProcessed = sal_True;
}
// new separation overlaping from left? -> reduce boundary
@@ -548,7 +548,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
if ( (nXRight >= pSep->mnXLeft) && (nXLeft <= pSep->mnXLeft) )
{
pSep->mnXLeft = nXRight+1;
- bSepProcessed = TRUE;
+ bSepProcessed = sal_True;
}
}
@@ -558,7 +558,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
if ( (nXLeft <= pSep->mnXRight) && (nXRight > pSep->mnXRight) )
{
pSep->mnXRight = nXLeft-1;
- bSepProcessed = TRUE;
+ bSepProcessed = sal_True;
}
}
@@ -571,7 +571,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
pNewSep = new ImplRegionBandSep;
pNewSep->mnXLeft = pSep->mnXLeft;
pNewSep->mnXRight = nXLeft-1;
- pNewSep->mbRemoved = FALSE;
+ pNewSep->mbRemoved = sal_False;
pSep->mnXLeft = nXRight+1;
@@ -651,7 +651,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
mpFirstSep = new ImplRegionBandSep;
mpFirstSep->mnXLeft = nXLeft;
mpFirstSep->mnXRight = nXRight;
- mpFirstSep->mbRemoved = FALSE;
+ mpFirstSep->mbRemoved = sal_False;
mpFirstSep->mpNextSep = NULL;
return;
}
@@ -680,7 +680,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep->mnXLeft = nXLeft;
pNewSep->mnXRight = nXRight;
pNewSep->mpNextSep = pSep;
- pNewSep->mbRemoved = FALSE;
+ pNewSep->mbRemoved = sal_False;
// connections from the new separation
pNewSep->mpNextSep = pSep;
@@ -696,7 +696,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
else if( nXLeft == nOldLeft && nXRight == nOldRight )
{
// #3
- pSep->mbRemoved = TRUE;
+ pSep->mbRemoved = sal_True;
pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
break;
}
@@ -729,7 +729,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
// cannot break here, simply mark segment as removed,
// and go on with adapted nXLeft/nXRight
- pSep->mbRemoved = TRUE;
+ pSep->mbRemoved = sal_True;
}
else
{
@@ -809,7 +809,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep->mnXLeft = nXLeft;
pNewSep->mnXRight = nXRight;
pNewSep->mpNextSep = pSep->mpNextSep;
- pNewSep->mbRemoved = FALSE;
+ pNewSep->mbRemoved = sal_False;
// connections from the new separation
pSep->mpNextSep = pNewSep;
@@ -831,7 +831,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep->mnXLeft = nXLeft;
pNewSep->mnXRight = nXRight;
pNewSep->mpNextSep = NULL;
- pNewSep->mbRemoved = FALSE;
+ pNewSep->mbRemoved = sal_False;
// connections from the new separation
pPrevSep->mpNextSep = pNewSep;
@@ -842,50 +842,50 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
// -----------------------------------------------------------------------
-BOOL ImplRegionBand::IsInside( long nX )
+sal_Bool ImplRegionBand::IsInside( long nX )
{
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
if ( (pSep->mnXLeft <= nX) && (pSep->mnXRight >= nX) )
- return TRUE;
+ return sal_True;
pSep = pSep->mpNextSep;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ImplRegionBand::IsOver( long nLeft, long nRight )
+sal_Bool ImplRegionBand::IsOver( long nLeft, long nRight )
{
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
if ( (pSep->mnXLeft < nRight) && (pSep->mnXRight > nLeft) )
- return TRUE;
+ return sal_True;
pSep = pSep->mpNextSep;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ImplRegionBand::IsInside( long nLeft, long nRight )
+sal_Bool ImplRegionBand::IsInside( long nLeft, long nRight )
{
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
if ( (pSep->mnXLeft >= nLeft) && (nRight <= pSep->mnXRight) )
- return TRUE;
+ return sal_True;
pSep = pSep->mpNextSep;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -912,7 +912,7 @@ long ImplRegionBand::GetXRightBoundary() const
// -----------------------------------------------------------------------
-BOOL ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const
+sal_Bool ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const
{
ImplRegionBandSep* pOwnRectBandSep = mpFirstSep;
ImplRegionBandSep* pSecondRectBandSep = rRegionBand.mpFirstSep;
@@ -922,12 +922,12 @@ BOOL ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const
long nOwnXLeft = pOwnRectBandSep->mnXLeft;
long nSecondXLeft = pSecondRectBandSep->mnXLeft;
if ( nOwnXLeft != nSecondXLeft )
- return FALSE;
+ return sal_False;
long nOwnXRight = pOwnRectBandSep->mnXRight;
long nSecondXRight = pSecondRectBandSep->mnXRight;
if ( nOwnXRight != nSecondXRight )
- return FALSE;
+ return sal_False;
// get next separation from current band
pOwnRectBandSep = pOwnRectBandSep->mpNextSep;
@@ -938,9 +938,9 @@ BOOL ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const
// differnt number of separations?
if ( pOwnRectBandSep || pSecondRectBandSep )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 067f5c214323..0f578804d16a 100755
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -86,19 +86,19 @@ namespace {
bool ImplIsPolygonRectilinear (const PolyPolygon& rPolyPoly)
{
// Iterate over all polygons.
- const USHORT nPolyCount = rPolyPoly.Count();
- for (USHORT nPoly = 0; nPoly < nPolyCount; ++nPoly)
+ const sal_uInt16 nPolyCount = rPolyPoly.Count();
+ for (sal_uInt16 nPoly = 0; nPoly < nPolyCount; ++nPoly)
{
const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
// Iterate over all edges of the current polygon.
- const USHORT nSize = aPoly.GetSize();
+ const sal_uInt16 nSize = aPoly.GetSize();
if (nSize < 2)
continue;
Point aPoint (aPoly.GetPoint(0));
const Point aLastPoint (aPoint);
- for (USHORT nPoint = 1; nPoint < nSize; ++nPoint)
+ for (sal_uInt16 nPoint = 1; nPoint < nSize; ++nPoint)
{
const Point aNextPoint (aPoly.GetPoint(nPoint));
// When there is at least one edge that is neither vertical nor
@@ -190,20 +190,20 @@ ImplRegion* ImplRectilinearPolygonToBands (const PolyPolygon& rPolyPoly)
long nLineId = 0L;
// Iterate over all polygons.
- const USHORT nPolyCount = rPolyPoly.Count();
- for (USHORT nPoly = 0; nPoly < nPolyCount; ++nPoly)
+ const sal_uInt16 nPolyCount = rPolyPoly.Count();
+ for (sal_uInt16 nPoly = 0; nPoly < nPolyCount; ++nPoly)
{
const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
// Iterate over all edges of the current polygon.
- const USHORT nSize = aPoly.GetSize();
+ const sal_uInt16 nSize = aPoly.GetSize();
if (nSize < 2)
continue;
// Avoid fetching every point twice (each point is the start point
// of one and the end point of another edge.)
Point aStart (aPoly.GetPoint(0));
Point aEnd;
- for (USHORT nPoint = 1; nPoint <= nSize; ++nPoint, aStart=aEnd)
+ for (sal_uInt16 nPoint = 1; nPoint <= nSize; ++nPoint, aStart=aEnd)
{
// We take the implicit closing edge into account by mapping
// index nSize to 0.
@@ -269,7 +269,7 @@ ImplRegion* ImplRectilinearPolygonToBands (const PolyPolygon& rPolyPoly)
// Add the x-value as point to all bands in the nTop->nBottom range.
for (pBand=pTopBand; pBand!=NULL&&pBand->mnYTop<=nBottom; pBand=pBand->mpNextBand)
- pBand->InsertPoint(aStart.X(), nLineId++, TRUE, eLineType);
+ pBand->InsertPoint(aStart.X(), nLineId++, sal_True, eLineType);
}
}
@@ -293,19 +293,19 @@ ImplRegion* ImplGeneralPolygonToBands (
pImplRegion->CreateBandRange( rPolygonBoundingBox.Top(), rPolygonBoundingBox.Bottom() );
// insert polygons
- const USHORT nPolyCount = rPolyPoly.Count();
- for ( USHORT nPoly = 0; nPoly < nPolyCount; nPoly++ )
+ const sal_uInt16 nPolyCount = rPolyPoly.Count();
+ for ( sal_uInt16 nPoly = 0; nPoly < nPolyCount; nPoly++ )
{
// get reference to current polygon
const Polygon& aPoly = rPolyPoly.GetObject( nPoly );
- const USHORT nSize = aPoly.GetSize();
+ const sal_uInt16 nSize = aPoly.GetSize();
// not enough points ( <= 2 )? -> nothing to do!
if ( nSize <= 2 )
continue;
// band the polygon
- for ( USHORT nPoint = 1; nPoint < nSize; nPoint++ )
+ for ( sal_uInt16 nPoint = 1; nPoint < nSize; nPoint++ )
pImplRegion->InsertLine( aPoly.GetPoint(nPoint-1), aPoly.GetPoint(nPoint), nLineID++ );
// close polygon with line from first point to last point, if neccesary
@@ -345,7 +345,7 @@ const char* ImplDbgTestRegion( const void* pObj )
if ( (pImplRegion != &aImplEmptyRegion) && (pImplRegion != &aImplNullRegion) )
{
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
const ImplRegionBand* pBand = pImplRegion->ImplGetFirstRegionBand();
while ( pBand )
{
@@ -543,14 +543,14 @@ void ImplRegion::CreateBandRange( long nYTop, long nYBottom )
// -----------------------------------------------------------------------
-BOOL ImplRegion::InsertLine( const Point& rStartPt, const Point& rEndPt,
+sal_Bool ImplRegion::InsertLine( const Point& rStartPt, const Point& rEndPt,
long nLineId )
{
long nX, nY;
// lines consisting of a single point do not interest here
if ( rStartPt == rEndPt )
- return TRUE;
+ return sal_True;
LineType eLineType = (rStartPt.Y() > rEndPt.Y()) ? LINE_DESCENDING : LINE_ASCENDING;
if ( rStartPt.X() == rEndPt.X() )
@@ -627,25 +627,25 @@ BOOL ImplRegion::InsertLine( const Point& rStartPt, const Point& rEndPt,
}
// last point
- InsertPoint( Point( nEndX, nEndY ), nLineId, TRUE, eLineType );
+ InsertPoint( Point( nEndX, nEndY ), nLineId, sal_True, eLineType );
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
//
// search for appropriate place for the new point
-BOOL ImplRegion::InsertPoint( const Point &rPoint, long nLineID,
- BOOL bEndPoint, LineType eLineType )
+sal_Bool ImplRegion::InsertPoint( const Point &rPoint, long nLineID,
+ sal_Bool bEndPoint, LineType eLineType )
{
DBG_ASSERT( mpFirstBand != NULL, "ImplRegion::InsertPoint - no bands available!" );
if ( rPoint.Y() == mpLastCheckedBand->mnYTop )
{
mpLastCheckedBand->InsertPoint( rPoint.X(), nLineID, bEndPoint, eLineType );
- return TRUE;
+ return sal_True;
}
if ( rPoint.Y() > mpLastCheckedBand->mnYTop )
@@ -657,7 +657,7 @@ BOOL ImplRegion::InsertPoint( const Point &rPoint, long nLineID,
if ( rPoint.Y() == mpLastCheckedBand->mnYTop )
{
mpLastCheckedBand->InsertPoint( rPoint.X(), nLineID, bEndPoint, eLineType );
- return TRUE;
+ return sal_True;
}
mpLastCheckedBand = mpLastCheckedBand->mpNextBand;
@@ -674,7 +674,7 @@ BOOL ImplRegion::InsertPoint( const Point &rPoint, long nLineID,
if ( rPoint.Y() == mpLastCheckedBand->mnYTop )
{
mpLastCheckedBand->InsertPoint( rPoint.X(), nLineID, bEndPoint, eLineType );
- return TRUE;
+ return sal_True;
}
mpLastCheckedBand = mpLastCheckedBand->mpPrevBand;
@@ -688,7 +688,7 @@ BOOL ImplRegion::InsertPoint( const Point &rPoint, long nLineID,
// reinitialize pointer (should never be reached!)
mpLastCheckedBand = mpFirstBand;
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -706,9 +706,9 @@ void ImplRegion::InsertBands( long nTop, long nBottom )
}
// find/insert bands for the boundaries of the rectangle
- BOOL bTopBoundaryInserted = FALSE;
- BOOL bTop2BoundaryInserted = FALSE;
- BOOL bBottomBoundaryInserted = FALSE;
+ sal_Bool bTopBoundaryInserted = sal_False;
+ sal_Bool bTop2BoundaryInserted = sal_False;
+ sal_Bool bBottomBoundaryInserted = sal_False;
// special case: top boundary is above the first band
ImplRegionBand* pNewBand;
@@ -723,7 +723,7 @@ void ImplRegion::InsertBands( long nTop, long nBottom )
pNewBand->mpNextBand = mpFirstBand;
mpFirstBand = pNewBand;
- bTopBoundaryInserted = TRUE;
+ bTopBoundaryInserted = sal_True;
}
// insert band(s) into the list
@@ -767,13 +767,13 @@ void ImplRegion::InsertBands( long nTop, long nBottom )
//
// create new band and insert it into the list
-BOOL ImplRegion::InsertSingleBand( ImplRegionBand* pBand,
+sal_Bool ImplRegion::InsertSingleBand( ImplRegionBand* pBand,
long nYBandPosition )
{
// boundary already included in band with height 1? -> nothing to do!
if ( (pBand->mnYTop == pBand->mnYBottom) &&
(nYBandPosition == pBand->mnYTop) )
- return TRUE;
+ return sal_True;
// insert single height band on top?
ImplRegionBand* pNewBand;
@@ -788,7 +788,7 @@ BOOL ImplRegion::InsertSingleBand( ImplRegionBand* pBand,
pBand->mnYBottom = nYBandPosition;
pBand->mpNextBand = pNewBand;
- return TRUE;
+ return sal_True;
}
// top of new rectangle within the current band? -> insert new band and copy data
@@ -815,7 +815,7 @@ BOOL ImplRegion::InsertSingleBand( ImplRegionBand* pBand,
pBand->mnYBottom = nYBandPosition - 1;
pBand->mpNextBand = pNewBand;
- return TRUE;
+ return sal_True;
}
// create new band behind the current in the list
@@ -832,7 +832,7 @@ BOOL ImplRegion::InsertSingleBand( ImplRegionBand* pBand,
// append band to the list
pBand->mpNextBand = pNewBand;
- return TRUE;
+ return sal_True;
}
if ( nYBandPosition > pBand->mnYBottom )
@@ -842,11 +842,11 @@ BOOL ImplRegion::InsertSingleBand( ImplRegionBand* pBand,
// append band to the list
pBand->mpNextBand = pNewBand;
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// ------------------------------------------------------------------------
@@ -987,7 +987,7 @@ void ImplRegion::XOr( long nLeft, long nTop, long nRight, long nBottom )
//
// remove empty bands
-BOOL ImplRegion::OptimizeBandList()
+sal_Bool ImplRegion::OptimizeBandList()
{
DBG_ASSERT( (this != &aImplNullRegion) && (this != &aImplEmptyRegion),
"ImplRegion::OptimizeBandList() - Empty oder NULL-Region" );
@@ -998,7 +998,7 @@ BOOL ImplRegion::OptimizeBandList()
ImplRegionBand* pBand = mpFirstBand;
while ( pBand )
{
- const BOOL bBTEqual = pBand->mpNextBand &&
+ const sal_Bool bBTEqual = pBand->mpNextBand &&
(pBand->mnYBottom == pBand->mpNextBand->mnYTop);
// no separation? -> remove!
@@ -1206,7 +1206,7 @@ void Region::ImplCreateRectRegion( const Rectangle& rRect )
void Region::ImplCreatePolyPolyRegion( const PolyPolygon& rPolyPoly )
{
- const USHORT nPolyCount = rPolyPoly.Count();
+ const sal_uInt16 nPolyCount = rPolyPoly.Count();
if ( nPolyCount )
{
// polypolygon empty? -> empty region
@@ -1370,13 +1370,13 @@ void Region::Scale( double fScaleX, double fScaleY )
// -----------------------------------------------------------------------
-BOOL Region::Union( const Rectangle& rRect )
+sal_Bool Region::Union( const Rectangle& rRect )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
// is rectangle empty? -> nothing to do
if ( rRect.IsEmpty() )
- return TRUE;
+ return sal_True;
if( HasPolyPolygon() )
{
@@ -1429,12 +1429,12 @@ BOOL Region::Union( const Rectangle& rRect )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Region::Intersect( const Rectangle& rRect )
+sal_Bool Region::Intersect( const Rectangle& rRect )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
@@ -1450,7 +1450,7 @@ BOOL Region::Intersect( const Rectangle& rRect )
delete mpImplRegion;
}
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
- return TRUE;
+ return sal_True;
}
// #103137# Avoid banding for special cases
@@ -1468,7 +1468,7 @@ BOOL Region::Intersect( const Rectangle& rRect )
// unnecessary banding
mpImplRegion->mpPolyPoly->Clip( rRect );
- return TRUE;
+ return sal_True;
}
else if( mpImplRegion->mpB2DPolyPoly )
{
@@ -1491,7 +1491,7 @@ BOOL Region::Intersect( const Rectangle& rRect )
// is region empty? -> nothing to do!
if ( mpImplRegion == &aImplEmptyRegion )
- return TRUE;
+ return sal_True;
// get justified rectangle
long nLeft = Min( rRect.Left(), rRect.Right() );
@@ -1512,7 +1512,7 @@ BOOL Region::Intersect( const Rectangle& rRect )
mpImplRegion->mpFirstBand->Union( nLeft, nRight );
mpImplRegion->mnRectCount = 1;
- return TRUE;
+ return sal_True;
}
// no own instance data? -> make own copy!
@@ -1556,18 +1556,18 @@ BOOL Region::Intersect( const Rectangle& rRect )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Region::Exclude( const Rectangle& rRect )
+sal_Bool Region::Exclude( const Rectangle& rRect )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
// is rectangle empty? -> nothing to do
if ( rRect.IsEmpty() )
- return TRUE;
+ return sal_True;
if( HasPolyPolygon() )
{
@@ -1592,7 +1592,7 @@ BOOL Region::Exclude( const Rectangle& rRect )
// no instance data? -> create!
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return TRUE;
+ return sal_True;
// no own instance data? -> make own copy!
if ( mpImplRegion->mnRefCount > 1 )
@@ -1617,18 +1617,18 @@ BOOL Region::Exclude( const Rectangle& rRect )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Region::XOr( const Rectangle& rRect )
+sal_Bool Region::XOr( const Rectangle& rRect )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
// is rectangle empty? -> nothing to do
if ( rRect.IsEmpty() )
- return TRUE;
+ return sal_True;
if( HasPolyPolygon() )
{
@@ -1681,7 +1681,7 @@ BOOL Region::XOr( const Rectangle& rRect )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1707,7 +1707,7 @@ void Region::ImplUnionPolyPolygon( const Region& i_rRegion )
*this = Region( aClip );
}
-BOOL Region::Union( const Region& rRegion )
+sal_Bool Region::Union( const Region& rRegion )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
@@ -1722,7 +1722,7 @@ BOOL Region::Union( const Region& rRegion )
// is region empty or null? -> nothing to do
if ( (rRegion.mpImplRegion == &aImplEmptyRegion) || (rRegion.mpImplRegion == &aImplNullRegion) )
- return TRUE;
+ return sal_True;
// no instance data? -> create!
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
@@ -1758,7 +1758,7 @@ BOOL Region::Union( const Region& rRegion )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1779,29 +1779,29 @@ void Region::ImplIntersectWithPolyPolygon( const Region& i_rRegion )
*this = Region( aClip );
}
-BOOL Region::Intersect( const Region& rRegion )
+sal_Bool Region::Intersect( const Region& rRegion )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
// same instance data? -> nothing to do!
if ( mpImplRegion == rRegion.mpImplRegion )
- return TRUE;
+ return sal_True;
if( rRegion.HasPolyPolygon() || HasPolyPolygon() )
{
ImplIntersectWithPolyPolygon( rRegion );
- return TRUE;
+ return sal_True;
}
ImplPolyPolyRegionToBandRegion();
((Region*)&rRegion)->ImplPolyPolyRegionToBandRegion();
if ( mpImplRegion == &aImplEmptyRegion )
- return TRUE;
+ return sal_True;
// is region null? -> nothing to do
if ( rRegion.mpImplRegion == &aImplNullRegion )
- return TRUE;
+ return sal_True;
// is rectangle empty? -> nothing to do
if ( rRegion.mpImplRegion == &aImplEmptyRegion )
@@ -1815,7 +1815,7 @@ BOOL Region::Intersect( const Region& rRegion )
delete mpImplRegion;
}
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
- return TRUE;
+ return sal_True;
}
// is own region NULL-region? -> copy data!
@@ -1823,7 +1823,7 @@ BOOL Region::Intersect( const Region& rRegion )
{
mpImplRegion = rRegion.mpImplRegion;
rRegion.mpImplRegion->mnRefCount++;
- return TRUE;
+ return sal_True;
}
// Wenn wir weniger Rechtecke haben, drehen wir den Intersect-Aufruf um
@@ -1843,7 +1843,7 @@ BOOL Region::Intersect( const Region& rRegion )
ImplRegionBand* pBand = mpImplRegion->mpFirstBand;
while ( pBand )
{
- pBand->mbTouched = FALSE;
+ pBand->mbTouched = sal_False;
pBand = pBand->mpNextBand;
}
@@ -1919,7 +1919,7 @@ BOOL Region::Intersect( const Region& rRegion )
}
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1939,7 +1939,7 @@ void Region::ImplExcludePolyPolygon( const Region& i_rRegion )
*this = Region( aClip );
}
-BOOL Region::Exclude( const Region& rRegion )
+sal_Bool Region::Exclude( const Region& rRegion )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
@@ -1954,11 +1954,11 @@ BOOL Region::Exclude( const Region& rRegion )
// is region empty or null? -> nothing to do
if ( (rRegion.mpImplRegion == &aImplEmptyRegion) || (rRegion.mpImplRegion == &aImplNullRegion) )
- return TRUE;
+ return sal_True;
// no instance data? -> nothing to do
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return TRUE;
+ return sal_True;
// no own instance data? -> make own copy!
if ( mpImplRegion->mnRefCount > 1 )
@@ -1993,7 +1993,7 @@ BOOL Region::Exclude( const Region& rRegion )
pBand = pBand->mpNextBand;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2016,7 +2016,7 @@ void Region::ImplXOrPolyPolygon( const Region& i_rRegion )
*this = Region( aClip );
}
-BOOL Region::XOr( const Region& rRegion )
+sal_Bool Region::XOr( const Region& rRegion )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
@@ -2031,13 +2031,13 @@ BOOL Region::XOr( const Region& rRegion )
// is region empty or null? -> nothing to do
if ( (rRegion.mpImplRegion == &aImplEmptyRegion) || (rRegion.mpImplRegion == &aImplNullRegion) )
- return TRUE;
+ return sal_True;
// no own instance data? -> XOr = copy
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
{
*this = rRegion;
- return TRUE;
+ return sal_True;
}
// no own instance data? -> make own copy!
@@ -2070,7 +2070,7 @@ BOOL Region::XOr( const Region& rRegion )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2124,7 +2124,7 @@ Rectangle Region::GetBoundRect() const
// -----------------------------------------------------------------------
-BOOL Region::HasPolyPolygon() const
+sal_Bool Region::HasPolyPolygon() const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
if( !mpImplRegion )
@@ -2206,7 +2206,7 @@ basegfx::B2DPolyPolygon Region::ConvertToB2DPolyPolygon()
// -----------------------------------------------------------------------
-BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
+bool Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
long& rX, long& rY,
long& rWidth, long& rHeight ) const
{
@@ -2216,11 +2216,11 @@ BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
// no internal data? -> region is empty!
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return false;
// no band in the list? -> region is empty!
if ( mpImplRegion->mpFirstBand == NULL )
- return FALSE;
+ return false;
// initialise pointer for first access
ImplRegionBand* pCurrRectBand = mpImplRegion->mpFirstBand;
@@ -2228,7 +2228,7 @@ BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
DBG_ASSERT( pCurrRectBandSep != NULL, "Erstes Band wurde nicht optimiert." );
if ( !pCurrRectBandSep )
- return FALSE;
+ return false;
// get boundaries of current rectangle
rX = pCurrRectBandSep->mnXLeft;
@@ -2240,12 +2240,12 @@ BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
rImplRegionInfo.mpVoidCurrRectBand = (void*)pCurrRectBand;
rImplRegionInfo.mpVoidCurrRectBandSep = (void*)pCurrRectBandSep;
- return TRUE;
+ return true;
}
// -----------------------------------------------------------------------
-BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
+bool Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
long& rX, long& rY,
long& rWidth, long& rHeight ) const
{
@@ -2253,7 +2253,7 @@ BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
// no internal data? -> region is empty!
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return false;
// get last pointers
ImplRegionBand* pCurrRectBand = (ImplRegionBand*)rImplRegionInfo.mpVoidCurrRectBand;
@@ -2270,7 +2270,7 @@ BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
// no band found? -> not further rectangles!
if( !pCurrRectBand )
- return FALSE;
+ return false;
// get first separation in current band
pCurrRectBandSep = pCurrRectBand->mpFirstSep;
@@ -2286,7 +2286,7 @@ BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
rImplRegionInfo.mpVoidCurrRectBand = (void*)pCurrRectBand;
rImplRegionInfo.mpVoidCurrRectBandSep = (void*)pCurrRectBandSep;
- return TRUE;
+ return true;
}
// -----------------------------------------------------------------------
@@ -2305,7 +2305,7 @@ RegionType Region::GetType() const
// -----------------------------------------------------------------------
-BOOL Region::IsInside( const Point& rPoint ) const
+sal_Bool Region::IsInside( const Point& rPoint ) const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
@@ -2318,7 +2318,7 @@ BOOL Region::IsInside( const Point& rPoint ) const
// no instance data? -> not inside
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return sal_False;
// search band list
ImplRegionBand* pBand = mpImplRegion->mpFirstBand;
@@ -2330,30 +2330,30 @@ BOOL Region::IsInside( const Point& rPoint ) const
{
// is point within separation of the band?
if ( pBand->IsInside( rPoint.X() ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
pBand = pBand->mpNextBand;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Region::IsInside( const Rectangle& rRect ) const
+sal_Bool Region::IsInside( const Rectangle& rRect ) const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
// is rectangle empty? -> not inside
if ( rRect.IsEmpty() )
- return FALSE;
+ return sal_False;
// no instance data? -> not inside
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return sal_False;
// create region from rectangle and intersect own region
Region aRegion = rRect;
@@ -2365,12 +2365,12 @@ BOOL Region::IsInside( const Rectangle& rRect ) const
// -----------------------------------------------------------------------
-BOOL Region::IsOver( const Rectangle& rRect ) const
+sal_Bool Region::IsOver( const Rectangle& rRect ) const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return sal_False;
// Can we optimize this ??? - is used in StarDraw for brushes pointers
// Why we have no IsOver for Regions ???
@@ -2467,20 +2467,20 @@ Region& Region::operator=( const Rectangle& rRect )
// -----------------------------------------------------------------------
-BOOL Region::operator==( const Region& rRegion ) const
+sal_Bool Region::operator==( const Region& rRegion ) const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion );
// reference to same object? -> equal!
if ( mpImplRegion == rRegion.mpImplRegion )
- return TRUE;
+ return sal_True;
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return sal_False;
if ( (rRegion.mpImplRegion == &aImplEmptyRegion) || (rRegion.mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return sal_False;
if ( rRegion.mpImplRegion->mpPolyPoly && mpImplRegion->mpPolyPoly )
return *rRegion.mpImplRegion->mpPolyPoly == *mpImplRegion->mpPolyPoly;
@@ -2491,13 +2491,13 @@ BOOL Region::operator==( const Region& rRegion ) const
// Eine der beiden Regions kann jetzt Empty sein
if ( mpImplRegion == rRegion.mpImplRegion )
- return TRUE;
+ return sal_True;
if ( mpImplRegion == &aImplEmptyRegion )
- return FALSE;
+ return sal_False;
if ( rRegion.mpImplRegion == &aImplEmptyRegion )
- return FALSE;
+ return sal_False;
}
// initialise pointers
@@ -2511,22 +2511,22 @@ BOOL Region::operator==( const Region& rRegion ) const
long nOwnXLeft = pOwnRectBandSep->mnXLeft;
long nSecondXLeft = pSecondRectBandSep->mnXLeft;
if ( nOwnXLeft != nSecondXLeft )
- return FALSE;
+ return sal_False;
long nOwnYTop = pOwnRectBand->mnYTop;
long nSecondYTop = pSecondRectBand->mnYTop;
if ( nOwnYTop != nSecondYTop )
- return FALSE;
+ return sal_False;
long nOwnXRight = pOwnRectBandSep->mnXRight;
long nSecondXRight = pSecondRectBandSep->mnXRight;
if ( nOwnXRight != nSecondXRight )
- return FALSE;
+ return sal_False;
long nOwnYBottom = pOwnRectBand->mnYBottom;
long nSecondYBottom = pSecondRectBand->mnYBottom;
if ( nOwnYBottom != nSecondYBottom )
- return FALSE;
+ return sal_False;
// get next separation from current band
pOwnRectBandSep = pOwnRectBandSep->mpNextSep;
@@ -2557,13 +2557,13 @@ BOOL Region::operator==( const Region& rRegion ) const
}
if ( pOwnRectBandSep && !pSecondRectBandSep )
- return FALSE;
+ return sal_False;
if ( !pOwnRectBandSep && pSecondRectBandSep )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2575,8 +2575,8 @@ SvStream& operator>>( SvStream& rIStrm, Region& rRegion )
DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion );
VersionCompat aCompat( rIStrm, STREAM_READ );
- UINT16 nVersion;
- UINT16 nTmp16;
+ sal_uInt16 nVersion;
+ sal_uInt16 nTmp16;
// statische Object haben RefCount von 0
if ( rRegion.mpImplRegion->mnRefCount )
@@ -2669,7 +2669,7 @@ SvStream& operator>>( SvStream& rIStrm, Region& rRegion )
if( aCompat.GetVersion() >= 2 )
{
- BOOL bHasPolyPolygon;
+ sal_Bool bHasPolyPolygon;
rIStrm >> bHasPolyPolygon;
@@ -2693,7 +2693,7 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
{
DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion );
- UINT16 nVersion = 2;
+ sal_uInt16 nVersion = 2;
VersionCompat aCompat( rOStrm, STREAM_WRITE, nVersion );
Region aTmpRegion( rRegion );
@@ -2704,7 +2704,7 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
rOStrm << nVersion;
// put type
- rOStrm << (UINT16)aTmpRegion.GetType();
+ rOStrm << (sal_uInt16)aTmpRegion.GetType();
// put all bands if not null or empty
if ( (aTmpRegion.mpImplRegion != &aImplEmptyRegion) && (aTmpRegion.mpImplRegion != &aImplNullRegion) )
@@ -2713,7 +2713,7 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
while ( pBand )
{
// put boundaries
- rOStrm << (UINT16) STREAMENTRY_BANDHEADER;
+ rOStrm << (sal_uInt16) STREAMENTRY_BANDHEADER;
rOStrm << pBand->mnYTop;
rOStrm << pBand->mnYBottom;
@@ -2722,7 +2722,7 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
while ( pSep )
{
// put separation
- rOStrm << (UINT16) STREAMENTRY_SEPARATION;
+ rOStrm << (sal_uInt16) STREAMENTRY_SEPARATION;
rOStrm << pSep->mnXLeft;
rOStrm << pSep->mnXRight;
@@ -2734,10 +2734,10 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
}
// put endmarker
- rOStrm << (UINT16) STREAMENTRY_END;
+ rOStrm << (sal_uInt16) STREAMENTRY_END;
// write polypolygon if available
- const BOOL bHasPolyPolygon = rRegion.HasPolyPolygon();
+ const sal_Bool bHasPolyPolygon = rRegion.HasPolyPolygon();
rOStrm << bHasPolyPolygon;
if( bHasPolyPolygon )
@@ -2774,12 +2774,12 @@ void Region::ImplBeginAddRect()
// -----------------------------------------------------------------------
-BOOL Region::ImplAddRect( const Rectangle& rRect )
+sal_Bool Region::ImplAddRect( const Rectangle& rRect )
{
// Hier kein CheckThis, da nicht alle Daten auf Stand
if ( rRect.IsEmpty() )
- return TRUE;
+ return sal_True;
// get justified rectangle
long nTop;
@@ -2839,7 +2839,7 @@ BOOL Region::ImplAddRect( const Rectangle& rRect )
mpImplRegion->mpLastCheckedBand->Union( nLeft, nRight );
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2908,14 +2908,14 @@ void Region::ImplEndAddRect()
// -----------------------------------------------------------------------
-ULONG Region::GetRectCount() const
+sal_uLong Region::GetRectCount() const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
((Region*)this)->ImplPolyPolyRegionToBandRegion();
#ifdef DBG_UTIL
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
// all bands if not null or empty
if ( (mpImplRegion != &aImplEmptyRegion) && (mpImplRegion != &aImplNullRegion) )
@@ -2961,7 +2961,7 @@ RegionHandle Region::BeginEnumRects()
ImplRegionHandle* pData = new ImplRegionHandle;
pData->mpRegion = new Region( *this );
- pData->mbFirst = TRUE;
+ pData->mbFirst = sal_True;
// save pointers
pData->mpCurrRectBand = pData->mpRegion->mpImplRegion->mpFirstBand;
@@ -2972,16 +2972,16 @@ RegionHandle Region::BeginEnumRects()
// -----------------------------------------------------------------------
-BOOL Region::GetEnumRects( RegionHandle pVoidData, Rectangle& rRect )
+sal_Bool Region::GetEnumRects( RegionHandle pVoidData, Rectangle& rRect )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
ImplRegionHandle* pData = (ImplRegionHandle*)pVoidData;
if ( !pData )
- return FALSE;
+ return sal_False;
if ( pData->mbFirst )
- pData->mbFirst = FALSE;
+ pData->mbFirst = sal_False;
else
{
// get next separation from current band
@@ -2995,7 +2995,7 @@ BOOL Region::GetEnumRects( RegionHandle pVoidData, Rectangle& rRect )
// no band found? -> not further rectangles!
if ( !pData->mpCurrRectBand )
- return FALSE;
+ return sal_False;
// get first separation in current band
pData->mpCurrRectBandSep = pData->mpCurrRectBand->mpFirstSep;
@@ -3007,7 +3007,7 @@ BOOL Region::GetEnumRects( RegionHandle pVoidData, Rectangle& rRect )
rRect.Bottom() = pData->mpCurrRectBand->mnYBottom;
rRect.Left() = pData->mpCurrRectBandSep->mnXLeft;
rRect.Right() = pData->mpCurrRectBandSep->mnXRight;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -3031,7 +3031,7 @@ static inline bool ImplPolygonRectTest( const Polygon& rPoly, Rectangle* pRectOu
{
bool bIsRect = false;
const Point* pPoints = rPoly.GetConstPointAry();
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
if( nPoints == 4 || (nPoints == 5 && pPoints[0] == pPoints[4]) )
{
long nX1 = pPoints[0].X(), nX2 = pPoints[2].X(),
@@ -3082,7 +3082,7 @@ Region Region::GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly )
int nPolygonRects = 0, nPolygonPolygons = 0;
int nPolygons = rPolyPoly.Count();
- for( USHORT i = 0; i < nPolygons; i++ )
+ for( sal_uInt16 i = 0; i < nPolygons; i++ )
{
const Polygon& rPoly = rPolyPoly[i];
if( ImplPolygonRectTest( rPoly ) )
@@ -3095,7 +3095,7 @@ Region Region::GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly )
Region aResult;
Rectangle aRect;
- for( USHORT i = 0; i < nPolygons; i++ )
+ for( sal_uInt16 i = 0; i < nPolygons; i++ )
{
const Polygon& rPoly = rPolyPoly[i];
if( ImplPolygonRectTest( rPoly, &aRect ) )
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index f8cb5529c1df..9f2ee0924555 100755
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -172,7 +172,7 @@ void SalGraphics::mirror( long& x, long& nWidth, const OutputDevice *pOutDev, bo
}
}
-BOOL SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack ) const
+sal_Bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack ) const
{
long w;
if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
@@ -245,10 +245,10 @@ BOOL SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *
pPtAry2[j].mnY = pPtAry[i].mnY;
}
}
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
void SalGraphics::mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack ) const
@@ -420,12 +420,12 @@ bool SalGraphics::drawPolyLine(
return false;
}
-void SalGraphics::DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev )
+void SalGraphics::DrawPolyLine( sal_uLong nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
drawPolyLine( nPoints, bCopied ? pPtAry2 : pPtAry );
delete [] pPtAry2;
}
@@ -433,12 +433,12 @@ void SalGraphics::DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const Out
drawPolyLine( nPoints, pPtAry );
}
-void SalGraphics::DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev )
+void SalGraphics::DrawPolygon( sal_uLong nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
drawPolygon( nPoints, bCopied ? pPtAry2 : pPtAry );
delete [] pPtAry2;
}
@@ -452,10 +452,10 @@ void SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints,
{
// TODO: optimize, reduce new/delete calls
SalPoint **pPtAry2 = new SalPoint*[nPoly];
- ULONG i;
+ sal_uLong i;
for(i=0; i<nPoly; i++)
{
- ULONG nPoints = pPoints[i];
+ sal_uLong nPoints = pPoints[i];
pPtAry2[i] = new SalPoint[ nPoints ];
mirror( nPoints, pPtAry[i], pPtAry2[i], pOutDev );
}
@@ -488,13 +488,13 @@ bool SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double /*fT
return false;
}
-sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev )
+sal_Bool SalGraphics::DrawPolyLineBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev )
{
sal_Bool bResult = sal_False;
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
bResult = drawPolyLineBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
delete [] pPtAry2;
}
@@ -503,13 +503,13 @@ sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry,
return bResult;
}
-sal_Bool SalGraphics::DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev )
+sal_Bool SalGraphics::DrawPolygonBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev )
{
sal_Bool bResult = sal_False;
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
bResult = drawPolygonBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
delete [] pPtAry2;
}
@@ -519,17 +519,17 @@ sal_Bool SalGraphics::DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry,
}
sal_Bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt32* i_pPoints,
- const SalPoint* const* i_pPtAry, const BYTE* const* i_pFlgAry, const OutputDevice* i_pOutDev )
+ const SalPoint* const* i_pPtAry, const sal_uInt8* const* i_pFlgAry, const OutputDevice* i_pOutDev )
{
sal_Bool bRet = sal_False;
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (i_pOutDev && i_pOutDev->IsRTLEnabled()) )
{
// TODO: optimize, reduce new/delete calls
SalPoint **pPtAry2 = new SalPoint*[i_nPoly];
- ULONG i;
+ sal_uLong i;
for(i=0; i<i_nPoly; i++)
{
- ULONG nPoints = i_pPoints[i];
+ sal_uLong nPoints = i_pPoints[i];
pPtAry2[i] = new SalPoint[ nPoints ];
mirror( nPoints, i_pPtAry[i], pPtAry2[i], i_pOutDev );
}
@@ -563,7 +563,7 @@ bool SalGraphics::DrawPolyLine( const ::basegfx::B2DPolygon& i_rPolygon, double
void SalGraphics::CopyArea( long nDestX, long nDestY,
long nSrcX, long nSrcY,
long nSrcWidth, long nSrcHeight,
- USHORT nFlags, const OutputDevice *pOutDev )
+ sal_uInt16 nFlags, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
@@ -657,12 +657,12 @@ void SalGraphics::Invert( long nX, long nY, long nWidth, long nHeight, SalInv
mirror( nX, nWidth, pOutDev );
invert( nX, nY, nWidth, nHeight, nFlags );
}
-void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev )
+void SalGraphics::Invert( sal_uLong nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
invert( nPoints, bCopied ? pPtAry2 : pPtAry, nFlags );
delete [] pPtAry2;
}
@@ -670,15 +670,15 @@ void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nF
invert( nPoints, pPtAry, nFlags );
}
-BOOL SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev )
+sal_Bool SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
return drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize );
}
-BOOL SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
- const Point& aPos, BOOL& rIsInside, const OutputDevice *pOutDev )
+sal_Bool SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ const Point& aPos, sal_Bool& rIsInside, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
@@ -727,7 +727,7 @@ void SalGraphics::mirror( ControlType , const ImplControlValue& rVal, const Outp
}
}
-BOOL SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+sal_Bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const OUString& aCaption, const OutputDevice *pOutDev )
{
@@ -736,7 +736,7 @@ BOOL SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const
Rectangle rgn( rControlRegion );
mirror( rgn, pOutDev );
mirror( nType, aValue, pOutDev );
- BOOL bRet = drawNativeControl( nType, nPart, rgn, nState, aValue, aCaption );
+ sal_Bool bRet = drawNativeControl( nType, nPart, rgn, nState, aValue, aCaption );
mirror( nType, aValue, pOutDev, true );
return bRet;
}
@@ -744,7 +744,7 @@ BOOL SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const
return drawNativeControl( nType, nPart, rControlRegion, nState, aValue, aCaption );
}
-BOOL SalGraphics::DrawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+sal_Bool SalGraphics::DrawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const OUString& aCaption, const OutputDevice *pOutDev )
{
@@ -753,7 +753,7 @@ BOOL SalGraphics::DrawNativeControlText( ControlType nType, ControlPart nPart, c
Rectangle rgn( rControlRegion );
mirror( rgn, pOutDev );
mirror( nType, aValue, pOutDev );
- BOOL bRet = drawNativeControlText( nType, nPart, rgn, nState, aValue, aCaption );
+ sal_Bool bRet = drawNativeControlText( nType, nPart, rgn, nState, aValue, aCaption );
mirror( nType, aValue, pOutDev, true );
return bRet;
}
@@ -761,7 +761,7 @@ BOOL SalGraphics::DrawNativeControlText( ControlType nType, ControlPart nPart, c
return drawNativeControlText( nType, nPart, rControlRegion, nState, aValue, aCaption );
}
-BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
+sal_Bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const OUString& aCaption,
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion, const OutputDevice *pOutDev )
{
@@ -776,12 +776,12 @@ BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart,
mirror( rNativeBoundingRegion, pOutDev, true );
mirror( rNativeContentRegion, pOutDev, true );
mirror( nType, aValue, pOutDev, true );
- return TRUE;
+ return sal_True;
}
else
{
mirror( nType, aValue, pOutDev, true );
- return FALSE;
+ return sal_False;
}
}
else
@@ -821,7 +821,7 @@ bool SalGraphics::filterText( const String&, String&, xub_StrLen, xub_StrLen&, x
void SalGraphics::AddDevFontSubstitute( OutputDevice* pOutDev,
const String& rFontName,
const String& rReplaceFontName,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
pOutDev->ImplAddDevFontSubstitute( rFontName, rReplaceFontName, nFlags );
}
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 31df581f50a2..f77ce914fd4d 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -101,12 +101,12 @@ static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuff
BitmapColor* pColMapBuf = aColMap.ImplGetColorBuffer();
BitmapColor aIndex( 0 );
- for( USHORT i = 0, nSrcCount = aColMap.GetEntryCount(), nDstCount = rDstBuffer.maPalette.GetEntryCount(); i < nSrcCount; i++ )
+ for( sal_uInt16 i = 0, nSrcCount = aColMap.GetEntryCount(), nDstCount = rDstBuffer.maPalette.GetEntryCount(); i < nSrcCount; i++ )
{
if( ( i < nDstCount ) && ( rSrcBuffer.maPalette[ i ] == rDstBuffer.maPalette[ i ] ) )
- aIndex.SetIndex( sal::static_int_cast<BYTE>(i) );
+ aIndex.SetIndex( sal::static_int_cast<sal_uInt8>(i) );
else
- aIndex.SetIndex( sal::static_int_cast<BYTE>(rDstBuffer.maPalette.GetBestIndex( rSrcBuffer.maPalette[ i ] )) );
+ aIndex.SetIndex( sal::static_int_cast<sal_uInt8>(rDstBuffer.maPalette.GetBestIndex( rSrcBuffer.maPalette[ i ] )) );
pColMapBuf[ i ] = aIndex;
}
@@ -212,7 +212,7 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer
if( BMP_SCANLINE_FORMAT( rSrcBuffer.mnFormat ) == BMP_FORMAT_24BIT_TC_BGR )
{
BitmapColor aCol;
- BYTE* pPixel;
+ sal_uInt8* pPixel;
for( long nActY = 0, nMapY; nActY < nHeight; nActY++ )
{
@@ -253,7 +253,7 @@ static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
const ColorMask& rDstMask = rDstBuffer.maColorMask;
BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
- BYTE* pColToPalMap = new BYTE[ TC_TO_PAL_COLORS ];
+ sal_uInt8* pColToPalMap = new sal_uInt8[ TC_TO_PAL_COLORS ];
BitmapColor aIndex( 0 );
for( long nR = 0; nR < 16; nR++ )
@@ -262,10 +262,10 @@ static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
{
for( long nB = 0; nB < 16; nB++ )
{
- BitmapColor aCol( sal::static_int_cast<BYTE>(nR << 4),
- sal::static_int_cast<BYTE>(nG << 4),
- sal::static_int_cast<BYTE>(nB << 4) );
- pColToPalMap[ ImplIndexFromColor( aCol ) ] = (BYTE) rDstBuffer.maPalette.GetBestIndex( aCol );
+ BitmapColor aCol( sal::static_int_cast<sal_uInt8>(nR << 4),
+ sal::static_int_cast<sal_uInt8>(nG << 4),
+ sal::static_int_cast<sal_uInt8>(nB << 4) );
+ pColToPalMap[ ImplIndexFromColor( aCol ) ] = (sal_uInt8) rDstBuffer.maPalette.GetBestIndex( aCol );
}
}
}
@@ -293,7 +293,7 @@ static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
// ---------------------
BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
- ULONG nDstBitmapFormat, BitmapPalette* pDstPal, ColorMask* pDstMask )
+ sal_uLong nDstBitmapFormat, BitmapPalette* pDstPal, ColorMask* pDstMask )
{
FncGetPixel pFncGetPixel;
FncSetPixel pFncSetPixel;
@@ -330,7 +330,7 @@ BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRec
}
// set function for setting pixels
- const ULONG nDstScanlineFormat = BMP_SCANLINE_FORMAT( nDstBitmapFormat );
+ const sal_uLong nDstScanlineFormat = BMP_SCANLINE_FORMAT( nDstBitmapFormat );
switch( nDstScanlineFormat )
{
IMPL_CASE_SET_FORMAT( _1BIT_MSB_PAL, 1 );
@@ -367,7 +367,7 @@ BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRec
pDstBuffer->mnScanlineSize = AlignedWidth4Bytes( pDstBuffer->mnBitCount * pDstBuffer->mnWidth );
try
{
- pDstBuffer->mpBits = new BYTE[ pDstBuffer->mnScanlineSize * pDstBuffer->mnHeight ];
+ pDstBuffer->mpBits = new sal_uInt8[ pDstBuffer->mnScanlineSize * pDstBuffer->mnHeight ];
}
catch( const std::bad_alloc& )
{
diff --git a/vcl/source/gdi/salnativewidgets-none.cxx b/vcl/source/gdi/salnativewidgets-none.cxx
index 8aa0e47f1a35..4cbce4c5298a 100644
--- a/vcl/source/gdi/salnativewidgets-none.cxx
+++ b/vcl/source/gdi/salnativewidgets-none.cxx
@@ -40,29 +40,29 @@ using namespace rtl;
/*
* IsNativeControlSupported()
*
- * Returns TRUE if the platform supports native
+ * Returns sal_True if the platform supports native
* drawing of the control defined by nPart
*/
-BOOL SalGraphics::IsNativeControlSupported( ControlType, ControlPart )
+sal_Bool SalGraphics::IsNativeControlSupported( ControlType, ControlPart )
{
- return( FALSE );
+ return( sal_False );
}
/*
* HitTestNativeControl()
*
- * If the return value is TRUE, bIsInside contains information whether
+ * If the return value is sal_True, bIsInside contains information whether
* aPos was or was not inside the native widget specified by the
* nType/nPart combination.
*/
-BOOL SalGraphics::hitTestNativeControl( ControlType,
+sal_Bool SalGraphics::hitTestNativeControl( ControlType,
ControlPart,
const Rectangle&,
const Point&,
- BOOL& )
+ sal_Bool& )
{
- return( FALSE );
+ return( sal_False );
}
@@ -75,14 +75,14 @@ BOOL SalGraphics::hitTestNativeControl( ControlType,
* aValue: An optional value (tristate/numerical/string)
* aCaption: A caption or title string (like button text etc)
*/
-BOOL SalGraphics::drawNativeControl( ControlType,
+sal_Bool SalGraphics::drawNativeControl( ControlType,
ControlPart,
const Rectangle&,
ControlState,
const ImplControlValue&,
const OUString& )
{
- return( FALSE );
+ return( sal_False );
}
@@ -96,22 +96,22 @@ BOOL SalGraphics::drawNativeControl( ControlType,
* aValue: An optional value (tristate/numerical/string)
* aCaption: A caption or title string (like button text etc)
*/
-BOOL SalGraphics::drawNativeControlText( ControlType,
+sal_Bool SalGraphics::drawNativeControlText( ControlType,
ControlPart,
const Rectangle&,
ControlState,
const ImplControlValue&,
const OUString& )
{
- return( FALSE );
+ return( sal_False );
}
/*
* GetNativeControlRegion()
*
- * If the return value is TRUE, rNativeBoundingRegion
- * contains the TRUE bounding region covered by the control
+ * If the return value is sal_True, rNativeBoundingRegion
+ * contains the sal_True bounding region covered by the control
* including any adornment, while rNativeContentRegion contains the area
* within the control that can be safely drawn into without drawing over
* the borders of the control.
@@ -120,7 +120,7 @@ BOOL SalGraphics::drawNativeControlText( ControlType,
* aValue: An optional value (tristate/numerical/string)
* aCaption: A caption or title string (like button text etc)
*/
-BOOL SalGraphics::getNativeControlRegion( ControlType,
+sal_Bool SalGraphics::getNativeControlRegion( ControlType,
ControlPart,
const Rectangle&,
ControlState,
@@ -129,6 +129,6 @@ BOOL SalGraphics::getNativeControlRegion( ControlType,
Rectangle &,
Rectangle & )
{
- return( FALSE );
+ return( sal_False );
}
diff --git a/vcl/source/gdi/svcompat.cxx b/vcl/source/gdi/svcompat.cxx
index 415cad128a49..be0c9cd7dcc9 100644
--- a/vcl/source/gdi/svcompat.cxx
+++ b/vcl/source/gdi/svcompat.cxx
@@ -34,7 +34,7 @@
// - ImplCompat -
// --------------
-ImplCompat::ImplCompat( SvStream& rStm, USHORT nStreamMode, USHORT nVersion ) :
+ImplCompat::ImplCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion ) :
mpRWStm ( &rStm ),
mnStmMode ( nStreamMode ),
mnVersion ( nVersion )
@@ -62,7 +62,7 @@ ImplCompat::~ImplCompat()
{
if( STREAM_WRITE == mnStmMode )
{
- const UINT32 nEndPos = mpRWStm->Tell();
+ const sal_uInt32 nEndPos = mpRWStm->Tell();
mpRWStm->Seek( mnCompatPos );
*mpRWStm << ( nEndPos - mnTotalSize );
@@ -70,7 +70,7 @@ ImplCompat::~ImplCompat()
}
else
{
- const UINT32 nReadSize = mpRWStm->Tell() - mnCompatPos;
+ const sal_uInt32 nReadSize = mpRWStm->Tell() - mnCompatPos;
if( mnTotalSize > nReadSize )
mpRWStm->SeekRel( mnTotalSize - nReadSize );
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 78ce197525ec..6d69bc67b982 100644..100755
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -109,7 +109,7 @@ namespace vcl
public:
// equivalents to the respective OutputDevice methods, which take the reference device into account
long GetTextArray( const XubString& _rText, sal_Int32* _pDXAry, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const;
- Rectangle DrawText( const Rectangle& _rRect, const XubString& _rText, USHORT _nStyle, MetricVector* _pVector, String* _pDisplayText );
+ Rectangle DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle, MetricVector* _pVector, String* _pDisplayText );
protected:
void onBeginDrawText()
@@ -309,13 +309,13 @@ namespace vcl
}
//--------------------------------------------------------------------
- Rectangle ReferenceDeviceTextLayout::DrawText( const Rectangle& _rRect, const XubString& _rText, USHORT _nStyle, MetricVector* _pVector, String* _pDisplayText )
+ Rectangle ReferenceDeviceTextLayout::DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle, MetricVector* _pVector, String* _pDisplayText )
{
if ( !_rText.Len() )
return Rectangle();
// determine text layout mode from the RTL-ness of the control whose text we render
- ULONG nTextLayoutMode = m_bRTLEnabled ? TEXT_LAYOUT_BIDI_RTL : TEXT_LAYOUT_BIDI_LTR;
+ sal_uLong nTextLayoutMode = m_bRTLEnabled ? TEXT_LAYOUT_BIDI_RTL : TEXT_LAYOUT_BIDI_LTR;
m_rReferenceDevice.SetLayoutMode( nTextLayoutMode );
m_rTargetDevice.SetLayoutMode( nTextLayoutMode | TEXT_LAYOUT_TEXTORIGIN_LEFT );
// TEXT_LAYOUT_TEXTORIGIN_LEFT is because when we do actually draw the text (in DrawText( Point, ... )), then
@@ -375,7 +375,7 @@ namespace vcl
}
//--------------------------------------------------------------------
- Rectangle ControlTextRenderer::DrawText( const Rectangle& _rRect, const XubString& _rText, USHORT _nStyle,
+ Rectangle ControlTextRenderer::DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle,
MetricVector* _pVector, String* _pDisplayText )
{
return m_pImpl->DrawText( _rRect, _rText, _nStyle, _pVector, _pDisplayText );
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 4c1439ffe6f4..e6e100072679 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -48,7 +48,7 @@ using namespace ::com::sun::star::uno;
// =======================================================================
void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
- long nDX, long nDY, USHORT nBitCount, const SystemGraphicsData *pData )
+ long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData )
{
DBG_ASSERT( nBitCount <= 1,
"VirtualDevice::VirtualDevice(): Only 0 or 1 is for BitCount allowed" );
@@ -86,7 +86,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
mnBitCount = ( nBitCount ? nBitCount : pOutDev->GetBitCount() );
mnOutWidth = nDX;
mnOutHeight = nDY;
- mbScreenComp = TRUE;
+ mbScreenComp = sal_True;
mnAlphaDepth = -1;
// #i59315# init vdev size from system object, when passed a
@@ -99,12 +99,12 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
SetAntialiasing( ANTIALIASING_DISABLE_TEXT );
if ( pOutDev->GetOutDevType() == OUTDEV_PRINTER )
- mbScreenComp = FALSE;
+ mbScreenComp = sal_False;
else if ( pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
mbScreenComp = ((VirtualDevice*)pOutDev)->mbScreenComp;
meOutDevType = OUTDEV_VIRDEV;
- mbDevOutput = TRUE;
+ mbDevOutput = sal_True;
mpFontList = pSVData->maGDIData.mpScreenFontList;
mpFontCache = pSVData->maGDIData.mpScreenFontCache;
mnDPIX = pOutDev->mnDPIX;
@@ -136,7 +136,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
// -----------------------------------------------------------------------
-VirtualDevice::VirtualDevice( USHORT nBitCount )
+VirtualDevice::VirtualDevice( sal_uInt16 nBitCount )
: mpVirDev( NULL ),
meRefDevMode( REFDEV_NONE )
{
@@ -147,7 +147,7 @@ VirtualDevice::VirtualDevice( USHORT nBitCount )
// -----------------------------------------------------------------------
-VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, USHORT nBitCount )
+VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount )
: mpVirDev( NULL ),
meRefDevMode( REFDEV_NONE )
{
@@ -158,7 +158,7 @@ VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, USHORT nBitCount )
// -----------------------------------------------------------------------
-VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, USHORT nBitCount, USHORT nAlphaBitCount )
+VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount, sal_uInt16 nAlphaBitCount )
: mpVirDev( NULL ),
meRefDevMode( REFDEV_NONE )
{
@@ -172,7 +172,7 @@ VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, USHORT nBitCount, US
// -----------------------------------------------------------------------
-VirtualDevice::VirtualDevice( const SystemGraphicsData *pData, USHORT nBitCount )
+VirtualDevice::VirtualDevice( const SystemGraphicsData *pData, sal_uInt16 nBitCount )
: mpVirDev( NULL ),
meRefDevMode( REFDEV_NONE )
{
@@ -208,20 +208,20 @@ VirtualDevice::~VirtualDevice()
// -----------------------------------------------------------------------
-BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
+sal_Bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, sal_Bool bErase )
{
DBG_TRACE3( "VirtualDevice::ImplSetOutputSizePixel( %ld, %ld, %d )", rNewSize.Width(), rNewSize.Height(), (int)bErase );
if ( !mpVirDev )
- return FALSE;
+ return sal_False;
else if ( rNewSize == GetOutputSizePixel() )
{
if ( bErase )
Erase();
- return TRUE;
+ return sal_True;
}
- BOOL bRet;
+ sal_Bool bRet;
long nNewWidth = rNewSize.Width(), nNewHeight = rNewSize.Height();
if ( nNewWidth < 1 )
@@ -250,7 +250,7 @@ BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
if ( !mpGraphics )
{
if ( !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
}
pNewVirDev = pSVData->mpDefInst->CreateVirtualDevice( mpGraphics, nNewWidth, nNewHeight, mnBitCount );
@@ -286,16 +286,16 @@ BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
mpVirDev = pNewVirDev;
mnOutWidth = rNewSize.Width();
mnOutHeight = rNewSize.Height();
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
- bRet = FALSE;
+ bRet = sal_False;
pSVData->mpDefInst->DestroyVirtualDevice( pNewVirDev );
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
@@ -319,7 +319,7 @@ void VirtualDevice::ImplFillOpaqueRectangle( const Rectangle& rRect )
// -----------------------------------------------------------------------
-BOOL VirtualDevice::SetOutputSizePixel( const Size& rNewSize, BOOL bErase )
+sal_Bool VirtualDevice::SetOutputSizePixel( const Size& rNewSize, sal_Bool bErase )
{
if( ImplSetOutputSizePixel(rNewSize, bErase) )
{
@@ -348,10 +348,10 @@ BOOL VirtualDevice::SetOutputSizePixel( const Size& rNewSize, BOOL bErase )
mpAlphaVDev->SetMapMode( GetMapMode() );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -363,7 +363,7 @@ void VirtualDevice::SetReferenceDevice( RefDevMode i_eRefDevMode )
{
case REFDEV_NONE:
default:
- DBG_ASSERT( FALSE, "VDev::SetRefDev illegal argument!" );
+ DBG_ASSERT( sal_False, "VDev::SetRefDev illegal argument!" );
break;
case REFDEV_MODE06:
nDPIX = nDPIY = 600;
@@ -391,17 +391,17 @@ void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32
mnDPIX = i_nDPIX;
mnDPIY = i_nDPIY;
- EnableOutput( FALSE ); // prevent output on reference device
- mbScreenComp = FALSE;
+ EnableOutput( sal_False ); // prevent output on reference device
+ mbScreenComp = sal_False;
// invalidate currently selected fonts
- mbInitFont = TRUE;
- mbNewFont = TRUE;
+ mbInitFont = sal_True;
+ mbNewFont = sal_True;
// avoid adjusting font lists when already in refdev mode
- BYTE nOldRefDevMode = meRefDevMode;
- BYTE nOldCompatFlag = (BYTE)meRefDevMode & REFDEV_FORCE_ZERO_EXTLEAD;
- meRefDevMode = (BYTE)(i_eRefDevMode | nOldCompatFlag);
+ sal_uInt8 nOldRefDevMode = meRefDevMode;
+ sal_uInt8 nOldCompatFlag = (sal_uInt8)meRefDevMode & REFDEV_FORCE_ZERO_EXTLEAD;
+ meRefDevMode = (sal_uInt8)(i_eRefDevMode | nOldCompatFlag);
if( (nOldRefDevMode ^ nOldCompatFlag) != REFDEV_NONE )
return;
@@ -442,7 +442,7 @@ void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32
void VirtualDevice::Compat_ZeroExtleadBug()
{
- meRefDevMode = (BYTE)meRefDevMode | REFDEV_FORCE_ZERO_EXTLEAD;
+ meRefDevMode = (sal_uInt8)meRefDevMode | REFDEV_FORCE_ZERO_EXTLEAD;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index 10aa4431f69d..5b865038bb2b 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -111,7 +111,7 @@ void ImplWallpaper::ImplReleaseCachedBitmap()
SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
{
VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
delete rImplWallpaper.mpRect;
rImplWallpaper.mpRect = NULL;
@@ -129,7 +129,7 @@ SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
// version 2
if( aCompat.GetVersion() >= 2 )
{
- BOOL bRect, bGrad, bBmp, bDummy;
+ sal_Bool bRect, bGrad, bBmp, bDummy;
rIStm >> bRect >> bGrad >> bBmp >> bDummy >> bDummy >> bDummy;
@@ -154,7 +154,7 @@ SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
// version 3 (new color format)
if( aCompat.GetVersion() >= 3 )
{
- rImplWallpaper.maColor.Read( rIStm, TRUE );
+ rImplWallpaper.maColor.Read( rIStm, sal_True );
}
}
@@ -166,13 +166,13 @@ SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
SvStream& operator<<( SvStream& rOStm, const ImplWallpaper& rImplWallpaper )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 3 );
- BOOL bRect = ( rImplWallpaper.mpRect != NULL );
- BOOL bGrad = ( rImplWallpaper.mpGradient != NULL );
- BOOL bBmp = ( rImplWallpaper.mpBitmap != NULL );
- BOOL bDummy = FALSE;
+ sal_Bool bRect = ( rImplWallpaper.mpRect != NULL );
+ sal_Bool bGrad = ( rImplWallpaper.mpGradient != NULL );
+ sal_Bool bBmp = ( rImplWallpaper.mpBitmap != NULL );
+ sal_Bool bDummy = sal_False;
// version 1
- rOStm << rImplWallpaper.maColor << (UINT16) rImplWallpaper.meStyle;
+ rOStm << rImplWallpaper.maColor << (sal_uInt16) rImplWallpaper.meStyle;
// version 2
rOStm << bRect << bGrad << bBmp << bDummy << bDummy << bDummy;
@@ -187,14 +187,14 @@ SvStream& operator<<( SvStream& rOStm, const ImplWallpaper& rImplWallpaper )
rOStm << *rImplWallpaper.mpBitmap;
// version 3 (new color format)
- ( (Color&) rImplWallpaper.maColor ).Write( rOStm, TRUE );
+ ( (Color&) rImplWallpaper.maColor ).Write( rOStm, sal_True );
return rOStm;
}
// -----------------------------------------------------------------------
-inline void Wallpaper::ImplMakeUnique( BOOL bReleaseCache )
+inline void Wallpaper::ImplMakeUnique( sal_Bool bReleaseCache )
{
// Falls noch andere Referenzen bestehen, dann kopieren
if ( mpImplWallpaper->mnRefCount != 1 )
@@ -313,7 +313,7 @@ void Wallpaper::SetStyle( WallpaperStyle eStyle )
{
DBG_CHKTHIS( Wallpaper, NULL );
- ImplMakeUnique( FALSE );
+ ImplMakeUnique( sal_False );
if( eStyle == WALLPAPER_APPLICATIONGRADIENT )
// set a dummy gradient, the correct gradient
@@ -391,7 +391,7 @@ BitmapEx Wallpaper::GetBitmap() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsBitmap() const
+sal_Bool Wallpaper::IsBitmap() const
{
DBG_CHKTHIS( Wallpaper, NULL );
@@ -449,7 +449,7 @@ Gradient Wallpaper::GetGradient() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsGradient() const
+sal_Bool Wallpaper::IsGradient() const
{
DBG_CHKTHIS( Wallpaper, NULL );
@@ -479,7 +479,7 @@ void Wallpaper::SetRect( const Rectangle& rRect )
{
DBG_CHKTHIS( Wallpaper, NULL );
- ImplMakeUnique( FALSE );
+ ImplMakeUnique( sal_False );
if ( rRect.IsEmpty() )
{
@@ -506,7 +506,7 @@ void Wallpaper::SetRect()
if ( mpImplWallpaper->mpRect )
{
- ImplMakeUnique( FALSE );
+ ImplMakeUnique( sal_False );
delete mpImplWallpaper->mpRect;
mpImplWallpaper->mpRect = NULL;
}
@@ -529,7 +529,7 @@ Rectangle Wallpaper::GetRect() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsRect() const
+sal_Bool Wallpaper::IsRect() const
{
DBG_CHKTHIS( Wallpaper, NULL );
@@ -539,26 +539,26 @@ BOOL Wallpaper::IsRect() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsFixed() const
+sal_Bool Wallpaper::IsFixed() const
{
if ( mpImplWallpaper->meStyle == WALLPAPER_NULL )
- return FALSE;
+ return sal_False;
else
return (!mpImplWallpaper->mpBitmap && !mpImplWallpaper->mpGradient);
}
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsScrollable() const
+sal_Bool Wallpaper::IsScrollable() const
{
if ( mpImplWallpaper->meStyle == WALLPAPER_NULL )
- return FALSE;
+ return sal_False;
else if ( !mpImplWallpaper->mpBitmap && !mpImplWallpaper->mpGradient )
- return TRUE;
+ return sal_True;
else if ( mpImplWallpaper->mpBitmap )
return (mpImplWallpaper->meStyle == WALLPAPER_TILE);
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -590,37 +590,37 @@ Wallpaper& Wallpaper::operator=( const Wallpaper& rWallpaper )
// -----------------------------------------------------------------------
-BOOL Wallpaper::operator==( const Wallpaper& rWallpaper ) const
+sal_Bool Wallpaper::operator==( const Wallpaper& rWallpaper ) const
{
DBG_CHKTHIS( Wallpaper, NULL );
DBG_CHKOBJ( &rWallpaper, Wallpaper, NULL );
if ( mpImplWallpaper == rWallpaper.mpImplWallpaper )
- return TRUE;
+ return sal_True;
if ( ( mpImplWallpaper->meStyle != rWallpaper.mpImplWallpaper->meStyle ) ||
( mpImplWallpaper->maColor != rWallpaper.mpImplWallpaper->maColor ) )
- return FALSE;
+ return sal_False;
if ( mpImplWallpaper->mpRect != rWallpaper.mpImplWallpaper->mpRect
&& ( !mpImplWallpaper->mpRect
|| !rWallpaper.mpImplWallpaper->mpRect
|| *(mpImplWallpaper->mpRect) != *(rWallpaper.mpImplWallpaper->mpRect) ) )
- return FALSE;
+ return sal_False;
if ( mpImplWallpaper->mpBitmap != rWallpaper.mpImplWallpaper->mpBitmap
&& ( !mpImplWallpaper->mpBitmap
|| !rWallpaper.mpImplWallpaper->mpBitmap
|| *(mpImplWallpaper->mpBitmap) != *(rWallpaper.mpImplWallpaper->mpBitmap) ) )
- return FALSE;
+ return sal_False;
if ( mpImplWallpaper->mpGradient != rWallpaper.mpImplWallpaper->mpGradient
&& ( !mpImplWallpaper->mpGradient
|| !rWallpaper.mpImplWallpaper->mpGradient
|| *(mpImplWallpaper->mpGradient) != *(rWallpaper.mpImplWallpaper->mpGradient) ) )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------