diff options
Diffstat (limited to 'vcl/source/gdi')
49 files changed, 1048 insertions, 1048 deletions
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx index 8a58bb1a8e65..7e1721e3dd55 100644 --- a/vcl/source/gdi/alpha.cxx +++ b/vcl/source/gdi/alpha.cxx @@ -75,14 +75,14 @@ Bitmap AlphaMask::GetBitmap() const return ImplGetBitmap(); } -sal_Bool AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, +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 // This optimization is possible because the palettes of AlphaMasks are always identical (8bit GreyPalette, see ctor) const Size aSizePix( GetSizePixel() ); Rectangle aRectDst( rRectDst ); - sal_Bool bRet = sal_False; + bool bRet = false; aRectDst.Intersection( Rectangle( Point(), aSizePix ) ); @@ -173,7 +173,7 @@ sal_Bool AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRect } ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } } } @@ -183,16 +183,16 @@ sal_Bool AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRect } -sal_Bool AlphaMask::Erase( sal_uInt8 cTransparency ) +bool AlphaMask::Erase( sal_uInt8 cTransparency ) { return Bitmap::Erase( Color( cTransparency, cTransparency, cTransparency ) ); } -sal_Bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency ) +bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency ) { BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess(); BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pMaskAcc && pAcc ) { @@ -213,14 +213,14 @@ sal_Bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency return bRet; } -sal_Bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency, sal_uLong +bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency, sal_uLong #ifdef DBG_UTIL nTol #endif ) { BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; DBG_ASSERT( !nTol, "AlphaMask::Replace: nTol not used yet" ); @@ -255,7 +255,7 @@ nTol } } - bRet = sal_True; + bRet = true; } if( pAcc ) diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx index b0e3a492ab83..abc068958353 100644 --- a/vcl/source/gdi/animate.cxx +++ b/vcl/source/gdi/animate.cxx @@ -67,9 +67,9 @@ Animation::Animation() : mnLoops ( 0 ), mnPos ( 0 ), meCycleMode ( CYCLE_NORMAL ), - mbIsInAnimation ( sal_False ), - mbLoopTerminated ( sal_False ), - mbIsWaiting ( sal_False ) + mbIsInAnimation ( false ), + mbLoopTerminated ( false ), + mbIsWaiting ( false ) { maTimer.SetTimeoutHdl( LINK( this, Animation, ImplTimeoutHdl ) ); } @@ -80,7 +80,7 @@ Animation::Animation( const Animation& rAnimation ) : mnLoopCount ( rAnimation.mnLoopCount ), mnPos ( rAnimation.mnPos ), meCycleMode ( rAnimation.meCycleMode ), - mbIsInAnimation ( sal_False ), + mbIsInAnimation ( false ), mbLoopTerminated ( rAnimation.mbLoopTerminated ), mbIsWaiting ( rAnimation.mbIsWaiting ) { @@ -153,7 +153,7 @@ bool Animation::operator==( const Animation& rAnimation ) const void Animation::Clear() { maTimer.Stop(); - mbIsInAnimation = sal_False; + mbIsInAnimation = false; maGlobalSize = Size(); maBitmapEx.SetEmpty(); @@ -166,11 +166,11 @@ void Animation::Clear() maViewList.clear(); } -sal_Bool Animation::IsTransparent() const +bool Animation::IsTransparent() const { Point aPoint; Rectangle aRect( aPoint, maGlobalSize ); - sal_Bool bRet = sal_False; + bool bRet = false; // If some small bitmap needs to be replaced by the background, // we need to be transparent, in order to be displayed correctly @@ -184,7 +184,7 @@ sal_Bool Animation::IsTransparent() const && Rectangle( pAnimBmp->aPosPix, pAnimBmp->aSizePix ) != aRect ) { - bRet = sal_True; + bRet = true; break; } } @@ -234,10 +234,10 @@ sal_uLong Animation::GetChecksum() const return nCrc; } -sal_Bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDestSz, long nExtraData, +bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDestSz, long nExtraData, OutputDevice* pFirstFrameOutDev ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !maList.empty() ) { @@ -274,7 +274,7 @@ sal_Bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& if( maViewList.empty() ) { maTimer.Stop(); - mbIsInAnimation = sal_False; + mbIsInAnimation = false; mnPos = 0UL; } @@ -284,13 +284,13 @@ sal_Bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& if( !mbIsInAnimation ) { ImplRestartTimer( maList[ mnPos ]->nWait ); - mbIsInAnimation = sal_True; + mbIsInAnimation = true; } } else Draw( pOut, rDestPt, rDestSz ); - bRet = sal_True; + bRet = true; } return bRet; @@ -315,7 +315,7 @@ void Animation::Stop( OutputDevice* pOut, long nExtraData ) if( maViewList.empty() ) { maTimer.Stop(); - mbIsInAnimation = sal_False; + mbIsInAnimation = false; } } @@ -391,7 +391,7 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl) pView = (ImplAnimView*) pAInfo->pViewData; pView->ImplPause( pAInfo->bPause ); - pView->ImplSetMarked( sal_True ); + pView->ImplSetMarked( true ); } // delete AInfo structures @@ -413,7 +413,7 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl) if( !pView->ImplIsPause() ) bGlobalPause = false; - pView->ImplSetMarked( sal_False ); + pView->ImplSetMarked( false ); i++; } } @@ -434,7 +434,7 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl) if( mnLoops == 1 ) { Stop(); - mbLoopTerminated = sal_True; + mbLoopTerminated = true; mnPos = nAnimCount - 1UL; maBitmapEx = maList[ mnPos ]->aBmpEx; return 0L; @@ -480,9 +480,9 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl) return 0L; } -sal_Bool Animation::Insert( const AnimationBitmap& rStepBmp ) +bool Animation::Insert( const AnimationBitmap& rStepBmp ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !IsInAnimation() ) { @@ -496,7 +496,7 @@ sal_Bool Animation::Insert( const AnimationBitmap& rStepBmp ) if( maList.size() == 1 ) maBitmapEx = rStepBmp.aBmpEx; - bRet = sal_True; + bRet = true; } return bRet; @@ -541,18 +541,18 @@ void Animation::SetLoopCount( const sal_uLong nLoopCount ) void Animation::ResetLoopCount() { mnLoops = mnLoopCount; - mbLoopTerminated = sal_False; + mbLoopTerminated = false; } -sal_Bool Animation::Convert( BmpConversion eConversion ) +bool Animation::Convert( BmpConversion eConversion ) { DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" ); - sal_Bool bRet; + bool bRet; if( !IsInAnimation() && !maList.empty() ) { - bRet = sal_True; + bRet = true; for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i ) bRet = maList[ i ]->aBmpEx.Convert( eConversion ); @@ -560,20 +560,20 @@ sal_Bool Animation::Convert( BmpConversion eConversion ) maBitmapEx.Convert( eConversion ); } else - bRet = sal_False; + bRet = false; return bRet; } -sal_Bool Animation::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce ) +bool Animation::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce ) { DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" ); - sal_Bool bRet; + bool bRet; if( !IsInAnimation() && !maList.empty() ) { - bRet = sal_True; + bRet = true; for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i ) bRet = maList[ i ]->aBmpEx.ReduceColors( nNewColorCount, eReduce ); @@ -581,20 +581,20 @@ sal_Bool Animation::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce ) maBitmapEx.ReduceColors( nNewColorCount, eReduce ); } else - bRet = sal_False; + bRet = false; return bRet; } -sal_Bool Animation::Invert() +bool Animation::Invert() { DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" ); - sal_Bool bRet; + bool bRet; if( !IsInAnimation() && !maList.empty() ) { - bRet = sal_True; + bRet = true; for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i ) bRet = maList[ i ]->aBmpEx.Invert(); @@ -602,27 +602,27 @@ sal_Bool Animation::Invert() maBitmapEx.Invert(); } else - bRet = sal_False; + bRet = false; return bRet; } -sal_Bool Animation::Mirror( sal_uLong nMirrorFlags ) +bool Animation::Mirror( sal_uLong nMirrorFlags ) { DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" ); - sal_Bool bRet; + bool bRet; if( !IsInAnimation() && !maList.empty() ) { - bRet = sal_True; + bRet = true; if( nMirrorFlags ) { for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i ) { AnimationBitmap* pStepBmp = maList[ i ]; - if( ( bRet = pStepBmp->aBmpEx.Mirror( nMirrorFlags ) ) == sal_True ) + if( ( bRet = pStepBmp->aBmpEx.Mirror( nMirrorFlags ) ) ) { if( nMirrorFlags & BMP_MIRROR_HORZ ) pStepBmp->aPosPix.X() = maGlobalSize.Width() - pStepBmp->aPosPix.X() - pStepBmp->aSizePix.Width(); @@ -636,22 +636,22 @@ sal_Bool Animation::Mirror( sal_uLong nMirrorFlags ) } } else - bRet = sal_False; + bRet = false; return bRet; } -sal_Bool Animation::Adjust( short nLuminancePercent, short nContrastPercent, +bool Animation::Adjust( short nLuminancePercent, short nContrastPercent, short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, - double fGamma, sal_Bool bInvert ) + double fGamma, bool bInvert ) { DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" ); - sal_Bool bRet; + bool bRet; if( !IsInAnimation() && !maList.empty() ) { - bRet = sal_True; + bRet = true; for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i ) { @@ -669,20 +669,20 @@ sal_Bool Animation::Adjust( short nLuminancePercent, short nContrastPercent, fGamma, bInvert ); } else - bRet = sal_False; + bRet = false; return bRet; } -sal_Bool Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) +bool Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) { DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" ); - sal_Bool bRet; + bool bRet; if( !IsInAnimation() && !maList.empty() ) { - bRet = sal_True; + bRet = true; for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i ) bRet = maList[ i ]->aBmpEx.Filter( eFilter, pFilterParam, pProgress ); @@ -690,7 +690,7 @@ sal_Bool Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterPara maBitmapEx.Filter( eFilter, pFilterParam, pProgress ); } else - bRet = sal_False; + bRet = false; return bRet; } @@ -777,7 +777,7 @@ SvStream& ReadAnimation( SvStream& rIStm, Animation& rAnimation ) BitmapEx aBmpEx; sal_uInt32 nTmp32; sal_uInt16 nTmp16; - sal_uInt8 cTmp; + bool cTmp; do { @@ -787,7 +787,7 @@ SvStream& ReadAnimation( SvStream& rIStm, Animation& rAnimation ) ReadPair( rIStm, rAnimation.maGlobalSize ); rIStm.ReadUInt16( nTmp16 ); aAnimBmp.nWait = ( ( 65535 == nTmp16 ) ? ANIMATION_TIMEOUT_ON_CLICK : nTmp16 ); rIStm.ReadUInt16( nTmp16 ); aAnimBmp.eDisposal = ( Disposal) nTmp16; - rIStm.ReadUChar( cTmp ); aAnimBmp.bUserInput = (sal_Bool) cTmp; + rIStm.ReadCharAsBool( cTmp ); aAnimBmp.bUserInput = cTmp; rIStm.ReadUInt32( nTmp32 ); rAnimation.mnLoopCount = (sal_uInt16) nTmp32; rIStm.ReadUInt32( nTmp32 ); // Unused rIStm.ReadUInt32( nTmp32 ); // Unused diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 41fff7466179..9ecb8fa74865 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -240,7 +240,7 @@ Bitmap& Bitmap::operator=( const Bitmap& rBitmap ) return *this; } -sal_Bool Bitmap::IsEqual( const Bitmap& rBmp ) const +bool Bitmap::IsEqual( const Bitmap& rBmp ) const { return( IsSameInstance( rBmp ) || ( rBmp.GetSizePixel() == GetSizePixel() && @@ -267,10 +267,10 @@ sal_uInt16 Bitmap::GetBitCount() const return( mpImpBmp ? mpImpBmp->ImplGetBitCount() : 0 ); } -sal_Bool Bitmap::HasGreyPalette() const +bool Bitmap::HasGreyPalette() const { const sal_uInt16 nBitCount = GetBitCount(); - sal_Bool bRet = nBitCount == 1 ? sal_True : sal_False; + bool bRet = nBitCount == 1 ? sal_True : sal_False; BitmapReadAccess* pRAcc = ( (Bitmap*) this )->AcquireReadAccess(); @@ -431,13 +431,13 @@ void Bitmap::ReleaseAccess( BitmapReadAccess* pBitmapAccess ) delete pBitmapAccess; } -sal_Bool Bitmap::Erase( const Color& rFillColor ) +bool Bitmap::Erase( const Color& rFillColor ) { if( !(*this) ) - return sal_True; + return true; BitmapWriteAccess* pWriteAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pWriteAcc ) { @@ -505,16 +505,16 @@ sal_Bool Bitmap::Erase( const Color& rFillColor ) } ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool Bitmap::Invert() +bool Bitmap::Invert() { BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pAcc ) { @@ -539,17 +539,17 @@ sal_Bool Bitmap::Invert() } ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool Bitmap::Mirror( sal_uLong nMirrorFlags ) +bool Bitmap::Mirror( sal_uLong nMirrorFlags ) { bool bHorz = ( ( nMirrorFlags & BMP_MIRROR_HORZ ) == BMP_MIRROR_HORZ ); bool bVert = ( ( nMirrorFlags & BMP_MIRROR_VERT ) == BMP_MIRROR_VERT ); - sal_Bool bRet = sal_False; + bool bRet = false; if( bHorz && !bVert ) { @@ -574,7 +574,7 @@ sal_Bool Bitmap::Mirror( sal_uLong nMirrorFlags ) } ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } } else if( bVert && !bHorz ) @@ -598,7 +598,7 @@ sal_Bool Bitmap::Mirror( sal_uLong nMirrorFlags ) delete[] pBuffer; ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } } else if( bHorz && bVert ) @@ -635,24 +635,24 @@ sal_Bool Bitmap::Mirror( sal_uLong nMirrorFlags ) } ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } } else - bRet = sal_True; + bRet = true; return bRet; } -sal_Bool Bitmap::Rotate( long nAngle10, const Color& rFillColor ) +bool Bitmap::Rotate( long nAngle10, const Color& rFillColor ) { - sal_Bool bRet = sal_False; + bool bRet = false; nAngle10 %= 3600L; nAngle10 = ( nAngle10 < 0L ) ? ( 3599L + nAngle10 ) : nAngle10; if( !nAngle10 ) - bRet = sal_True; + bRet = true; else if( 1800L == nAngle10 ) bRet = Mirror( BMP_MIRROR_HORZ | BMP_MIRROR_VERT ); else @@ -778,18 +778,18 @@ sal_Bool Bitmap::Rotate( long nAngle10, const Color& rFillColor ) ReleaseAccess( pReadAcc ); } - if( ( bRet = !!aRotatedBmp ) == sal_True ) + if( ( bRet = !!aRotatedBmp ) ) ImplAssignWithSize( aRotatedBmp ); } return bRet; }; -sal_Bool Bitmap::Crop( const Rectangle& rRectPixel ) +bool Bitmap::Crop( const Rectangle& rRectPixel ) { const Size aSizePix( GetSizePixel() ); Rectangle aRect( rRectPixel ); - sal_Bool bRet = sal_False; + bool bRet = false; aRect.Intersection( Rectangle( Point(), aSizePix ) ); @@ -816,7 +816,7 @@ sal_Bool Bitmap::Crop( const Rectangle& rRectPixel ) pWriteAcc->SetPixel( nY, nX, pReadAcc->GetPixel( nY2, nX2 ) ); aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -829,12 +829,12 @@ sal_Bool Bitmap::Crop( const Rectangle& rRectPixel ) return bRet; }; -sal_Bool Bitmap::CopyPixel( const Rectangle& rRectDst, +bool Bitmap::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, const Bitmap* pBmpSrc ) { const Size aSizePix( GetSizePixel() ); Rectangle aRectDst( rRectDst ); - sal_Bool bRet = sal_False; + bool bRet = false; aRectDst.Intersection( Rectangle( Point(), aSizePix ) ); @@ -1006,7 +1006,7 @@ sal_Bool Bitmap::CopyPixel( const Rectangle& rRectDst, } ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } } } @@ -1015,9 +1015,9 @@ sal_Bool Bitmap::CopyPixel( const Rectangle& rRectDst, return bRet; } -sal_Bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor ) +bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( nDX || nDY ) { @@ -1061,7 +1061,7 @@ sal_Bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor ) pWriteAcc->SetPixel( nY, nX, aColor ); aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -1078,7 +1078,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const { Bitmap aNewBmp( GetSizePixel(), 1 ); BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pWriteAcc ) { @@ -1247,7 +1247,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const } ( (Bitmap*) this )->ReleaseAccess( pReadAcc ); - bRet = sal_True; + bRet = true; } aNewBmp.ReleaseAccess( pWriteAcc ); @@ -1369,11 +1369,11 @@ Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) const return aRegion; } -sal_Bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor ) +bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor ) { BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess(); BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pMaskAcc && pAcc ) { @@ -1434,7 +1434,7 @@ sal_Bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor ) if( pMaskAcc->GetPixel( nY, nX ) == aMaskWhite ) pAcc->SetPixel( nY, nX, aReplace ); - bRet = sal_True; + bRet = true; } ( (Bitmap&) rMask ).ReleaseAccess( pMaskAcc ); @@ -1443,13 +1443,13 @@ sal_Bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor ) return bRet; } -sal_Bool Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor ) +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(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pAcc && pAlphaAcc && pNewAcc ) { @@ -1466,7 +1466,7 @@ sal_Bool Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor ) } } - bRet = sal_True; + bRet = true; } ReleaseAccess( pAcc ); @@ -1487,7 +1487,7 @@ sal_Bool Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor ) return bRet; } -sal_Bool Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol ) +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 @@ -1495,7 +1495,7 @@ sal_Bool Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, Convert( BMP_CONVERSION_4BIT_COLORS ); BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pAcc ) { @@ -1542,13 +1542,13 @@ sal_Bool Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, } ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors, +bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, sal_uLong* _pTols ) { // Bitmaps with 1 bit color depth can cause problems @@ -1557,7 +1557,7 @@ sal_Bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColor Convert( BMP_CONVERSION_4BIT_COLORS ); BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pAcc ) { @@ -1649,7 +1649,7 @@ sal_Bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColor delete[] pMinB; delete[] pMaxB; ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } return bRet; @@ -1672,11 +1672,11 @@ Bitmap Bitmap::CreateDisplayBitmap( OutputDevice* pDisplay ) return aDispBmp; } -sal_Bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine ) +bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine ) { BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess(); BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pMaskAcc && pAcc ) { @@ -1800,7 +1800,7 @@ sal_Bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine ) break; } - bRet = sal_True; + bRet = true; } ( (Bitmap&) rMask ).ReleaseAccess( pMaskAcc ); @@ -1811,7 +1811,7 @@ sal_Bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine ) // TODO: Have a look at OutputDevice::ImplDrawAlpha() for some // optimizations. Might even consolidate the code here and there. -sal_Bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor ) +bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor ) { // Convert to a truecolor bitmap, if we're a paletted one. There's // room for tradeoff decision here, maybe later for an overload (or a flag) @@ -1820,7 +1820,7 @@ sal_Bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor ) BitmapReadAccess* pAlphaAcc = const_cast<AlphaMask&>(rAlpha).AcquireReadAccess(); BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pAlphaAcc && pAcc ) { @@ -1833,7 +1833,7 @@ sal_Bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor ) pAcc->GetPixel( nY, nX ).Merge( rBackgroundColor, 255 - pAlphaAcc->GetPixelIndex( nY, nX ) ) ); - bRet = sal_True; + bRet = true; } const_cast<AlphaMask&>(rAlpha).ReleaseAccess( pAlphaAcc ); @@ -1842,7 +1842,7 @@ sal_Bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor ) return bRet; } -sal_Bool Bitmap::MakeMono( sal_uInt8 cThreshold ) +bool Bitmap::MakeMono( sal_uInt8 cThreshold ) { return ImplMakeMono( cThreshold ); } diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 87333ee4f4a6..73029540a90b 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -236,10 +236,10 @@ void ImplCreateDitherMatrix( sal_uInt8 (*pDitherMatrix)[16][16] ) (*pDitherMatrix)[i][j] = (sal_uInt8) ( fVal * pMtx[i][j] ); } -sal_Bool Bitmap::Convert( BmpConversion eConversion ) +bool Bitmap::Convert( BmpConversion eConversion ) { const sal_uInt16 nBitCount = GetBitCount(); - sal_Bool bRet = sal_False; + bool bRet = false; switch( eConversion ) { @@ -262,7 +262,7 @@ sal_Bool Bitmap::Convert( BmpConversion eConversion ) else if( nBitCount > 4 ) bRet = ImplConvertDown( 4, NULL ); else - bRet = sal_True; + bRet = true; } break; @@ -288,7 +288,7 @@ sal_Bool Bitmap::Convert( BmpConversion eConversion ) else if( nBitCount > 8 ) bRet = ImplConvertDown( 8 ); else - bRet = sal_True; + bRet = true; } break; @@ -308,7 +308,7 @@ sal_Bool Bitmap::Convert( BmpConversion eConversion ) if( nBitCount < 24 ) bRet = ImplConvertUp( 24, NULL ); else - bRet = sal_True; + bRet = true; } break; @@ -324,10 +324,10 @@ sal_Bool Bitmap::Convert( BmpConversion eConversion ) return bRet; } -sal_Bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold ) +bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold ) { BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -376,7 +376,7 @@ sal_Bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold ) } aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -396,10 +396,10 @@ sal_Bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold ) return bRet; } -sal_Bool Bitmap::ImplMakeMonoDither() +bool Bitmap::ImplMakeMonoDither() { BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -451,7 +451,7 @@ sal_Bool Bitmap::ImplMakeMonoDither() } aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -471,12 +471,12 @@ sal_Bool Bitmap::ImplMakeMonoDither() return bRet; } -sal_Bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys ) +bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys ) { DBG_ASSERT( nGreys == 16 || nGreys == 256, "Only 16 or 256 greyscales are supported!" ); BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -557,7 +557,7 @@ sal_Bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys ) } aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -576,19 +576,19 @@ sal_Bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys ) else { ReleaseAccess( pReadAcc ); - bRet = sal_True; + bRet = true; } } return bRet; } -sal_Bool Bitmap::ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor ) +bool Bitmap::ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor ) { DBG_ASSERT( nBitCount > GetBitCount(), "New BitCount must be greater!" ); BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -637,7 +637,7 @@ sal_Bool Bitmap::ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor ) } aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -657,12 +657,12 @@ sal_Bool Bitmap::ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor ) return bRet; } -sal_Bool Bitmap::ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor ) +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(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -761,7 +761,7 @@ sal_Bool Bitmap::ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor ) delete[] pErrQuad2; aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -781,11 +781,11 @@ sal_Bool Bitmap::ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor ) return bRet; } -sal_Bool Bitmap::ImplConvertGhosted() +bool Bitmap::ImplConvertGhosted() { Bitmap aNewBmp; BitmapReadAccess* pR = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pR ) { @@ -808,7 +808,7 @@ sal_Bool Bitmap::ImplConvertGhosted() { pW->CopyBuffer( *pR ); aNewBmp.ReleaseAccess( pW ); - bRet = sal_True; + bRet = true; } } else @@ -834,7 +834,7 @@ sal_Bool Bitmap::ImplConvertGhosted() } aNewBmp.ReleaseAccess( pW ); - bRet = sal_True; + bRet = true; } } @@ -855,7 +855,7 @@ sal_Bool Bitmap::ImplConvertGhosted() return bRet; } -sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag ) +bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag ) { bool bRetval(false); @@ -948,7 +948,7 @@ sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 // ------------------------------------------------------------------------ -sal_Bool Bitmap::Scale( const Size& rNewSize, sal_uInt32 nScaleFlag ) +bool Bitmap::Scale( const Size& rNewSize, sal_uInt32 nScaleFlag ) { const Size aSize( GetSizePixel() ); bool bRet; @@ -1024,12 +1024,12 @@ void Bitmap::ImplAdaptBitCount(Bitmap& rNew) const } } -sal_Bool Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY ) +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 ); - sal_Bool bRet = sal_False; + bool bRet = false; if( nNewWidth && nNewHeight ) { @@ -1076,7 +1076,7 @@ sal_Bool Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY ) nActY++; } - bRet = sal_True; + bRet = true; aNewBmp.ReleaseAccess( pWriteAcc ); } @@ -1093,12 +1093,12 @@ sal_Bool Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY ) return bRet; } -sal_Bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY ) +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 ); - sal_Bool bRet = sal_False; + bool bRet = false; if( ( nNewWidth > 1L ) && ( nNewHeight > 1L ) ) { @@ -1185,7 +1185,7 @@ sal_Bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rSca delete[] pLutInt; delete[] pLutFrac; - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -1193,7 +1193,7 @@ sal_Bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rSca if( bRet ) { - bRet = sal_False; + bRet = false; const Bitmap aOriginal(*this); *this = aNewBmp; aNewBmp = Bitmap( Size( nNewWidth, nNewHeight ), 24 ); @@ -1257,7 +1257,7 @@ sal_Bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rSca delete[] pLutInt; delete[] pLutFrac; - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -1281,7 +1281,7 @@ sal_Bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rSca // #i121233# Added BMP_SCALE_SUPER from symphony code -sal_Bool Bitmap::ImplScaleSuper( +bool Bitmap::ImplScaleSuper( const double& rScaleX, const double& rScaleY ) { @@ -2140,7 +2140,7 @@ namespace } } - sal_Bool ImplScaleConvolutionHor( + bool ImplScaleConvolutionHor( Bitmap& rSource, Bitmap& rTarget, const double& rScaleX, @@ -2333,7 +2333,7 @@ namespace // #i121233# Added BMP_SCALE_LANCZOS, BMP_SCALE_BICUBIC, BMP_SCALE_BILINEAR and // BMP_SCALE_BOX derived from the original commit from Tomas Vajngerl (see // bugzilla task for deitails) Thanks! -sal_Bool Bitmap::ImplScaleConvolution( +bool Bitmap::ImplScaleConvolution( const double& rScaleX, const double& rScaleY, const Kernel& aKernel) @@ -2444,14 +2444,14 @@ sal_Bool Bitmap::ImplScaleConvolution( // ------------------------------------------------------------------------ -sal_Bool Bitmap::Dither( sal_uLong nDitherFlags ) +bool Bitmap::Dither( sal_uLong nDitherFlags ) { - sal_Bool bRet = sal_False; + bool bRet = false; const Size aSizePix( GetSizePixel() ); if( aSizePix.Width() == 1 || aSizePix.Height() == 1 ) - bRet = sal_True; + bRet = true; else if( nDitherFlags & BMP_DITHER_MATRIX ) bRet = ImplDitherMatrix(); else if( nDitherFlags & BMP_DITHER_FLOYD ) @@ -2462,12 +2462,12 @@ sal_Bool Bitmap::Dither( sal_uLong nDitherFlags ) return bRet; } -sal_Bool Bitmap::ImplDitherMatrix() +bool Bitmap::ImplDitherMatrix() { BitmapReadAccess* pReadAcc = AcquireReadAccess(); Bitmap aNewBmp( GetSizePixel(), 8 ); BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc && pWriteAcc ) { @@ -2510,7 +2510,7 @@ sal_Bool Bitmap::ImplDitherMatrix() } } - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -2530,10 +2530,10 @@ sal_Bool Bitmap::ImplDitherMatrix() return bRet; } -sal_Bool Bitmap::ImplDitherFloyd() +bool Bitmap::ImplDitherFloyd() { const Size aSize( GetSizePixel() ); - sal_Bool bRet = sal_False; + bool bRet = false; if( ( aSize.Width() > 3 ) && ( aSize.Height() > 2 ) ) { @@ -2559,7 +2559,7 @@ sal_Bool Bitmap::ImplDitherFloyd() long* p1T = p1; long* p2T = p2; long* pTmp; - sal_Bool bPal = pReadAcc->HasPalette(); + bool bPal = pReadAcc->HasPalette(); pTmp = p2T; @@ -2648,7 +2648,7 @@ sal_Bool Bitmap::ImplDitherFloyd() delete[] p1; delete[] p2; - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -2669,12 +2669,12 @@ sal_Bool Bitmap::ImplDitherFloyd() return bRet; } -sal_Bool Bitmap::ImplDitherFloyd16() +bool Bitmap::ImplDitherFloyd16() { BitmapReadAccess* pReadAcc = AcquireReadAccess(); Bitmap aNewBmp( GetSizePixel(), 24 ); BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc && pWriteAcc ) { @@ -2738,7 +2738,7 @@ sal_Bool Bitmap::ImplDitherFloyd16() // Destroy row buffer delete[] pErrQuad1; delete[] pErrQuad2; - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -2758,12 +2758,12 @@ sal_Bool Bitmap::ImplDitherFloyd16() return bRet; } -sal_Bool Bitmap::ReduceColors( sal_uInt16 nColorCount, BmpReduce eReduce ) +bool Bitmap::ReduceColors( sal_uInt16 nColorCount, BmpReduce eReduce ) { - sal_Bool bRet; + bool bRet; if( GetColorCount() <= (sal_uLong) nColorCount ) - bRet = sal_True; + bRet = true; else if( nColorCount ) { if( BMP_REDUCE_SIMPLE == eReduce ) @@ -2774,18 +2774,18 @@ sal_Bool Bitmap::ReduceColors( sal_uInt16 nColorCount, BmpReduce eReduce ) bRet = ImplReduceMedian( nColorCount ); } else - bRet = sal_False; + bRet = false; return bRet; } -sal_Bool Bitmap::ImplReduceSimple( sal_uInt16 nColorCount ) +bool Bitmap::ImplReduceSimple( sal_uInt16 nColorCount ) { Bitmap aNewBmp; BitmapReadAccess* pRAcc = AcquireReadAccess(); const sal_uInt16 nColCount = std::min( nColorCount, (sal_uInt16) 256 ); sal_uInt16 nBitCount; - sal_Bool bRet = sal_False; + bool bRet = false; if( nColCount <= 2 ) nBitCount = 1; @@ -2822,7 +2822,7 @@ sal_Bool Bitmap::ImplReduceSimple( sal_uInt16 nColorCount ) } aNewBmp.ReleaseAccess( pWAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pRAcc ); @@ -2861,11 +2861,11 @@ extern "C" int SAL_CALL ImplPopularCmpFnc( const void* p1, const void* p2 ) return nRet; } -sal_Bool Bitmap::ImplReducePopular( sal_uInt16 nColCount ) +bool Bitmap::ImplReducePopular( sal_uInt16 nColCount ) { BitmapReadAccess* pRAcc = AcquireReadAccess(); sal_uInt16 nBitCount; - sal_Bool bRet = sal_False; + bool bRet = false; if( nColCount > 256 ) nColCount = 256; @@ -2986,7 +2986,7 @@ sal_Bool Bitmap::ImplReducePopular( sal_uInt16 nColCount ) delete[] pIndexMap; aNewBmp.ReleaseAccess( pWAcc ); - bRet = sal_True; + bRet = true; } delete[] pCountTable; @@ -3006,11 +3006,11 @@ sal_Bool Bitmap::ImplReducePopular( sal_uInt16 nColCount ) return bRet; } -sal_Bool Bitmap::ImplReduceMedian( sal_uInt16 nColCount ) +bool Bitmap::ImplReduceMedian( sal_uInt16 nColCount ) { BitmapReadAccess* pRAcc = AcquireReadAccess(); sal_uInt16 nBitCount; - sal_Bool bRet = sal_False; + bool bRet = false; if( nColCount < 17 ) nBitCount = 4; @@ -3076,7 +3076,7 @@ sal_Bool Bitmap::ImplReduceMedian( sal_uInt16 nColCount ) rtl_freeMemory( pColBuf ); aNewBmp.ReleaseAccess( pWAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pRAcc ); @@ -3226,28 +3226,28 @@ void Bitmap::ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal, } } -sal_Bool Bitmap::Vectorize( PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress ) +bool Bitmap::Vectorize( PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress ) { return ImplVectorizer().ImplVectorize( *this, rPolyPoly, nFlags, pProgress ); } -sal_Bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress ) +bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress ) { return ImplVectorizer().ImplVectorize( *this, rMtf, cReduce, nFlags, pProgress ); } -sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, +bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, - double fGamma, sal_Bool bInvert ) + double fGamma, bool bInvert ) { - sal_Bool bRet = sal_False; + bool bRet = false; // nothing to do => return quickly if( !nLuminancePercent && !nContrastPercent && !nChannelRPercent && !nChannelGPercent && !nChannelBPercent && ( fGamma == 1.0 ) && !bInvert ) { - bRet = sal_True; + bRet = true; } else { @@ -3365,7 +3365,7 @@ sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, delete[] cMapG; delete[] cMapB; ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } } diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx index dbda9e68d4e8..509f7ead46ef 100644 --- a/vcl/source/gdi/bitmap4.cxx +++ b/vcl/source/gdi/bitmap4.cxx @@ -38,9 +38,9 @@ static inline sal_uInt8 lcl_getDuotoneColorComponent( sal_uInt8 base, sal_uInt16 return (sal_uInt8) (color1+color2); } -sal_Bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) +bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) { - sal_Bool bRet = sal_False; + bool bRet = false; switch( eFilter ) { @@ -58,7 +58,7 @@ sal_Bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, } else { - bRet = sal_False; + bRet = false; } } break; @@ -110,11 +110,11 @@ sal_Bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, return bRet; } -sal_Bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor, +bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor, const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) { BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -236,7 +236,7 @@ sal_Bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor, aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -256,10 +256,10 @@ sal_Bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor, return bRet; } -sal_Bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) +bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) { BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -365,7 +365,7 @@ sal_Bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -385,13 +385,13 @@ sal_Bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const return bRet; } -sal_Bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) +bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) { - sal_Bool bRet = ImplMakeGreyscales( 256 ); + bool bRet = ImplMakeGreyscales( 256 ); if( bRet ) { - bRet = sal_False; + bRet = false; BitmapReadAccess* pReadAcc = AcquireReadAccess(); @@ -490,7 +490,7 @@ sal_Bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Li delete[] pHMap; delete[] pVMap; aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -511,13 +511,13 @@ sal_Bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Li return bRet; } -sal_Bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) +bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) { - sal_Bool bRet = ImplMakeGreyscales( 256 ); + bool bRet = ImplMakeGreyscales( 256 ); if( bRet ) { - bRet = sal_False; + bRet = false; BitmapReadAccess* pReadAcc = AcquireReadAccess(); @@ -602,7 +602,7 @@ sal_Bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* delete[] pHMap; delete[] pVMap; aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -623,9 +623,9 @@ sal_Bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* return bRet; } -sal_Bool Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) +bool Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) { - sal_Bool bRet = sal_False; + bool bRet = false; BitmapWriteAccess* pWriteAcc = AcquireWriteAccess(); if( pWriteAcc ) @@ -665,16 +665,16 @@ sal_Bool Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* / } ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) +bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) { BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -736,7 +736,7 @@ sal_Bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pP } aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -756,13 +756,13 @@ sal_Bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pP return bRet; } -sal_Bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) +bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) { sal_uLong nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ? pFilterParam->maMosaicTileSize.mnTileWidth : 4; sal_uLong nTileHeight = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ? pFilterParam->maMosaicTileSize.mnTileHeight : 4; - sal_Bool bRet = sal_False; + bool bRet = false; if( !nTileWidth ) nTileWidth = 1; @@ -884,7 +884,7 @@ sal_Bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*p } while( nY1 < nHeight ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -908,7 +908,7 @@ sal_Bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*p } } else - bRet = sal_True; + bRet = true; return bRet; } @@ -933,13 +933,13 @@ extern "C" int SAL_CALL ImplPopArtCmpFnc( const void* p1, const void* p2 ) return nRet; } -sal_Bool Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) +bool Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) { - sal_Bool bRet = ( GetBitCount() > 8 ) ? Convert( BMP_CONVERSION_8BIT_COLORS ) : sal_True; + bool bRet = ( GetBitCount() > 8 ) ? Convert( BMP_CONVERSION_8BIT_COLORS ) : sal_True; if( bRet ) { - bRet = sal_False; + bRet = false; BitmapWriteAccess* pWriteAcc = AcquireWriteAccess(); @@ -986,7 +986,7 @@ sal_Bool Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* // cleanup delete[] pPopArtTable; ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } } diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index 7a3320c767c8..a8b287724478 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -48,7 +48,7 @@ using namespace ::com::sun::star; BitmapEx::BitmapEx() : eTransparent( TRANSPARENT_NONE ), - bAlpha ( sal_False ) + bAlpha ( false ) { } @@ -64,7 +64,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx ) : BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) : eTransparent( TRANSPARENT_NONE ), - bAlpha ( sal_False ) + bAlpha ( false ) { if( rBitmapEx.IsEmpty() ) return; @@ -73,7 +73,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) : aBitmapSize = aSize; if( rBitmapEx.IsAlpha() ) { - bAlpha = sal_True; + bAlpha = true; aMask = AlphaMask( aSize ).ImplGetBitmap(); } else if( rBitmapEx.IsTransparent() ) @@ -86,7 +86,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) : BitmapEx::BitmapEx( const ResId& rResId ) : eTransparent( TRANSPARENT_NONE ), - bAlpha ( sal_False ) + bAlpha ( false ) { static ImplImageTreeSingletonRef aImageTree; ResMgr* pResMgr = NULL; @@ -113,7 +113,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp ) : aBitmap ( rBmp ), aBitmapSize ( aBitmap.GetSizePixel() ), eTransparent( TRANSPARENT_NONE ), - bAlpha ( sal_False ) + bAlpha ( false ) { } @@ -122,7 +122,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Bitmap& rMask ) : aMask ( rMask ), aBitmapSize ( aBitmap.GetSizePixel() ), eTransparent ( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ), - bAlpha ( sal_False ) + bAlpha ( false ) { if(!!aBitmap && !!aMask && aBitmap.GetSizePixel() != aMask.GetSizePixel()) { @@ -163,7 +163,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Color& rTransparentColor ) : aBitmapSize ( aBitmap.GetSizePixel() ), aTransparentColor ( rTransparentColor ), eTransparent ( TRANSPARENT_BITMAP ), - bAlpha ( sal_False ) + bAlpha ( false ) { aMask = aBitmap.CreateMask( aTransparentColor ); @@ -190,19 +190,19 @@ BitmapEx& BitmapEx::operator=( const BitmapEx& rBitmapEx ) return *this; } -sal_Bool BitmapEx::operator==( const BitmapEx& rBitmapEx ) const +bool BitmapEx::operator==( const BitmapEx& rBitmapEx ) const { if( eTransparent != rBitmapEx.eTransparent ) - return sal_False; + return false; if( aBitmap != rBitmapEx.aBitmap ) - return sal_False; + return false; if( aBitmapSize != rBitmapEx.aBitmapSize ) - return sal_False; + return false; if( eTransparent == TRANSPARENT_NONE ) - return sal_True; + return true; if( eTransparent == TRANSPARENT_COLOR ) return aTransparentColor == rBitmapEx.aTransparentColor; @@ -210,7 +210,7 @@ sal_Bool BitmapEx::operator==( const BitmapEx& rBitmapEx ) const return( ( aMask == rBitmapEx.aMask ) && ( bAlpha == rBitmapEx.bAlpha ) ); } -sal_Bool BitmapEx::IsEqual( const BitmapEx& rBmpEx ) const +bool BitmapEx::IsEqual( const BitmapEx& rBmpEx ) const { return( rBmpEx.eTransparent == eTransparent && rBmpEx.bAlpha == bAlpha && @@ -218,7 +218,7 @@ sal_Bool BitmapEx::IsEqual( const BitmapEx& rBmpEx ) const rBmpEx.aMask.IsEqual( aMask ) ); } -sal_Bool BitmapEx::IsEmpty() const +bool BitmapEx::IsEmpty() const { return( aBitmap.IsEmpty() && aMask.IsEmpty() ); } @@ -228,7 +228,7 @@ void BitmapEx::SetEmpty() aBitmap.SetEmpty(); aMask.SetEmpty(); eTransparent = TRANSPARENT_NONE; - bAlpha = sal_False; + bAlpha = false; } void BitmapEx::Clear() @@ -236,12 +236,12 @@ void BitmapEx::Clear() SetEmpty(); } -sal_Bool BitmapEx::IsTransparent() const +bool BitmapEx::IsTransparent() const { return( eTransparent != TRANSPARENT_NONE ); } -sal_Bool BitmapEx::IsAlpha() const +bool BitmapEx::IsAlpha() const { return( IsTransparent() && bAlpha ); } @@ -332,9 +332,9 @@ void BitmapEx::SetSizePixel( const Size& rNewSize, sal_uInt32 nScaleFlag ) } } -sal_Bool BitmapEx::Invert() +bool BitmapEx::Invert() { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -347,9 +347,9 @@ sal_Bool BitmapEx::Invert() return bRet; } -sal_Bool BitmapEx::Mirror( sal_uLong nMirrorFlags ) +bool BitmapEx::Mirror( sal_uLong nMirrorFlags ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -364,9 +364,9 @@ sal_Bool BitmapEx::Mirror( sal_uLong nMirrorFlags ) // ------------------------------------------------------------------ -sal_Bool BitmapEx::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag ) +bool BitmapEx::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -388,9 +388,9 @@ sal_Bool BitmapEx::Scale( const double& rScaleX, const double& rScaleY, sal_uInt // ------------------------------------------------------------------------ -sal_Bool BitmapEx::Scale( const Size& rNewSize, sal_uInt32 nScaleFlag ) +bool BitmapEx::Scale( const Size& rNewSize, sal_uInt32 nScaleFlag ) { - sal_Bool bRet; + bool bRet; if( aBitmapSize.Width() && aBitmapSize.Height() && ( rNewSize.Width() != aBitmapSize.Width() || @@ -401,14 +401,14 @@ sal_Bool BitmapEx::Scale( const Size& rNewSize, sal_uInt32 nScaleFlag ) nScaleFlag ); } else - bRet = sal_True; + bRet = true; return bRet; } -sal_Bool BitmapEx::Rotate( long nAngle10, const Color& rFillColor ) +bool BitmapEx::Rotate( long nAngle10, const Color& rFillColor ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -450,9 +450,9 @@ sal_Bool BitmapEx::Rotate( long nAngle10, const Color& rFillColor ) return bRet; } -sal_Bool BitmapEx::Crop( const Rectangle& rRectPixel ) +bool BitmapEx::Crop( const Rectangle& rRectPixel ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -470,19 +470,19 @@ sal_Bool BitmapEx::Crop( const Rectangle& rRectPixel ) return bRet; } -sal_Bool BitmapEx::Convert( BmpConversion eConversion ) +bool BitmapEx::Convert( BmpConversion eConversion ) { return( !!aBitmap ? aBitmap.Convert( eConversion ) : sal_False ); } -sal_Bool BitmapEx::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce ) +bool BitmapEx::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce ) { return( !!aBitmap ? aBitmap.ReduceColors( nNewColorCount, eReduce ) : sal_False ); } -sal_Bool BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor, sal_Bool bExpandTransparent ) +bool BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor, bool bExpandTransparent ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -503,10 +503,10 @@ sal_Bool BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor return bRet; } -sal_Bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, +bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, const BitmapEx* pBmpExSrc ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !pBmpExSrc || pBmpExSrc->IsEmpty() ) { @@ -537,7 +537,7 @@ sal_Bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectS aMask = pAlpha->ImplGetBitmap(); delete pAlpha; - bAlpha = sal_True; + bAlpha = true; aMask.CopyPixel( rRectDst, rRectSrc, &pBmpExSrc->aMask ); } else @@ -548,7 +548,7 @@ sal_Bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectS aMask = pAlpha->ImplGetBitmap(); delete pAlpha; eTransparent = TRANSPARENT_BITMAP; - bAlpha = sal_True; + bAlpha = true; aMask.CopyPixel( rRectDst, rRectSrc, &pBmpExSrc->aMask ); } } @@ -590,9 +590,9 @@ sal_Bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectS return bRet; } -sal_Bool BitmapEx::Erase( const Color& rFillColor ) +bool BitmapEx::Erase( const Color& rFillColor ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -617,31 +617,31 @@ sal_Bool BitmapEx::Erase( const Color& rFillColor ) return bRet; } -sal_Bool BitmapEx::Dither( sal_uLong nDitherFlags ) +bool BitmapEx::Dither( sal_uLong nDitherFlags ) { return( !!aBitmap ? aBitmap.Dither( nDitherFlags ) : sal_False ); } -sal_Bool BitmapEx::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol ) +bool BitmapEx::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol ) { return( !!aBitmap ? aBitmap.Replace( rSearchColor, rReplaceColor, nTol ) : sal_False ); } -sal_Bool BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, const sal_uLong* pTols ) +bool BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, const sal_uLong* pTols ) { return( !!aBitmap ? aBitmap.Replace( pSearchColors, pReplaceColors, nColorCount, (sal_uLong*) pTols ) : sal_False ); } -sal_Bool BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent, +bool BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent, short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, - double fGamma, sal_Bool bInvert ) + double fGamma, bool bInvert ) { return( !!aBitmap ? aBitmap.Adjust( nLuminancePercent, nContrastPercent, nChannelRPercent, nChannelGPercent, nChannelBPercent, fGamma, bInvert ) : sal_False ); } -sal_Bool BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) +bool BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) { return( !!aBitmap ? aBitmap.Filter( eFilter, pFilterParam, pProgress ) : sal_False ); } diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx index 8e3836596e32..92160da2b990 100644 --- a/vcl/source/gdi/bmpacc.cxx +++ b/vcl/source/gdi/bmpacc.cxx @@ -26,7 +26,7 @@ #include <string.h> -BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, sal_Bool bModify ) : +BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, bool bModify ) : mpBuffer ( NULL ), mpScanBuf ( NULL ), mFncGetPixel ( NULL ), @@ -41,7 +41,7 @@ BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap ) : mpScanBuf ( NULL ), mFncGetPixel ( NULL ), mFncSetPixel ( NULL ), - mbModify ( sal_False ) + mbModify ( false ) { ImplCreate( rBitmap ); } @@ -133,9 +133,9 @@ void BitmapReadAccess::ImplDestroy() } } -sal_Bool BitmapReadAccess::ImplSetAccessPointers( sal_uLong nFormat ) +bool BitmapReadAccess::ImplSetAccessPointers( sal_uLong nFormat ) { - sal_Bool bRet = sal_True; + bool bRet = true; switch( nFormat ) { @@ -157,7 +157,7 @@ sal_Bool BitmapReadAccess::ImplSetAccessPointers( sal_uLong nFormat ) CASE_FORMAT( _32BIT_TC_MASK ) default: - bRet = sal_False; + bRet = false; break; } @@ -385,7 +385,7 @@ BitmapColor BitmapReadAccess::GetColorWithFallback( double fY, double fX, const } BitmapWriteAccess::BitmapWriteAccess( Bitmap& rBitmap ) : - BitmapReadAccess( rBitmap, sal_True ), + BitmapReadAccess( rBitmap, true ), mpLineColor ( NULL ), mpFillColor ( NULL ) { diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index 3df540f95d67..d547cc19eaaa 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -249,7 +249,7 @@ void ImplWriteFont( SvStream& rOStm, const Font& rFont, rOStm.WriteInt16( (sal_Int16) nWeight ); rOStm.WriteInt16( (sal_Int16) rFont.GetUnderline() ); rOStm.WriteInt16( (sal_Int16) rFont.GetStrikeout() ); - rOStm.WriteUChar( (sal_Bool) ( rFont.GetItalic() != ITALIC_NONE ) ); + rOStm.WriteUChar( rFont.GetItalic() != ITALIC_NONE ); rOStm.WriteUChar( rFont.IsOutline() ); rOStm.WriteUChar( rFont.IsShadow() ); rOStm.WriteUChar( rFont.IsTransparent() ); @@ -262,7 +262,7 @@ void ImplWriteRasterOpAction( SvStream& rOStm, sal_Int16 nRasterOp ) rOStm.WriteInt16( (sal_Int16) GDI_RASTEROP_ACTION ).WriteInt32( (sal_Int32) 6 ).WriteInt16( nRasterOp ); } -sal_Bool ImplWriteUnicodeComment( SvStream& rOStm, const OUString& rString ) +bool ImplWriteUnicodeComment( SvStream& rOStm, const OUString& rString ) { sal_Int32 nStringLen = rString.getLength(); if ( nStringLen ) @@ -662,7 +662,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, sal_False ) ); + rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) ); rMtf.AddAction( new MetaPolygonAction( aPoly ) ); rMtf.AddAction( new MetaPopAction() ); rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) ); @@ -683,7 +683,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, sal_False ) ); + rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) ); rMtf.AddAction( new MetaPolygonAction( aPoly ) ); rMtf.AddAction( new MetaPopAction() ); rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) ); @@ -704,7 +704,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, sal_False ) ); + rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) ); rMtf.AddAction( new MetaPolygonAction( aPoly ) ); rMtf.AddAction( new MetaPopAction() ); rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) ); @@ -744,7 +744,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) if( bFatLine ) { rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) ); - rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) ); + rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) ); rMtf.AddAction( new MetaPolygonAction( aActionPoly ) ); rMtf.AddAction( new MetaPopAction() ); rMtf.AddAction( new MetaPolyLineAction( aActionPoly, aLineInfo ) ); @@ -766,7 +766,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) if( bFatLine ) { rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) ); - rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) ); + rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) ); rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) ); rMtf.AddAction( new MetaPopAction() ); @@ -788,7 +788,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) sal_Int32 nWidth, nHeight; sal_Int16 nCharSet, nFamily, nPitch, nAlign, nWeight, nUnderline, nStrikeout; sal_Int16 nCharOrient, nLineOrient; - sal_Bool bItalic, bOutline, bShadow, bTransparent; + bool bItalic, bOutline, bShadow, bTransparent; ImplReadColor( rIStm, aActionColor ); aFont.SetColor( aActionColor ); ImplReadColor( rIStm, aActionColor ); aFont.SetFillColor( aActionColor ); @@ -797,7 +797,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) rIStm.ReadInt32( nWidth ).ReadInt32( nHeight ); rIStm.ReadInt16( nCharOrient ).ReadInt16( nLineOrient ); rIStm.ReadInt16( nCharSet ).ReadInt16( nFamily ).ReadInt16( nPitch ).ReadInt16( nAlign ).ReadInt16( nWeight ).ReadInt16( nUnderline ).ReadInt16( nStrikeout ); - rIStm.ReadUChar( bItalic ).ReadUChar( bOutline ).ReadUChar( bShadow ).ReadUChar( bTransparent ); + rIStm.ReadCharAsBool( bItalic ).ReadCharAsBool( bOutline ).ReadCharAsBool( bShadow ).ReadCharAsBool( bTransparent ); aFont.SetSize( Size( nWidth, nHeight ) ); aFont.SetCharSet( (rtl_TextEncoding) nCharSet ); @@ -1011,7 +1011,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) Region aRegion; sal_Int16 nRegType; sal_Int16 bIntersect; - sal_Bool bClip = sal_False; + bool bClip = false; rIStm.ReadInt16( nRegType ).ReadInt16( bIntersect ); ImplReadRect( rIStm, aRect ); @@ -1027,7 +1027,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) ImplReadRect( rIStm, aRegRect ); aRegion = Region( aRegRect ); - bClip = sal_True; + bClip = true; } break; @@ -1035,7 +1035,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) { ImplReadPoly( rIStm, aActionPoly ); aRegion = Region( aActionPoly ); - bClip = sal_True; + bClip = true; } break; @@ -1053,7 +1053,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) } aRegion = Region( aPolyPoly ); - bClip = sal_True; + bClip = true; } break; } @@ -1227,11 +1227,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case( GDI_REFPOINT_COMMENT ): { Point aRefPoint; - sal_Bool bSet; + bool bSet; sal_Int32 nFollowingActionCount; ReadPair( rIStm, aRefPoint ); - rIStm.ReadUChar( bSet ).ReadInt32( nFollowingActionCount ); + rIStm.ReadCharAsBool( bSet ).ReadInt32( nFollowingActionCount ); ImplSkipActions( rIStm, nFollowingActionCount ); rMtf.AddAction( new MetaRefPointAction( aRefPoint, bSet ) ); @@ -1248,11 +1248,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case( GDI_TEXTLINECOLOR_COMMENT ): { Color aColor; - sal_Bool bSet; + bool bSet; sal_Int32 nFollowingActionCount; ReadColor( rIStm, aColor ); - rIStm.ReadUChar( bSet ).ReadInt32( nFollowingActionCount ); + rIStm.ReadCharAsBool( bSet ).ReadInt32( nFollowingActionCount ); ImplSkipActions( rIStm, nFollowingActionCount ); rMtf.AddAction( new MetaTextLineColorAction( aColor, bSet ) ); @@ -1354,7 +1354,7 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf ) const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt(); rtl_TextEncoding eActualCharSet = osl_getThreadTextEncoding(); const Size aPrefSize( rMtf.GetPrefSize() ); - sal_Bool bRop_0_1 = sal_False; + bool bRop_0_1 = false; VirtualDevice aSaveVDev; Color aLineCol( COL_BLACK ); ::std::stack< Color* > aLineColStack; @@ -1390,7 +1390,7 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf ) } sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, - VirtualDevice& rSaveVDev, sal_Bool& rRop_0_1, + VirtualDevice& rSaveVDev, bool& rRop_0_1, Color& rLineCol, ::std::stack< Color* >& rLineColStack, rtl_TextEncoding& rActualCharSet ) { @@ -2108,7 +2108,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { ImplWritePopAction( rOStm ); rSaveVDev.Pop(); - rRop_0_1 = sal_False; + rRop_0_1 = false; nCount++; } @@ -2140,7 +2140,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, } ImplWriteRasterOpAction( rOStm, 0 ); - rRop_0_1 = sal_True; + rRop_0_1 = true; nCount += 4; } } @@ -2314,7 +2314,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaRefPointAction* pA = (MetaRefPointAction*) pAction; const Point& rRefPoint = pA->GetRefPoint(); - const sal_Bool bSet = pA->IsSetting(); + const bool bSet = pA->IsSetting(); sal_uLong nOldPos, nNewPos; // write RefPoint comment @@ -2343,7 +2343,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaTextLineColorAction* pA = (MetaTextLineColorAction*) pAction; const Color& rColor = pA->GetColor(); - const sal_Bool bSet = pA->IsSetting(); + const bool bSet = pA->IsSetting(); sal_uLong nOldPos, nNewPos; // write RefPoint comment diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index 738e463c43ef..b20286959b9c 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -303,7 +303,7 @@ void Font::SetFillColor( const Color& rColor ) mpImplFont->mbTransparent = true; } -void Font::SetTransparent( sal_Bool bTransparent ) +void Font::SetTransparent( bool bTransparent ) { if( mpImplFont->mbTransparent != bTransparent ) @@ -427,7 +427,7 @@ void Font::SetOrientation( short nOrientation ) } } -void Font::SetVertical( sal_Bool bVertical ) +void Font::SetVertical( bool bVertical ) { if( mpImplFont->mbVertical != bVertical ) @@ -447,7 +447,7 @@ void Font::SetKerning( FontKerning nKerning ) } } -sal_Bool Font::IsKerning() const +bool Font::IsKerning() const { return (mpImplFont->mnKerning & KERNING_FONTSPECIFIC) != 0; } @@ -482,7 +482,7 @@ void Font::SetItalic( FontItalic eItalic ) } } -void Font::SetOutline( sal_Bool bOutline ) +void Font::SetOutline( bool bOutline ) { if( mpImplFont->mbOutline != bOutline ) @@ -492,7 +492,7 @@ void Font::SetOutline( sal_Bool bOutline ) } } -void Font::SetShadow( sal_Bool bShadow ) +void Font::SetShadow( bool bShadow ) { if( mpImplFont->mbShadow != bShadow ) @@ -552,7 +552,7 @@ void Font::SetEmphasisMark( FontEmphasisMark eEmphasisMark ) } } -void Font::SetWordLineMode( sal_Bool bWordLine ) +void Font::SetWordLineMode( bool bWordLine ) { if( mpImplFont->mbWordLine != bWordLine ) @@ -659,7 +659,7 @@ SvStream& ReadImpl_Font( SvStream& rIStm, Impl_Font& rImpl_Font ) { VersionCompat aCompat( rIStm, STREAM_READ ); sal_uInt16 nTmp16; - sal_Bool bTmp; + bool bTmp; sal_uInt8 nTmp8; rImpl_Font.maFamilyName = rIStm.ReadUniOrByteString(rIStm.GetStreamCharSet()); @@ -678,16 +678,16 @@ SvStream& ReadImpl_Font( SvStream& rIStm, Impl_Font& rImpl_Font ) rIStm.ReadInt16( rImpl_Font.mnOrientation ); - rIStm.ReadUChar( bTmp ); rImpl_Font.mbWordLine = bTmp; - rIStm.ReadUChar( bTmp ); rImpl_Font.mbOutline = bTmp; - rIStm.ReadUChar( bTmp ); rImpl_Font.mbShadow = bTmp; + rIStm.ReadCharAsBool( bTmp ); rImpl_Font.mbWordLine = bTmp; + rIStm.ReadCharAsBool( bTmp ); rImpl_Font.mbOutline = bTmp; + rIStm.ReadCharAsBool( bTmp ); rImpl_Font.mbShadow = bTmp; rIStm.ReadUChar( nTmp8 ); rImpl_Font.mnKerning = nTmp8; if( aCompat.GetVersion() >= 2 ) { rIStm.ReadUChar( nTmp8 ); rImpl_Font.meRelief = (FontRelief)nTmp8; rIStm.ReadUInt16( nTmp16 ); rImpl_Font.maCJKLanguageTag.reset( (LanguageType)nTmp16); - rIStm.ReadUChar( bTmp ); rImpl_Font.mbVertical = bTmp; + rIStm.ReadCharAsBool( bTmp ); rImpl_Font.mbVertical = bTmp; rIStm.ReadUInt16( nTmp16 ); rImpl_Font.meEmphasisMark = (FontEmphasisMark)nTmp16; } if( aCompat.GetVersion() >= 3 ) @@ -719,15 +719,15 @@ SvStream& WriteImpl_Font( SvStream& rOStm, const Impl_Font& rImpl_Font ) rOStm.WriteInt16( rImpl_Font.mnOrientation ); - rOStm.WriteUChar( (sal_Bool) rImpl_Font.mbWordLine ); - rOStm.WriteUChar( (sal_Bool) rImpl_Font.mbOutline ); - rOStm.WriteUChar( (sal_Bool) rImpl_Font.mbShadow ); + rOStm.WriteUChar( rImpl_Font.mbWordLine ); + rOStm.WriteUChar( rImpl_Font.mbOutline ); + rOStm.WriteUChar( rImpl_Font.mbShadow ); rOStm.WriteUChar( (sal_uInt8) rImpl_Font.mnKerning ); // new in version 2 rOStm.WriteUChar( (sal_uInt8) rImpl_Font.meRelief ); rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.maCJKLanguageTag.getLanguageType( false) ); - rOStm.WriteUChar( (sal_Bool) rImpl_Font.mbVertical ); + rOStm.WriteUChar( rImpl_Font.mbVertical ); rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.meEmphasisMark ); // new in version 3 @@ -960,7 +960,7 @@ const Color& Font::GetColor() const { return mpImplFont->maColor; } const Color& Font::GetFillColor() const { return mpImplFont->maFillColor; } -sal_Bool Font::IsTransparent() const { return mpImplFont->mbTransparent; } +bool Font::IsTransparent() const { return mpImplFont->mbTransparent; } FontAlign Font::GetAlign() const { return mpImplFont->meAlign; } @@ -1004,9 +1004,9 @@ FontItalic Font::GetItalic() const { return mpImplFont->GetItalic(); } FontFamily Font::GetFamily() const { return mpImplFont->GetFamily(); } -sal_Bool Font::IsOutline() const { return mpImplFont->mbOutline; } +bool Font::IsOutline() const { return mpImplFont->mbOutline; } -sal_Bool Font::IsShadow() const { return mpImplFont->mbShadow; } +bool Font::IsShadow() const { return mpImplFont->mbShadow; } FontRelief Font::GetRelief() const { return mpImplFont->meRelief; } @@ -1018,8 +1018,8 @@ FontStrikeout Font::GetStrikeout() const { return mpImplFont->meStrikeout; } FontEmphasisMark Font::GetEmphasisMark() const { return mpImplFont->meEmphasisMark; } -sal_Bool Font::IsWordLineMode() const { return mpImplFont->mbWordLine; } +bool Font::IsWordLineMode() const { return mpImplFont->mbWordLine; } -sal_Bool Font::IsSameInstance( const Font& rFont ) const { return (mpImplFont == rFont.mpImplFont); } +bool Font::IsSameInstance( const Font& rFont ) const { return (mpImplFont == rFont.mpImplFont); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index a8768bff42f3..8e952cea47c0 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -66,7 +66,7 @@ struct ImplBmpAdjustParam short nChannelGPercent; short nChannelBPercent; double fGamma; - sal_Bool bInvert; + bool bInvert; }; struct ImplColConvertParam @@ -115,9 +115,9 @@ GDIMetaFile::GDIMetaFile() : pPrev ( NULL ), pNext ( NULL ), pOutDev ( NULL ), - bPause ( sal_False ), - bRecord ( sal_False ), - bUseCanvas ( sal_False ) + bPause ( false ), + bRecord ( false ), + bUseCanvas ( false ) { } @@ -129,8 +129,8 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) : pPrev ( rMtf.pPrev ), pNext ( rMtf.pNext ), pOutDev ( NULL ), - bPause ( sal_False ), - bRecord ( sal_False ), + bPause ( false ), + bRecord ( false ), bUseCanvas ( rMtf.bUseCanvas ) { // Increment RefCount of MetaActions @@ -145,7 +145,7 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) : Record( rMtf.pOutDev ); if ( rMtf.bPause ) - Pause( sal_True ); + Pause( true ); } } @@ -209,8 +209,8 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf ) pPrev = rMtf.pPrev; pNext = rMtf.pNext; pOutDev = NULL; - bPause = sal_False; - bRecord = sal_False; + bPause = false; + bRecord = false; bUseCanvas = rMtf.bUseCanvas; if( rMtf.bRecord ) @@ -218,31 +218,31 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf ) Record( rMtf.pOutDev ); if( rMtf.bPause ) - Pause( sal_True ); + Pause( true ); } } return *this; } -sal_Bool GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const +bool GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const { const size_t nObjCount = aList.size(); - sal_Bool bRet = sal_False; + bool bRet = false; if( this == &rMtf ) - bRet = sal_True; + bRet = true; else if( rMtf.GetActionSize() == nObjCount && rMtf.GetPrefSize() == aPrefSize && rMtf.GetPrefMapMode() == aPrefMapMode ) { - bRet = sal_True; + bRet = true; for( size_t n = 0; n < nObjCount; n++ ) { if( aList[ n ] != rMtf.GetAction( n ) ) { - bRet = sal_False; + bRet = false; break; } } @@ -306,7 +306,7 @@ void GDIMetaFile::Record( OutputDevice* pOut ) nCurrentActionElement = aList.empty() ? 0 : (aList.size() - 1); pOutDev = pOut; - bRecord = sal_True; + bRecord = true; Linker( pOut, sal_True ); } @@ -590,7 +590,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos, } } -void GDIMetaFile::Pause( sal_Bool _bPause ) +void GDIMetaFile::Pause( bool _bPause ) { if( bRecord ) { @@ -613,12 +613,12 @@ void GDIMetaFile::Stop() { if( bRecord ) { - bRecord = sal_False; + bRecord = false; if( !bPause ) Linker( pOutDev, sal_False ); else - bPause = sal_False; + bPause = false; } } @@ -686,12 +686,12 @@ void GDIMetaFile::RemoveAction( size_t nPos ) pPrev->RemoveAction( nPos ); } -sal_Bool GDIMetaFile::Mirror( sal_uLong nMirrorFlags ) +bool GDIMetaFile::Mirror( sal_uLong nMirrorFlags ) { const Size aOldPrefSize( GetPrefSize() ); long nMoveX, nMoveY; double fScaleX, fScaleY; - sal_Bool bRet; + bool bRet; if( nMirrorFlags & MTF_MIRROR_HORZ ) nMoveX = SAL_ABS( aOldPrefSize.Width() ) - 1, fScaleX = -1.0; @@ -708,10 +708,10 @@ sal_Bool GDIMetaFile::Mirror( sal_uLong nMirrorFlags ) Scale( fScaleX, fScaleY ); Move( nMoveX, nMoveY ); SetPrefSize( aOldPrefSize ); - bRet = sal_True; + bRet = true; } else - bRet = sal_False; + bRet = false; return bRet; } @@ -722,7 +722,7 @@ void GDIMetaFile::Move( long nX, long nY ) Size aOffset( aBaseOffset ); VirtualDevice aMapVDev; - aMapVDev.EnableOutput( sal_False ); + aMapVDev.EnableOutput( false ); aMapVDev.SetMapMode( GetPrefMapMode() ); for( MetaAction* pAct = FirstAction(); pAct; pAct = NextAction() ) @@ -756,7 +756,7 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY ) Size aOffset( aBaseOffset ); VirtualDevice aMapVDev; - aMapVDev.EnableOutput( sal_False ); + aMapVDev.EnableOutput( false ); aMapVDev.SetReferenceDevice( nDPIX, nDPIY ); aMapVDev.SetMapMode( GetPrefMapMode() ); @@ -824,7 +824,7 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect ) Rectangle aCurRect( i_rClipRect ); VirtualDevice aMapVDev; - aMapVDev.EnableOutput( sal_False ); + aMapVDev.EnableOutput( false ); aMapVDev.SetMapMode( GetPrefMapMode() ); for( MetaAction* pAct = FirstAction(); pAct; pAct = NextAction() ) @@ -844,7 +844,7 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect ) Region aNewReg( aCurRect ); if( pOldAct->IsClipping() ) aNewReg.Intersect( pOldAct->GetRegion() ); - MetaClipRegionAction* pNewAct = new MetaClipRegionAction( aNewReg, sal_True ); + MetaClipRegionAction* pNewAct = new MetaClipRegionAction( aNewReg, true ); aList[ nCurrentActionElement ] = pNewAct; pOldAct->Delete(); } @@ -890,7 +890,7 @@ void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf, { // Generate comment, GradientEx and Gradient actions (within DrawGradient) VirtualDevice aVDev( rMapDev, 0 ); - aVDev.EnableOutput( sal_False ); + aVDev.EnableOutput( false ); GDIMetaFile aGradMtf; aGradMtf.Record( &aVDev ); @@ -923,7 +923,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) aPoly.Rotate( Point(), fSin, fCos ); - aMapVDev.EnableOutput( sal_False ); + aMapVDev.EnableOutput( false ); aMapVDev.SetMapMode( GetPrefMapMode() ); const Rectangle aNewBound( aPoly.GetBoundRect() ); @@ -1280,7 +1280,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction; if( pAct->IsClipping() && pAct->GetRegion().HasPolyPolygonOrB2DPolyPolygon() ) - aMtf.AddAction( new MetaClipRegionAction( Region( ImplGetRotatedPolyPolygon( pAct->GetRegion().GetAsPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ), sal_True ) ); + aMtf.AddAction( new MetaClipRegionAction( Region( ImplGetRotatedPolyPolygon( pAct->GetRegion().GetAsPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ), true ) ); else { pAction->Duplicate(); @@ -1399,7 +1399,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai GDIMetaFile aMtf; VirtualDevice aMapVDev( i_rReference ); - aMapVDev.EnableOutput( sal_False ); + aMapVDev.EnableOutput( false ); aMapVDev.SetMapMode( GetPrefMapMode() ); std::vector<Rectangle> aClipStack( 1, Rectangle() ); @@ -1939,7 +1939,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol if( !pAct->IsSetting() ) pAct->Duplicate(); else - pAct = new MetaLineColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True ); + pAct = new MetaLineColorAction( pFncCol( pAct->GetColor(), pColParam ), true ); aMtf.push_back( pAct ); } @@ -1952,7 +1952,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol if( !pAct->IsSetting() ) pAct->Duplicate(); else - pAct = new MetaFillColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True ); + pAct = new MetaFillColorAction( pFncCol( pAct->GetColor(), pColParam ), true ); aMtf.push_back( pAct ); } @@ -1972,7 +1972,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol if( !pAct->IsSetting() ) pAct->Duplicate(); else - pAct = new MetaTextFillColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True ); + pAct = new MetaTextFillColorAction( pFncCol( pAct->GetColor(), pColParam ), true ); aMtf.push_back( pAct ); } @@ -1985,7 +1985,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol if( !pAct->IsSetting() ) pAct->Duplicate(); else - pAct = new MetaTextLineColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True ); + pAct = new MetaTextLineColorAction( pFncCol( pAct->GetColor(), pColParam ), true ); aMtf.push_back( pAct ); } @@ -1998,7 +1998,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol if( !pAct->IsSetting() ) pAct->Duplicate(); else - pAct = new MetaOverlineColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True ); + pAct = new MetaOverlineColorAction( pFncCol( pAct->GetColor(), pColParam ), true ); aMtf.push_back( pAct ); } @@ -2176,7 +2176,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent, short nChannelRPercent, short nChannelGPercent, - short nChannelBPercent, double fGamma, sal_Bool bInvert ) + short nChannelBPercent, double fGamma, bool bInvert ) { // nothing to do? => return quickly if( nLuminancePercent || nContrastPercent || @@ -2772,7 +2772,7 @@ SvStream& ReadGDIMetaFile( SvStream& rIStm, GDIMetaFile& rGDIMetaFile ) { MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction); if ( pCommentAct->GetComment() == "EMF_PLUS" ) - rGDIMetaFile.UseCanvas( sal_True ); + rGDIMetaFile.UseCanvas( true ); } rGDIMetaFile.AddAction( pAction ); } @@ -2870,7 +2870,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm ) return rOStm; } -sal_Bool GDIMetaFile::CreateThumbnail(BitmapEx& rBmpEx, sal_uInt32 nMaximumExtent) const +bool GDIMetaFile::CreateThumbnail(BitmapEx& rBmpEx, sal_uInt32 nMaximumExtent) const { // initialization seems to be complicated but is used to avoid rounding errors VirtualDevice aVDev; @@ -2938,7 +2938,7 @@ sal_Bool GDIMetaFile::CreateThumbnail(BitmapEx& rBmpEx, sal_uInt32 nMaximumExten return !rBmpEx.IsEmpty(); } -void GDIMetaFile::UseCanvas( sal_Bool _bUseCanvas ) +void GDIMetaFile::UseCanvas( bool _bUseCanvas ) { bUseCanvas = _bUseCanvas; } diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx index 94f1b0022ca8..742b5537e109 100644 --- a/vcl/source/gdi/gfxlink.cxx +++ b/vcl/source/gdi/gfxlink.cxx @@ -45,7 +45,7 @@ GfxLink::GfxLink( const GfxLink& rGfxLink ) : ImplCopy( rGfxLink ); } -GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, sal_Bool bOwns ) : +GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, bool bOwns ) : mpImpData( new ImpGfxLink ) { DBG_ASSERT( (pBuf != NULL && nSize) || (!bOwns && nSize == 0), @@ -94,9 +94,9 @@ GfxLink& GfxLink::operator=( const GfxLink& rGfxLink ) return *this; } -sal_Bool GfxLink::IsEqual( const GfxLink& rGfxLink ) const +bool GfxLink::IsEqual( const GfxLink& rGfxLink ) const { - sal_Bool bIsEqual = sal_False; + bool bIsEqual = false; if ( ( mnBufSize == rGfxLink.mnBufSize ) && ( meType == rGfxLink.meType ) ) { @@ -109,7 +109,7 @@ sal_Bool GfxLink::IsEqual( const GfxLink& rGfxLink ) const bIsEqual = memcmp( pSource, pDest, nSourceSize ) == 0; } else if ( ( pSource == 0 ) && ( pDest == 0 ) ) - bIsEqual = sal_True; + bIsEqual = true; } return bIsEqual; } @@ -135,7 +135,7 @@ GfxLinkType GfxLink::GetType() const return meType; } -sal_Bool GfxLink::IsNative() const +bool GfxLink::IsNative() const { return( meType >= GFX_LINK_FIRST_NATIVE_ID && meType <= GFX_LINK_LAST_NATIVE_ID ); } @@ -185,9 +185,9 @@ bool GfxLink::IsPrefMapModeValid() return mpImpData->mbPrefMapModeValid; } -sal_Bool GfxLink::LoadNative( Graphic& rGraphic ) +bool GfxLink::LoadNative( Graphic& rGraphic ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( IsNative() && mnBufSize ) { @@ -215,7 +215,7 @@ sal_Bool GfxLink::LoadNative( Graphic& rGraphic ) } if( nCvtType && ( GraphicConverter::Import( aMemStm, rGraphic, nCvtType ) == ERRCODE_NONE ) ) - bRet = sal_True; + bRet = true; } } @@ -256,7 +256,7 @@ void GfxLink::SwapIn() } } -sal_Bool GfxLink::ExportNative( SvStream& rOStream ) const +bool GfxLink::ExportNative( SvStream& rOStream ) const { if( GetDataSize() ) { @@ -319,7 +319,7 @@ SvStream& ReadGfxLink( SvStream& rIStream, GfxLink& rGfxLink) pBuf = new sal_uInt8[ nSize ]; rIStream.Read( pBuf, nSize ); - rGfxLink = GfxLink( pBuf, nSize, (GfxLinkType) nType, sal_True ); + rGfxLink = GfxLink( pBuf, nSize, (GfxLinkType) nType, true ); rGfxLink.SetUserId( nUserId ); if( bMapAndSizeValid ) diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx index da4185ebef2d..d8eed8320a27 100644 --- a/vcl/source/gdi/gradient.cxx +++ b/vcl/source/gdi/gradient.cxx @@ -265,11 +265,11 @@ Gradient& Gradient::operator=( const Gradient& rGradient ) return *this; } -sal_Bool Gradient::operator==( const Gradient& rGradient ) const +bool Gradient::operator==( const Gradient& rGradient ) const { if ( mpImplGradient == rGradient.mpImplGradient ) - return sal_True; + return true; if ( (mpImplGradient->meStyle == rGradient.mpImplGradient->meStyle) && (mpImplGradient->mnAngle == rGradient.mpImplGradient->mnAngle) && @@ -281,9 +281,9 @@ sal_Bool Gradient::operator==( const Gradient& rGradient ) const (mpImplGradient->mnIntensityEnd == rGradient.mpImplGradient->mnIntensityEnd) && (mpImplGradient->maStartColor == rGradient.mpImplGradient->maStartColor) && (mpImplGradient->maEndColor == rGradient.mpImplGradient->maEndColor) ) - return sal_True; + return true; else - return sal_False; + return false; } SvStream& ReadImpl_Gradient( SvStream& rIStm, Impl_Gradient& rImpl_Gradient ) diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 20b1b090464c..be6af1734f8f 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -289,17 +289,17 @@ Graphic& Graphic::operator=( const Graphic& rGraphic ) return *this; } -sal_Bool Graphic::operator==( const Graphic& rGraphic ) const +bool Graphic::operator==( const Graphic& rGraphic ) const { return( *mpImpGraphic == *rGraphic.mpImpGraphic ); } -sal_Bool Graphic::operator!=( const Graphic& rGraphic ) const +bool Graphic::operator!=( const Graphic& rGraphic ) const { return( *mpImpGraphic != *rGraphic.mpImpGraphic ); } -sal_Bool Graphic::operator!() const +bool Graphic::operator!() const { return( GRAPHIC_NONE == mpImpGraphic->ImplGetType() ); } @@ -336,27 +336,27 @@ void Graphic::SetDefaultType() mpImpGraphic->ImplSetDefaultType(); } -sal_Bool Graphic::IsSupportedGraphic() const +bool Graphic::IsSupportedGraphic() const { return mpImpGraphic->ImplIsSupportedGraphic(); } -sal_Bool Graphic::IsTransparent() const +bool Graphic::IsTransparent() const { return mpImpGraphic->ImplIsTransparent(); } -sal_Bool Graphic::IsAlpha() const +bool Graphic::IsAlpha() const { return mpImpGraphic->ImplIsAlpha(); } -sal_Bool Graphic::IsAnimated() const +bool Graphic::IsAnimated() const { return mpImpGraphic->ImplIsAnimated(); } -sal_Bool Graphic::IsEPS() const +bool Graphic::IsEPS() const { return mpImpGraphic->ImplIsEPS(); } @@ -516,31 +516,31 @@ sal_uLong Graphic::GetDocFilePos() const return mpImpGraphic->ImplGetDocFilePos(); } -sal_Bool Graphic::SwapOut() +bool Graphic::SwapOut() { ImplTestRefCount(); return mpImpGraphic->ImplSwapOut(); } -sal_Bool Graphic::SwapOut( SvStream* pOStream ) +bool Graphic::SwapOut( SvStream* pOStream ) { ImplTestRefCount(); return mpImpGraphic->ImplSwapOut( pOStream ); } -sal_Bool Graphic::SwapIn() +bool Graphic::SwapIn() { ImplTestRefCount(); return mpImpGraphic->ImplSwapIn(); } -sal_Bool Graphic::SwapIn( SvStream* pStrm ) +bool Graphic::SwapIn( SvStream* pStrm ) { ImplTestRefCount(); return mpImpGraphic->ImplSwapIn( pStrm ); } -sal_Bool Graphic::IsSwapOut() const +bool Graphic::IsSwapOut() const { return mpImpGraphic->ImplIsSwapOut(); } @@ -556,7 +556,7 @@ GfxLink Graphic::GetLink() const return mpImpGraphic->ImplGetLink(); } -sal_Bool Graphic::IsLink() const +bool Graphic::IsLink() const { return mpImpGraphic->ImplIsLink(); } @@ -566,7 +566,7 @@ sal_uLong Graphic::GetChecksum() const return mpImpGraphic->ImplGetChecksum(); } -sal_Bool Graphic::ExportNative( SvStream& rOStream ) const +bool Graphic::ExportNative( SvStream& rOStream ) const { return mpImpGraphic->ImplExportNative( rOStream ); } diff --git a/vcl/source/gdi/hatch.cxx b/vcl/source/gdi/hatch.cxx index b4f2439ef93a..e4d08e08a7f3 100644 --- a/vcl/source/gdi/hatch.cxx +++ b/vcl/source/gdi/hatch.cxx @@ -80,7 +80,7 @@ Hatch& Hatch::operator=( const Hatch& rHatch ) return *this; } -sal_Bool Hatch::operator==( const Hatch& rHatch ) const +bool Hatch::operator==( const Hatch& rHatch ) const { return( mpImplHatch == rHatch.mpImplHatch || diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx index 2a17f5140771..8400942651a5 100644 --- a/vcl/source/gdi/image.cxx +++ b/vcl/source/gdi/image.cxx @@ -247,7 +247,7 @@ Image& Image::operator=( const Image& rImage ) return *this; } -sal_Bool Image::operator==( const Image& rImage ) const +bool Image::operator==( const Image& rImage ) const { bool bRet = false; @@ -690,7 +690,7 @@ ImageList& ImageList::operator=( const ImageList& rImageList ) return *this; } -sal_Bool ImageList::operator==( const ImageList& rImageList ) const +bool ImageList::operator==( const ImageList& rImageList ) const { bool bRet = false; diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx index 40b86b4fb91f..5a5453045dc7 100644 --- a/vcl/source/gdi/impanmvw.cxx +++ b/vcl/source/gdi/impanmvw.cxx @@ -37,8 +37,8 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut, mpBackground ( new VirtualDevice ), mpRestore ( new VirtualDevice ), meLastDisposal ( DISPOSE_BACK ), - mbPause ( sal_False ), - mbMarked ( sal_False ), + mbPause ( false ), + mbMarked ( false ), mbHMirr ( maSz.Width() < 0L ), mbVMirr ( maSz.Height() < 0L ) { @@ -100,17 +100,17 @@ ImplAnimView::~ImplAnimView() mpParent->ImplDecAnimCount(); } -sal_Bool ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const +bool ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const { - sal_Bool bRet = sal_False; + bool bRet = false; if( nExtraData ) { if( ( mnExtraData == nExtraData ) && ( !pOut || ( pOut == mpOut ) ) ) - bRet = sal_True; + bRet = true; } else if( !pOut || ( pOut == mpOut ) ) - bRet = sal_True; + bRet = true; return bRet; } @@ -157,7 +157,7 @@ void ImplAnimView::ImplDrawToPos( sal_uLong nPos ) VirtualDevice aVDev; Region* pOldClip = !maClip.IsNull() ? new Region( mpOut->GetClipRegion() ) : NULL; - aVDev.SetOutputSizePixel( maSzPix, sal_False ); + aVDev.SetOutputSizePixel( maSzPix, false ); nPos = std::min( nPos, (sal_uLong) mpParent->Count() - 1UL ); for( sal_uLong i = 0UL; i <= nPos; i++ ) @@ -186,7 +186,7 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev ) // check, if output lies out of display if( aOutRect.Intersection( Rectangle( maDispPt, maDispSz ) ).IsEmpty() ) - ImplSetMarked( sal_True ); + ImplSetMarked( true ); else if( !mbPause ) { VirtualDevice* pDev; @@ -227,7 +227,7 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev ) if( !pVDev ) { pDev = new VirtualDevice; - pDev->SetOutputSizePixel( maSzPix, sal_False ); + pDev->SetOutputSizePixel( maSzPix, false ); pDev->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut ); } else @@ -258,10 +258,10 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev ) // Put it into a bitmap if needed, else delete // SaveBitmap to conserve memory if( ( meLastDisposal == DISPOSE_BACK ) || ( meLastDisposal == DISPOSE_NOT ) ) - mpRestore->SetOutputSizePixel( Size( 1, 1 ), sal_False ); + mpRestore->SetOutputSizePixel( Size( 1, 1 ), false ); else { - mpRestore->SetOutputSizePixel( maRestSz, sal_False ); + mpRestore->SetOutputSizePixel( maRestSz, false ); mpRestore->DrawOutDev( Point(), maRestSz, aPosPix, aSizePix, *pDev ); } @@ -292,7 +292,7 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev ) void ImplAnimView::ImplRepaint() { - const sal_Bool bOldPause = mbPause; + const bool bOldPause = mbPause; if( mpOut->GetOutDevType() == OUTDEV_WINDOW ) { @@ -305,7 +305,7 @@ void ImplAnimView::ImplRepaint() else mpBackground->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut ); - mbPause = sal_False; + mbPause = false; ImplDrawToPos( mnActPos ); mbPause = bOldPause; } diff --git a/vcl/source/gdi/impanmvw.hxx b/vcl/source/gdi/impanmvw.hxx index 8fb0df5207be..2cb0aecf264a 100644 --- a/vcl/source/gdi/impanmvw.hxx +++ b/vcl/source/gdi/impanmvw.hxx @@ -47,10 +47,10 @@ private: VirtualDevice* mpRestore; sal_uLong mnActPos; Disposal meLastDisposal; - sal_Bool mbPause; - sal_Bool mbMarked; - sal_Bool mbHMirr; - sal_Bool mbVMirr; + bool mbPause; + bool mbMarked; + bool mbHMirr; + bool mbVMirr; void ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix ); void ImplDraw( sal_uLong nPos, VirtualDevice* pVDev ); @@ -62,7 +62,7 @@ public: OutputDevice* pFirstFrameOutDev = NULL ); ~ImplAnimView(); - sal_Bool ImplMatches( OutputDevice* pOut, long nExtraData ) const; + bool ImplMatches( OutputDevice* pOut, long nExtraData ) const; void ImplDrawToPos( sal_uLong nPos ); void ImplDraw( sal_uLong nPos ); void ImplRepaint(); @@ -73,11 +73,11 @@ public: const Size& ImplGetOutSize() const { return maSz; } const Size& ImplGetOutSizePix() const { return maSzPix; } - void ImplPause( sal_Bool bPause ) { mbPause = bPause; } - sal_Bool ImplIsPause() const { return mbPause; } + void ImplPause( bool bPause ) { mbPause = bPause; } + bool ImplIsPause() const { return mbPause; } - void ImplSetMarked( sal_Bool bMarked ) { mbMarked = bMarked; } - sal_Bool ImplIsMarked() const { return mbMarked; } + void ImplSetMarked( bool bMarked ) { mbMarked = bMarked; } + bool ImplIsMarked() const { return mbMarked; } }; #endif diff --git a/vcl/source/gdi/impbmp.cxx b/vcl/source/gdi/impbmp.cxx index 852f21110998..08ecc18b7a91 100644 --- a/vcl/source/gdi/impbmp.cxx +++ b/vcl/source/gdi/impbmp.cxx @@ -42,23 +42,23 @@ void ImpBitmap::ImplSetSalBitmap( SalBitmap* pBitmap ) delete mpSalBitmap, mpSalBitmap = pBitmap; } -sal_Bool ImpBitmap::ImplCreate( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ) +bool ImpBitmap::ImplCreate( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ) { return mpSalBitmap->Create( rSize, nBitCount, rPal ); } -sal_Bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap ) +bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap ) { mnChecksum = rImpBitmap.mnChecksum; return mpSalBitmap->Create( *rImpBitmap.mpSalBitmap ); } -sal_Bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics ) +bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics ) { return mpSalBitmap->Create( *rImpBitmap.mpSalBitmap, pGraphics ); } -sal_Bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, sal_uInt16 nNewBitCount ) +bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, sal_uInt16 nNewBitCount ) { return mpSalBitmap->Create( *rImpBitmap.mpSalBitmap, nNewBitCount ); } @@ -74,12 +74,12 @@ sal_uInt16 ImpBitmap::ImplGetBitCount() const return( ( nBitCount <= 1 ) ? 1 : ( nBitCount <= 4 ) ? 4 : ( nBitCount <= 8 ) ? 8 : 24 ); } -BitmapBuffer* ImpBitmap::ImplAcquireBuffer( sal_Bool bReadOnly ) +BitmapBuffer* ImpBitmap::ImplAcquireBuffer( bool bReadOnly ) { return mpSalBitmap->AcquireBuffer( bReadOnly ); } -void ImpBitmap::ImplReleaseBuffer( BitmapBuffer* pBuffer, sal_Bool bReadOnly ) +void ImpBitmap::ImplReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) { mpSalBitmap->ReleaseBuffer( pBuffer, bReadOnly ); diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index f8c6065c3f1c..643b28311e4a 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -97,8 +97,8 @@ ImpGraphic::ImpGraphic() : mnDocFilePos ( 0UL ), mnSizeBytes ( 0UL ), mnRefCount ( 1UL ), - mbSwapOut ( sal_False ), - mbSwapUnderway ( sal_False ) + mbSwapOut ( false ), + mbSwapUnderway ( false ) { } @@ -113,7 +113,7 @@ ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) : mnSizeBytes ( rImpGraphic.mnSizeBytes ), mnRefCount ( 1UL ), mbSwapOut ( rImpGraphic.mbSwapOut ), - mbSwapUnderway ( sal_False ) + mbSwapUnderway ( false ) { if( mpSwapFile ) mpSwapFile->nRefCount++; @@ -144,8 +144,8 @@ ImpGraphic::ImpGraphic( const Bitmap& rBitmap ) : mnDocFilePos ( 0UL ), mnSizeBytes ( 0UL ), mnRefCount ( 1UL ), - mbSwapOut ( sal_False ), - mbSwapUnderway ( sal_False ) + mbSwapOut ( false ), + mbSwapUnderway ( false ) { } @@ -159,8 +159,8 @@ ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) : mnDocFilePos ( 0UL ), mnSizeBytes ( 0UL ), mnRefCount ( 1UL ), - mbSwapOut ( sal_False ), - mbSwapUnderway ( sal_False ) + mbSwapOut ( false ), + mbSwapUnderway ( false ) { } @@ -173,8 +173,8 @@ ImpGraphic::ImpGraphic(const SvgDataPtr& rSvgDataPtr) mnDocFilePos( 0UL ), mnSizeBytes( 0UL ), mnRefCount( 1UL ), - mbSwapOut( sal_False ), - mbSwapUnderway( sal_False ), + mbSwapOut( false ), + mbSwapUnderway( false ), maSvgData(rSvgDataPtr) { } @@ -189,8 +189,8 @@ ImpGraphic::ImpGraphic( const Animation& rAnimation ) : mnDocFilePos ( 0UL ), mnSizeBytes ( 0UL ), mnRefCount ( 1UL ), - mbSwapOut ( sal_False ), - mbSwapUnderway ( sal_False ) + mbSwapOut ( false ), + mbSwapUnderway ( false ) { } @@ -204,8 +204,8 @@ ImpGraphic::ImpGraphic( const GDIMetaFile& rMtf ) : mnDocFilePos ( 0UL ), mnSizeBytes ( 0UL ), mnRefCount ( 1UL ), - mbSwapOut ( sal_False ), - mbSwapUnderway ( sal_False ) + mbSwapOut ( false ), + mbSwapUnderway ( false ) { } @@ -265,24 +265,24 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic ) return *this; } -sal_Bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const +bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const { - sal_Bool bRet = sal_False; + bool bRet = false; if( this == &rImpGraphic ) - bRet = sal_True; + bRet = true; else if( !ImplIsSwapOut() && ( rImpGraphic.meType == meType ) ) { switch( meType ) { case( GRAPHIC_NONE ): - bRet = sal_True; + bRet = true; break; case( GRAPHIC_GDIMETAFILE ): { if( rImpGraphic.maMetaFile == maMetaFile ) - bRet = sal_True; + bRet = true; } break; @@ -292,7 +292,7 @@ sal_Bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const { if(maSvgData == rImpGraphic.maSvgData) { - bRet = sal_True; + bRet = true; } else if(rImpGraphic.maSvgData) { @@ -303,7 +303,7 @@ sal_Bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const rImpGraphic.maSvgData->getSvgDataArray().get(), maSvgData->getSvgDataArrayLength())) { - bRet = sal_True; + bRet = true; } } } @@ -311,11 +311,11 @@ sal_Bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const else if( mpAnimation ) { if( rImpGraphic.mpAnimation && ( *rImpGraphic.mpAnimation == *mpAnimation ) ) - bRet = sal_True; + bRet = true; } else if( !rImpGraphic.mpAnimation && ( rImpGraphic.maEx == maEx ) ) { - bRet = sal_True; + bRet = true; } } break; @@ -328,7 +328,7 @@ sal_Bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const return bRet; } -void ImpGraphic::ImplClearGraphics( sal_Bool bCreateSwapInfo ) +void ImpGraphic::ImplClearGraphics( bool bCreateSwapInfo ) { if( bCreateSwapInfo && !ImplIsSwapOut() ) { @@ -370,7 +370,7 @@ void ImpGraphic::ImplClear() comphelper::getProcessComponentContext() ); aCnt.executeCommand( OUString("delete"), - ::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) ); + ::com::sun::star::uno::makeAny( true ) ); } catch( const ::com::sun::star::ucb::ContentCreationException& ) { @@ -391,12 +391,12 @@ void ImpGraphic::ImplClear() mpSwapFile = NULL; } - mbSwapOut = sal_False; + mbSwapOut = false; mnDocFilePos = 0UL; maDocFileURLStr = OUString(); // cleanup - ImplClearGraphics( sal_False ); + ImplClearGraphics( false ); meType = GRAPHIC_NONE; mnSizeBytes = 0; } @@ -412,14 +412,14 @@ void ImpGraphic::ImplSetDefaultType() meType = GRAPHIC_DEFAULT; } -sal_Bool ImpGraphic::ImplIsSupportedGraphic() const +bool ImpGraphic::ImplIsSupportedGraphic() const { return( meType != GRAPHIC_NONE ); } -sal_Bool ImpGraphic::ImplIsTransparent() const +bool ImpGraphic::ImplIsTransparent() const { - sal_Bool bRet(sal_True); + bool bRet(true); if( meType == GRAPHIC_BITMAP && !maSvgData.get()) { @@ -429,13 +429,13 @@ sal_Bool ImpGraphic::ImplIsTransparent() const return bRet; } -sal_Bool ImpGraphic::ImplIsAlpha() const +bool ImpGraphic::ImplIsAlpha() const { - sal_Bool bRet(sal_False); + bool bRet(false); if(maSvgData.get()) { - bRet = sal_True; + bRet = true; } else if( meType == GRAPHIC_BITMAP ) { @@ -445,12 +445,12 @@ sal_Bool ImpGraphic::ImplIsAlpha() const return bRet; } -sal_Bool ImpGraphic::ImplIsAnimated() const +bool ImpGraphic::ImplIsAnimated() const { return( mpAnimation != NULL ); } -sal_Bool ImpGraphic::ImplIsEPS() const +bool ImpGraphic::ImplIsEPS() const { return( ( meType == GRAPHIC_GDIMETAFILE ) && ( maMetaFile.GetActionSize() > 0 ) && @@ -980,7 +980,7 @@ sal_uLong ImpGraphic::ImplGetDocFilePos() const return mnDocFilePos; } -sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) +bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, bool bSwap ) { MapMode aMapMode; Size aSize; @@ -991,7 +991,7 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) sal_Int32 nType; sal_Int32 nLen; const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt(); - sal_Bool bRet = sal_False; + bool bRet = false; if( !mbSwapUnderway ) { @@ -1088,7 +1088,7 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) if (!maDocFileURLStr.isEmpty()) { rIStm.Seek( nStartPos + nHeaderLen + nLen ); - bRet = mbSwapOut = sal_True; + bRet = mbSwapOut = true; } else { @@ -1135,7 +1135,7 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) if( !nReadErr && !nWriteErr ) { - bRet = mbSwapOut = sal_True; + bRet = mbSwapOut = true; mpSwapFile = new ImpSwapFile; mpSwapFile->nRefCount = 1; mpSwapFile->aSwapURL = aTmpURL; @@ -1149,7 +1149,7 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) comphelper::getProcessComponentContext() ); aCnt.executeCommand( OUString("delete"), - ::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) ); + ::com::sun::star::uno::makeAny( true ) ); } catch( const ::com::sun::star::ucb::ContentCreationException& ) { @@ -1210,16 +1210,16 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) } } else - bRet = sal_True; + bRet = true; rIStm.SetNumberFormatInt( nOldFormat ); return bRet; } -sal_Bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm ) +bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( ( meType != GRAPHIC_NONE ) && ( meType != GRAPHIC_DEFAULT ) && !ImplIsSwapOut() ) { @@ -1286,7 +1286,7 @@ sal_Bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm ) //fdo39428 SvStream no longer supports operator<<(long) rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(nStmPos2 - nDataStart) ); rOStm.Seek( nStmPos2 ); - bRet = sal_True; + bRet = true; } } @@ -1296,9 +1296,9 @@ sal_Bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm ) return bRet; } -sal_Bool ImpGraphic::ImplSwapOut() +bool ImpGraphic::ImplSwapOut() { - sal_Bool bRet = sal_False; + bool bRet = false; if( !ImplIsSwapOut() ) { @@ -1322,7 +1322,7 @@ sal_Bool ImpGraphic::ImplSwapOut() pOStm->SetVersion( SOFFICE_FILEFORMAT_50 ); pOStm->SetCompressMode( COMPRESSMODE_NATIVE ); - if( ( bRet = ImplSwapOut( pOStm ) ) == sal_True ) + if( ( bRet = ImplSwapOut( pOStm ) ) ) { mpSwapFile = new ImpSwapFile; mpSwapFile->nRefCount = 1; @@ -1339,7 +1339,7 @@ sal_Bool ImpGraphic::ImplSwapOut() comphelper::getProcessComponentContext() ); aCnt.executeCommand( OUString("delete"), - ::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) ); + ::com::sun::star::uno::makeAny( true ) ); } catch( const ::com::sun::star::ucb::ContentCreationException& ) { @@ -1361,17 +1361,17 @@ sal_Bool ImpGraphic::ImplSwapOut() } else { - ImplClearGraphics( sal_True ); - bRet = mbSwapOut = sal_True; + ImplClearGraphics( true ); + bRet = mbSwapOut = true; } } return bRet; } -sal_Bool ImpGraphic::ImplSwapOut( SvStream* pOStm ) +bool ImpGraphic::ImplSwapOut( SvStream* pOStm ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( pOStm ) { @@ -1383,23 +1383,23 @@ sal_Bool ImpGraphic::ImplSwapOut( SvStream* pOStm ) if( !pOStm->GetError() ) { - ImplClearGraphics( sal_True ); - bRet = mbSwapOut = sal_True; + ImplClearGraphics( true ); + bRet = mbSwapOut = true; } } } else { - ImplClearGraphics( sal_True ); - bRet = mbSwapOut = sal_True; + ImplClearGraphics( true ); + bRet = mbSwapOut = true; } return bRet; } -sal_Bool ImpGraphic::ImplSwapIn() +bool ImpGraphic::ImplSwapIn() { - sal_Bool bRet = sal_False; + bool bRet = false; if( ImplIsSwapOut() ) { @@ -1445,7 +1445,7 @@ sal_Bool ImpGraphic::ImplSwapIn() comphelper::getProcessComponentContext() ); aCnt.executeCommand( OUString("delete"), - ::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) ); + ::com::sun::star::uno::makeAny( true ) ); } catch( const ::com::sun::star::ucb::ContentCreationException& ) { @@ -1472,9 +1472,9 @@ sal_Bool ImpGraphic::ImplSwapIn() return bRet; } -sal_Bool ImpGraphic::ImplSwapIn( SvStream* pIStm ) +bool ImpGraphic::ImplSwapIn( SvStream* pIStm ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( pIStm ) { @@ -1482,21 +1482,21 @@ sal_Bool ImpGraphic::ImplSwapIn( SvStream* pIStm ) if( !pIStm->GetError() ) { - mbSwapUnderway = sal_True; + mbSwapUnderway = true; bRet = ImplReadEmbedded( *pIStm ); - mbSwapUnderway = sal_False; + mbSwapUnderway = false; if( !bRet ) ImplClear(); else - mbSwapOut = sal_False; + mbSwapOut = false; } } return bRet; } -sal_Bool ImpGraphic::ImplIsSwapOut() const +bool ImpGraphic::ImplIsSwapOut() const { return mbSwapOut; } @@ -1515,7 +1515,7 @@ GfxLink ImpGraphic::ImplGetLink() return( mpGfxLink ? *mpGfxLink : GfxLink() ); } -sal_Bool ImpGraphic::ImplIsLink() const +bool ImpGraphic::ImplIsLink() const { return ( mpGfxLink != NULL ) ? sal_True : sal_False; } @@ -1559,9 +1559,9 @@ sal_uLong ImpGraphic::ImplGetChecksum() const return nRet; } -sal_Bool ImpGraphic::ImplExportNative( SvStream& rOStm ) const +bool ImpGraphic::ImplExportNative( SvStream& rOStm ) const { - sal_Bool bResult = sal_False; + bool bResult = false; if( !rOStm.GetError() ) { @@ -1625,7 +1625,7 @@ SvStream& ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic ) if( !rIStm.GetError() && aLink.LoadNative( aGraphic ) ) { // set link only, if no other link was set - const sal_Bool bSetLink = ( rImpGraphic.mpGfxLink == NULL ); + const bool bSetLink = ( rImpGraphic.mpGfxLink == NULL ); // assign graphic rImpGraphic = *aGraphic.ImplGetImpGraphic(); diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx index fafd07c90007..5215ed0d969d 100644 --- a/vcl/source/gdi/impimage.cxx +++ b/vcl/source/gdi/impimage.cxx @@ -112,7 +112,7 @@ ImplImageData::~ImplImageData() delete mpImageBitmap; } -sal_Bool ImplImageData::IsEqual( const ImplImageData& rData ) +bool ImplImageData::IsEqual( const ImplImageData& rData ) { return( maBmpEx == rData.maBmpEx ); } diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index 7c5ed11e82a0..aa2c022c84c1 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -639,10 +639,10 @@ ImplVectorizer::~ImplVectorizer() { } -sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, +bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress ) { - sal_Bool bRet = sal_False; + bool bRet = false; VECT_PROGRESS( pProgress, 0 ); @@ -709,8 +709,8 @@ sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rM if( aPolyPoly.Count() ) { - rMtf.AddAction( new MetaLineColorAction( aFindColor, sal_True ) ); - rMtf.AddAction( new MetaFillColorAction( aFindColor, sal_True ) ); + rMtf.AddAction( new MetaLineColorAction( aFindColor, true ) ); + rMtf.AddAction( new MetaFillColorAction( aFindColor, true ) ); rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) ); } } @@ -731,7 +731,7 @@ sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rM rMtf.SetPrefSize( Size( nWidth + 2, nHeight + 2 ) ); rMtf.Move( 1, 1 ); rMtf.Scale( aLogSize1.Width(), aLogSize1.Height() ); - bRet = sal_True; + bRet = true; } } @@ -742,14 +742,14 @@ sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rM return bRet; } -sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp, +bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress ) { Bitmap* pBmp = new Bitmap( rMonoBmp ); BitmapReadAccess* pRAcc; ImplVectMap* pMap; - sal_Bool bRet = sal_False; + bool bRet = false; VECT_PROGRESS( pProgress, 10 ); @@ -829,7 +829,7 @@ sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp, rPolyPoly.Insert( aFirst, 0 ); } - bRet = sal_True; + bRet = true; } VECT_PROGRESS( pProgress, 100 ); @@ -1027,7 +1027,7 @@ void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, s } } -sal_Bool ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain ) +bool ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain ) { long nActX = rStartPt.X(); long nActY = rStartPt.Y(); @@ -1076,19 +1076,19 @@ sal_Bool ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt } while( nFound ); - return sal_True; + return true; } -sal_Bool ImplVectorizer::ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const +bool ImplVectorizer::ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const { if( pMap->IsDone( nY - 1L, nX ) ) - return sal_True; + return true; else if( pMap->IsDone( nY + 1L, nX ) ) - return sal_False; + return false; else if( pMap->IsDone( nY - 1L, nX - 1L ) || pMap->IsDone( nY - 1L, nX + 1L ) ) - return sal_True; + return true; else - return sal_False; + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx index 5543c13a7458..38becc56ddd7 100644 --- a/vcl/source/gdi/impvect.hxx +++ b/vcl/source/gdi/impvect.hxx @@ -37,8 +37,8 @@ private: ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor ); 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; + bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain ); + bool ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const; void ImplLimitPolyPoly( PolyPolygon& rPolyPoly ); public: @@ -46,9 +46,9 @@ public: ImplVectorizer(); ~ImplVectorizer(); - sal_Bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, + bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress ); - sal_Bool ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly, + bool ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress ); }; diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx index 044cde6977e2..ecc81753f365 100644 --- a/vcl/source/gdi/jobset.cxx +++ b/vcl/source/gdi/jobset.cxx @@ -192,14 +192,14 @@ JobSetup& JobSetup::operator=( const JobSetup& rJobSetup ) return *this; } -sal_Bool JobSetup::operator==( const JobSetup& rJobSetup ) const +bool JobSetup::operator==( const JobSetup& rJobSetup ) const { if ( mpData == rJobSetup.mpData ) - return sal_True; + return true; if ( !mpData || !rJobSetup.mpData ) - return sal_False; + return false; ImplJobSetup* pData1 = mpData; ImplJobSetup* pData2 = rJobSetup.mpData; @@ -216,9 +216,9 @@ sal_Bool JobSetup::operator==( const JobSetup& rJobSetup ) const (memcmp( pData1->mpDriverData, pData2->mpDriverData, pData1->mnDriverDataLen ) == 0) && (pData1->maValueMap == pData2->maValueMap) ) - return sal_True; + return true; - return sal_False; + return false; } SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup ) diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx index bc6f7390b68d..a6fb09f1ad05 100644 --- a/vcl/source/gdi/lineinfo.cxx +++ b/vcl/source/gdi/lineinfo.cxx @@ -119,7 +119,7 @@ LineInfo& LineInfo::operator=( const LineInfo& rLineInfo ) // ----------------------------------------------------------------------- -sal_Bool LineInfo::operator==( const LineInfo& rLineInfo ) const +bool LineInfo::operator==( const LineInfo& rLineInfo ) const { return( mpImplLineInfo == rLineInfo.mpImplLineInfo || @@ -220,7 +220,7 @@ void LineInfo::SetLineCap(com::sun::star::drawing::LineCap eLineCap) // ----------------------------------------------------------------------- -sal_Bool LineInfo::IsDefault() const +bool LineInfo::IsDefault() const { return( !mpImplLineInfo->mnWidth && ( LINE_SOLID == mpImplLineInfo->meStyle ) diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx index d17e73e8cd38..2a723a987e70 100644 --- a/vcl/source/gdi/mapmod.cxx +++ b/vcl/source/gdi/mapmod.cxx @@ -30,7 +30,7 @@ ImplMapMode::ImplMapMode() : { mnRefCount = 1; meUnit = MAP_PIXEL; - mbSimple = sal_False; + mbSimple = false; } ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) : @@ -40,7 +40,7 @@ ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) : { mnRefCount = 1; meUnit = rImplMapMode.meUnit; - mbSimple = sal_False; + mbSimple = false; } SvStream& ReadImplMapMode( SvStream& rIStm, ImplMapMode& rImplMapMode ) @@ -52,7 +52,7 @@ SvStream& ReadImplMapMode( SvStream& rIStm, ImplMapMode& rImplMapMode ) ReadPair( rIStm, rImplMapMode.maOrigin ); ReadFraction( rIStm, rImplMapMode.maScaleX ); ReadFraction( rIStm, rImplMapMode.maScaleY ); - rIStm.ReadUChar( rImplMapMode.mbSimple ); + rIStm.ReadCharAsBool( rImplMapMode.mbSimple ); return rIStm; } @@ -85,7 +85,7 @@ ImplMapMode* ImplMapMode::ImplGetStaticMapMode( MapUnit eUnit ) pImplMapMode->maScaleX = aDefFraction; pImplMapMode->maScaleY = aDefFraction; pImplMapMode->meUnit = eUnit; - pImplMapMode->mbSimple = sal_True; + pImplMapMode->mbSimple = true; } return pImplMapMode; @@ -202,35 +202,35 @@ MapMode& MapMode::operator=( const MapMode& rMapMode ) return *this; } -sal_Bool MapMode::operator==( const MapMode& rMapMode ) const +bool MapMode::operator==( const MapMode& rMapMode ) const { if ( mpImplMapMode == rMapMode.mpImplMapMode ) - return sal_True; + return true; if ( (mpImplMapMode->meUnit == rMapMode.mpImplMapMode->meUnit) && (mpImplMapMode->maOrigin == rMapMode.mpImplMapMode->maOrigin) && (mpImplMapMode->maScaleX == rMapMode.mpImplMapMode->maScaleX) && (mpImplMapMode->maScaleY == rMapMode.mpImplMapMode->maScaleY) ) - return sal_True; + return true; else - return sal_False; + return false; } -sal_Bool MapMode::IsDefault() const +bool MapMode::IsDefault() const { ImplMapMode* pDefMapMode = ImplMapMode::ImplGetStaticMapMode( MAP_PIXEL ); if ( mpImplMapMode == pDefMapMode ) - return sal_True; + return true; if ( (mpImplMapMode->meUnit == pDefMapMode->meUnit) && (mpImplMapMode->maOrigin == pDefMapMode->maOrigin) && (mpImplMapMode->maScaleX == pDefMapMode->maScaleX) && (mpImplMapMode->maScaleY == pDefMapMode->maScaleY) ) - return sal_True; + return true; else - return sal_False; + return false; } SvStream& ReadMapMode( SvStream& rIStm, MapMode& rMapMode ) diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 3c8b494ff542..16ecaa20ac57 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -131,9 +131,9 @@ void MetaAction::Scale( double, double ) // ------------------------------------------------------------------------ -sal_Bool MetaAction::Compare( const MetaAction& ) const +bool MetaAction::Compare( const MetaAction& ) const { - return sal_True; + return true; } // ------------------------------------------------------------------------ @@ -278,7 +278,7 @@ void MetaPixelAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaPixelAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPixelAction::Compare( const MetaAction& rMetaAction ) const { return ( maPt == ((MetaPixelAction&)rMetaAction).maPt ) && ( maColor == ((MetaPixelAction&)rMetaAction).maColor ); @@ -346,7 +346,7 @@ void MetaPointAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaPointAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPointAction::Compare( const MetaAction& rMetaAction ) const { return maPt == ((MetaPointAction&)rMetaAction).maPt; } @@ -429,7 +429,7 @@ void MetaLineAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaLineAction::Compare( const MetaAction& rMetaAction ) const +bool MetaLineAction::Compare( const MetaAction& rMetaAction ) const { return ( maLineInfo == ((MetaLineAction&)rMetaAction).maLineInfo ) && ( maStartPt == ((MetaLineAction&)rMetaAction).maStartPt ) && @@ -508,7 +508,7 @@ void MetaRectAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaRectAction::Compare( const MetaAction& rMetaAction ) const +bool MetaRectAction::Compare( const MetaAction& rMetaAction ) const { return maRect == ((MetaRectAction&)rMetaAction).maRect; } @@ -578,7 +578,7 @@ void MetaRoundRectAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaRoundRectAction::Compare( const MetaAction& rMetaAction ) const +bool MetaRoundRectAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaRoundRectAction&)rMetaAction).maRect ) && ( mnHorzRound == ((MetaRoundRectAction&)rMetaAction).mnHorzRound ) && @@ -646,7 +646,7 @@ void MetaEllipseAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaEllipseAction::Compare( const MetaAction& rMetaAction ) const +bool MetaEllipseAction::Compare( const MetaAction& rMetaAction ) const { return maRect == ((MetaEllipseAction&)rMetaAction).maRect; } @@ -718,7 +718,7 @@ void MetaArcAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaArcAction::Compare( const MetaAction& rMetaAction ) const +bool MetaArcAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaArcAction&)rMetaAction).maRect ) && ( maStartPt == ((MetaArcAction&)rMetaAction).maStartPt ) && @@ -796,7 +796,7 @@ void MetaPieAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaPieAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPieAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaPieAction&)rMetaAction).maRect ) && ( maStartPt == ((MetaPieAction&)rMetaAction).maStartPt ) && @@ -874,7 +874,7 @@ void MetaChordAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaChordAction::Compare( const MetaAction& rMetaAction ) const +bool MetaChordAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaChordAction&)rMetaAction).maRect ) && ( maStartPt == ((MetaChordAction&)rMetaAction).maStartPt ) && @@ -958,11 +958,11 @@ void MetaPolyLineAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaPolyLineAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPolyLineAction::Compare( const MetaAction& rMetaAction ) const { - sal_Bool bIsEqual = sal_True; + bool bIsEqual = true; if ( maLineInfo != ((MetaPolyLineAction&)rMetaAction).maLineInfo ) - bIsEqual = sal_False; + bIsEqual = false; else bIsEqual = maPoly.IsEqual(((MetaPolyLineAction&)rMetaAction).maPoly ); return bIsEqual; @@ -1052,7 +1052,7 @@ void MetaPolygonAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaPolygonAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPolygonAction::Compare( const MetaAction& rMetaAction ) const { return maPoly.IsEqual(((MetaPolygonAction&)rMetaAction).maPoly ); } @@ -1135,7 +1135,7 @@ void MetaPolyPolygonAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaPolyPolygonAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPolyPolygonAction::Compare( const MetaAction& rMetaAction ) const { return maPolyPoly.IsEqual(((MetaPolyPolygonAction&)rMetaAction).maPolyPoly ); } @@ -1243,7 +1243,7 @@ void MetaTextAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaTextAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextAction::Compare( const MetaAction& rMetaAction ) const { return ( maPt == ((MetaTextAction&)rMetaAction).maPt ) && ( maStr == ((MetaTextAction&)rMetaAction).maStr ) && @@ -1377,7 +1377,7 @@ void MetaTextArrayAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaTextArrayAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextArrayAction::Compare( const MetaAction& rMetaAction ) const { return ( maStartPt == ((MetaTextArrayAction&)rMetaAction).maStartPt ) && ( maStr == ((MetaTextArrayAction&)rMetaAction).maStr ) && @@ -1516,7 +1516,7 @@ void MetaStretchTextAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaStretchTextAction::Compare( const MetaAction& rMetaAction ) const +bool MetaStretchTextAction::Compare( const MetaAction& rMetaAction ) const { return ( maPt == ((MetaStretchTextAction&)rMetaAction).maPt ) && ( maStr == ((MetaStretchTextAction&)rMetaAction).maStr ) && @@ -1601,7 +1601,7 @@ void MetaTextRectAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaTextRectAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextRectAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaTextRectAction&)rMetaAction).maRect ) && ( maStr == ((MetaTextRectAction&)rMetaAction).maStr ) && @@ -1685,7 +1685,7 @@ void MetaTextLineAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaTextLineAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextLineAction::Compare( const MetaAction& rMetaAction ) const { return ( maPos == ((MetaTextLineAction&)rMetaAction).maPos ) && ( mnWidth == ((MetaTextLineAction&)rMetaAction).mnWidth ) && @@ -1776,7 +1776,7 @@ void MetaBmpAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaBmpAction::Compare( const MetaAction& rMetaAction ) const +bool MetaBmpAction::Compare( const MetaAction& rMetaAction ) const { return maBmp.IsEqual(((MetaBmpAction&)rMetaAction).maBmp ) && ( maPt == ((MetaBmpAction&)rMetaAction).maPt ); @@ -1853,7 +1853,7 @@ void MetaBmpScaleAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaBmpScaleAction::Compare( const MetaAction& rMetaAction ) const +bool MetaBmpScaleAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmp.IsEqual(((MetaBmpScaleAction&)rMetaAction).maBmp )) && ( maPt == ((MetaBmpScaleAction&)rMetaAction).maPt ) && @@ -1936,7 +1936,7 @@ void MetaBmpScalePartAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaBmpScalePartAction::Compare( const MetaAction& rMetaAction ) const +bool MetaBmpScalePartAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmp.IsEqual(((MetaBmpScalePartAction&)rMetaAction).maBmp )) && ( maDstPt == ((MetaBmpScalePartAction&)rMetaAction).maDstPt ) && @@ -2017,7 +2017,7 @@ void MetaBmpExAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaBmpExAction::Compare( const MetaAction& rMetaAction ) const +bool MetaBmpExAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmpEx.IsEqual(((MetaBmpExAction&)rMetaAction).maBmpEx )) && ( maPt == ((MetaBmpExAction&)rMetaAction).maPt ); @@ -2094,7 +2094,7 @@ void MetaBmpExScaleAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaBmpExScaleAction::Compare( const MetaAction& rMetaAction ) const +bool MetaBmpExScaleAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmpEx.IsEqual(((MetaBmpExScaleAction&)rMetaAction).maBmpEx )) && ( maPt == ((MetaBmpExScaleAction&)rMetaAction).maPt ) && @@ -2177,7 +2177,7 @@ void MetaBmpExScalePartAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaBmpExScalePartAction::Compare( const MetaAction& rMetaAction ) const +bool MetaBmpExScalePartAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmpEx.IsEqual(((MetaBmpExScalePartAction&)rMetaAction).maBmpEx )) && ( maDstPt == ((MetaBmpExScalePartAction&)rMetaAction).maDstPt ) && @@ -2261,7 +2261,7 @@ void MetaMaskAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaMaskAction::Compare( const MetaAction& rMetaAction ) const +bool MetaMaskAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmp.IsEqual(((MetaMaskAction&)rMetaAction).maBmp )) && ( maColor == ((MetaMaskAction&)rMetaAction).maColor ) && @@ -2341,7 +2341,7 @@ void MetaMaskScaleAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaMaskScaleAction::Compare( const MetaAction& rMetaAction ) const +bool MetaMaskScaleAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmp.IsEqual(((MetaMaskScaleAction&)rMetaAction).maBmp )) && ( maColor == ((MetaMaskScaleAction&)rMetaAction).maColor ) && @@ -2427,7 +2427,7 @@ void MetaMaskScalePartAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaMaskScalePartAction::Compare( const MetaAction& rMetaAction ) const +bool MetaMaskScalePartAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmp.IsEqual(((MetaMaskScalePartAction&)rMetaAction).maBmp )) && ( maColor == ((MetaMaskScalePartAction&)rMetaAction).maColor ) && @@ -2511,7 +2511,7 @@ void MetaGradientAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaGradientAction::Compare( const MetaAction& rMetaAction ) const +bool MetaGradientAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaGradientAction&)rMetaAction).maRect ) && ( maGradient == ((MetaGradientAction&)rMetaAction).maGradient ); @@ -2594,7 +2594,7 @@ void MetaGradientExAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaGradientExAction::Compare( const MetaAction& rMetaAction ) const +bool MetaGradientExAction::Compare( const MetaAction& rMetaAction ) const { return ( maPolyPoly == ((MetaGradientExAction&)rMetaAction).maPolyPoly ) && ( maGradient == ((MetaGradientExAction&)rMetaAction).maGradient ); @@ -2669,7 +2669,7 @@ void MetaHatchAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaHatchAction::Compare( const MetaAction& rMetaAction ) const +bool MetaHatchAction::Compare( const MetaAction& rMetaAction ) const { return ( maPolyPoly == ((MetaHatchAction&)rMetaAction).maPolyPoly ) && ( maHatch == ((MetaHatchAction&)rMetaAction).maHatch ); @@ -2744,7 +2744,7 @@ void MetaWallpaperAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaWallpaperAction::Compare( const MetaAction& rMetaAction ) const +bool MetaWallpaperAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaWallpaperAction&)rMetaAction).maRect ) && ( maWallpaper == ((MetaWallpaperAction&)rMetaAction).maWallpaper ); @@ -2772,7 +2772,7 @@ IMPL_META_ACTION( ClipRegion, META_CLIPREGION_ACTION ) // ------------------------------------------------------------------------ -MetaClipRegionAction::MetaClipRegionAction( const Region& rRegion, sal_Bool bClip ) : +MetaClipRegionAction::MetaClipRegionAction( const Region& rRegion, bool bClip ) : MetaAction ( META_CLIPREGION_ACTION ), maRegion ( rRegion ), mbClip ( bClip ) @@ -2814,7 +2814,7 @@ void MetaClipRegionAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaClipRegionAction::Compare( const MetaAction& rMetaAction ) const +bool MetaClipRegionAction::Compare( const MetaAction& rMetaAction ) const { return ( maRegion == ((MetaClipRegionAction&)rMetaAction).maRegion ) && ( mbClip == ((MetaClipRegionAction&)rMetaAction).mbClip ); @@ -2835,7 +2835,7 @@ void MetaClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); ReadRegion( rIStm, maRegion ); - rIStm.ReadUChar( mbClip ); + rIStm.ReadCharAsBool( mbClip ); } // ======================================================================== @@ -2882,7 +2882,7 @@ void MetaISectRectClipRegionAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaISectRectClipRegionAction::Compare( const MetaAction& rMetaAction ) const +bool MetaISectRectClipRegionAction::Compare( const MetaAction& rMetaAction ) const { return maRect == ((MetaISectRectClipRegionAction&)rMetaAction).maRect; } @@ -2947,7 +2947,7 @@ void MetaISectRegionClipRegionAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaISectRegionClipRegionAction::Compare( const MetaAction& rMetaAction ) const +bool MetaISectRegionClipRegionAction::Compare( const MetaAction& rMetaAction ) const { return maRegion == ((MetaISectRegionClipRegionAction&)rMetaAction).maRegion; } @@ -3007,7 +3007,7 @@ void MetaMoveClipRegionAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaMoveClipRegionAction::Compare( const MetaAction& rMetaAction ) const +bool MetaMoveClipRegionAction::Compare( const MetaAction& rMetaAction ) const { return ( mnHorzMove == ((MetaMoveClipRegionAction&)rMetaAction).mnHorzMove ) && ( mnVertMove == ((MetaMoveClipRegionAction&)rMetaAction).mnVertMove ); @@ -3040,7 +3040,7 @@ IMPL_META_ACTION( LineColor, META_LINECOLOR_ACTION ) // ------------------------------------------------------------------------ -MetaLineColorAction::MetaLineColorAction( const Color& rColor, sal_Bool bSet ) : +MetaLineColorAction::MetaLineColorAction( const Color& rColor, bool bSet ) : MetaAction ( META_LINECOLOR_ACTION ), maColor ( rColor ), mbSet ( bSet ) @@ -3068,7 +3068,7 @@ MetaAction* MetaLineColorAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaLineColorAction::Compare( const MetaAction& rMetaAction ) const +bool MetaLineColorAction::Compare( const MetaAction& rMetaAction ) const { return ( maColor == ((MetaLineColorAction&)rMetaAction).maColor ) && ( mbSet == ((MetaLineColorAction&)rMetaAction).mbSet ); @@ -3089,7 +3089,7 @@ void MetaLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); maColor.Read( rIStm, true ); - rIStm.ReadUChar( mbSet ); + rIStm.ReadCharAsBool( mbSet ); } // ======================================================================== @@ -3098,7 +3098,7 @@ IMPL_META_ACTION( FillColor, META_FILLCOLOR_ACTION ) // ------------------------------------------------------------------------ -MetaFillColorAction::MetaFillColorAction( const Color& rColor, sal_Bool bSet ) : +MetaFillColorAction::MetaFillColorAction( const Color& rColor, bool bSet ) : MetaAction ( META_FILLCOLOR_ACTION ), maColor ( rColor ), mbSet ( bSet ) @@ -3126,7 +3126,7 @@ MetaAction* MetaFillColorAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaFillColorAction::Compare( const MetaAction& rMetaAction ) const +bool MetaFillColorAction::Compare( const MetaAction& rMetaAction ) const { return ( maColor == ((MetaFillColorAction&)rMetaAction).maColor ) && ( mbSet == ((MetaFillColorAction&)rMetaAction).mbSet ); @@ -3147,7 +3147,7 @@ void MetaFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); maColor.Read( rIStm, true ); - rIStm.ReadUChar( mbSet ); + rIStm.ReadCharAsBool( mbSet ); } // ======================================================================== @@ -3180,7 +3180,7 @@ MetaAction* MetaTextColorAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaTextColorAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextColorAction::Compare( const MetaAction& rMetaAction ) const { return maColor == ((MetaTextColorAction&)rMetaAction).maColor; } @@ -3207,7 +3207,7 @@ IMPL_META_ACTION( TextFillColor, META_TEXTFILLCOLOR_ACTION ) // ------------------------------------------------------------------------ -MetaTextFillColorAction::MetaTextFillColorAction( const Color& rColor, sal_Bool bSet ) : +MetaTextFillColorAction::MetaTextFillColorAction( const Color& rColor, bool bSet ) : MetaAction ( META_TEXTFILLCOLOR_ACTION ), maColor ( rColor ), mbSet ( bSet ) @@ -3235,7 +3235,7 @@ MetaAction* MetaTextFillColorAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaTextFillColorAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextFillColorAction::Compare( const MetaAction& rMetaAction ) const { return ( maColor == ((MetaTextFillColorAction&)rMetaAction).maColor ) && ( mbSet == ((MetaTextFillColorAction&)rMetaAction).mbSet ); @@ -3256,7 +3256,7 @@ void MetaTextFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); maColor.Read( rIStm, true ); - rIStm.ReadUChar( mbSet ); + rIStm.ReadCharAsBool( mbSet ); } // ======================================================================== @@ -3265,7 +3265,7 @@ IMPL_META_ACTION( TextLineColor, META_TEXTLINECOLOR_ACTION ) // ------------------------------------------------------------------------ -MetaTextLineColorAction::MetaTextLineColorAction( const Color& rColor, sal_Bool bSet ) : +MetaTextLineColorAction::MetaTextLineColorAction( const Color& rColor, bool bSet ) : MetaAction ( META_TEXTLINECOLOR_ACTION ), maColor ( rColor ), mbSet ( bSet ) @@ -3293,7 +3293,7 @@ MetaAction* MetaTextLineColorAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaTextLineColorAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextLineColorAction::Compare( const MetaAction& rMetaAction ) const { return ( maColor == ((MetaTextLineColorAction&)rMetaAction).maColor ) && ( mbSet == ((MetaTextLineColorAction&)rMetaAction).mbSet ); @@ -3314,7 +3314,7 @@ void MetaTextLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); maColor.Read( rIStm, true ); - rIStm.ReadUChar( mbSet ); + rIStm.ReadCharAsBool( mbSet ); } // ======================================================================== @@ -3323,7 +3323,7 @@ IMPL_META_ACTION( OverlineColor, META_OVERLINECOLOR_ACTION ) // ------------------------------------------------------------------------ -MetaOverlineColorAction::MetaOverlineColorAction( const Color& rColor, sal_Bool bSet ) : +MetaOverlineColorAction::MetaOverlineColorAction( const Color& rColor, bool bSet ) : MetaAction ( META_OVERLINECOLOR_ACTION ), maColor ( rColor ), mbSet ( bSet ) @@ -3351,7 +3351,7 @@ MetaAction* MetaOverlineColorAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaOverlineColorAction::Compare( const MetaAction& rMetaAction ) const +bool MetaOverlineColorAction::Compare( const MetaAction& rMetaAction ) const { return ( maColor == ((MetaOverlineColorAction&)rMetaAction).maColor ) && ( mbSet == ((MetaOverlineColorAction&)rMetaAction).mbSet ); @@ -3372,7 +3372,7 @@ void MetaOverlineColorAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); maColor.Read( rIStm, true ); - rIStm.ReadUChar( mbSet ); + rIStm.ReadCharAsBool( mbSet ); } // ======================================================================== @@ -3405,7 +3405,7 @@ MetaAction* MetaTextAlignAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaTextAlignAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextAlignAction::Compare( const MetaAction& rMetaAction ) const { return maAlign == ((MetaTextAlignAction&)rMetaAction).maAlign; } @@ -3468,7 +3468,7 @@ void MetaMapModeAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaMapModeAction::Compare( const MetaAction& rMetaAction ) const +bool MetaMapModeAction::Compare( const MetaAction& rMetaAction ) const { return maMapMode == ((MetaMapModeAction&)rMetaAction).maMapMode; } @@ -3538,7 +3538,7 @@ void MetaFontAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaFontAction::Compare( const MetaAction& rMetaAction ) const +bool MetaFontAction::Compare( const MetaAction& rMetaAction ) const { return maFont == ((MetaFontAction&)rMetaAction).maFont; } @@ -3595,7 +3595,7 @@ MetaAction* MetaPushAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaPushAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPushAction::Compare( const MetaAction& rMetaAction ) const { return mnFlags == ((MetaPushAction&)rMetaAction).mnFlags; } @@ -3680,7 +3680,7 @@ MetaAction* MetaRasterOpAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaRasterOpAction::Compare( const MetaAction& rMetaAction ) const +bool MetaRasterOpAction::Compare( const MetaAction& rMetaAction ) const { return meRasterOp == ((MetaRasterOpAction&)rMetaAction).meRasterOp; } @@ -3749,7 +3749,7 @@ void MetaTransparentAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaTransparentAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTransparentAction::Compare( const MetaAction& rMetaAction ) const { return ( maPolyPoly == ((MetaTransparentAction&)rMetaAction).maPolyPoly ) && ( mnTransPercent == ((MetaTransparentAction&)rMetaAction).mnTransPercent ); @@ -3837,7 +3837,7 @@ void MetaFloatTransparentAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaFloatTransparentAction::Compare( const MetaAction& rMetaAction ) const +bool MetaFloatTransparentAction::Compare( const MetaAction& rMetaAction ) const { return ( maMtf == ((MetaFloatTransparentAction&)rMetaAction).maMtf ) && ( maPoint == ((MetaFloatTransparentAction&)rMetaAction).maPoint ) && @@ -3919,7 +3919,7 @@ void MetaEPSAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaEPSAction::Compare( const MetaAction& rMetaAction ) const +bool MetaEPSAction::Compare( const MetaAction& rMetaAction ) const { return ( maGfxLink.IsEqual(((MetaEPSAction&)rMetaAction).maGfxLink )) && ( maSubst == ((MetaEPSAction&)rMetaAction).maSubst ) && @@ -3955,7 +3955,7 @@ IMPL_META_ACTION( RefPoint, META_REFPOINT_ACTION ) // ------------------------------------------------------------------------ -MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, sal_Bool bSet ) : +MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, bool bSet ) : MetaAction ( META_REFPOINT_ACTION ), maRefPoint ( rRefPoint ), mbSet ( bSet ) @@ -3983,7 +3983,7 @@ MetaAction* MetaRefPointAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaRefPointAction::Compare( const MetaAction& rMetaAction ) const +bool MetaRefPointAction::Compare( const MetaAction& rMetaAction ) const { return ( maRefPoint == ((MetaRefPointAction&)rMetaAction).maRefPoint ) && ( mbSet == ((MetaRefPointAction&)rMetaAction).mbSet ); @@ -4003,7 +4003,7 @@ void MetaRefPointAction::Write( SvStream& rOStm, ImplMetaWriteData* pData ) void MetaRefPointAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); - ReadPair( rIStm, maRefPoint ).ReadUChar( mbSet ); + ReadPair( rIStm, maRefPoint ).ReadCharAsBool( mbSet ); } // ======================================================================== @@ -4199,7 +4199,7 @@ void MetaCommentAction::Scale( double fXScale, double fYScale ) // ------------------------------------------------------------------------ -sal_Bool MetaCommentAction::Compare( const MetaAction& rMetaAction ) const +bool MetaCommentAction::Compare( const MetaAction& rMetaAction ) const { return ( maComment == ((MetaCommentAction&)rMetaAction).maComment ) && ( mnValue == ((MetaCommentAction&)rMetaAction).mnValue ) && @@ -4270,7 +4270,7 @@ MetaAction* MetaLayoutModeAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaLayoutModeAction::Compare( const MetaAction& rMetaAction ) const +bool MetaLayoutModeAction::Compare( const MetaAction& rMetaAction ) const { return mnLayoutMode == ((MetaLayoutModeAction&)rMetaAction).mnLayoutMode; } @@ -4321,7 +4321,7 @@ MetaAction* MetaTextLanguageAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaTextLanguageAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextLanguageAction::Compare( const MetaAction& rMetaAction ) const { return meTextLanguage == ((MetaTextLanguageAction&)rMetaAction).meTextLanguage; } diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx index ff17f9d5bd9a..0ddf5ec69e1c 100644 --- a/vcl/source/gdi/metric.cxx +++ b/vcl/source/gdi/metric.cxx @@ -116,15 +116,15 @@ FontInfo& FontInfo::operator=( const FontInfo& rInfo ) // ----------------------------------------------------------------------- -sal_Bool FontInfo::operator==( const FontInfo& rInfo ) const +bool FontInfo::operator==( const FontInfo& rInfo ) const { if( !Font::operator==( rInfo ) ) - return sal_False; + return false; if( mpImplMetric == rInfo.mpImplMetric ) - return sal_True; + return true; if( *mpImplMetric == *rInfo.mpImplMetric ) - return sal_True; - return sal_False; + return true; + return false; } // ----------------------------------------------------------------------- @@ -190,7 +190,7 @@ FontMetric& FontMetric::operator =( const FontMetric& rMetric ) // ----------------------------------------------------------------------- -sal_Bool FontMetric::operator==( const FontMetric& rMetric ) const +bool FontMetric::operator==( const FontMetric& rMetric ) const { return FontInfo::operator==( rMetric ); } diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx index 165ab33708cf..0a6a8c1ddc13 100644 --- a/vcl/source/gdi/octree.cxx +++ b/vcl/source/gdi/octree.cxx @@ -217,7 +217,7 @@ void Octree::ImplReduce() } } - pNode->bLeaf = sal_True; + pNode->bLeaf = true; pNode->nRed = nRedSum; pNode->nGreen = nGreenSum; pNode->nBlue = nBlueSum; diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index b372c9d8c585..439e385f5b94 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -392,7 +392,7 @@ OutputDevice::~OutputDevice() if ( GetUnoGraphicsList() ) { - UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_False ); + UnoWrapperBase* pWrapper = Application::GetUnoWrapper( false ); if ( pWrapper ) pWrapper->ReleaseAllGraphics( this ); delete mpUnoGraphicsList; @@ -457,9 +457,9 @@ bool OutputDevice::supportsOperation( OutDevSupportType eType ) const return bHasSupport; } -void OutputDevice::EnableRTL( sal_Bool bEnable ) +void OutputDevice::EnableRTL( bool bEnable ) { - mbEnableRTL = (bEnable != 0); + mbEnableRTL = bEnable; if( meOutDevType == OUTDEV_VIRDEV ) { // virdevs default to not mirroring, they will only be set to mirroring @@ -555,7 +555,7 @@ SalGraphics* OutputDevice::ImplGetGraphics() const { // steal the wingraphics from the other outdev mpGraphics = pReleaseOutDev->mpGraphics; - pReleaseOutDev->ImplReleaseGraphics( sal_False ); + pReleaseOutDev->ImplReleaseGraphics( false ); } else { @@ -670,7 +670,7 @@ SalGraphics* OutputDevice::ImplGetGraphics() const return mpGraphics; } -void OutputDevice::ImplReleaseGraphics( sal_Bool bRelease ) +void OutputDevice::ImplReleaseGraphics( bool bRelease ) { DBG_TESTSOLARMUTEX(); @@ -820,7 +820,7 @@ void OutputDevice::ImplInvalidateViewTransform() } } -sal_Bool OutputDevice::ImplIsRecordLayout() const +bool OutputDevice::ImplIsRecordLayout() const { return mpOutDevData && mpOutDevData->mpRecordLayout; } @@ -994,7 +994,7 @@ void OutputDevice::SetClipRegion() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaClipRegionAction( Region(), sal_False ) ); + mpMetaFile->AddAction( new MetaClipRegionAction( Region(), false ) ); ImplSetClipRegion( NULL ); @@ -1006,7 +1006,7 @@ void OutputDevice::SetClipRegion( const Region& rRegion ) { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaClipRegionAction( rRegion, sal_True ) ); + mpMetaFile->AddAction( new MetaClipRegionAction( rRegion, true ) ); if ( rRegion.IsNull() ) { @@ -1130,7 +1130,7 @@ void OutputDevice::SetLineColor() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) ); + mpMetaFile->AddAction( new MetaLineColorAction( Color(), false ) ); if ( mbLineColor ) { @@ -1190,7 +1190,7 @@ void OutputDevice::SetLineColor( const Color& rColor ) Color aColor = ImplDrawModeToColor( rColor ); if( mpMetaFile ) - mpMetaFile->AddAction( new MetaLineColorAction( aColor, sal_True ) ); + mpMetaFile->AddAction( new MetaLineColorAction( aColor, true ) ); if( ImplIsColorTransparent( aColor ) ) { @@ -1219,7 +1219,7 @@ void OutputDevice::SetFillColor() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaFillColorAction( Color(), sal_False ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color(), false ) ); if ( mbFillColor ) { @@ -1275,7 +1275,7 @@ void OutputDevice::SetFillColor( const Color& rColor ) } if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaFillColorAction( aColor, sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( aColor, true ) ); if ( ImplIsColorTransparent( aColor ) ) { @@ -1328,7 +1328,7 @@ void OutputDevice::SetRefPoint() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaRefPointAction( Point(), sal_False ) ); + mpMetaFile->AddAction( new MetaRefPointAction( Point(), false ) ); mbRefPoint = false; maRefPoint.X() = maRefPoint.Y() = 0L; @@ -1341,7 +1341,7 @@ void OutputDevice::SetRefPoint( const Point& rRefPoint ) { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaRefPointAction( rRefPoint, sal_True ) ); + mpMetaFile->AddAction( new MetaRefPointAction( rRefPoint, true ) ); mbRefPoint = true; maRefPoint = rRefPoint; @@ -2459,9 +2459,9 @@ void OutputDevice::SetConnectMetaFile( GDIMetaFile* pMtf ) mpMetaFile = pMtf; } -void OutputDevice::EnableOutput( sal_Bool bEnable ) +void OutputDevice::EnableOutput( bool bEnable ) { - mbOutput = (bEnable != 0); + mbOutput = bEnable; if( mpAlphaVDev ) mpAlphaVDev->EnableOutput( bEnable ); @@ -2510,7 +2510,7 @@ sal_uLong OutputDevice::GetColorCount() const return( ( nBitCount > 31 ) ? ULONG_MAX : ( ( (sal_uLong) 1 ) << nBitCount) ); } -sal_Bool OutputDevice::HasAlpha() +bool OutputDevice::HasAlpha() { return mpAlphaVDev != NULL; } diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 501d42b236c4..111fdf652a8a 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -1747,7 +1747,7 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp, "ImplBlendWithAlpha(): call me only with valid alpha VDev!" ); bool bOldMapMode( mpAlphaVDev->IsMapModeEnabled() ); - mpAlphaVDev->EnableMapMode(sal_False); + mpAlphaVDev->EnableMapMode(false); Bitmap aAlphaBitmap( mpAlphaVDev->GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) ); BitmapWriteAccess* pAlphaW = aAlphaBitmap.AcquireWriteAccess(); diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index fb3c099a158a..833caaa1bb00 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -334,7 +334,7 @@ void OutputDevice::ImplUpdateFontDataForAllFrames( const FontUpdateHandler_t pHd void OutputDevice::BeginFontSubstitution() { ImplSVData* pSVData = ImplGetSVData(); - pSVData->maGDIData.mbFontSubChanged = sal_False; + pSVData->maGDIData.mbFontSubChanged = false; } void OutputDevice::EndFontSubstitution() @@ -348,7 +348,7 @@ void OutputDevice::EndFontSubstitution() DataChangedEvent aDCEvt( DATACHANGED_FONTSUBSTITUTION ); pApp->DataChanged( aDCEvt ); pApp->NotifyAllWindows( aDCEvt ); - pSVData->maGDIData.mbFontSubChanged = sal_False; + pSVData->maGDIData.mbFontSubChanged = false; } } @@ -360,7 +360,7 @@ void OutputDevice::AddFontSubstitute( const OUString& rFontName, if( !rpSubst ) rpSubst = new ImplDirectFontSubstitution(); rpSubst->AddFontSubstitute( rFontName, rReplaceFontName, nFlags ); - ImplGetSVData()->maGDIData.mbFontSubChanged = sal_True; + ImplGetSVData()->maGDIData.mbFontSubChanged = true; } void ImplDirectFontSubstitution::AddFontSubstitute( const OUString& rFontName, @@ -2837,17 +2837,17 @@ FontEmphasisMark OutputDevice::ImplGetEmphasisMarkStyle( const Font& rFont ) return nEmphasisMark; } -sal_Bool OutputDevice::ImplIsUnderlineAbove( const Font& rFont ) +bool OutputDevice::ImplIsUnderlineAbove( const Font& rFont ) { if ( !rFont.IsVertical() ) - return sal_False; + return false; if( (LANGUAGE_JAPANESE == rFont.GetLanguage()) || (LANGUAGE_JAPANESE == rFont.GetCJKContextLanguage()) ) // the underline is right for Japanese only - return sal_True; + return true; - return sal_False; + return false; } void OutputDevice::ImplInitFontList() const @@ -3563,7 +3563,7 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nDistX, long nDistY, long nWidth, FontUnderline eTextLine, Color aColor, - sal_Bool bIsAbove ) + bool bIsAbove ) { ImplFontEntry* pFontEntry = mpFontEntry; long nLineHeight; @@ -3625,7 +3625,7 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nDistX, long nDistY, long nWidth, FontUnderline eTextLine, Color aColor, - sal_Bool bIsAbove ) + bool bIsAbove ) { ImplFontEntry* pFontEntry = mpFontEntry; long nLineHeight = 0; @@ -4006,7 +4006,7 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, - sal_Bool bUnderlineAbove ) + bool bUnderlineAbove ) { if ( !nWidth ) return; @@ -4046,7 +4046,7 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY, (eOverline == UNDERLINE_DOUBLEWAVE) || (eOverline == UNDERLINE_BOLDWAVE) ) { - ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, sal_True ); + ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, true ); bOverlineDone = true; } @@ -4061,14 +4061,14 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY, ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove ); if ( !bOverlineDone ) - ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, sal_True ); + ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, true ); if ( !bStrikeoutDone ) ImplDrawStrikeoutLine( nX, nY, nDistX, 0, nWidth, eStrikeout, aStrikeoutColor ); } void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout, - FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, sal_Bool bWordLine, sal_Bool bUnderlineAbove ) + FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, bool bWordLine, bool bUnderlineAbove ) { if( bWordLine ) { @@ -4140,10 +4140,10 @@ 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, sal_False ); + ImplDrawTextLine( nX, nY, 0, nWidth, STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE, false ); } -void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, sal_Bool& rPolyLine, +void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, @@ -4184,7 +4184,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, sal_Bool& rPolyL rWidth = 0; rYOff = 0; - rPolyLine = sal_False; + rPolyLine = false; if ( !nHeight ) return; @@ -4225,7 +4225,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, sal_Bool& rPolyL // BorderWidth is 15% long nBorder = (nDotSize*150)/1000; if ( nBorder <= 1 ) - rPolyLine = sal_True; + rPolyLine = true; else { Polygon aPoly2( Point( nRad, nRad ), @@ -4297,7 +4297,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, sal_Bool& rPolyL } void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY, - const PolyPolygon& rPolyPoly, sal_Bool bPolyLine, + const PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ) { if( IsRTLEnabled() ) @@ -4343,10 +4343,10 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout ) { Color aOldLineColor = GetLineColor(); Color aOldFillColor = GetFillColor(); - sal_Bool bOldMap = mbMap; + bool bOldMap = mbMap; GDIMetaFile* pOldMetaFile = mpMetaFile; mpMetaFile = NULL; - EnableMapMode( sal_False ); + EnableMapMode( false ); FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont ); PolyPolygon aPolyPoly; @@ -4355,7 +4355,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout ) long nEmphasisYOff; long nEmphasisWidth; long nEmphasisHeight; - sal_Bool bPolyLine; + bool bPolyLine; if ( nEmphasisMark & EMPHASISMARK_POS_BELOW ) nEmphasisHeight = mnEmphasisDescent; @@ -4477,12 +4477,12 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) GDIMetaFile* pOldMetaFile = mpMetaFile; long nOldOffX = mnOutOffX; long nOldOffY = mnOutOffY; - sal_Bool bOldMap = mbMap; + bool bOldMap = mbMap; mnOutOffX = 0L; mnOutOffY = 0L; mpMetaFile = NULL; - EnableMapMode( sal_False ); + EnableMapMode( false ); DrawMask( aPoint, aBmp, GetTextColor() ); @@ -4494,7 +4494,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) return true; } -void OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, sal_Bool bTextLines ) +void OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, bool bTextLines ) { if( mpFontEntry->mnOwnOrientation ) if( ImplDrawRotateText( rSalLayout ) ) @@ -4758,7 +4758,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, xHyphWord = xHyph->hyphenate( aWord, rDefLocale, aWord.getLength() - nMinTrail, uno::Sequence< beans::PropertyValue >() ); if (xHyphWord.is()) { - sal_Bool bAlternate = xHyphWord->isAlternativeSpelling(); + bool bAlternate = xHyphWord->isAlternativeSpelling(); sal_Int32 _nWordLen = 1 + xHyphWord->getHyphenPos(); if ( ( _nWordLen >= 2 ) && ( (nWordStart+_nWordLen) >= ( 2 ) ) ) @@ -4930,7 +4930,7 @@ void OutputDevice::SetFont( const Font& rNewFont ) aFont.SetColor( aTextColor ); - sal_Bool bTransFill = aFont.IsTransparent(); + bool bTransFill = aFont.IsTransparent(); if ( !bTransFill ) { Color aTextFillColor( aFont.GetFillColor() ); @@ -4949,7 +4949,7 @@ void OutputDevice::SetFont( const Font& rNewFont ) else if ( mnDrawMode & DRAWMODE_NOFILL ) { aTextFillColor = Color( COL_TRANSPARENT ); - bTransFill = sal_True; + bTransFill = true; } if ( !bTransFill && (mnDrawMode & DRAWMODE_GHOSTEDFILL) ) @@ -5073,12 +5073,12 @@ void OutputDevice::SetTextFillColor() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaTextFillColorAction( Color(), sal_False ) ); + mpMetaFile->AddAction( new MetaTextFillColorAction( Color(), false ) ); if ( maFont.GetColor() != Color( COL_TRANSPARENT ) ) maFont.SetFillColor( Color( COL_TRANSPARENT ) ); if ( !maFont.IsTransparent() ) - maFont.SetTransparent( sal_True ); + maFont.SetTransparent( true ); if( mpAlphaVDev ) mpAlphaVDev->SetTextFillColor(); @@ -5088,7 +5088,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor ) { Color aColor( rColor ); - sal_Bool bTransFill = ImplIsColorTransparent( aColor ) ? sal_True : sal_False; + bool bTransFill = ImplIsColorTransparent( aColor ) ? sal_True : sal_False; if ( !bTransFill ) { @@ -5110,7 +5110,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor ) else if ( mnDrawMode & DRAWMODE_NOFILL ) { aColor = Color( COL_TRANSPARENT ); - bTransFill = sal_True; + bTransFill = true; } if ( !bTransFill && (mnDrawMode & DRAWMODE_GHOSTEDFILL) ) @@ -5123,7 +5123,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor ) } if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaTextFillColorAction( aColor, sal_True ) ); + mpMetaFile->AddAction( new MetaTextFillColorAction( aColor, true ) ); if ( maFont.GetFillColor() != aColor ) maFont.SetFillColor( aColor ); @@ -5146,7 +5146,7 @@ void OutputDevice::SetTextLineColor() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaTextLineColorAction( Color(), sal_False ) ); + mpMetaFile->AddAction( new MetaTextLineColorAction( Color(), false ) ); maTextLineColor = Color( COL_TRANSPARENT ); @@ -5185,7 +5185,7 @@ void OutputDevice::SetTextLineColor( const Color& rColor ) } if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaTextLineColorAction( aColor, sal_True ) ); + mpMetaFile->AddAction( new MetaTextLineColorAction( aColor, true ) ); maTextLineColor = aColor; @@ -5197,7 +5197,7 @@ void OutputDevice::SetOverlineColor() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaOverlineColorAction( Color(), sal_False ) ); + mpMetaFile->AddAction( new MetaOverlineColorAction( Color(), false ) ); maOverlineColor = Color( COL_TRANSPARENT ); @@ -5236,7 +5236,7 @@ void OutputDevice::SetOverlineColor( const Color& rColor ) } if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaOverlineColorAction( aColor, sal_True ) ); + mpMetaFile->AddAction( new MetaOverlineColorAction( aColor, true ) ); maOverlineColor = aColor; @@ -5264,7 +5264,7 @@ void OutputDevice::DrawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, - sal_Bool bUnderlineAbove ) + bool bUnderlineAbove ) { if ( mpMetaFile ) @@ -5594,7 +5594,7 @@ long OutputDevice::GetTextArray( const OUString& rStr, sal_Int32* pDXAry, bool OutputDevice::GetCaretPositions( const OUString& rStr, sal_Int32* pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen, sal_Int32* pDXAry, long nLayoutWidth, - sal_Bool bCellBreaking ) const + bool bCellBreaking ) const { if( nIndex >= rStr.getLength() ) @@ -6013,7 +6013,7 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay return pSalLayout; } -sal_Bool OutputDevice::GetTextIsRTL( const OUString& rString, sal_Int32 nIndex, sal_Int32 nLen ) const +bool OutputDevice::GetTextIsRTL( const OUString& rString, sal_Int32 nIndex, sal_Int32 nLen ) const { OUString aStr( rString ); ImplLayoutArgs aArgs = ImplPrepareLayoutArgs( aStr, nIndex, nLen, 0, NULL ); @@ -6120,8 +6120,8 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r bool bRestoreFillColor = false; if ( (nStyle & TEXT_DRAW_DISABLE) && ! pVector ) { - sal_Bool bHighContrastBlack = sal_False; - sal_Bool bHighContrastWhite = sal_False; + bool bHighContrastBlack = false; + bool bHighContrastWhite = false; const StyleSettings& rStyleSettings( rTargetDevice.GetSettings().GetStyleSettings() ); if( rStyleSettings.GetHighContrastMode() ) { @@ -6392,11 +6392,11 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect, // temporarily swap in passed mtf for action generation, and // disable output generation. - const sal_Bool bOutputEnabled( IsOutputEnabled() ); + const bool bOutputEnabled( IsOutputEnabled() ); GDIMetaFile* pMtf = mpMetaFile; mpMetaFile = &rMtf; - EnableOutput( sal_False ); + EnableOutput( false ); // #i47157# Factored out to ImplDrawTextRect(), to be shared // between us and DrawText() @@ -6495,7 +6495,7 @@ Rectangle OutputDevice::GetTextRect( const Rectangle& rRect, else { if ( pInfo ) - pInfo->mbEllipsis = sal_True; + pInfo->mbEllipsis = true; nMaxWidth = nWidth; } } @@ -6536,7 +6536,7 @@ Rectangle OutputDevice::GetTextRect( const Rectangle& rRect, if ( (nMaxWidth > nWidth) && (nStyle & TEXT_DRAW_ELLIPSIS) ) { if ( pInfo ) - pInfo->mbEllipsis = sal_True; + pInfo->mbEllipsis = true; nMaxWidth = nWidth; } } @@ -6803,8 +6803,8 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr, Color aOldTextColor; Color aOldTextFillColor; bool bRestoreFillColor; - sal_Bool bHighContrastBlack = sal_False; - sal_Bool bHighContrastWhite = sal_False; + bool bHighContrastBlack = false; + bool bHighContrastWhite = false; const StyleSettings& rStyleSettings( GetSettings().GetStyleSettings() ); if( rStyleSettings.GetHighContrastMode() ) { @@ -6960,23 +6960,23 @@ FontInfo OutputDevice::GetDevFont( int nDevFontIndex ) const return aFontInfo; } -sal_Bool OutputDevice::AddTempDevFont( const OUString& rFileURL, const OUString& rFontName ) +bool OutputDevice::AddTempDevFont( const OUString& rFileURL, const OUString& rFontName ) { ImplInitFontList(); if( !mpGraphics && !ImplGetGraphics() ) - return sal_False; + return false; bool bRC = mpGraphics->AddTempDevFont( mpFontList, rFileURL, rFontName ); if( !bRC ) - return sal_False; + return false; if( mpAlphaVDev ) mpAlphaVDev->AddTempDevFont( rFileURL, rFontName ); mpFontCache->Invalidate(); - return sal_True; + return true; } int OutputDevice::GetDevFontSizeCount( const Font& rFont ) const @@ -7020,7 +7020,7 @@ Size OutputDevice::GetDevFontSize( const Font& rFont, int nSizeIndex ) const return aSize; } -sal_Bool OutputDevice::IsFontAvailable( const OUString& rFontName ) const +bool OutputDevice::IsFontAvailable( const OUString& rFontName ) const { ImplDevFontListData* pFound = mpFontList->FindFontFamily( rFontName ); @@ -7215,7 +7215,7 @@ sal_Int32 OutputDevice::ValidateKashidas ( const OUString& rTxt, return nDropped; } -sal_Bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, +bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ) { @@ -7247,7 +7247,7 @@ sal_Bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& return (nLen == (int)rVector.size()); } -sal_Bool OutputDevice::GetTextBoundRect( Rectangle& rRect, +bool OutputDevice::GetTextBoundRect( Rectangle& rRect, const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex, sal_Int32 nLen, sal_uLong nLayoutWidth, const sal_Int32* pDXAry ) const @@ -7258,7 +7258,7 @@ sal_Bool OutputDevice::GetTextBoundRect( Rectangle& rRect, "GetTextBoundRect Suspicious arguments nLen:" << nLen); } - sal_Bool bRet = sal_False; + bool bRet = false; rRect.SetEmpty(); SalLayout* pSalLayout = NULL; @@ -7322,8 +7322,8 @@ sal_Bool OutputDevice::GetTextBoundRect( Rectangle& rRect, // so we need a monochrome virtual device with matching font VirtualDevice aVDev( 1 ); Font aFont( GetFont() ); - aFont.SetShadow( sal_False ); - aFont.SetOutline( sal_False ); + aFont.SetShadow( false ); + aFont.SetOutline( false ); aFont.SetRelief( RELIEF_NONE ); aFont.SetOrientation( 0 ); aFont.SetSize( Size( mpFontEntry->maFontSelData.mnWidth, mpFontEntry->maFontSelData.mnHeight ) ); @@ -7356,7 +7356,7 @@ sal_Bool OutputDevice::GetTextBoundRect( Rectangle& rRect, Bitmap aBmp = aVDev.GetBitmap( Point(), aOutSize ); BitmapReadAccess* pAcc = aBmp.AcquireReadAccess(); if( !pAcc ) - return sal_False; + return false; const BitmapColor aBlack( pAcc->GetBestMatchingColor( Color( COL_BLACK ) ) ); const long nW = pAcc->Width(); const long nH = pAcc->Height(); @@ -7421,16 +7421,16 @@ sal_Bool OutputDevice::GetTextBoundRect( Rectangle& rRect, aTopLeft.X() = ImplDevicePixelToLogicWidth( aTopLeft.X() ); aTopLeft.Y() = ImplDevicePixelToLogicHeight( aTopLeft.Y() ); rRect = Rectangle( aTopLeft, aSize ); - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector, +bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector, const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex, sal_Int32 nLen, - sal_Bool bOptimize, sal_uLong nLayoutWidth, const sal_Int32* pDXArray ) const + bool bOptimize, sal_uLong nLayoutWidth, const sal_Int32* pDXArray ) const { if(nLen == 0x0FFFF) { @@ -7443,9 +7443,9 @@ sal_Bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector if( mbInitFont ) ImplInitFont(); if( !mpFontEntry ) - return sal_False; + return false; - sal_Bool bRet = sal_False; + bool bRet = false; rVector.clear(); if( nLen < 0 ) { @@ -7455,7 +7455,7 @@ sal_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 - sal_Bool bOldMap = mbMap; + bool bOldMap = mbMap; if( bOldMap ) { const_cast<OutputDevice&>(*this).mbMap = false; @@ -7564,7 +7564,7 @@ sal_Bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector pSalLayout->Release(); if( !nWidth || !nHeight ) - return sal_True; + return true; double fScaleX = static_cast< double >(nOrgWidth) / nWidth; double fScaleY = static_cast< double >(nOrgHeight) / nHeight; @@ -7662,9 +7662,9 @@ sal_Bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector return bRet; } -sal_Bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector, +bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector, const OUString& rStr, sal_Int32 nBase, - sal_Int32 nIndex, sal_Int32 nLen, sal_Bool bOptimize, + sal_Int32 nIndex, sal_Int32 nLen, bool bOptimize, sal_uLong nTWidth, const sal_Int32* pDXArray ) const { if(nLen == 0x0FFFF) @@ -7679,7 +7679,7 @@ sal_Bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector, ::basegfx::B2DPolyPolygonVector aB2DPolyPolyVector; if( !GetTextOutlines( aB2DPolyPolyVector, rStr, nBase, nIndex, nLen, bOptimize, nTWidth, pDXArray ) ) - return sal_False; + return false; // convert to a tool polypolygon vector rResultVector.reserve( aB2DPolyPolyVector.size() ); @@ -7687,12 +7687,12 @@ sal_Bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector, for(; aIt != aB2DPolyPolyVector.end(); ++aIt ) rResultVector.push_back(PolyPolygon(*aIt)); // #i76339# - return sal_True; + return true; } -sal_Bool OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly, const OUString& rStr, +bool OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly, const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex, sal_Int32 nLen, - sal_Bool bOptimize, sal_uLong nTWidth, const sal_Int32* pDXArray ) const + bool bOptimize, sal_uLong nTWidth, const sal_Int32* pDXArray ) const { if(nLen == 0x0FFFF) { @@ -7705,7 +7705,7 @@ sal_Bool OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly, const OUString& r ::basegfx::B2DPolyPolygonVector aB2DPolyPolyVector; if( !GetTextOutlines( aB2DPolyPolyVector, rStr, nBase, nIndex, nLen, bOptimize, nTWidth, pDXArray ) ) - return sal_False; + return false; // convert and merge into a tool polypolygon ::basegfx::B2DPolyPolygonVector::const_iterator aIt = aB2DPolyPolyVector.begin(); @@ -7713,7 +7713,7 @@ sal_Bool OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly, const OUString& r for( unsigned int i = 0; i < aIt->count(); ++i ) rPolyPoly.Insert(Polygon((*aIt).getB2DPolygon( i ))); // #i76339# - return sal_True; + return true; } bool OutputDevice::GetFontCapabilities( FontCapabilities& rFontCapabilities ) const @@ -7732,20 +7732,20 @@ bool OutputDevice::GetFontCapabilities( FontCapabilities& rFontCapabilities ) co return mpGraphics->GetImplFontCapabilities(rFontCapabilities); } -sal_Bool OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const +bool OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const { rFontCharMap.Reset(); // we need a graphics if( !mpGraphics && !ImplGetGraphics() ) - return sal_False; + return false; if( mbNewFont ) ImplNewFont(); if( mbInitFont ) ImplInitFont(); if( !mpFontEntry ) - return sal_False; + return false; #ifdef ENABLE_IFC_CACHE // a little font charmap cache helps considerably static const int NMAXITEMS = 16; @@ -7785,8 +7785,8 @@ sal_Bool OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const } if( rFontCharMap.IsDefaultMap() ) - return sal_False; - return sal_True; + return false; + return true; } sal_Int32 OutputDevice::HasGlyphs( const Font& rTempFont, const OUString& rStr, @@ -7807,11 +7807,11 @@ sal_Int32 OutputDevice::HasGlyphs( const Font& rTempFont, const OUString& rStr, const Font aOrigFont = GetFont(); const_cast<OutputDevice&>(*this).SetFont( rTempFont ); FontCharMap aFontCharMap; - sal_Bool bRet = GetFontCharMap( aFontCharMap ); + bool bRet = GetFontCharMap( aFontCharMap ); const_cast<OutputDevice&>(*this).SetFont( aOrigFont ); // if fontmap is unknown assume it doesn't have the glyphs - if( bRet == sal_False ) + if( !bRet ) return nIndex; for( sal_Int32 i = nIndex; nIndex < nEnd; ++i, ++nIndex ) diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx index 55f28e479693..c9a3e6369dda 100644 --- a/vcl/source/gdi/outdev4.cxx +++ b/vcl/source/gdi/outdev4.cxx @@ -143,7 +143,7 @@ inline sal_uInt8 ImplGetGradientColorValue( long nValue ) void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, - sal_Bool bMtf, const PolyPolygon* pClipPolyPoly ) + bool bMtf, const PolyPolygon* pClipPolyPoly ) { // get BoundRect of rotated rectangle Rectangle aRect; @@ -211,7 +211,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect, nGreen = (sal_uInt8)nStartGreen; nBlue = (sal_uInt8)nStartBlue; if ( bMtf ) - mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); else mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); @@ -296,7 +296,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect, fTempColor = ((double)nStartBlue) * (1.0-fAlpha) + ((double)nEndBlue) * fAlpha; nBlue = ImplGetGradientColorValue((long)fTempColor); if ( bMtf ) - mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); else mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); @@ -334,7 +334,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect, nGreen = ImplGetGradientColorValue(nEndGreen); nBlue = ImplGetGradientColorValue(nEndBlue); if ( bMtf ) - mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); else mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); @@ -354,7 +354,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect, void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, - sal_Bool bMtf, const PolyPolygon* pClipPolyPoly ) + bool bMtf, const PolyPolygon* pClipPolyPoly ) { // Determine if we output via Polygon or PolyPolygon // For all rasteroperations other then Overpaint always use PolyPolygon, @@ -442,7 +442,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, bool bPaintLastPolygon( false ); // #107349# Paint last polygon only if loop has generated any output if( bMtf ) - mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); else mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); @@ -510,7 +510,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 ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); else mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); } @@ -518,7 +518,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, { // #107349# Set fill color _before_ geometry painting if( bMtf ) - mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); else mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); @@ -545,7 +545,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, if( bMtf ) { - mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); mpMetaFile->AddAction( new MetaPolygonAction( rPoly ) ); } else @@ -670,9 +670,9 @@ void OutputDevice::DrawGradient( const Rectangle& rRect, aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL ) - ImplDrawLinearGradient( aRect, aGradient, sal_False, NULL ); + ImplDrawLinearGradient( aRect, aGradient, false, NULL ); else - ImplDrawComplexGradient( aRect, aGradient, sal_False, NULL ); + ImplDrawComplexGradient( aRect, aGradient, false, NULL ); } Pop(); @@ -743,9 +743,9 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly, } else { - const sal_Bool bOldOutput = IsOutputEnabled(); + const bool bOldOutput = IsOutputEnabled(); - EnableOutput( sal_False ); + EnableOutput( false ); Push( PUSH_RASTEROP ); SetRasterOp( ROP_XOR ); DrawGradient( aRect, rGradient ); @@ -830,9 +830,9 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly, aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL ) - ImplDrawLinearGradient( aRect, aGradient, sal_False, &aClipPolyPoly ); + ImplDrawLinearGradient( aRect, aGradient, false, &aClipPolyPoly ); else - ImplDrawComplexGradient( aRect, aGradient, sal_False, &aClipPolyPoly ); + ImplDrawComplexGradient( aRect, aGradient, false, &aClipPolyPoly ); } } } @@ -874,9 +874,9 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly, if( pVDev->SetOutputSizePixel( aDstSize) ) { MapMode aVDevMap; - const sal_Bool bOldMap = mbMap; + const bool bOldMap = mbMap; - EnableMapMode( sal_False ); + EnableMapMode( false ); pVDev->DrawOutDev( Point(), aDstSize, aDstRect.TopLeft(), aDstSize, *this ); pVDev->SetRasterOp( ROP_XOR ); @@ -921,7 +921,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(), sal_False ) ); + mpMetaFile->AddAction( new MetaLineColorAction( Color(), false ) ); // because we draw with no border line, we have to expand gradient // rect to avoid missing lines on the right and bottom edge @@ -935,9 +935,9 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL ) - ImplDrawLinearGradient( aRect, aGradient, sal_True, NULL ); + ImplDrawLinearGradient( aRect, aGradient, true, NULL ); else - ImplDrawComplexGradient( aRect, aGradient, sal_True, NULL ); + ImplDrawComplexGradient( aRect, aGradient, true, NULL ); mpMetaFile->AddAction( new MetaPopAction() ); mpMetaFile = pOldMtf; @@ -998,17 +998,17 @@ void OutputDevice::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch { PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) ); GDIMetaFile* pOldMetaFile = mpMetaFile; - sal_Bool bOldMap = mbMap; + bool bOldMap = mbMap; aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME ); aHatch.SetDistance( ImplLogicWidthToDevicePixel( aHatch.GetDistance() ) ); mpMetaFile = NULL; - EnableMapMode( sal_False ); + EnableMapMode( false ); Push( PUSH_LINECOLOR ); SetLineColor( aHatch.GetColor() ); ImplInitLineColor(); - ImplDrawHatch( aPolyPoly, aHatch, sal_False ); + ImplDrawHatch( aPolyPoly, aHatch, false ); Pop(); EnableMapMode( bOldMap ); mpMetaFile = pOldMetaFile; @@ -1031,14 +1031,14 @@ void OutputDevice::AddHatchActions( const PolyPolygon& rPolyPoly, const Hatch& r mpMetaFile = &rMtf; mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) ); - mpMetaFile->AddAction( new MetaLineColorAction( rHatch.GetColor(), sal_True ) ); - ImplDrawHatch( aPolyPoly, rHatch, sal_True ); + mpMetaFile->AddAction( new MetaLineColorAction( rHatch.GetColor(), true ) ); + ImplDrawHatch( aPolyPoly, rHatch, true ); mpMetaFile->AddAction( new MetaPopAction() ); mpMetaFile = pOldMtf; } } -void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, sal_Bool bMtf ) +void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf ) { if(rPolyPoly.Count()) { @@ -1221,7 +1221,7 @@ void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, sal_ } void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly, - Point* pPtBuffer, sal_Bool bMtf ) + Point* pPtBuffer, bool bMtf ) { double fX, fY; long nAdd, nPCounter = 0; diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx index 3f06b4e9c4ff..9d785e2610f9 100644 --- a/vcl/source/gdi/outdev6.cxx +++ b/vcl/source/gdi/outdev6.cxx @@ -139,8 +139,8 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLon if( mbInitFillColor ) ImplInitFillColor(); - const sal_Bool bOldMap = mbMap; - EnableMapMode( sal_False ); + const bool bOldMap = mbMap; + EnableMapMode( false ); if( nFlags & GRID_DOTS ) { @@ -384,8 +384,8 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly, Push( PUSH_CLIPREGION | PUSH_LINECOLOR ); IntersectClipRegion(Region(rPolyPoly)); SetLineColor( GetFillColor() ); - const sal_Bool bOldMap = mbMap; - EnableMapMode( sal_False ); + const bool bOldMap = mbMap; + EnableMapMode( false ); if(nMove) { @@ -480,9 +480,9 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly, if( aVDev.SetOutputSizePixel( aDstSz ) ) { - const sal_Bool bOldMap = mbMap; + const bool bOldMap = mbMap; - EnableMapMode( sal_False ); + EnableMapMode( false ); aVDev.SetLineColor( COL_BLACK ); aVDev.SetFillColor( COL_BLACK ); @@ -745,17 +745,17 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, AlphaMask aAlpha; MapMode aMap( GetMapMode() ); Point aOutPos( PixelToLogic( aDstRect.TopLeft() ) ); - const sal_Bool bOldMap = mbMap; + const bool bOldMap = mbMap; aMap.SetOrigin( Point( -aOutPos.X(), -aOutPos.Y() ) ); pVDev->SetMapMode( aMap ); - const sal_Bool bVDevOldMap = pVDev->IsMapModeEnabled(); + const bool bVDevOldMap = pVDev->IsMapModeEnabled(); // create paint bitmap ( (GDIMetaFile&) rMtf ).WindStart(); ( (GDIMetaFile&) rMtf ).Play( pVDev, rPos, rSize ); ( (GDIMetaFile&) rMtf ).WindStart(); - pVDev->EnableMapMode( sal_False ); + pVDev->EnableMapMode( false ); aPaint = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() ); pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here! @@ -768,7 +768,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, ( (GDIMetaFile&) rMtf ).WindStart(); ( (GDIMetaFile&) rMtf ).Play( pVDev, rPos, rSize ); ( (GDIMetaFile&) rMtf ).WindStart(); - pVDev->EnableMapMode( sal_False ); + pVDev->EnableMapMode( false ); aMask = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() ); pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here! @@ -776,14 +776,14 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, pVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT ); pVDev->DrawGradient( Rectangle( rPos, rSize ), rTransparenceGradient ); pVDev->SetDrawMode( DRAWMODE_DEFAULT ); - pVDev->EnableMapMode( sal_False ); + pVDev->EnableMapMode( false ); pVDev->DrawMask( Point(), pVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) ); aAlpha = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() ); delete pVDev; - EnableMapMode( sal_False ); + EnableMapMode( false ); DrawBitmapEx( aDstRect.TopLeft(), BitmapEx( aPaint, aAlpha ) ); EnableMapMode( bOldMap ); } @@ -807,8 +807,8 @@ void OutputDevice::ImplDrawColorWallpaper( long nX, long nY, Color aOldFillColor = GetFillColor(); SetLineColor(); SetFillColor( rWallpaper.GetColor() ); - sal_Bool bMap = mbMap; - EnableMapMode( sal_False ); + bool bMap = mbMap; + EnableMapMode( false ); DrawRect( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); SetLineColor( aOldLineColor ); SetFillColor( aOldFillColor ); @@ -827,7 +827,7 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY, Size aSize; GDIMetaFile* pOldMetaFile = mpMetaFile; const WallpaperStyle eStyle = rWallpaper.GetStyle(); - const sal_Bool bOldMap = mbMap; + const bool bOldMap = mbMap; bool bDrawn = false; bool bDrawGradientBackground = false; bool bDrawColorBackground = false; @@ -839,7 +839,7 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY, const long nBmpWidth = aBmpEx.GetSizePixel().Width(); const long nBmpHeight = aBmpEx.GetSizePixel().Height(); - const sal_Bool bTransparent = aBmpEx.IsTransparent(); + const bool bTransparent = aBmpEx.IsTransparent(); // draw background if( bTransparent ) @@ -891,7 +891,7 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY, } mpMetaFile = NULL; - EnableMapMode( sal_False ); + EnableMapMode( false ); Push( PUSH_CLIPREGION ); IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); @@ -1066,13 +1066,13 @@ void OutputDevice::ImplDrawGradientWallpaper( long nX, long nY, { Rectangle aBound; GDIMetaFile* pOldMetaFile = mpMetaFile; - const sal_Bool bOldMap = mbMap; + const bool bOldMap = mbMap; bool bNeedGradient = true; aBound = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); mpMetaFile = NULL; - EnableMapMode( sal_False ); + EnableMapMode( false ); Push( PUSH_CLIPREGION ); IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); @@ -1151,7 +1151,7 @@ void OutputDevice::Erase() if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() ) return; - sal_Bool bNativeOK = sal_False; + bool bNativeOK = false; if( meOutDevType == OUTDEV_WINDOW ) { diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx index d04477930c6d..9e310c7ab9ac 100644 --- a/vcl/source/gdi/outdevnative.cxx +++ b/vcl/source/gdi/outdevnative.cxx @@ -147,14 +147,14 @@ PushButtonValue* PushButtonValue::clone() const // ----------------------------------------------------------------------- -sal_Bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPart ) const +bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPart ) const { if( !lcl_enableNativeWidget( *this ) ) - return sal_False; + return false; if ( !mpGraphics ) if ( !ImplGetGraphics() ) - return sal_False; + return false; return( mpGraphics->IsNativeControlSupported(nType, nPart) ); } @@ -162,18 +162,18 @@ sal_Bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart // ----------------------------------------------------------------------- -sal_Bool OutputDevice::HitTestNativeControl( ControlType nType, +bool OutputDevice::HitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) const { if( !lcl_enableNativeWidget( *this ) ) - return sal_False; + return false; if ( !mpGraphics ) if ( !ImplGetGraphics() ) - return sal_False; + return false; Point aWinOffs( mnOutOffX, mnOutOffY ); Rectangle screenRegion( rControlRegion ); @@ -263,7 +263,7 @@ static boost::shared_ptr< ImplControlValue > lcl_transformControlValue( const Im } return aResult; } -sal_Bool OutputDevice::DrawNativeControl( ControlType nType, +bool OutputDevice::DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, @@ -271,17 +271,17 @@ sal_Bool OutputDevice::DrawNativeControl( ControlType nType, OUString aCaption ) { if( !lcl_enableNativeWidget( *this ) ) - return sal_False; + return false; // make sure the current clip region is initialized correctly if ( !mpGraphics ) if ( !ImplGetGraphics() ) - return sal_False; + return false; if ( mbInitClipRegion ) ImplInitClipRegion(); if ( mbOutputClipped ) - return sal_True; + return true; if ( mbInitLineColor ) ImplInitLineColor(); @@ -298,14 +298,14 @@ sal_Bool OutputDevice::DrawNativeControl( ControlType nType, if (aTestRegion == Region(rControlRegion)) nState |= CTRL_CACHING_ALLOWED; // control is not clipped, caching allowed - sal_Bool bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this ); + bool bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this ); return bRet; } // ----------------------------------------------------------------------- -sal_Bool OutputDevice::GetNativeControlRegion( ControlType nType, +bool OutputDevice::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, @@ -315,18 +315,18 @@ sal_Bool OutputDevice::GetNativeControlRegion( ControlType nType, Rectangle &rNativeContentRegion ) const { if( !lcl_enableNativeWidget( *this ) ) - return sal_False; + return false; if ( !mpGraphics ) if ( !ImplGetGraphics() ) - return sal_False; + return 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 ) ); - sal_Bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue, + 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 e68140ba1191..ba9fd16d9c06 100644 --- a/vcl/source/gdi/outmap.cxx +++ b/vcl/source/gdi/outmap.cxx @@ -684,9 +684,9 @@ Region OutputDevice::ImplPixelToDevicePixel( const Region& rRegion ) const // ----------------------------------------------------------------------- -void OutputDevice::EnableMapMode( sal_Bool bEnable ) +void OutputDevice::EnableMapMode( bool bEnable ) { - mbMap = (bEnable != 0); + mbMap = bEnable; if( mpAlphaVDev ) mpAlphaVDev->EnableMapMode( bEnable ); diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index 30f118652b03..327c46bc6ba6 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -304,7 +304,7 @@ struct PageSyncData PageSyncData( GlobalSyncData* pGlobal ) : mbGroupIgnoreGDIMtfActions ( false ) { mpGlobalData = pGlobal; } void PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDataSync::Action eAct ); - sal_Bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const PDFExtOutDevData& rOutDevData ); + bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const PDFExtOutDevData& rOutDevData ); }; void PageSyncData::PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDataSync::Action eAct ) { @@ -319,12 +319,12 @@ void PageSyncData::PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDa aSync.nIdx = 0x7fffffff; // sync not possible mActions.push_back( aSync ); } -sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const PDFExtOutDevData& rOutDevData ) +bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const PDFExtOutDevData& rOutDevData ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( mActions.size() && ( mActions.front().nIdx == rCurGDIMtfAction ) ) { - bRet = sal_True; + bRet = true; PDFExtOutDevDataSync aDataSync = mActions.front(); mActions.pop_front(); switch( aDataSync.eAct ) @@ -486,7 +486,7 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM else if ( mbGroupIgnoreGDIMtfActions ) { rCurGDIMtfAction++; - bRet = sal_True; + bRet = true; } return bRet; } @@ -494,14 +494,14 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM TYPEINIT1(PDFExtOutDevData,ExtOutDevData); PDFExtOutDevData::PDFExtOutDevData( const OutputDevice& rOutDev ) : mrOutDev ( rOutDev ), - mbTaggedPDF ( sal_False ), - mbExportNotes ( sal_True ), - mbExportNotesPages ( sal_False ), - mbTransitionEffects ( sal_True ), - mbUseLosslessCompression( sal_True ), - mbReduceImageResolution ( sal_False ), - mbExportHiddenSlides ( sal_False ), - mbExportNDests ( sal_False ), + mbTaggedPDF ( false ), + mbExportNotes ( true ), + mbExportNotesPages ( false ), + mbTransitionEffects ( true ), + mbUseLosslessCompression( true ), + mbReduceImageResolution ( false ), + mbExportHiddenSlides ( false ), + mbExportNDests ( false ), mnFormsFormat ( 0 ), mnPage ( -1 ), mpPageSyncData ( NULL ), @@ -532,59 +532,59 @@ void PDFExtOutDevData::SetCurrentPageNumber( const sal_Int32 nPage ) { mnPage = nPage; } -sal_Bool PDFExtOutDevData::GetIsLosslessCompression() const +bool PDFExtOutDevData::GetIsLosslessCompression() const { return mbUseLosslessCompression; } -void PDFExtOutDevData::SetIsLosslessCompression( const sal_Bool bUseLosslessCompression ) +void PDFExtOutDevData::SetIsLosslessCompression( const bool bUseLosslessCompression ) { mbUseLosslessCompression = bUseLosslessCompression; } -sal_Bool PDFExtOutDevData::GetIsReduceImageResolution() const +bool PDFExtOutDevData::GetIsReduceImageResolution() const { return mbReduceImageResolution; } -void PDFExtOutDevData::SetIsReduceImageResolution( const sal_Bool bReduceImageResolution ) +void PDFExtOutDevData::SetIsReduceImageResolution( const bool bReduceImageResolution ) { mbReduceImageResolution = bReduceImageResolution; } -sal_Bool PDFExtOutDevData::GetIsExportNotes() const +bool PDFExtOutDevData::GetIsExportNotes() const { return mbExportNotes; } -void PDFExtOutDevData::SetIsExportNotes( const sal_Bool bExportNotes ) +void PDFExtOutDevData::SetIsExportNotes( const bool bExportNotes ) { mbExportNotes = bExportNotes; } -sal_Bool PDFExtOutDevData::GetIsExportNotesPages() const +bool PDFExtOutDevData::GetIsExportNotesPages() const { return mbExportNotesPages; } -void PDFExtOutDevData::SetIsExportNotesPages( const sal_Bool bExportNotesPages ) +void PDFExtOutDevData::SetIsExportNotesPages( const bool bExportNotesPages ) { mbExportNotesPages = bExportNotesPages; } -sal_Bool PDFExtOutDevData::GetIsExportTaggedPDF() const +bool PDFExtOutDevData::GetIsExportTaggedPDF() const { return mbTaggedPDF; } -void PDFExtOutDevData::SetIsExportTaggedPDF( const sal_Bool bTaggedPDF ) +void PDFExtOutDevData::SetIsExportTaggedPDF( const bool bTaggedPDF ) { mbTaggedPDF = bTaggedPDF; } -sal_Bool PDFExtOutDevData::GetIsExportTransitionEffects() const +bool PDFExtOutDevData::GetIsExportTransitionEffects() const { return mbTransitionEffects; } -void PDFExtOutDevData::SetIsExportTransitionEffects( const sal_Bool bTransitionEffects ) +void PDFExtOutDevData::SetIsExportTransitionEffects( const bool bTransitionEffects ) { mbTransitionEffects = bTransitionEffects; } -sal_Bool PDFExtOutDevData::GetIsExportFormFields() const +bool PDFExtOutDevData::GetIsExportFormFields() const { return mbExportFormFields; } -void PDFExtOutDevData::SetIsExportFormFields( const sal_Bool bExportFomtFields ) +void PDFExtOutDevData::SetIsExportFormFields( const bool bExportFomtFields ) { mbExportFormFields = bExportFomtFields; } @@ -592,19 +592,19 @@ void PDFExtOutDevData::SetFormsFormat( const sal_Int32 nFormsFormat ) { mnFormsFormat = nFormsFormat; } -sal_Bool PDFExtOutDevData::GetIsExportBookmarks() const +bool PDFExtOutDevData::GetIsExportBookmarks() const { return mbExportBookmarks; } -void PDFExtOutDevData::SetIsExportBookmarks( const sal_Bool bExportBookmarks ) +void PDFExtOutDevData::SetIsExportBookmarks( const bool bExportBookmarks ) { mbExportBookmarks = bExportBookmarks; } -sal_Bool PDFExtOutDevData::GetIsExportHiddenSlides() const +bool PDFExtOutDevData::GetIsExportHiddenSlides() const { return mbExportHiddenSlides; } -void PDFExtOutDevData::SetIsExportHiddenSlides( const sal_Bool bExportHiddenSlides ) +void PDFExtOutDevData::SetIsExportHiddenSlides( const bool bExportHiddenSlides ) { mbExportHiddenSlides = bExportHiddenSlides; } @@ -612,11 +612,11 @@ std::vector< PDFExtOutDevBookmarkEntry >& PDFExtOutDevData::GetBookmarks() { return maBookmarks; } -sal_Bool PDFExtOutDevData::GetIsExportNamedDestinations() const +bool PDFExtOutDevData::GetIsExportNamedDestinations() const { return mbExportNDests; } -void PDFExtOutDevData::SetIsExportNamedDestinations( const sal_Bool bExportNDests ) +void PDFExtOutDevData::SetIsExportNamedDestinations( const bool bExportNDests ) { mbExportNDests = bExportNDests; } @@ -624,7 +624,7 @@ void PDFExtOutDevData::ResetSyncData() { *mpPageSyncData = PageSyncData( mpGlobalSyncData ); } -sal_Bool PDFExtOutDevData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rIdx ) +bool PDFExtOutDevData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rIdx ) { return mpPageSyncData->PlaySyncPageAct( rWriter, rIdx, *this ); } diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx index 610bfd5db6fa..de00ac33c87a 100644 --- a/vcl/source/gdi/pdfwriter.cxx +++ b/vcl/source/gdi/pdfwriter.cxx @@ -74,7 +74,7 @@ void PDFWriter::DrawTextLine( FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, - sal_Bool bUnderlineAbove ) + bool bUnderlineAbove ) { pImplementation->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove ); } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index d24ba589dad1..ccf7771b99ee 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -4409,7 +4409,7 @@ we check in the following sequence: INetURLObject aDocumentURL( m_aContext.BaseURL ); INetURLObject aTargetURL( rLink.m_aURL ); sal_Int32 nSetGoToRMode = 0; - sal_Bool bTargetHasPDFExtension = sal_False; + bool bTargetHasPDFExtension = false; INetProtocol eTargetProtocol = aTargetURL.GetProtocol(); bool bIsUNCPath = false; @@ -7165,7 +7165,7 @@ void PDFWriterImpl::drawRelief( SalLayout& rLayout, const OUString& rText, bool Font aSetFont = m_aCurrentPDFState.m_aFont; aSetFont.SetRelief( RELIEF_NONE ); - aSetFont.SetShadow( sal_False ); + aSetFont.SetShadow( false ); aSetFont.SetColor( aReliefColor ); setTextLineColor( aReliefColor ); @@ -7202,8 +7202,8 @@ void PDFWriterImpl::drawShadow( SalLayout& rLayout, const OUString& rText, bool rFont.SetColor( Color( COL_LIGHTGRAY ) ); else rFont.SetColor( Color( COL_BLACK ) ); - rFont.SetShadow( sal_False ); - rFont.SetOutline( sal_False ); + rFont.SetShadow( false ); + rFont.SetOutline( false ); setFont( rFont ); setTextLineColor( rFont.GetColor() ); setOverlineColor( rFont.GetColor() ); @@ -7661,7 +7661,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool ) ) { - sal_Bool bUnderlineAbove = OutputDevice::ImplIsUnderlineAbove( m_aCurrentPDFState.m_aFont ); + bool bUnderlineAbove = OutputDevice::ImplIsUnderlineAbove( m_aCurrentPDFState.m_aFont ); if( m_aCurrentPDFState.m_aFont.IsWordLineMode() ) { Point aPos, aStartPt; @@ -7714,7 +7714,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool long nEmphYOff; long nEmphWidth; long nEmphHeight; - sal_Bool bEmphPolyLine; + bool bEmphPolyLine; FontEmphasisMark nEmphMark; push( PUSH_ALL ); @@ -7795,7 +7795,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool } void PDFWriterImpl::drawEmphasisMark( long nX, long nY, - const PolyPolygon& rPolyPoly, sal_Bool bPolyLine, + const PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ) { // TODO: pass nWidth as width of this mark @@ -8387,11 +8387,11 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik while( m_pReferenceDevice->GetTextWidth( aStrikeout ) >= nWidth ) aStrikeout = aStrikeout.replaceAt( 0, 1, "" ); aStrikeout += aStrikeoutChar; - sal_Bool bShadow = m_aCurrentPDFState.m_aFont.IsShadow(); + bool bShadow = m_aCurrentPDFState.m_aFont.IsShadow(); if ( bShadow ) { Font aFont = m_aCurrentPDFState.m_aFont; - aFont.SetShadow( sal_False ); + aFont.SetShadow( false ); setFont( aFont ); updateGraphicsState(); } @@ -8425,7 +8425,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik if ( bShadow ) { Font aFont = m_aCurrentPDFState.m_aFont; - aFont.SetShadow( sal_True ); + aFont.SetShadow( true ); setFont( aFont ); updateGraphicsState(); } @@ -10326,7 +10326,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, sal_False ); + getReferenceDevice()->ImplDrawHatch( aPolyPoly, rHatch, false ); pop(); } } diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 4bcebbddc11e..b2fa560e56ed 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -1010,7 +1010,7 @@ i12626 bool checkEmitStructure(); /* draws an emphasis mark */ - void drawEmphasisMark( long nX, long nY, const PolyPolygon& rPolyPoly, sal_Bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ); + void drawEmphasisMark( long nX, long nY, const PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ); /* true if PDF/A-1a or PDF/A-1b is output */ bool m_bIsPDF_A1; @@ -1153,7 +1153,7 @@ public: void setTextFillColor() { m_aGraphicsStack.front().m_aFont.SetFillColor( Color( COL_TRANSPARENT ) ); - m_aGraphicsStack.front().m_aFont.SetTransparent( sal_True ); + m_aGraphicsStack.front().m_aFont.SetTransparent( true ); m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateFont; } void setTextColor( const Color& rColor ) diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index bea5e7dc2c2c..2a805f6d5a67 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -253,7 +253,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa if( ! pDummyVDev ) { pPrivateDevice = pDummyVDev = new VirtualDevice(); - pDummyVDev->EnableOutput( sal_False ); + pDummyVDev->EnableOutput( false ); pDummyVDev->SetMapMode( i_rMtf.GetPrefMapMode() ); } GDIMetaFile aMtf( i_rMtf ); @@ -461,9 +461,9 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa aTmpMtf.Play( pVDev, aPoint, aDstSize ); aTmpMtf.WindStart(); - pVDev->EnableMapMode( sal_False ); + pVDev->EnableMapMode( false ); aPaint = pVDev->GetBitmap( aPoint, aDstSizePixel ); - pVDev->EnableMapMode( sal_True ); + pVDev->EnableMapMode( true ); // create mask bitmap pVDev->SetLineColor( COL_BLACK ); @@ -474,15 +474,15 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa aTmpMtf.WindStart(); aTmpMtf.Play( pVDev, aPoint, aDstSize ); aTmpMtf.WindStart(); - pVDev->EnableMapMode( sal_False ); + pVDev->EnableMapMode( false ); aMask = pVDev->GetBitmap( aPoint, aDstSizePixel ); - pVDev->EnableMapMode( sal_True ); + pVDev->EnableMapMode( true ); // create alpha mask from gradient pVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT ); pVDev->DrawGradient( Rectangle( aPoint, aDstSize ), rTransparenceGradient ); pVDev->SetDrawMode( DRAWMODE_DEFAULT ); - pVDev->EnableMapMode( sal_False ); + pVDev->EnableMapMode( false ); pVDev->DrawMask( aPoint, aDstSizePixel, aMask, Color( COL_WHITE ) ); aAlpha = pVDev->GetBitmap( aPoint, aDstSizePixel ); implWriteBitmapEx( rPos, rSize, BitmapEx( aPaint, aAlpha ), pDummyVDev, i_rContext ); diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx index 0e8160e02d91..79f36d49f38a 100644 --- a/vcl/source/gdi/pngwrite.cxx +++ b/vcl/source/gdi/pngwrite.cxx @@ -51,7 +51,7 @@ public: const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData = NULL ); ~PNGWriterImpl(); - sal_Bool Write( SvStream& rOStm ); + bool Write( SvStream& rOStm ); std::vector< vcl::PNGWriter::ChunkData >& GetChunks(); @@ -62,7 +62,7 @@ private: sal_Int32 mnCompLevel; sal_Int32 mnInterlaced; sal_uInt32 mnMaxChunkSize; - sal_Bool mbStatus; + bool mbStatus; BitmapReadAccess* mpAccess; BitmapReadAccess* mpMaskAccess; @@ -77,7 +77,7 @@ private: sal_uInt8 mnBitsPerPixel; sal_uInt8 mnFilterType; // 0 oder 4; sal_uLong mnBBP; // bytes per pixel ( needed for filtering ) - sal_Bool mbTrueAlpha; + bool mbTrueAlpha; sal_uLong mnCRC; void ImplWritepHYs( const BitmapEx& rBitmapEx ); @@ -85,7 +85,7 @@ private: sal_uLong ImplGetFilter( sal_uLong nY, sal_uLong nXStart=0, sal_uLong nXAdd=1 ); void ImplClearFirstScanline(); void ImplWriteTransparent(); - sal_Bool ImplWriteHeader(); + bool ImplWriteHeader(); void ImplWritePalette(); void ImplOpenChunk( sal_uLong nChunkType ); void ImplWriteChunk( sal_uInt8 nNumb ); @@ -97,7 +97,7 @@ private: PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) : mnCompLevel ( PNG_DEF_COMPRESSION ), - mbStatus ( sal_True ), + mbStatus ( true ), mpAccess ( NULL ), mpMaskAccess ( NULL ), mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ), @@ -157,14 +157,14 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, aBmp.ReleaseAccess( mpAccess ), mpAccess = 0; } else - mbStatus = sal_False; + mbStatus = false; } else { mpAccess = aBmp.AcquireReadAccess(); // sal_True RGB with alphachannel if( mpAccess ) { - if ( ( mbTrueAlpha = rBmpEx.IsAlpha() ) != sal_False ) + if ( ( mbTrueAlpha = rBmpEx.IsAlpha() ) ) { AlphaMask aMask( rBmpEx.GetAlpha() ); mpMaskAccess = aMask.AcquireReadAccess(); @@ -178,7 +178,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, aMask.ReleaseAccess( mpMaskAccess ), mpMaskAccess = 0; } else - mbStatus = sal_False; + mbStatus = false; } else { @@ -194,12 +194,12 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, aMask.ReleaseAccess( mpMaskAccess ), mpMaskAccess = 0; } else - mbStatus = sal_False; + mbStatus = false; } aBmp.ReleaseAccess( mpAccess ), mpAccess = 0; } else - mbStatus = sal_False; + mbStatus = false; } } else @@ -218,7 +218,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, aBmp.ReleaseAccess( mpAccess ), mpAccess = 0; } else - mbStatus = sal_False; + mbStatus = false; } if ( mbStatus ) { @@ -233,7 +233,7 @@ PNGWriterImpl::~PNGWriterImpl() delete mpZCodec; } -sal_Bool PNGWriterImpl::Write( SvStream& rOStm ) +bool PNGWriterImpl::Write( SvStream& rOStm ) { /* png signature is always an array of 8 bytes */ sal_uInt16 nOldMode = rOStm.GetNumberFormatInt(); @@ -269,7 +269,7 @@ std::vector< vcl::PNGWriter::ChunkData >& PNGWriterImpl::GetChunks() return maChunkSeq; } -sal_Bool PNGWriterImpl::ImplWriteHeader() +bool PNGWriterImpl::ImplWriteHeader() { ImplOpenChunk(PNGCHUNK_IHDR); ImplWriteChunk( sal_uInt32( mnWidth = mpAccess->Width() ) ); @@ -301,7 +301,7 @@ sal_Bool PNGWriterImpl::ImplWriteHeader() ImplCloseChunk(); } else - mbStatus = sal_False; + mbStatus = false; return mbStatus; } @@ -505,7 +505,7 @@ sal_uLong PNGWriterImpl::ImplGetFilter ( sal_uLong nY, sal_uLong nXStart, sal_uL break; default : - mbStatus = sal_False; + mbStatus = false; break; } } @@ -658,7 +658,7 @@ PNGWriter::~PNGWriter() delete mpImpl; } -sal_Bool PNGWriter::Write( SvStream& rIStm ) +bool PNGWriter::Write( SvStream& rIStm ) { return mpImpl->Write( rIStm ); } diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 4137c23ef85a..ea6780da3df0 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -100,17 +100,17 @@ void ImplUpdateJobSetupPaper( JobSetup& rJobSetup ) // PrinterOptions PrinterOptions::PrinterOptions() : - mbReduceTransparency( sal_False ), + mbReduceTransparency( false ), meReducedTransparencyMode( PRINTER_TRANSPARENCY_AUTO ), - mbReduceGradients( sal_False ), + mbReduceGradients( false ), meReducedGradientsMode( PRINTER_GRADIENT_STRIPES ), mnReducedGradientStepCount( 64 ), - mbReduceBitmaps( sal_False ), + mbReduceBitmaps( false ), meReducedBitmapMode( PRINTER_BITMAP_NORMAL ), mnReducedBitmapResolution( 200 ), - mbReducedBitmapsIncludeTransparency( sal_True ), - mbConvertToGreyscales( sal_False ), - mbPDFAsStandardPrintJobFormat( sal_False ) + mbReducedBitmapsIncludeTransparency( true ), + mbConvertToGreyscales( false ), + mbPDFAsStandardPrintJobFormat( false ) { } @@ -167,7 +167,7 @@ bool PrinterOptions::ReadFromConfig( bool i_bFile ) if( xSet.is() ) { sal_Int32 nValue = 0; - sal_Bool bValue = 0; + bool bValue = false; if( xSet->getPropertyValue(PROPERTYNAME_REDUCETRANSPARENCY) >>= bValue ) SetReduceTransparency( bValue ); if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDTRANSPARENCYMODE) >>= nValue ) @@ -421,22 +421,22 @@ void Printer::ImplInitData() { mbDevOutput = false; meOutDevType = OUTDEV_PRINTER; - mbDefPrinter = sal_False; + mbDefPrinter = false; mnError = 0; mnCurPage = 0; mnCurPrintPage = 0; mnPageQueueSize = 0; mnCopyCount = 1; - mbCollateCopy = sal_False; - mbPrinting = sal_False; - mbJobActive = sal_False; - mbPrintFile = sal_False; - mbInPrintPage = sal_False; - mbNewJobSetup = sal_False; + mbCollateCopy = false; + mbPrinting = false; + mbJobActive = false; + mbPrintFile = false; + mbInPrintPage = false; + mbNewJobSetup = false; mpInfoPrinter = NULL; mpPrinter = NULL; mpDisplayDev = NULL; - mbIsQueuePrinter = sal_False; + mbIsQueuePrinter = false; mpPrinterOptions = new PrinterOptions; // Add printer to the list @@ -597,7 +597,7 @@ Printer::Printer() { ImplInit( pInfo ); if ( !IsDisplayPrinter() ) - mbDefPrinter = sal_True; + mbDefPrinter = true; } else ImplInitDisplay( NULL ); @@ -707,38 +707,38 @@ sal_uLong Printer::GetCapabilities( sal_uInt16 nType ) const } -sal_Bool Printer::HasSupport( PrinterSupport eFeature ) const +bool Printer::HasSupport( PrinterSupport eFeature ) const { switch ( eFeature ) { case SUPPORT_SET_ORIENTATION: - return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETORIENTATION ); + return GetCapabilities( PRINTER_CAPABILITIES_SETORIENTATION ) != 0; case SUPPORT_SET_PAPERBIN: - return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETPAPERBIN ); + return GetCapabilities( PRINTER_CAPABILITIES_SETPAPERBIN ) != 0; case SUPPORT_SET_PAPERSIZE: - return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETPAPERSIZE ); + return GetCapabilities( PRINTER_CAPABILITIES_SETPAPERSIZE ) != 0; case SUPPORT_SET_PAPER: - return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETPAPER ); + return GetCapabilities( PRINTER_CAPABILITIES_SETPAPER ) != 0; case SUPPORT_COPY: return (GetCapabilities( PRINTER_CAPABILITIES_COPIES ) != 0); case SUPPORT_COLLATECOPY: return (GetCapabilities( PRINTER_CAPABILITIES_COLLATECOPIES ) != 0); case SUPPORT_SETUPDIALOG: - return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SUPPORTDIALOG ); + return GetCapabilities( PRINTER_CAPABILITIES_SUPPORTDIALOG ) != 0; case SUPPORT_FAX: - return (sal_Bool) GetCapabilities( PRINTER_CAPABILITIES_FAX ); + return GetCapabilities( PRINTER_CAPABILITIES_FAX ) != 0; case SUPPORT_PDF: - return (sal_Bool) GetCapabilities( PRINTER_CAPABILITIES_PDF ); + return GetCapabilities( PRINTER_CAPABILITIES_PDF ) != 0; } - return sal_True; + return true; } -sal_Bool Printer::SetJobSetup( const JobSetup& rSetup ) +bool Printer::SetJobSetup( const JobSetup& rSetup ) { if ( IsDisplayPrinter() || mbInPrintPage ) - return sal_False; + return false; JobSetup aJobSetup = rSetup; @@ -746,58 +746,58 @@ sal_Bool Printer::SetJobSetup( const JobSetup& rSetup ) if ( mpInfoPrinter->SetPrinterData( aJobSetup.ImplGetData() ) ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool Printer::Setup( Window* pWindow ) +bool Printer::Setup( Window* pWindow ) { if ( IsDisplayPrinter() ) - return sal_False; + return false; if ( IsJobActive() || IsPrinting() ) - return sal_False; + return false; JobSetup aJobSetup = maJobSetup; SalFrame* pFrame; if ( !pWindow ) pWindow = ImplGetDefaultWindow(); if( !pWindow ) - return sal_False; + return false; pFrame = pWindow->ImplGetFrame(); ImplReleaseGraphics(); ImplSVData* pSVData = ImplGetSVData(); pSVData->maAppData.mnModalMode++; nImplSysDialog++; - sal_Bool bSetup = mpInfoPrinter->Setup( pFrame, aJobSetup.ImplGetData() ); + bool bSetup = mpInfoPrinter->Setup( pFrame, aJobSetup.ImplGetData() ); pSVData->maAppData.mnModalMode--; nImplSysDialog--; if ( bSetup ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool Printer::SetPrinterProps( const Printer* pPrinter ) +bool Printer::SetPrinterProps( const Printer* pPrinter ) { if ( IsJobActive() || IsPrinting() ) - return sal_False; + return false; ImplSVData* pSVData = ImplGetSVData(); @@ -844,7 +844,7 @@ sal_Bool Printer::SetPrinterProps( const Printer* pPrinter ) // Construct new printer ImplInitDisplay( NULL ); - return sal_True; + return true; } // Destroy old printer? @@ -898,14 +898,14 @@ sal_Bool Printer::SetPrinterProps( const Printer* pPrinter ) else SetJobSetup( pPrinter->GetJobSetup() ); - return sal_False; + return false; } -sal_Bool Printer::SetOrientation( Orientation eOrientation ) +bool Printer::SetOrientation( Orientation eOrientation ) { if ( mbInPrintPage ) - return sal_False; + return false; if ( maJobSetup.ImplGetConstData()->meOrientation != eOrientation ) { @@ -915,26 +915,26 @@ sal_Bool Printer::SetOrientation( Orientation eOrientation ) if ( IsDisplayPrinter() ) { - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; - return sal_True; + return true; } ImplReleaseGraphics(); if ( mpInfoPrinter->SetData( SAL_JOBSET_ORIENTATION, pSetupData ) ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } else - return sal_False; + return false; } - return sal_True; + return true; } @@ -944,10 +944,10 @@ Orientation Printer::GetOrientation() const } -sal_Bool Printer::SetPaperBin( sal_uInt16 nPaperBin ) +bool Printer::SetPaperBin( sal_uInt16 nPaperBin ) { if ( mbInPrintPage ) - return sal_False; + return false; if ( (maJobSetup.ImplGetConstData()->mnPaperBin != nPaperBin) && (nPaperBin < GetPaperBinCount()) ) @@ -958,26 +958,26 @@ sal_Bool Printer::SetPaperBin( sal_uInt16 nPaperBin ) if ( IsDisplayPrinter() ) { - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; - return sal_True; + return true; } ImplReleaseGraphics(); if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERBIN, pSetupData ) ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } else - return sal_False; + return false; } - return sal_True; + return true; } @@ -1077,10 +1077,10 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe } -sal_Bool Printer::SetPaper( Paper ePaper ) +bool Printer::SetPaper( Paper ePaper ) { if ( mbInPrintPage ) - return sal_False; + return false; if ( maJobSetup.ImplGetConstData()->mePaperFormat != ePaper ) { @@ -1096,9 +1096,9 @@ sal_Bool Printer::SetPaper( Paper ePaper ) if ( IsDisplayPrinter() ) { - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; - return sal_True; + return true; } ImplReleaseGraphics(); @@ -1107,29 +1107,29 @@ sal_Bool Printer::SetPaper( Paper ePaper ) if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERSIZE|SAL_JOBSET_ORIENTATION, pSetupData ) ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } else - return sal_False; + return false; } - return sal_True; + return true; } -sal_Bool Printer::SetPaperSizeUser( const Size& rSize ) +bool Printer::SetPaperSizeUser( const Size& rSize ) { return SetPaperSizeUser( rSize, false ); } -sal_Bool Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest ) +bool Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest ) { if ( mbInPrintPage ) - return sal_False; + return false; Size aPixSize = LogicToPixel( rSize ); Size aPageSize = PixelToLogic( aPixSize, MAP_100TH_MM ); @@ -1145,9 +1145,9 @@ sal_Bool Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest ) if ( IsDisplayPrinter() ) { - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; - return sal_True; + return true; } ImplReleaseGraphics(); @@ -1157,17 +1157,17 @@ sal_Bool Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest ) if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERSIZE|SAL_JOBSET_ORIENTATION, pSetupData ) ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } else - return sal_False; + return false; } - return sal_True; + return true; } @@ -1234,10 +1234,10 @@ const PaperInfo& Printer::GetPaperInfo( int nPaper ) const } -sal_Bool Printer::SetDuplexMode( DuplexMode eDuplex ) +bool Printer::SetDuplexMode( DuplexMode eDuplex ) { if ( mbInPrintPage ) - return sal_False; + return false; if ( maJobSetup.ImplGetConstData()->meDuplexMode != eDuplex ) { @@ -1247,26 +1247,26 @@ sal_Bool Printer::SetDuplexMode( DuplexMode eDuplex ) if ( IsDisplayPrinter() ) { - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; - return sal_True; + return true; } ImplReleaseGraphics(); if ( mpInfoPrinter->SetData( SAL_JOBSET_DUPLEXMODE, pSetupData ) ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } else - return sal_False; + return false; } - return sal_True; + return true; } @@ -1303,11 +1303,11 @@ OUString Printer::GetPaperBinName( sal_uInt16 nPaperBin ) const } -sal_Bool Printer::SetCopyCount( sal_uInt16 nCopy, sal_Bool bCollate ) +bool Printer::SetCopyCount( sal_uInt16 nCopy, bool bCollate ) { mnCopyCount = nCopy; mbCollateCopy = bCollate; - return sal_True; + return true; } @@ -1338,15 +1338,15 @@ sal_uLong Printer::ImplSalPrinterErrorCodeToVCL( sal_uLong nError ) } -sal_Bool Printer::EndJob() +bool Printer::EndJob() { - sal_Bool bRet = sal_False; + bool bRet = false; if ( !IsJobActive() ) return bRet; DBG_ASSERT( !mbInPrintPage, "Printer::EndJob() - StartPage() without EndPage() called" ); - mbJobActive = sal_False; + mbJobActive = false; if ( mpPrinter ) { @@ -1354,7 +1354,7 @@ sal_Bool Printer::EndJob() mnCurPage = 0; - mbPrinting = sal_False; + mbPrinting = false; mnCurPrintPage = 0; maJobName = OUString(); @@ -1389,7 +1389,7 @@ void Printer::ImplStartPage() // PrintJob not aborted ??? if ( IsJobActive() ) { - mbInPrintPage = sal_True; + mbInPrintPage = true; mnCurPage++; mnCurPrintPage++; } @@ -1402,7 +1402,7 @@ void Printer::ImplEndPage() if ( !IsJobActive() ) return; - mbInPrintPage = sal_False; + mbInPrintPage = false; if ( mpPrinter ) { @@ -1411,7 +1411,7 @@ void Printer::ImplEndPage() mbDevOutput = false; mpJobGraphics = NULL; - mbNewJobSetup = sal_False; + mbNewJobSetup = false; } } diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index 5f30b43d9ac9..b6b8f23de2b8 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -144,13 +144,13 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf, 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) ); + o_rMtf.AddAction( new MetaLineColorAction(aLineColor, true) ); Color aFillColor( rStateOutDev.GetFillColor() ); 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 MetaFillColorAction(aFillColor, true) ); } o_rMtf.AddAction( new MetaPolyPolygonAction(pTransAct->GetPolyPolygon()) ); @@ -727,7 +727,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, VirtualDevice aMapModeVDev; aMapModeVDev.mnDPIX = mnDPIX; aMapModeVDev.mnDPIY = mnDPIY; - aMapModeVDev.EnableOutput(sal_False); + aMapModeVDev.EnableOutput(false); int nLastBgAction, nActionNum; @@ -1172,7 +1172,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, Size aDstSzPix; VirtualDevice aMapVDev; // here, we record only mapmode information - aMapVDev.EnableOutput(sal_False); + aMapVDev.EnableOutput(false); VirtualDevice aPaintVDev; // into this one, we render. aPaintVDev.SetBackground( aBackgroundComponent.aBgColor ); @@ -1204,7 +1204,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, aMapVDev.mnDPIX = aPaintVDev.mnDPIX = mnDPIX; aMapVDev.mnDPIY = aPaintVDev.mnDPIY = mnDPIY; - aPaintVDev.EnableOutput(sal_False); + aPaintVDev.EnableOutput(false); // iterate over all actions for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0; @@ -1216,7 +1216,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, // the current aCCList element // (aCurr) if( aCCList_MemberMap[nActionNum] == &(*aCurr) ) - aPaintVDev.EnableOutput(sal_True); + aPaintVDev.EnableOutput(true); // but process every action const sal_uInt16 nType( pCurrAct->GetType() ); @@ -1254,7 +1254,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, Application::Reschedule(); } - const sal_Bool bOldMap = mbMap; + const bool bOldMap = mbMap; mbMap = aPaintVDev.mbMap = false; Bitmap aBandBmp( aPaintVDev.GetBitmap( Point(), aDstSzPix ) ); diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index db7b14e14ec0..a64e6fc3ddff 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -148,10 +148,10 @@ public: Link maOptionChangeHdl; ControlDependencyMap maControlDependencies; ChoiceDisableMap maChoiceDisableMap; - sal_Bool mbFirstPage; - sal_Bool mbLastPage; - sal_Bool mbReversePageOrder; - sal_Bool mbPapersizeFromSetup; + bool mbFirstPage; + bool mbLastPage; + bool mbReversePageOrder; + bool mbPapersizeFromSetup; view::PrintableState meJobState; vcl::PrinterController::MultiPageSetup maMultiPage; @@ -182,10 +182,10 @@ public: // history suggests this is intentional... ImplPrinterControllerData() : - mbFirstPage( sal_True ), - mbLastPage( sal_False ), - mbReversePageOrder( sal_False ), - mbPapersizeFromSetup( sal_False ), + mbFirstPage( true ), + mbLastPage( false ), + mbReversePageOrder( false ), + mbPapersizeFromSetup( false ), meJobState( view::PrintableState_JOB_STARTED ), mpProgress( NULL ), mnDefaultPaperBin( -1 ), @@ -285,7 +285,7 @@ void Printer::PrintJob( const boost::shared_ptr<PrinterController>& i_pControlle const JobSetup& i_rInitSetup ) { - sal_Bool bSynchronous = sal_False; + bool bSynchronous = false; PropertyValue* pVal = i_pController->getValue( OUString( "Wait" ) ); if( pVal ) pVal->Value >>= bSynchronous; @@ -333,7 +333,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr } // reset last page property - i_pController->setLastPage( sal_False ); + i_pController->setLastPage( false ); // update "PageRange" property inferring from other properties: // case 1: "Pages" set from UNO API -> @@ -402,7 +402,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr PropertyValue* pReverseVal = i_pController->getValue( OUString( "PrintReverse" ) ); if( pReverseVal ) { - sal_Bool bReverse = sal_False; + bool bReverse = false; pReverseVal->Value >>= bReverse; pController->setReversePrint( bReverse ); } @@ -410,7 +410,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr PropertyValue* pPapersizeFromSetupVal = i_pController->getValue( OUString( "PapersizeFromSetup" ) ); if( pPapersizeFromSetupVal ) { - sal_Bool bPapersizeFromSetup = sal_False; + bool bPapersizeFromSetup = false; pPapersizeFromSetupVal->Value >>= bPapersizeFromSetup; pController->setPapersizeFromSetup( bPapersizeFromSetup ); } @@ -560,7 +560,7 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print if ( !mpPrinter ) return false; - sal_Bool bSinglePrintJobs = sal_False; + bool bSinglePrintJobs = false; PropertyValue* pSingleValue = i_pController->getValue( OUString( "PrintCollateAsSingleJobs" ) ); if( pSingleValue ) { @@ -574,9 +574,9 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print pFileValue->Value >>= aFile; if( !aFile.isEmpty() ) { - mbPrintFile = sal_True; + mbPrintFile = true; maPrintFile = aFile; - bSinglePrintJobs = sal_False; + bSinglePrintJobs = false; } } @@ -588,10 +588,10 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print maJobName = i_rJobName; mnCurPage = 1; mnCurPrintPage = 1; - mbPrinting = sal_True; + mbPrinting = true; if( GetCapabilities( PRINTER_CAPABILITIES_USEPULLMODEL ) ) { - mbJobActive = sal_True; + mbJobActive = 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 @@ -612,12 +612,12 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print pSVData->mpDefInst->DestroyPrinter( mpPrinter ); mnCurPage = 0; mnCurPrintPage = 0; - mbPrinting = sal_False; + mbPrinting = false; mpPrinter = NULL; - mbJobActive = sal_False; + mbJobActive = false; GDIMetaFile aDummyFile; - i_pController->setLastPage(sal_True); + i_pController->setLastPage(true); i_pController->getFilteredPageFile(0, aDummyFile); return false; @@ -658,7 +658,7 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print i_pController->isDirectPrint(), maJobSetup.ImplGetConstData() ) ) { - mbJobActive = sal_True; + mbJobActive = true; i_pController->createProgressDialog(); const int nPages = i_pController->getFilteredPageCount(); // abort job, if no pages will be printed. @@ -678,7 +678,7 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print nInnerIteration == nInnerRepeatCount-1 && nJobIteration == nJobs-1 ) { - i_pController->setLastPage( sal_True ); + i_pController->setLastPage( true ); } i_pController->printFilteredPage( nPage ); if( i_pController->isProgressCanceled() ) @@ -705,7 +705,7 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print maJobName = i_rJobName; mnCurPage = 1; mnCurPrintPage = 1; - mbPrinting = sal_True; + mbPrinting = true; } else bError = true; @@ -726,7 +726,7 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print pSVData->mpDefInst->DestroyPrinter( mpPrinter ); mnCurPage = 0; mnCurPrintPage = 0; - mbPrinting = sal_False; + mbPrinting = false; mpPrinter = NULL; return false; @@ -863,7 +863,7 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons } else if ( i_rProps[ nProperty ].Name == "PageIncludesNonprintableArea" ) { - sal_Bool bVal = sal_False; + bool bVal = false; i_rProps[ nProperty ].Value >>= bVal; aPageSize.bFullPaper = static_cast<bool>(bVal); } @@ -985,7 +985,7 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag o_rMtf.SetPrefSize( aPageSize.aSize ); o_rMtf.SetPrefMapMode( aMapMode ); - mpImplData->mpPrinter->EnableOutput( sal_False ); + mpImplData->mpPrinter->EnableOutput( false ); o_rMtf.Record( mpImplData->mpPrinter.get() ); @@ -999,7 +999,7 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag mpImplData->maPageCache.insert( i_nUnfilteredPage, o_rMtf, aPageSize ); // reset "FirstPage" property to false now we've gotten at least our first one - mpImplData->mbFirstPage = sal_False; + mpImplData->mbFirstPage = false; return aPageSize; } @@ -1014,7 +1014,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 ), sal_True ) ); + o_rMtf.AddAction( new MetaClipRegionAction( Region( i_rClipRect ), true ) ); // append the subpage io_rSubPage.WindStart(); @@ -1031,8 +1031,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 ), sal_True ) ); - o_rMtf.AddAction( new MetaFillColorAction( Color( COL_TRANSPARENT ), sal_False ) ); + o_rMtf.AddAction( new MetaLineColorAction( Color( COL_BLACK ), true ) ); + o_rMtf.AddAction( new MetaFillColorAction( Color( COL_TRANSPARENT ), false ) ); o_rMtf.AddAction( new MetaRectAction( aBorderRect ) ); // restore gstate @@ -1085,8 +1085,8 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte // set last page property really only on the very last page to be rendered // that is on the last subpage of a NUp run - sal_Bool bIsLastPage = mpImplData->mbLastPage; - mpImplData->mbLastPage = sal_False; + bool bIsLastPage = mpImplData->mbLastPage; + mpImplData->mbLastPage = false; Size aPaperSize( mpImplData->getRealPaperSize( mpImplData->maMultiPage.aPaperSize, false ) ); @@ -1298,7 +1298,7 @@ void PrinterController::printFilteredPage( int i_nPage ) GDIMetaFile aCleanedFile; sal_uLong nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile ); - mpImplData->mpPrinter->EnableOutput( sal_True ); + mpImplData->mpPrinter->EnableOutput( true ); // actually print the page mpImplData->mpPrinter->ImplStartPage(); @@ -1326,19 +1326,19 @@ void PrinterController::abortJob() setJobState( view::PrintableState_JOB_ABORTED ); // applications (well, sw) depend on a page request with "IsLastPage" = true // to free resources, else they (well, sw) will crash eventually - setLastPage( sal_True ); + setLastPage( true ); delete mpImplData->mpProgress; mpImplData->mpProgress = NULL; GDIMetaFile aMtf; getPageFile( 0, aMtf, false ); } -void PrinterController::setLastPage( sal_Bool i_bLastPage ) +void PrinterController::setLastPage( bool i_bLastPage ) { mpImplData->mbLastPage = i_bLastPage; } -void PrinterController::setReversePrint( sal_Bool i_bReverse ) +void PrinterController::setReversePrint( bool i_bReverse ) { mpImplData->mbReversePageOrder = i_bReverse; } @@ -1348,7 +1348,7 @@ bool PrinterController::getReversePrint() const return mpImplData->mbReversePageOrder; } -void PrinterController::setPapersizeFromSetup( sal_Bool i_bPapersizeFromSetup ) +void PrinterController::setPapersizeFromSetup( bool i_bPapersizeFromSetup ) { mpImplData->mbPapersizeFromSetup = i_bPapersizeFromSetup; } @@ -1475,7 +1475,7 @@ void PrinterController::setUIOptions( const Sequence< PropertyValue >& i_rOption } else if ( rEntry.Name == "Enabled" ) { - sal_Bool bValue = sal_True; + bool bValue = true; rEntry.Value >>= bValue; bIsEnabled = bValue; } @@ -1537,7 +1537,7 @@ bool PrinterController::isUIOptionEnabled( const OUString& i_rProperty ) const if( pVal ) { sal_Int32 nDepVal = 0; - sal_Bool bDepVal = sal_False; + bool bDepVal = false; if( pVal->Value >>= nDepVal ) { bEnabled = (nDepVal == it->second.mnDependsOnEntry) || (it->second.mnDependsOnEntry == -1); @@ -1605,7 +1605,7 @@ OUString PrinterController::makeEnabled( const OUString& i_rProperty ) if( pVal ) { sal_Int32 nDepVal = 0; - sal_Bool bDepVal = sal_False; + bool bDepVal = false; if( pVal->Value >>= nDepVal ) { if( it->second.mnDependsOnEntry != -1 ) @@ -1615,7 +1615,7 @@ OUString PrinterController::makeEnabled( const OUString& i_rProperty ) } else if( pVal->Value >>= bDepVal ) { - setValue( aDependency, makeAny( sal_Bool( it->second.mnDependsOnEntry != 0 ) ) ); + setValue( aDependency, makeAny( it->second.mnDependsOnEntry != 0 ) ); } else { @@ -1638,7 +1638,7 @@ void PrinterController::createProgressDialog() { if( ! mpImplData->mpProgress ) { - sal_Bool bShow = sal_True; + bool bShow = true; PropertyValue* pMonitor = getValue( OUString( "MonitorVisible" ) ); if( pMonitor ) pMonitor->Value >>= bShow; @@ -1647,7 +1647,7 @@ void PrinterController::createProgressDialog() const css::beans::PropertyValue* pVal = getValue( OUString( "IsApi" ) ); if( pVal ) { - sal_Bool bApi = sal_False; + bool bApi = false; pVal->Value >>= bApi; bShow = ! bApi; } @@ -1690,7 +1690,7 @@ void PrinterController::pushPropertiesToPrinter() const css::beans::PropertyValue* pVal = getValue( OUString( "CopyCount" ) ); if( pVal ) pVal->Value >>= nCopyCount; - sal_Bool bCollate = sal_False; + bool bCollate = false; pVal = getValue( OUString( "Collate" ) ); if( pVal ) pVal->Value >>= bCollate; @@ -1713,19 +1713,19 @@ void PrinterController::pushPropertiesToPrinter() bool PrinterController::isShowDialogs() const { - sal_Bool bApi = getBoolProperty( OUString( "IsApi" ), sal_False ); + bool bApi = getBoolProperty( OUString( "IsApi" ), false ); return ! bApi && ! Application::IsHeadlessModeEnabled(); } bool PrinterController::isDirectPrint() const { - sal_Bool bDirect = getBoolProperty( OUString( "IsDirect" ), sal_False ); - return bDirect == sal_True; + bool bDirect = getBoolProperty( OUString( "IsDirect" ), false ); + return bDirect; } -sal_Bool PrinterController::getBoolProperty( const OUString& i_rProperty, sal_Bool i_bFallback ) const +bool PrinterController::getBoolProperty( const OUString& i_rProperty, bool i_bFallback ) const { - sal_Bool bRet = i_bFallback; + bool bRet = i_bFallback; const css::beans::PropertyValue* pVal = getValue( i_rProperty ); if( pVal ) pVal->Value >>= bRet; @@ -1754,9 +1754,9 @@ Any PrinterOptionsHelper::getValue( const OUString& i_rPropertyName ) const return aRet; } -sal_Bool PrinterOptionsHelper::getBoolValue( const OUString& i_rPropertyName, sal_Bool i_bDefault ) const +bool PrinterOptionsHelper::getBoolValue( const OUString& i_rPropertyName, bool i_bDefault ) const { - sal_Bool bRet = sal_False; + bool bRet = false; Any aVal( getValue( i_rPropertyName ) ); return (aVal >>= bRet) ? bRet : i_bDefault; } @@ -1945,7 +1945,7 @@ Any PrinterOptionsHelper::setBoolControlOpt(const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId, const OUString& i_rProperty, - sal_Bool i_bValue, + bool i_bValue, const PrinterOptionsHelper::UIControlOptions& i_rControlOptions) { Sequence< OUString > aHelpId; diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index e35f0b424ceb..6e3f7fe06d3d 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -1598,9 +1598,9 @@ SvStream& ReadRegion(SvStream& rIStrm, Region& rRegion) if(aCompat.GetVersion() >= 2) { - sal_Bool bHasPolyPolygon(sal_False); + bool bHasPolyPolygon(false); - rIStrm.ReadUChar( bHasPolyPolygon ); + rIStrm.ReadCharAsBool( bHasPolyPolygon ); if(bHasPolyPolygon) { @@ -1674,7 +1674,7 @@ SvStream& WriteRegion( SvStream& rOStrm, const Region& rRegion ) } // write polypolygon if available - const sal_Bool bHasPolyPolygon(rRegion.HasPolyPolygonOrB2DPolyPolygon()); + const bool bHasPolyPolygon(rRegion.HasPolyPolygonOrB2DPolyPolygon()); rOStrm.WriteUChar( bHasPolyPolygon ); if(bHasPolyPolygon) diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index ab522688e0f5..35f66b58924a 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -167,7 +167,7 @@ void SalGraphics::mirror( long& x, long& nWidth, const OutputDevice *pOutDev, bo } } -sal_Bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack ) const +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 ) @@ -240,10 +240,10 @@ sal_Bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoi pPtAry2[j].mnY = pPtAry[i].mnY; } } - return sal_True; + return true; } else - return sal_False; + return false; } void SalGraphics::mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack ) const @@ -422,7 +422,7 @@ void SalGraphics::DrawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry, cons if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) { SalPoint* pPtAry2 = new SalPoint[nPoints]; - sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); + bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); drawPolyLine( nPoints, bCopied ? pPtAry2 : pPtAry ); delete [] pPtAry2; } @@ -435,7 +435,7 @@ void SalGraphics::DrawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry, const if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) { SalPoint* pPtAry2 = new SalPoint[nPoints]; - sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); + bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); drawPolygon( nPoints, bCopied ? pPtAry2 : pPtAry ); delete [] pPtAry2; } @@ -480,13 +480,13 @@ bool SalGraphics::DrawPolyPolygon( const basegfx::B2DPolyPolygon& i_rPolyPolygon return bRet; } -sal_Bool SalGraphics::DrawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev ) +bool SalGraphics::DrawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev ) { - sal_Bool bResult = sal_False; + bool bResult = false; if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) { SalPoint* pPtAry2 = new SalPoint[nPoints]; - sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); + bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); bResult = drawPolyLineBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry ); delete [] pPtAry2; } @@ -495,13 +495,13 @@ sal_Bool SalGraphics::DrawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pP return bResult; } -sal_Bool SalGraphics::DrawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev ) +bool SalGraphics::DrawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev ) { - sal_Bool bResult = sal_False; + bool bResult = false; if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) { SalPoint* pPtAry2 = new SalPoint[nPoints]; - sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); + bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); bResult = drawPolygonBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry ); delete [] pPtAry2; } @@ -510,10 +510,10 @@ sal_Bool SalGraphics::DrawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPt return bResult; } -sal_Bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt32* i_pPoints, +bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt32* i_pPoints, const SalPoint* const* i_pPtAry, const sal_uInt8* const* i_pFlgAry, const OutputDevice* i_pOutDev ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (i_pOutDev && i_pOutDev->IsRTLEnabled()) ) { // TODO: optimize, reduce new/delete calls @@ -645,7 +645,7 @@ void SalGraphics::Invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInve if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) { SalPoint* pPtAry2 = new SalPoint[nPoints]; - sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); + bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); invert( nPoints, bCopied ? pPtAry2 : pPtAry, nFlags ); delete [] pPtAry2; } @@ -653,14 +653,14 @@ void SalGraphics::Invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInve invert( nPoints, pPtAry, nFlags ); } -sal_Bool SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize, const OutputDevice *pOutDev ) +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 ); } -sal_Bool SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, +bool SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, const Point& aPos, bool& rIsInside, const OutputDevice *pOutDev ) { if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) @@ -710,7 +710,7 @@ void SalGraphics::mirror( ImplControlValue& rVal, const OutputDevice* pOutDev, b } } -sal_Bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, +bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, const OutputDevice *pOutDev ) { @@ -720,14 +720,14 @@ sal_Bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, c mirror( rgn, pOutDev ); boost::scoped_ptr< ImplControlValue > mirrorValue( aValue.clone()); mirror( *mirrorValue, pOutDev ); - sal_Bool bRet = drawNativeControl( nType, nPart, rgn, nState, *mirrorValue, aCaption ); + bool bRet = drawNativeControl( nType, nPart, rgn, nState, *mirrorValue, aCaption ); return bRet; } else return drawNativeControl( nType, nPart, rControlRegion, nState, aValue, aCaption ); } -sal_Bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, +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 ) { @@ -742,9 +742,9 @@ sal_Bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPa { mirror( rNativeBoundingRegion, pOutDev, true ); mirror( rNativeContentRegion, pOutDev, true ); - return sal_True; + return true; } - return sal_False; + return false; } else return getNativeControlRegion( nType, nPart, rControlRegion, nState, aValue, aCaption, diff --git a/vcl/source/gdi/salnativewidgets-none.cxx b/vcl/source/gdi/salnativewidgets-none.cxx index bd97f0d67b7b..8e8ee1240caf 100644 --- a/vcl/source/gdi/salnativewidgets-none.cxx +++ b/vcl/source/gdi/salnativewidgets-none.cxx @@ -32,9 +32,9 @@ * Returns sal_True if the platform supports native * drawing of the control defined by nPart */ -sal_Bool SalGraphics::IsNativeControlSupported( ControlType, ControlPart ) +bool SalGraphics::IsNativeControlSupported( ControlType, ControlPart ) { - return( sal_False ); + return false; } @@ -45,13 +45,13 @@ sal_Bool SalGraphics::IsNativeControlSupported( ControlType, ControlPart ) * aPos was or was not inside the native widget specified by the * nType/nPart combination. */ -sal_Bool SalGraphics::hitTestNativeControl( ControlType, +bool SalGraphics::hitTestNativeControl( ControlType, ControlPart, const Rectangle&, const Point&, bool& ) { - return( sal_False ); + return false; } @@ -64,14 +64,14 @@ sal_Bool SalGraphics::hitTestNativeControl( ControlType, * aValue: An optional value (tristate/numerical/string) * aCaption: A caption or title string (like button text etc) */ -sal_Bool SalGraphics::drawNativeControl( ControlType, +bool SalGraphics::drawNativeControl( ControlType, ControlPart, const Rectangle&, ControlState, const ImplControlValue&, const OUString& ) { - return( sal_False ); + return false; } /* @@ -87,7 +87,7 @@ sal_Bool SalGraphics::drawNativeControl( ControlType, * aValue: An optional value (tristate/numerical/string) * aCaption: A caption or title string (like button text etc) */ -sal_Bool SalGraphics::getNativeControlRegion( ControlType, +bool SalGraphics::getNativeControlRegion( ControlType, ControlPart, const Rectangle&, ControlState, @@ -96,7 +96,7 @@ sal_Bool SalGraphics::getNativeControlRegion( ControlType, Rectangle &, Rectangle & ) { - return( sal_False ); + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index a7b3633ddf2d..2602dbc3d7f8 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -73,7 +73,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, mnBitCount = ( nBitCount ? nBitCount : pOutDev->GetBitCount() ); mnOutWidth = nDX; mnOutHeight = nDY; - mbScreenComp = sal_True; + mbScreenComp = true; mnAlphaDepth = -1; // #i59315# init vdev size from system object, when passed a @@ -86,7 +86,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, SetAntialiasing( ANTIALIASING_DISABLE_TEXT ); if ( pOutDev->GetOutDevType() == OUTDEV_PRINTER ) - mbScreenComp = sal_False; + mbScreenComp = false; else if ( pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) mbScreenComp = ((VirtualDevice*)pOutDev)->mbScreenComp; @@ -203,24 +203,24 @@ VirtualDevice::~VirtualDevice() // ----------------------------------------------------------------------- -sal_Bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, sal_Bool bErase, const basebmp::RawMemorySharedArray &pBuffer ) +bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase, const basebmp::RawMemorySharedArray &pBuffer ) { SAL_INFO( "vcl.gdi", "VirtualDevice::InnerImplSetOutputSizePixel( " << rNewSize.Width() << ", " << rNewSize.Height() << ", " << int(bErase) << " )" ); if ( !mpVirDev ) - return sal_False; + return false; else if ( rNewSize == GetOutputSizePixel() ) { if ( bErase ) Erase(); // Yeah, so trying to re-use a VirtualDevice but this time using a // pre-allocated buffer won't work. Big deal. - return sal_True; + return true; } - sal_Bool bRet; + bool bRet; long nNewWidth = rNewSize.Width(), nNewHeight = rNewSize.Height(); if ( nNewWidth < 1 ) @@ -252,7 +252,7 @@ sal_Bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, sal_B if ( !mpGraphics ) { if ( !ImplGetGraphics() ) - return sal_False; + return false; } pNewVirDev = pSVData->mpDefInst->CreateVirtualDevice( mpGraphics, nNewWidth, nNewHeight, mnBitCount ); @@ -288,16 +288,16 @@ sal_Bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, sal_B mpVirDev = pNewVirDev; mnOutWidth = rNewSize.Width(); mnOutHeight = rNewSize.Height(); - bRet = sal_True; + bRet = true; } else { - bRet = sal_False; + bRet = false; pSVData->mpDefInst->DestroyVirtualDevice( pNewVirDev ); } } else - bRet = sal_False; + bRet = false; } return bRet; @@ -321,7 +321,7 @@ void VirtualDevice::ImplFillOpaqueRectangle( const Rectangle& rRect ) // ----------------------------------------------------------------------- -sal_Bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, sal_Bool bErase, const basebmp::RawMemorySharedArray &pBuffer ) +bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, bool bErase, const basebmp::RawMemorySharedArray &pBuffer ) { if( InnerImplSetOutputSizePixel(rNewSize, bErase, pBuffer) ) { @@ -350,18 +350,18 @@ sal_Bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, sal_Bool b mpAlphaVDev->SetMapMode( GetMapMode() ); } - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool VirtualDevice::SetOutputSizePixel( const Size& rNewSize, sal_Bool bErase ) +bool VirtualDevice::SetOutputSizePixel( const Size& rNewSize, bool bErase ) { return ImplSetOutputSizePixel( rNewSize, bErase, basebmp::RawMemorySharedArray() ); } -sal_Bool VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer( const Size& rNewSize, const Fraction& rScale, const Point& rNewOffset, const basebmp::RawMemorySharedArray &pBuffer ) +bool VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer( const Size& rNewSize, const Fraction& rScale, const Point& rNewOffset, const basebmp::RawMemorySharedArray &pBuffer ) { if (pBuffer) { MapMode mm = GetMapMode(); @@ -370,7 +370,7 @@ sal_Bool VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer( const Size& rNew mm.SetScaleY( rScale ); SetMapMode( mm ); } - return ImplSetOutputSizePixel( rNewSize, sal_True, pBuffer); + return ImplSetOutputSizePixel( rNewSize, true, pBuffer); } // ----------------------------------------------------------------------- @@ -408,8 +408,8 @@ void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32 mnDPIY = i_nDPIY; mnDPIScaleFactor = 1; - EnableOutput( sal_False ); // prevent output on reference device - mbScreenComp = sal_False; + EnableOutput( false ); // prevent output on reference device + mbScreenComp = false; // invalidate currently selected fonts mbInitFont = true; diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx index f6d7d59b34af..7c08e016b5cb 100644 --- a/vcl/source/gdi/wall.cxx +++ b/vcl/source/gdi/wall.cxx @@ -118,9 +118,9 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper ) // version 2 if( aCompat.GetVersion() >= 2 ) { - sal_Bool bRect, bGrad, bBmp, bDummy; + bool bRect, bGrad, bBmp, bDummy; - rIStm.ReadUChar( bRect ).ReadUChar( bGrad ).ReadUChar( bBmp ).ReadUChar( bDummy ).ReadUChar( bDummy ).ReadUChar( bDummy ); + rIStm.ReadCharAsBool( bRect ).ReadCharAsBool( bGrad ).ReadCharAsBool( bBmp ).ReadCharAsBool( bDummy ).ReadCharAsBool( bDummy ).ReadCharAsBool( bDummy ); if( bRect ) { @@ -155,10 +155,10 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper ) SvStream& WriteImplWallpaper( SvStream& rOStm, const ImplWallpaper& rImplWallpaper ) { VersionCompat aCompat( rOStm, STREAM_WRITE, 3 ); - sal_Bool bRect = ( rImplWallpaper.mpRect != NULL ); - sal_Bool bGrad = ( rImplWallpaper.mpGradient != NULL ); - sal_Bool bBmp = ( rImplWallpaper.mpBitmap != NULL ); - sal_Bool bDummy = sal_False; + bool bRect = ( rImplWallpaper.mpRect != NULL ); + bool bGrad = ( rImplWallpaper.mpGradient != NULL ); + bool bBmp = ( rImplWallpaper.mpBitmap != NULL ); + bool bDummy = false; // version 1 WriteColor( rOStm, rImplWallpaper.maColor ); @@ -184,7 +184,7 @@ SvStream& WriteImplWallpaper( SvStream& rOStm, const ImplWallpaper& rImplWallpap // ----------------------------------------------------------------------- -inline void Wallpaper::ImplMakeUnique( sal_Bool bReleaseCache ) +inline void Wallpaper::ImplMakeUnique( bool bReleaseCache ) { // copy them if other references exist if ( mpImplWallpaper->mnRefCount != 1 ) @@ -292,7 +292,7 @@ const Color& Wallpaper::GetColor() const void Wallpaper::SetStyle( WallpaperStyle eStyle ) { - ImplMakeUnique( sal_False ); + ImplMakeUnique( false ); if( eStyle == WALLPAPER_APPLICATIONGRADIENT ) // set a dummy gradient, the correct gradient @@ -353,7 +353,7 @@ BitmapEx Wallpaper::GetBitmap() const // ----------------------------------------------------------------------- -sal_Bool Wallpaper::IsBitmap() const +bool Wallpaper::IsBitmap() const { return (mpImplWallpaper->mpBitmap != 0); @@ -394,7 +394,7 @@ Gradient Wallpaper::GetGradient() const // ----------------------------------------------------------------------- -sal_Bool Wallpaper::IsGradient() const +bool Wallpaper::IsGradient() const { return (mpImplWallpaper->mpGradient != 0); @@ -422,7 +422,7 @@ Gradient Wallpaper::ImplGetApplicationGradient() const void Wallpaper::SetRect( const Rectangle& rRect ) { - ImplMakeUnique( sal_False ); + ImplMakeUnique( false ); if ( rRect.IsEmpty() ) { @@ -457,7 +457,7 @@ Rectangle Wallpaper::GetRect() const // ----------------------------------------------------------------------- -sal_Bool Wallpaper::IsRect() const +bool Wallpaper::IsRect() const { return (mpImplWallpaper->mpRect != 0); @@ -466,26 +466,26 @@ sal_Bool Wallpaper::IsRect() const // ----------------------------------------------------------------------- -sal_Bool Wallpaper::IsFixed() const +bool Wallpaper::IsFixed() const { if ( mpImplWallpaper->meStyle == WALLPAPER_NULL ) - return sal_False; + return false; else return (!mpImplWallpaper->mpBitmap && !mpImplWallpaper->mpGradient); } // ----------------------------------------------------------------------- -sal_Bool Wallpaper::IsScrollable() const +bool Wallpaper::IsScrollable() const { if ( mpImplWallpaper->meStyle == WALLPAPER_NULL ) - return sal_False; + return false; else if ( !mpImplWallpaper->mpBitmap && !mpImplWallpaper->mpGradient ) - return sal_True; + return true; else if ( mpImplWallpaper->mpBitmap ) return (mpImplWallpaper->meStyle == WALLPAPER_TILE); else - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -515,35 +515,35 @@ Wallpaper& Wallpaper::operator=( const Wallpaper& rWallpaper ) // ----------------------------------------------------------------------- -sal_Bool Wallpaper::operator==( const Wallpaper& rWallpaper ) const +bool Wallpaper::operator==( const Wallpaper& rWallpaper ) const { if ( mpImplWallpaper == rWallpaper.mpImplWallpaper ) - return sal_True; + return true; if ( ( mpImplWallpaper->meStyle != rWallpaper.mpImplWallpaper->meStyle ) || ( mpImplWallpaper->maColor != rWallpaper.mpImplWallpaper->maColor ) ) - return sal_False; + return false; if ( mpImplWallpaper->mpRect != rWallpaper.mpImplWallpaper->mpRect && ( !mpImplWallpaper->mpRect || !rWallpaper.mpImplWallpaper->mpRect || *(mpImplWallpaper->mpRect) != *(rWallpaper.mpImplWallpaper->mpRect) ) ) - return sal_False; + return false; if ( mpImplWallpaper->mpBitmap != rWallpaper.mpImplWallpaper->mpBitmap && ( !mpImplWallpaper->mpBitmap || !rWallpaper.mpImplWallpaper->mpBitmap || *(mpImplWallpaper->mpBitmap) != *(rWallpaper.mpImplWallpaper->mpBitmap) ) ) - return sal_False; + return false; if ( mpImplWallpaper->mpGradient != rWallpaper.mpImplWallpaper->mpGradient && ( !mpImplWallpaper->mpGradient || !rWallpaper.mpImplWallpaper->mpGradient || *(mpImplWallpaper->mpGradient) != *(rWallpaper.mpImplWallpaper->mpGradient) ) ) - return sal_False; + return false; - return sal_True; + return true; } // ----------------------------------------------------------------------- |