From 50a4018d0d95652b73175f37740c9c7dd13ca4e0 Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Fri, 7 Jun 2013 02:26:01 +0900 Subject: sal_Bool to bool Change-Id: I58efb9d026203c77d3806552bd4280a4d16d5111 --- include/vcl/wmf.hxx | 4 ++-- sd/source/ui/unoidl/unopage.cxx | 2 +- svtools/source/misc/transfer.cxx | 2 +- svx/source/unodraw/unoshap2.cxx | 2 +- svx/source/unodraw/unoshap4.cxx | 2 +- svx/source/unodraw/unoshape.cxx | 4 ++-- vcl/source/filter/sgvmain.hxx | 2 +- vcl/source/filter/sgvtext.cxx | 6 +++--- vcl/source/filter/wmf/emfwr.cxx | 4 ++-- vcl/source/filter/wmf/enhwmf.cxx | 8 ++++---- vcl/source/filter/wmf/winmtf.cxx | 26 +++++++++++++------------- vcl/source/filter/wmf/winwmf.cxx | 4 ++-- vcl/source/filter/wmf/wmf.cxx | 8 ++++---- vcl/source/filter/wmf/wmfwr.cxx | 40 ++++++++++++++++++++-------------------- vcl/source/filter/wmf/wmfwr.hxx | 18 +++++++++--------- 15 files changed, 66 insertions(+), 66 deletions(-) diff --git a/include/vcl/wmf.hxx b/include/vcl/wmf.hxx index ed0b5e27fd50..2293f7222afd 100644 --- a/include/vcl/wmf.hxx +++ b/include/vcl/wmf.hxx @@ -59,11 +59,11 @@ sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaF VCL_DLLPUBLIC sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem ); -VCL_DLLPUBLIC sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL, sal_Bool bPlaceable = sal_True ); +VCL_DLLPUBLIC bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL, bool bPlaceable = true ); sal_Bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL ); -VCL_DLLPUBLIC sal_Bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF ); +VCL_DLLPUBLIC bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF ); #endif diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 12926e270387..1fb509a236f6 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -1090,7 +1090,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) pMetaFile->SetPrefSize( aSize ); SvMemoryStream aDestStrm( 65535, 65535 ); - ConvertGDIMetaFileToWMF( *pMetaFile, aDestStrm, NULL, sal_False ); + ConvertGDIMetaFileToWMF( *pMetaFile, aDestStrm, NULL, false ); Sequence aSeq( (sal_Int8*)aDestStrm.GetData(), aDestStrm.Tell() ); aAny <<= aSeq; } diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index d7a107200a46..c1806c4fd1cf 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -416,7 +416,7 @@ Any SAL_CALL TransferableHelper::getTransferData( const DataFlavor& rFlavor ) th SvMemoryStream aDstStm( 65535, 65535 ); // taking wmf without file header - if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, NULL, sal_False ) ) + if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, NULL, false ) ) { maAny <<= ( aSeq = Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aDstStm.GetData() ), aDstStm.Seek( STREAM_SEEK_TO_END ) ) ); diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index e96f7e12b560..0b89df29f7a4 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1626,7 +1626,7 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte { SvMemoryStream aDestStrm( 65535, 65535 ); - ConvertGDIMetaFileToWMF( rGraphic.GetGDIMetaFile(), aDestStrm, NULL, sal_False ); + ConvertGDIMetaFileToWMF( rGraphic.GetGDIMetaFile(), aDestStrm, NULL, false ); const uno::Sequence aSeq( static_cast< const sal_Int8* >(aDestStrm.GetData()), aDestStrm.GetEndOfData()); diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 59b8b59ac43b..768896d9da36 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -239,7 +239,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const OUString& rName, const SfxItemPro // #i119735# just use GetGDIMetaFile, it will create a bufferd version of contained bitmap now automatically GDIMetaFile aMtf(pObj->GetGraphic()->GetGDIMetaFile()); SvMemoryStream aDestStrm( 65535, 65535 ); - ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False ); + ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, false ); const uno::Sequence aSeq( static_cast< const sal_Int8* >(aDestStrm.GetData()), aDestStrm.GetEndOfData()); diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 5aee66783c8a..c5199e601049 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -706,7 +706,7 @@ uno::Any SvxShape::GetBitmap( sal_Bool bMetaFile /* = sal_False */ ) const throw if( bMetaFile ) { SvMemoryStream aDestStrm( 65535, 65535 ); - ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False ); + ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, false ); const uno::Sequence aSeq( static_cast< const sal_Int8* >(aDestStrm.GetData()), aDestStrm.GetEndOfData()); @@ -2945,7 +2945,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl // #119735# just use GetGDIMetaFile, it will create a bufferd version of contained bitmap now automatically GDIMetaFile aMtf(pObj->GetGraphic()->GetGDIMetaFile()); SvMemoryStream aDestStrm( 65535, 65535 ); - ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False ); + ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, false ); const uno::Sequence aSeq( static_cast< const sal_Int8* >(aDestStrm.GetData()), aDestStrm.GetEndOfData()); diff --git a/vcl/source/filter/sgvmain.hxx b/vcl/source/filter/sgvmain.hxx index 36564cc4fab3..7d7d689cc9f6 100644 --- a/vcl/source/filter/sgvmain.hxx +++ b/vcl/source/filter/sgvmain.hxx @@ -337,7 +337,7 @@ public: SgfFontOne* Last; // Listenende sal_uInt32 LastID; // f�r schnelleren Zugriff bei Wiederholungen SgfFontOne* LastLn; // f�r schnelleren Zugriff bei Wiederholungen - sal_Bool Tried; + bool Tried; SgfFontLst(); ~SgfFontLst(); void AssignFN(const String& rFName); diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index 8373ac58c7fa..96aba68ea810 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -1184,7 +1184,7 @@ SgfFontLst::SgfFontLst() Last=NULL; LastID=0; LastLn=NULL; - Tried=sal_False; + Tried=false; } SgfFontLst::~SgfFontLst() @@ -1204,7 +1204,7 @@ void SgfFontLst::RausList() } pList=NULL; Last=NULL; - Tried=sal_False; + Tried=false; LastID=0; LastLn=NULL; } @@ -1216,7 +1216,7 @@ void SgfFontLst::ReadList() { if (!Tried) { - Tried=sal_True; + Tried=true; LastID=0; LastLn=NULL; SgfFontOne* P,P1; diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index e4e3e51afc68..3adaaf2eeb9e 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -697,14 +697,14 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ) ImplWritePolygonRecord( rPolyPoly[ 0 ], sal_True ); else { - sal_Bool bHasFlags = sal_False; + bool bHasFlags = false; sal_uInt32 nTotalPoints = 0; for( i = 0; i < nPolyCount; i++ ) { nTotalPoints += rPolyPoly[ i ].GetSize(); if ( rPolyPoly[ i ].HasFlags() ) - bHasFlags = sal_True; + bHasFlags = true; } if( nTotalPoints ) { diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index ad2a3a6d0d33..d024ee3437d6 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -202,9 +202,9 @@ SvStream& operator>>( SvStream& rIn, XForm& rXForm ) return rIn; } -static sal_Bool ImplReadRegion( PolyPolygon& rPolyPoly, SvStream& rSt, sal_uInt32 nLen ) +static bool ImplReadRegion( PolyPolygon& rPolyPoly, SvStream& rSt, sal_uInt32 nLen ) { - sal_Bool bOk = sal_False; + bool bOk = false; if ( nLen ) { sal_uInt32 nHdSize, nType, nCount, nRgnSize, i; @@ -229,7 +229,7 @@ static sal_Bool ImplReadRegion( PolyPolygon& rPolyPoly, SvStream& rSt, sal_uInt3 rPolyPoly.GetUnion( aPolyPolyOr1, aPolyPolyOr2 ); rPolyPoly = aPolyPolyOr2; } - bOk = sal_True; + bOk = true; } } return bOk; @@ -456,7 +456,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() sal_Bool bFlag(sal_False), bStatus = ReadHeader(); sal_Bool bHaveDC = false; - static sal_Bool bEnableEMFPlus = ( getenv( "EMF_PLUS_DISABLE" ) == NULL ); + static bool bEnableEMFPlus = ( getenv( "EMF_PLUS_DISABLE" ) == NULL ); while( bStatus && nRecordCount-- && pWMF->good()) { diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index c8c6652af667..43aaf5e13e26 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -268,16 +268,16 @@ WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont ) #ifdef WIN_MTF_ASSERT void WinMtfAssertHandler( const sal_Char* pAction, sal_uInt32 nFlags ) { - static sal_Bool bOnlyOnce; + static bool bOnlyOnce; static sal_Int32 nAssertCount; if ( nFlags & WIN_MTF_ASSERT_INIT ) nAssertCount = 0; if ( nFlags & WIN_MTF_ASSERT_ONCE ) - bOnlyOnce = sal_True; + bOnlyOnce = true; if ( nFlags & WIN_MTF_ASSERT_MIFE ) { - if ( ( nAssertCount == 0 ) || ( bOnlyOnce == sal_False ) ) + if ( ( nAssertCount == 0 ) || !bOnlyOnce ) { OStringBuffer aText("WMF/EMF Import: "); if (pAction) @@ -1469,10 +1469,10 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry mpGDIMetaFile->AddAction( new MetaLayoutModeAction( mnTextLayoutMode ) ); } SetGfxMode( nGfxMode ); - sal_Bool bChangeFont = sal_False; + bool bChangeFont = false; if ( mnLatestTextAlign != mnTextAlign ) { - bChangeFont = sal_True; + bChangeFont = true; mnLatestTextAlign = mnTextAlign; TextAlign eTextAlign; if ( ( mnTextAlign & TA_BASELINE) == TA_BASELINE ) @@ -1485,24 +1485,24 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry } if ( maLatestTextColor != maTextColor ) { - bChangeFont = sal_True; + bChangeFont = true; maLatestTextColor = maTextColor; mpGDIMetaFile->AddAction( new MetaTextColorAction( maTextColor ) ); } - sal_Bool bChangeFillColor = sal_False; + bool bChangeFillColor = false; if ( maLatestBkColor != maBkColor ) { - bChangeFillColor = sal_True; + bChangeFillColor = true; maLatestBkColor = maBkColor; } if ( mnLatestBkMode != mnBkMode ) { - bChangeFillColor = sal_True; + bChangeFillColor = true; mnLatestBkMode = mnBkMode; } if ( bChangeFillColor ) { - bChangeFont = sal_True; + bChangeFont = true; mpGDIMetaFile->AddAction( new MetaTextFillColorAction( maFont.GetFillColor(), !maFont.IsTransparent() ) ); } Font aTmp( maFont ); @@ -1708,7 +1708,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) } else { - sal_Bool bDrawn = sal_False; + bool bDrawn = false; if ( i == nObjectStartIndex ) // optimizing, sometimes it is possible to create just one transparent bitmap { @@ -1729,7 +1729,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) Bitmap aMask( pSave->aBmp ); aMask.Invert(); BitmapEx aBmpEx( pSave2->aBmp, aMask ); ImplDrawBitmap( aPos, aSize, aBmpEx ); - bDrawn = sal_True; + bDrawn = true; i++; } // #i20085# This is just the other way @@ -1740,7 +1740,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) Bitmap aMask( pSave->aBmp ); BitmapEx aBmpEx( pSave2->aBmp, aMask ); ImplDrawBitmap( aPos, aSize, aBmpEx ); - bDrawn = sal_True; + bDrawn = true; i++; } } diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index 84b1a78d9537..76df617c381d 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -503,7 +503,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) sal_uInt32 nMaxStreamPos = nRecordPos + ( nRecordSize << 1 ); sal_Int32 nDxArySize = nMaxStreamPos - pWMF->Tell(); sal_Int32 nDxAryEntries = nDxArySize >> 1; - sal_Bool bUseDXAry = sal_False; + bool bUseDXAry = false; if ( ( ( nDxAryEntries % nOriginalTextLen ) == 0 ) && ( nNewTextLen <= nOriginalTextLen ) ) { @@ -534,7 +534,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) pDXAry[ i ] = nDx; } if ( i == nNewTextLen ) - bUseDXAry = sal_True; + bUseDXAry = true; } if ( pDXAry && bUseDXAry ) pOut->DrawText( aPosition, aText, pDXAry ); diff --git a/vcl/source/filter/wmf/wmf.cxx b/vcl/source/filter/wmf/wmf.cxx index 26f7a1a0ba81..91cf24f90621 100644 --- a/vcl/source/filter/wmf/wmf.cxx +++ b/vcl/source/filter/wmf/wmf.cxx @@ -84,8 +84,8 @@ sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigI // ----------------------------------------------------------------------------- -sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, - FilterConfigItem* pConfigItem, sal_Bool bPlaceable) +bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, + FilterConfigItem* pConfigItem, bool bPlaceable) { WMFWriter aWMFWriter; return aWMFWriter.WriteWMF( rMTF, rTargetStream, pConfigItem, bPlaceable ); @@ -102,9 +102,9 @@ sal_Bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetSt // ----------------------------------------------------------------------------- -sal_Bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF ) +bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF ) { - return WMFWriter().WriteWMF( rMTF, rStream, NULL, sal_False ); + return WMFWriter().WriteWMF( rMTF, rStream, NULL, false ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 385c3fd58a14..3cc4dccd82c5 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -420,9 +420,9 @@ void WMFWriter::WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_In /* if return value is true, then a complete unicode string and also a polygon replacement has been written, so there is no more action necessary */ -sal_Bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String& rUniStr, const sal_Int32* pDXAry ) +bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String& rUniStr, const sal_Int32* pDXAry ) { - sal_Bool bEscapeUsed = sal_False; + bool bEscapeUsed = false; sal_uInt32 i, nStringLen = rUniStr.Len(); if ( nStringLen ) @@ -510,7 +510,7 @@ sal_Bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String& } aSrcFillColor = aOldFillColor; aSrcLineColor = aOldLineColor; - bEscapeUsed = sal_True; + bEscapeUsed = true; } } } @@ -686,10 +686,10 @@ void WMFWriter::WMFRecord_SelectObject(sal_uInt16 nObjectHandle) } -void WMFWriter::WMFRecord_SetBkMode(sal_Bool bTransparent) +void WMFWriter::WMFRecord_SetBkMode(bool bTransparent) { WriteRecordHeader(0x00000004,W_META_SETBKMODE); - if (bTransparent==sal_True) *pWMF << (sal_uInt16)W_TRANSPARENT; + if (bTransparent) *pWMF << (sal_uInt16)W_TRANSPARENT; else *pWMF << (sal_uInt16)W_OPAQUE; } @@ -849,19 +849,19 @@ sal_uInt16 WMFWriter::AllocHandle() sal_uInt16 i; for (i=0; iGetError()) - bStatus=sal_False; + bStatus=false; - if(bStatus==sal_False) + if(!bStatus) break; } } @@ -1652,7 +1652,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) // ------------------------------------------------------------------------ -void WMFWriter::WriteHeader( const GDIMetaFile &, sal_Bool bPlaceable ) +void WMFWriter::WriteHeader( const GDIMetaFile &, bool bPlaceable ) { if( bPlaceable ) { @@ -1708,13 +1708,13 @@ void WMFWriter::UpdateHeader() // ------------------------------------------------------------------------ -sal_Bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, - FilterConfigItem* pFConfigItem, sal_Bool bPlaceable ) +bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, + FilterConfigItem* pFConfigItem, bool bPlaceable ) { WMFWriterAttrStackMember * pAt; - bEmbedEMF = sal_True; - bStatus=sal_True; + bEmbedEMF = true; + bStatus=true; pConvert = 0; pVirDev = new VirtualDevice; @@ -1762,7 +1762,7 @@ sal_Bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, pAttrStack=NULL; for (sal_uInt16 i=0; i