From e8f8f24c8415898c787bbfb629247ed62e73a2b9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 21 Feb 2014 12:53:51 +0100 Subject: vcl: sal_Bool -> bool Change-Id: I2a3e3d3e3266ea0f0fafdd91362076a4aa160f0e --- vcl/source/filter/FilterConfigCache.cxx | 30 ++--- vcl/source/filter/FilterConfigCache.hxx | 20 +-- vcl/source/filter/FilterConfigItem.cxx | 44 +++---- vcl/source/filter/graphicfilter.cxx | 24 ++-- vcl/source/filter/graphicfilter2.cxx | 212 ++++++++++++++++---------------- vcl/source/filter/igif/gifread.cxx | 2 +- vcl/source/filter/jpeg/JpegReader.cxx | 2 +- vcl/source/filter/jpeg/JpegReader.hxx | 2 +- vcl/source/filter/jpeg/JpegWriter.cxx | 8 +- vcl/source/filter/jpeg/JpegWriter.hxx | 4 +- vcl/source/filter/jpeg/jpeg.h | 2 +- vcl/source/filter/jpeg/jpegc.cxx | 8 +- vcl/source/filter/sgvmain.hxx | 24 ++-- vcl/source/filter/sgvtext.cxx | 32 ++--- vcl/source/filter/wmf/emfwr.cxx | 34 ++--- vcl/source/filter/wmf/emfwr.hxx | 18 +-- vcl/source/filter/wmf/enhwmf.cxx | 84 ++++++------- vcl/source/filter/wmf/winmtf.cxx | 96 +++++++-------- vcl/source/filter/wmf/winmtf.hxx | 88 ++++++------- vcl/source/filter/wmf/winwmf.cxx | 26 ++-- vcl/source/filter/wmf/wmf.cxx | 10 +- 21 files changed, 385 insertions(+), 385 deletions(-) (limited to 'vcl/source/filter') diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx index 71334c96653a..cbb35a2ccd61 100644 --- a/vcl/source/filter/FilterConfigCache.cxx +++ b/vcl/source/filter/FilterConfigCache.cxx @@ -52,7 +52,7 @@ const char* FilterConfigCache::FilterConfigCacheEntry::ExternalPixelFilterNameLi "epp", "ira", "era", "itg", "iti", "eti", "exp", NULL }; -sal_Bool FilterConfigCache::bInitialized = sal_False; +bool FilterConfigCache::bInitialized = false; sal_Int32 FilterConfigCache::nIndType = -1; sal_Int32 FilterConfigCache::nIndUIName = -1; sal_Int32 FilterConfigCache::nIndDocumentService = -1; @@ -62,30 +62,30 @@ sal_Int32 FilterConfigCache::nIndUserData = -1; sal_Int32 FilterConfigCache::nIndFileFormatVersion = -1; sal_Int32 FilterConfigCache::nIndTemplateName = -1; -sal_Bool FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUString& rUserDataEntry ) +bool FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUString& rUserDataEntry ) { - bIsPixelFormat = bIsInternalFilter = sal_False; + bIsPixelFormat = bIsInternalFilter = false; sFilterName = rUserDataEntry; const char** pPtr; - for ( pPtr = InternalPixelFilterNameList; *pPtr && ( bIsInternalFilter == sal_False ); pPtr++ ) + for ( pPtr = InternalPixelFilterNameList; *pPtr && !bIsInternalFilter; pPtr++ ) { if ( sFilterName.equalsIgnoreAsciiCase( OUString(*pPtr, strlen(*pPtr), RTL_TEXTENCODING_ASCII_US) ) ) { - bIsInternalFilter = sal_True; - bIsPixelFormat = sal_True; + bIsInternalFilter = true; + bIsPixelFormat = true; } } - for ( pPtr = InternalVectorFilterNameList; *pPtr && ( bIsInternalFilter == sal_False ); pPtr++ ) + for ( pPtr = InternalVectorFilterNameList; *pPtr && !bIsInternalFilter; pPtr++ ) { if ( sFilterName.equalsIgnoreAsciiCase( OUString(*pPtr, strlen(*pPtr), RTL_TEXTENCODING_ASCII_US) ) ) - bIsInternalFilter = sal_True; + bIsInternalFilter = true; } if ( !bIsInternalFilter ) { - for ( pPtr = ExternalPixelFilterNameList; *pPtr && ( bIsPixelFormat == sal_False ); pPtr++ ) + for ( pPtr = ExternalPixelFilterNameList; *pPtr && !bIsPixelFormat; pPtr++ ) { if ( sFilterName.equalsIgnoreAsciiCase( OUString(*pPtr, strlen(*pPtr), RTL_TEXTENCODING_ASCII_US) ) ) - bIsPixelFormat = sal_True; + bIsPixelFormat = true; } OUString sTemp(SVLIBRARY("?")); sFilterName = sTemp.replaceFirst("?", sFilterName); @@ -302,7 +302,7 @@ void FilterConfigCache::ImplInitSmart() // ------------------------------------------------------------------------ -FilterConfigCache::FilterConfigCache( sal_Bool bConfig ) : +FilterConfigCache::FilterConfigCache( bool bConfig ) : bUseConfig ( bConfig ) { if ( bUseConfig ) @@ -432,12 +432,12 @@ OUString FilterConfigCache::GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEn return aWildcard; } -sal_Bool FilterConfigCache::IsImportInternalFilter( sal_uInt16 nFormat ) +bool FilterConfigCache::IsImportInternalFilter( sal_uInt16 nFormat ) { return (nFormat < aImport.size()) && aImport[ nFormat ].bIsInternalFilter; } -sal_Bool FilterConfigCache::IsImportPixelFormat( sal_uInt16 nFormat ) +bool FilterConfigCache::IsImportPixelFormat( sal_uInt16 nFormat ) { return (nFormat < aImport.size()) && aImport[ nFormat ].bIsPixelFormat; } @@ -546,12 +546,12 @@ OUString FilterConfigCache::GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEn return aWildcard; } -sal_Bool FilterConfigCache::IsExportInternalFilter( sal_uInt16 nFormat ) +bool FilterConfigCache::IsExportInternalFilter( sal_uInt16 nFormat ) { return (nFormat < aExport.size()) && aExport[ nFormat ].bIsInternalFilter; } -sal_Bool FilterConfigCache::IsExportPixelFormat( sal_uInt16 nFormat ) +bool FilterConfigCache::IsExportPixelFormat( sal_uInt16 nFormat ) { return (nFormat < aExport.size()) && aExport[ nFormat ].bIsPixelFormat; } diff --git a/vcl/source/filter/FilterConfigCache.hxx b/vcl/source/filter/FilterConfigCache.hxx index a9b693e73c00..ee83a39db2fb 100644 --- a/vcl/source/filter/FilterConfigCache.hxx +++ b/vcl/source/filter/FilterConfigCache.hxx @@ -48,10 +48,10 @@ class FilterConfigCache // user data OUString sFilterName; - sal_Bool bIsInternalFilter : 1; - sal_Bool bIsPixelFormat : 1; + bool bIsInternalFilter : 1; + bool bIsPixelFormat : 1; - sal_Bool CreateFilterName( const OUString& rUserDataEntry ); + bool CreateFilterName( const OUString& rUserDataEntry ); OUString GetShortName( ); static const char* InternalPixelFilterNameList[]; @@ -63,9 +63,9 @@ class FilterConfigCache CacheVector aImport; CacheVector aExport; - sal_Bool bUseConfig; + bool bUseConfig; - static sal_Bool bInitialized; + static bool bInitialized; static sal_Int32 nIndType; static sal_Int32 nIndUIName; static sal_Int32 nIndDocumentService; @@ -98,8 +98,8 @@ public: OUString GetImportFilterType( sal_uInt16 nFormat ); OUString GetImportFilterTypeName( sal_uInt16 nFormat ); - sal_Bool IsImportInternalFilter( sal_uInt16 nFormat ); - sal_Bool IsImportPixelFormat( sal_uInt16 nFormat ); + bool IsImportInternalFilter( sal_uInt16 nFormat ); + bool IsImportPixelFormat( sal_uInt16 nFormat ); sal_uInt16 GetExportFormatCount() const { return sal::static_int_cast< sal_uInt16 >(aExport.size()); }; @@ -116,10 +116,10 @@ public: OUString GetExportFilterTypeName( sal_uInt16 nFormat ); OUString GetExportInternalFilterName( sal_uInt16 nFormat ); - sal_Bool IsExportInternalFilter( sal_uInt16 nFormat ); - sal_Bool IsExportPixelFormat( sal_uInt16 nFormat ); + bool IsExportInternalFilter( sal_uInt16 nFormat ); + bool IsExportPixelFormat( sal_uInt16 nFormat ); - FilterConfigCache( sal_Bool bUseConfig ); + FilterConfigCache( bool bUseConfig ); ~FilterConfigCache(); }; diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx index e486af6372bf..db9af7ad21ed 100644 --- a/vcl/source/filter/FilterConfigItem.cxx +++ b/vcl/source/filter/FilterConfigItem.cxx @@ -104,7 +104,7 @@ static bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv, co void FilterConfigItem::ImpInitTree( const OUString& rSubTree ) { - bModified = sal_False; + bModified = false; Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() ); @@ -122,7 +122,7 @@ void FilterConfigItem::ImpInitTree( const OUString& rSubTree ) // creation arguments: commit mode PropertyValue aModeArgument; - sal_Bool bAsyncron = sal_True; + bool bAsyncron = true; aAny <<= bAsyncron; aModeArgument.Name = "lazywrite"; aModeArgument.Value = aAny; @@ -189,15 +189,15 @@ FilterConfigItem::~FilterConfigItem() } } -sal_Bool FilterConfigItem::ImplGetPropertyValue( Any& rAny, const Reference< XPropertySet >& rXPropSet, const OUString& rString, sal_Bool bTestPropertyAvailability ) +bool FilterConfigItem::ImplGetPropertyValue( Any& rAny, const Reference< XPropertySet >& rXPropSet, const OUString& rString, bool bTestPropertyAvailability ) { - sal_Bool bRetValue = sal_True; + bool bRetValue = true; if ( rXPropSet.is() ) { if ( bTestPropertyAvailability ) { - bRetValue = sal_False; + bRetValue = false; try { Reference< XPropertySetInfo > @@ -216,16 +216,16 @@ sal_Bool FilterConfigItem::ImplGetPropertyValue( Any& rAny, const Reference< XPr { rAny = rXPropSet->getPropertyValue( rString ); if ( !rAny.hasValue() ) - bRetValue = sal_False; + bRetValue = false; } catch( ::com::sun::star::uno::Exception& ) { - bRetValue = sal_False; + bRetValue = false; } } } else - bRetValue = sal_False; + bRetValue = false; return bRetValue; } @@ -252,9 +252,9 @@ PropertyValue* FilterConfigItem::GetPropertyValue( Sequence< PropertyValue >& rP corresponding PropertyValue is replaced, otherwise the given PropertyValue will be appended */ -sal_Bool FilterConfigItem::WritePropertyValue( Sequence< PropertyValue >& rPropSeq, const PropertyValue& rPropValue ) +bool FilterConfigItem::WritePropertyValue( Sequence< PropertyValue >& rPropSeq, const PropertyValue& rPropValue ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( !rPropValue.Name.isEmpty() ) { sal_Int32 i, nCount; @@ -268,21 +268,21 @@ sal_Bool FilterConfigItem::WritePropertyValue( Sequence< PropertyValue >& rPropS rPropSeq[ i ] = rPropValue; - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool FilterConfigItem::ReadBool( const OUString& rKey, sal_Bool bDefault ) +bool FilterConfigItem::ReadBool( const OUString& rKey, bool bDefault ) { Any aAny; - sal_Bool bRetValue = bDefault; + bool bRetValue = bDefault; PropertyValue* pPropVal = GetPropertyValue( aFilterData, rKey ); if ( pPropVal ) { pPropVal->Value >>= bRetValue; } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) { aAny >>= bRetValue; } @@ -302,7 +302,7 @@ sal_Int32 FilterConfigItem::ReadInt32( const OUString& rKey, sal_Int32 nDefault { pPropVal->Value >>= nRetValue; } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) { aAny >>= nRetValue; } @@ -322,7 +322,7 @@ OUString FilterConfigItem::ReadString( const OUString& rKey, const OUString& rDe { pPropVal->Value >>= aRetValue; } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) { aAny >>= aRetValue; } @@ -333,7 +333,7 @@ OUString FilterConfigItem::ReadString( const OUString& rKey, const OUString& rDe return aRetValue; } -void FilterConfigItem::WriteBool( const OUString& rKey, sal_Bool bNewValue ) +void FilterConfigItem::WriteBool( const OUString& rKey, bool bNewValue ) { PropertyValue aBool; aBool.Name = rKey; @@ -343,9 +343,9 @@ void FilterConfigItem::WriteBool( const OUString& rKey, sal_Bool bNewValue ) if ( xPropSet.is() ) { Any aAny; - if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) { - sal_Bool bOldValue(sal_True); + bool bOldValue(true); if ( aAny >>= bOldValue ) { if ( bOldValue != bNewValue ) @@ -354,7 +354,7 @@ void FilterConfigItem::WriteBool( const OUString& rKey, sal_Bool bNewValue ) try { xPropSet->setPropertyValue( rKey, aAny ); - bModified = sal_True; + bModified = true; } catch ( ::com::sun::star::uno::Exception& ) { @@ -377,7 +377,7 @@ void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue ) { Any aAny; - if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) { sal_Int32 nOldValue = 0; if ( aAny >>= nOldValue ) @@ -388,7 +388,7 @@ void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue ) try { xPropSet->setPropertyValue( rKey, aAny ); - bModified = sal_True; + bModified = true; } catch ( ::com::sun::star::uno::Exception& ) { diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 8e7e1ae69a91..abdcbea87bdb 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -145,7 +145,7 @@ static void KillDirEntry( const OUString& rMainUrl ) comphelper::getProcessComponentContext() ); aCnt.executeCommand( "delete", - css::uno::makeAny( sal_Bool( sal_True ) ) ); + css::uno::makeAny( true ) ); } catch(const css::ucb::CommandAbortedException&) { @@ -1097,7 +1097,7 @@ ImpFilterLibCacheEntry* ImpFilterLibCache::GetFilter( const OUString& rFilterPat namespace { struct Cache : public rtl::Static {}; } -GraphicFilter::GraphicFilter( sal_Bool bConfig ) : +GraphicFilter::GraphicFilter( bool bConfig ) : bUseConfig ( bConfig ), nExpGraphHint ( 0 ) { @@ -1153,7 +1153,7 @@ void GraphicFilter::ImplInit() } pErrorEx = new FilterErrorEx; - bAbort = sal_False; + bAbort = false; } sal_uLong GraphicFilter::ImplSetError( sal_uLong nError, const SvStream* pStm ) @@ -1219,7 +1219,7 @@ OUString GraphicFilter::GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry return pConfig->GetImportWildcard( nFormat, nEntry ); } -sal_Bool GraphicFilter::IsImportPixelFormat( sal_uInt16 nFormat ) +bool GraphicFilter::IsImportPixelFormat( sal_uInt16 nFormat ) { return pConfig->IsImportPixelFormat( nFormat ); } @@ -1285,7 +1285,7 @@ OUString GraphicFilter::GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry return pConfig->GetExportWildcard( nFormat, nEntry ); } -sal_Bool GraphicFilter::IsExportPixelFormat( sal_uInt16 nFormat ) +bool GraphicFilter::IsExportPixelFormat( sal_uInt16 nFormat ) { return pConfig->IsExportPixelFormat( nFormat ); } @@ -1356,12 +1356,12 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat GraphicReader* pContext = rGraphic.GetContext(); GfxLinkType eLinkType = GFX_LINK_TYPE_NONE; bool bDummyContext = ( pContext == (GraphicReader*) 1 ); - const sal_Bool bLinkSet = rGraphic.IsLink(); + const bool bLinkSet = rGraphic.IsLink(); FilterConfigItem* pFilterConfigItem = NULL; Size aPreviewSizeHint( 0, 0 ); - sal_Bool bAllowPartialStreamRead = sal_False; - sal_Bool bCreateNativeLink = sal_True; + bool bAllowPartialStreamRead = false; + bool bCreateNativeLink = true; ResetLastError(); @@ -1407,7 +1407,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat else nStmBegin = rIStream.Tell(); - bAbort = sal_False; + bAbort = false; nStatus = ImpTestOrFindFormat( rPath, rIStream, nFormat ); // if pending, return GRFILTER_OK in order to request more bytes if( rIStream.GetError() == ERRCODE_IO_PENDING ) @@ -1736,7 +1736,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat { rIStream.Seek( nStmBegin ); rIStream.Read( pBuf, nBufSize ); - rGraphic.SetLink( GfxLink( pBuf, nBufSize, eLinkType, sal_True ) ); + rGraphic.SetLink( GfxLink( pBuf, nBufSize, eLinkType, true ) ); } } } @@ -1844,7 +1844,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData ); OUString aFilterName( pConfig->GetExportFilterName( nFormat ) ); - bAbort = sal_False; + bAbort = false; sal_uInt16 nStatus = GRFILTER_OK; GraphicType eType; Graphic aGraphic( rGraphic ); @@ -1907,7 +1907,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString if( !aBmp.Convert( (BmpConversion) nColorRes ) ) aBmp = aGraphic.GetBitmap(); } - sal_Bool bRleCoding = aConfigItem.ReadBool( "RLE_Coding", sal_True ); + bool bRleCoding = aConfigItem.ReadBool( "RLE_Coding", true ); // save RLE encoded? WriteDIB(aBmp, rOStm, bRleCoding, true); diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx index 9e3fd4c96624..b0495dc174fa 100644 --- a/vcl/source/filter/graphicfilter2.cxx +++ b/vcl/source/filter/graphicfilter2.cxx @@ -32,14 +32,14 @@ sal_uInt8* ImplSearchEntry( sal_uInt8* , sal_uInt8* , sal_uLong , sal_uLong ); GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) : pFileStm( ::utl::UcbStreamHelper::CreateStream( rPath.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ) ), aPathExt( rPath.GetFileExtension().toAsciiLowerCase() ), - bOwnStream( sal_True ) + bOwnStream( true ) { ImpConstruct(); } GraphicDescriptor::GraphicDescriptor( SvStream& rInStream, const OUString* pPath) : pFileStm ( &rInStream ), - bOwnStream ( sal_False ) + bOwnStream ( false ) { ImpConstruct(); @@ -56,39 +56,39 @@ GraphicDescriptor::~GraphicDescriptor() delete pFileStm; } -sal_Bool GraphicDescriptor::Detect( sal_Bool bExtendedInfo ) +bool GraphicDescriptor::Detect( sal_Bool bExtendedInfo ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( pFileStm && !pFileStm->GetError() ) { SvStream& rStm = *pFileStm; sal_uInt16 nOldFormat = rStm.GetNumberFormatInt(); - if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectSVG( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = sal_True; + if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectSVG( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = true; rStm.SetNumberFormatInt( nOldFormat ); } @@ -100,13 +100,13 @@ void GraphicDescriptor::ImpConstruct() nFormat = GFF_NOT; nBitsPerPixel = 0; nPlanes = 0; - bCompressed = sal_False; + bCompressed = false; } -sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, bool bExtendedInfo ) { sal_uInt16 nTemp16 = 0; - sal_Bool bRet = sal_False; + bool bRet = false; sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); @@ -123,7 +123,7 @@ sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo if ( nTemp16 == 0x4d42 ) { nFormat = GFF_BMP; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -168,7 +168,7 @@ sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo if ( ( nBitsPerPixel > 24 ) || ( nCompression > 3 ) ) { nFormat = GFF_NOT; - bRet = sal_False; + bRet = false; } } } @@ -176,11 +176,11 @@ sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo return bRet; } -sal_Bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, bool bExtendedInfo ) { sal_uInt32 n32 = 0; sal_uInt16 n16 = 0; - sal_Bool bRet = sal_False; + bool bRet = false; sal_uInt8 cByte = 0; sal_Int32 nStmPos = rStm.Tell(); @@ -193,7 +193,7 @@ sal_Bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo if ( ( n16 == 0x6137 ) || ( n16 == 0x6139 ) ) { nFormat = GFF_GIF; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -243,10 +243,10 @@ sal_uInt8 ImpDetectJPG_GetNextMarker( SvStream& rStm ) return nByte; } -sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, bool bExtendedInfo ) { sal_uInt32 nTemp32 = 0; - sal_Bool bRet = sal_False; + bool bRet = false; sal_Int32 nStmPos = rStm.Tell(); @@ -257,7 +257,7 @@ sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInf if( 0xffd8ff00 == ( nTemp32 & 0xffffff00 ) ) { nFormat = GFF_JPG; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -400,9 +400,9 @@ sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInf return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, bool ) { - sal_Bool bRet = sal_False; + bool bRet = false; sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); @@ -421,21 +421,21 @@ sal_Bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, sal_Bool ) ( cByte == 0x49 ) ) { nFormat = GFF_PCD; - bRet = sal_True; + bRet = true; } rStm.Seek( nStmPos ); return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, bool bExtendedInfo ) { // ! Because 0x0a can be interpreted as LF too ... // we cant be sure that this special sign represent a PCX file only. // Every Ascii file is possible here :-( // We must detect the whole header. - bExtendedInfo = sal_True; + bExtendedInfo = true; - sal_Bool bRet = sal_False; + bool bRet = false; sal_uInt8 cByte = 0; sal_Int32 nStmPos = rStm.Tell(); @@ -445,7 +445,7 @@ sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo if ( cByte == 0x0a ) { nFormat = GFF_PCX; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -511,10 +511,10 @@ sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, bool bExtendedInfo ) { sal_uInt32 nTemp32 = 0; - sal_Bool bRet = sal_False; + bool bRet = false; sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); @@ -526,7 +526,7 @@ sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo if ( nTemp32 == 0x0d0a1a0a ) { nFormat = GFF_PNG; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -550,7 +550,7 @@ sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo // Planes always 1; // compression always nPlanes = 1; - bCompressed = sal_True; + bCompressed = true; sal_uInt32 nLen32 = 0; nTemp32 = 0; @@ -606,10 +606,10 @@ sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo return bRet; } -sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, bool bExtendedInfo ) { bool bDetectOk = false; - sal_Bool bRet = sal_False; + bool bRet = false; sal_uInt8 cByte1 = 0; sal_uInt8 cByte2 = 1; @@ -637,7 +637,7 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo if ( nTemp16 == 0x2a ) { nFormat = GFF_TIF; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -737,38 +737,38 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo return bRet; } -sal_Bool GraphicDescriptor::ImpDetectXBM( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectXBM( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "xbm" ); + bool bRet = aPathExt.startsWith( "xbm" ); if (bRet) nFormat = GFF_XBM; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectXPM( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectXPM( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "xpm" ); + bool bRet = aPathExt.startsWith( "xpm" ); if (bRet) nFormat = GFF_XPM; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPBM( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectPBM( SvStream& rStm, bool ) { - sal_Bool bRet = sal_False; + bool bRet = false; // check file extension first, as this trumps the 2 ID bytes if ( aPathExt.startsWith( "pbm" ) ) - bRet = sal_True; + bRet = true; else { sal_Int32 nStmPos = rStm.Tell(); sal_uInt8 nFirst = 0, nSecond = 0; rStm.ReadUChar( nFirst ).ReadUChar( nSecond ); if ( nFirst == 'P' && ( ( nSecond == '1' ) || ( nSecond == '4' ) ) ) - bRet = sal_True; + bRet = true; rStm.Seek( nStmPos ); } @@ -778,19 +778,19 @@ sal_Bool GraphicDescriptor::ImpDetectPBM( SvStream& rStm, sal_Bool ) return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPGM( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectPGM( SvStream& rStm, bool ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( aPathExt.startsWith( "pgm" ) ) - bRet = sal_True; + bRet = true; else { sal_uInt8 nFirst = 0, nSecond = 0; sal_Int32 nStmPos = rStm.Tell(); rStm.ReadUChar( nFirst ).ReadUChar( nSecond ); if ( nFirst == 'P' && ( ( nSecond == '2' ) || ( nSecond == '5' ) ) ) - bRet = sal_True; + bRet = true; rStm.Seek( nStmPos ); } @@ -800,19 +800,19 @@ sal_Bool GraphicDescriptor::ImpDetectPGM( SvStream& rStm, sal_Bool ) return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, bool ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( aPathExt.startsWith( "ppm" ) ) - bRet = sal_True; + bRet = true; else { sal_uInt8 nFirst = 0, nSecond = 0; sal_Int32 nStmPos = rStm.Tell(); rStm.ReadUChar( nFirst ).ReadUChar( nSecond ); if ( nFirst == 'P' && ( ( nSecond == '3' ) || ( nSecond == '6' ) ) ) - bRet = sal_True; + bRet = true; rStm.Seek( nStmPos ); } @@ -822,34 +822,34 @@ sal_Bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, sal_Bool ) return bRet; } -sal_Bool GraphicDescriptor::ImpDetectRAS( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectRAS( SvStream& rStm, bool ) { sal_uInt32 nMagicNumber = 0; - sal_Bool bRet = sal_False; + bool bRet = false; sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); rStm.ReadUInt32( nMagicNumber ); if ( nMagicNumber == 0x59a66a95 ) { nFormat = GFF_RAS; - bRet = sal_True; + bRet = true; } rStm.Seek( nStmPos ); return bRet; } -sal_Bool GraphicDescriptor::ImpDetectTGA( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectTGA( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "tga" ); + bool bRet = aPathExt.startsWith( "tga" ); if (bRet) nFormat = GFF_TGA; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, bool bExtendedInfo ) { - sal_Bool bRet = sal_False; + bool bRet = false; sal_uInt32 nMagicNumber = 0; sal_Int32 nStmPos = rStm.Tell(); @@ -861,7 +861,7 @@ sal_Bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo rStm.ReadUInt16( nVersion ); if ( nVersion == 1 ) { - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { sal_uInt16 nChannels = 0; @@ -885,11 +885,11 @@ sal_Bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo aPixSize.Height() = nRows; break; default: - bRet = sal_False; + bRet = false; } } else - bRet = sal_False; + bRet = false; } } } @@ -900,12 +900,12 @@ sal_Bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo return bRet; } -sal_Bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, bool ) { // check the EPS preview and the file extension sal_uInt32 nFirstLong = 0; sal_uInt8 nFirstBytes[20]; - sal_Bool bRet = sal_False; + bool bRet = false; memset(nFirstBytes, 0, sizeof (nFirstBytes)); sal_Int32 nStmPos = rStm.Tell(); @@ -919,24 +919,24 @@ sal_Bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, sal_Bool ) && ImplSearchEntry( &nFirstBytes[15], (sal_uInt8*)"EPS", 3, 3 ) ) ) { nFormat = GFF_EPS; - bRet = sal_True; + bRet = true; } rStm.Seek( nStmPos ); return bRet; } -sal_Bool GraphicDescriptor::ImpDetectDXF( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectDXF( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "dxf" ); + bool bRet = aPathExt.startsWith( "dxf" ); if (bRet) nFormat = GFF_DXF; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectMET( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectMET( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "met" ); + bool bRet = aPathExt.startsWith( "met" ); if (bRet) nFormat = GFF_MET; @@ -945,9 +945,9 @@ sal_Bool GraphicDescriptor::ImpDetectMET( SvStream&, sal_Bool ) extern bool isPCT(SvStream& rStream, sal_uLong nStreamPos, sal_uLong nStreamLen); -sal_Bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, bool ) { - sal_Bool bRet = aPathExt.startsWith( "pct" ); + bool bRet = aPathExt.startsWith( "pct" ); if (bRet) nFormat = GFF_PCT; else @@ -956,7 +956,7 @@ sal_Bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, sal_Bool ) sal_Size nStreamLen = rStm.remainingSize(); if (isPCT(rStm, nStreamPos, nStreamLen)) { - bRet = sal_True; + bRet = true; nFormat = GFF_PCT; } rStm.Seek(nStreamPos); @@ -965,11 +965,11 @@ sal_Bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, sal_Bool ) return bRet; } -sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, bool ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( aPathExt.startsWith( "sgf" ) ) - bRet = sal_True; + bRet = true; else { sal_Int32 nStmPos = rStm.Tell(); @@ -979,7 +979,7 @@ sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool ) rStm.ReadUChar( nFirst ).ReadUChar( nSecond ); if( nFirst == 'J' && nSecond == 'J' ) - bRet = sal_True; + bRet = true; rStm.Seek( nStmPos ); } @@ -990,19 +990,19 @@ sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool ) return bRet; } -sal_Bool GraphicDescriptor::ImpDetectSGV( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectSGV( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "sgv" ); + bool bRet = aPathExt.startsWith( "sgv" ); if (bRet) nFormat = GFF_SGV; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, bool bExtendedInfo ) { sal_uInt32 n32 = 0; - sal_Bool bRet = sal_False; + bool bRet = false; sal_uInt8 cByte = 0; sal_Int32 nStmPos = rStm.Tell(); @@ -1015,7 +1015,7 @@ sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo if ( cByte == 0x49 ) { nFormat = GFF_SVM; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -1058,7 +1058,7 @@ sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo if( nTmp16 == 0x4654 ) { nFormat = GFF_SVM; - bRet = sal_True; + bRet = true; if( bExtendedInfo ) { @@ -1076,27 +1076,27 @@ sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo return bRet; } -sal_Bool GraphicDescriptor::ImpDetectWMF( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectWMF( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "wmf" ); + bool bRet = aPathExt.startsWith( "wmf" ); if (bRet) nFormat = GFF_WMF; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectEMF( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectEMF( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "emf" ); + bool bRet = aPathExt.startsWith( "emf" ); if (bRet) nFormat = GFF_EMF; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectSVG( SvStream& /*rStm*/, sal_Bool /*bExtendedInfo*/ ) +bool GraphicDescriptor::ImpDetectSVG( SvStream& /*rStm*/, bool /*bExtendedInfo*/ ) { - sal_Bool bRet = aPathExt.startsWith( "svg" ); + bool bRet = aPathExt.startsWith( "svg" ); if (bRet) nFormat = GFF_SVG; diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index 79d58ce0641e..26ceb86b9e12 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -543,7 +543,7 @@ void GIFReader::CreateNewBitmaps() aAnimBmp.aPosPix = Point( nImagePosX, nImagePosY ); aAnimBmp.aSizePix = Size( nImageWidth, nImageHeight ); aAnimBmp.nWait = ( nTimer != 65535 ) ? nTimer : ANIMATION_TIMEOUT_ON_CLICK; - aAnimBmp.bUserInput = sal_False; + aAnimBmp.bUserInput = false; if( nGCDisposalMethod == 2 ) aAnimBmp.eDisposal = DISPOSE_BACK; diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx index 5e5c6ac9e9c9..e473df1e7a7d 100644 --- a/vcl/source/filter/jpeg/JpegReader.cxx +++ b/vcl/source/filter/jpeg/JpegReader.cxx @@ -285,7 +285,7 @@ unsigned char * JPEGReader::CreateBitmap( JPEGCreateBitmapParam * pParam ) else { pParam->nAlignedWidth = AlignedWidth4Bytes( aSize.Width() * ( bGray ? 8 : 24 ) ); - pParam->bTopDown = sal_True; + pParam->bTopDown = true; pBmpBuf = mpBuffer = new unsigned char[pParam->nAlignedWidth * aSize.Height()]; } } diff --git a/vcl/source/filter/jpeg/JpegReader.hxx b/vcl/source/filter/jpeg/JpegReader.hxx index 442c52d78ef2..978317a59c9d 100644 --- a/vcl/source/filter/jpeg/JpegReader.hxx +++ b/vcl/source/filter/jpeg/JpegReader.hxx @@ -43,7 +43,7 @@ struct JPEGCreateBitmapParam long bGray; long nAlignedWidth; // these members will be filled by the - long bTopDown; // CreateBitmap method in svtools + bool bTopDown; // CreateBitmap method in svtools }; class JPEGReader : public GraphicReader diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx index e763314138e9..78a96d43eeeb 100644 --- a/vcl/source/filter/jpeg/JpegWriter.cxx +++ b/vcl/source/filter/jpeg/JpegWriter.cxx @@ -186,9 +186,9 @@ void* JPEGWriter::GetScanline( long nY ) return pScanline; } -sal_Bool JPEGWriter::Write( const Graphic& rGraphic ) +bool JPEGWriter::Write( const Graphic& rGraphic ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( mxStatusIndicator.is() ) { @@ -223,7 +223,7 @@ sal_Bool JPEGWriter::Write( const Graphic& rGraphic ) } } if ( bIsGrey ) - mbGreys = sal_True; + mbGreys = true; } if( mpExpWasGrey ) @@ -236,7 +236,7 @@ sal_Bool JPEGWriter::Write( const Graphic& rGraphic ) if( !mbNative ) mpBuffer = new sal_uInt8[ AlignedWidth4Bytes( mbGreys ? mpReadAccess->Width() * 8L : mpReadAccess->Width() * 24L ) ]; - bRet = (sal_Bool) WriteJPEG( this, &mrStream, mpReadAccess->Width(), mpReadAccess->Height(), mbGreys, mnQuality, maChromaSubsampling, mxStatusIndicator ); + bRet = WriteJPEG( this, &mrStream, mpReadAccess->Width(), mpReadAccess->Height(), mbGreys, mnQuality, maChromaSubsampling, mxStatusIndicator ); delete[] mpBuffer; mpBuffer = NULL; diff --git a/vcl/source/filter/jpeg/JpegWriter.hxx b/vcl/source/filter/jpeg/JpegWriter.hxx index 88b6352f0c1b..8c4b13bbf197 100644 --- a/vcl/source/filter/jpeg/JpegWriter.hxx +++ b/vcl/source/filter/jpeg/JpegWriter.hxx @@ -33,7 +33,7 @@ class JPEGWriter BitmapReadAccess* mpReadAccess; sal_uInt8* mpBuffer; bool mbNative; - sal_Bool mbGreys; + bool mbGreys; sal_Int32 mnQuality; sal_Int32 maChromaSubsampling; @@ -49,7 +49,7 @@ public: virtual ~JPEGWriter() {}; void* GetScanline( long nY ); - sal_Bool Write( const Graphic& rGraphic ); + bool Write( const Graphic& rGraphic ); }; diff --git a/vcl/source/filter/jpeg/jpeg.h b/vcl/source/filter/jpeg/jpeg.h index 01209ba56509..1f8c21f62aac 100644 --- a/vcl/source/filter/jpeg/jpeg.h +++ b/vcl/source/filter/jpeg/jpeg.h @@ -38,7 +38,7 @@ void jpeg_svstream_src (j_decompress_ptr cinfo, void* infile); void jpeg_svstream_dest (j_compress_ptr cinfo, void* outfile); -long WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, long nWidth, long nHeight, long bGreyScale, +bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, long nWidth, long nHeight, bool bGreyScale, long nQualityPercent, long aChromaSubsampling, css::uno::Reference const & status); diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx index 3f52a2f024b9..6cbb5899d855 100644 --- a/vcl/source/filter/jpeg/jpegc.cxx +++ b/vcl/source/filter/jpeg/jpegc.cxx @@ -217,8 +217,8 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, jpeg_destroy_decompress( &cinfo ); } -long WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, - long nWidth, long nHeight, long bGreys, +bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, + long nWidth, long nHeight, bool bGreys, long nQualityPercent, long aChromaSubsampling, css::uno::Reference const & status ) { @@ -230,7 +230,7 @@ long WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, if ( setjmp( jerr.setjmp_buffer ) ) { jpeg_destroy_compress( &cinfo ); - return 0; + return false; } cinfo.err = jpeg_std_error( &jerr.pub ); @@ -295,7 +295,7 @@ long WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, jpeg_finish_compress(&cinfo); jpeg_destroy_compress( &cinfo ); - return 1; + return true; } long Transform(void* pInputStream, void* pOutputStream, long nAngle) diff --git a/vcl/source/filter/sgvmain.hxx b/vcl/source/filter/sgvmain.hxx index e9272b3b5260..93ba2a47bd75 100644 --- a/vcl/source/filter/sgvmain.hxx +++ b/vcl/source/filter/sgvmain.hxx @@ -58,7 +58,7 @@ public: sal_uInt32 nList; // objectdata, first record sal_uInt32 ListEnd; // objectdata, last record Seitenformat Paper; // data of paper - sal_Bool BorderClip; // clip objects at border (cheat due to alignment in NT) + bool BorderClip; // clip objects at border (cheat due to alignment in NT) sal_uInt8 StdPg; // insert which standardpage ? PointType U; // origin sal_Int16 HlpLnH[20]; // guides @@ -115,8 +115,8 @@ public: ObjLineType ShdL; // shadow outline (new 2.0) ObjAreaType ShdF; // shadow inside (new 2.0) PointType ShdVers; // shadow offset max. 300.00% - sal_Bool ShdAbs; // True-> shadow offset is absolute instead of relative to font size - sal_Bool NoSpc; // True-> no space (for background area) + bool ShdAbs; // True-> shadow offset is absolute instead of relative to font size + bool NoSpc; // True-> no space (for background area) ObjAreaType BackF; // background area sal_uInt32 GetFont(); void SetFont(sal_uInt32 FontID); @@ -139,7 +139,7 @@ public: sal_uInt8 Art; sal_uInt8 Layer; friend SvStream& ReadObjkType(SvStream& rIStream, ObjkType& rObjk); - friend sal_Bool ObjOverSeek(SvStream& rInp, ObjkType& rObjk); + friend bool ObjOverSeek(SvStream& rInp, ObjkType& rObjk); virtual void Draw(OutputDevice& rOut); }; @@ -265,9 +265,9 @@ public: PointType PixSize; // size in Pixel (0 for vector) GrafStat Format; // see: GpmDef.Pas sal_uInt8 nPlanes; // number of bitplanes (0 for vector) - sal_Bool RawOut; // output as raw ? - sal_Bool InvOut; // output inverted ? - sal_Bool LightOut; // brighten? (SD20) + bool RawOut; // output as raw ? + bool InvOut; // output inverted ? + bool LightOut; // brighten? (SD20) sal_uInt8 GrfFlg; // (SD20) 0=nSGF 1=Pcx 2=HPGL 4=Raw $FF=Undef (to fix DrawBmp) INetURLObject aFltPath; // for GraphicFilter friend SvStream& ReadBmapType(SvStream& rIStream, BmapType& rBmap); @@ -300,11 +300,11 @@ class SgfFontOne { public: SgfFontOne* Next; // pointer to list sal_uInt32 IFID; - sal_Bool Bold; - sal_Bool Ital; - sal_Bool Sans; - sal_Bool Serf; - sal_Bool Fixd; + bool Bold; + bool Ital; + bool Sans; + bool Serf; + bool Fixd; FontFamily SVFamil; rtl_TextEncoding SVChSet; OUString SVFName; // e.g. "Times New Roman" = 15 chars diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index b5355cafcb81..39b581f373a4 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -589,7 +589,7 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u aColor=Sgv2SvFarbe(Atr.L.LFarbe,Atr.L.LBFarbe,Atr.L.LIntens); aFont.SetColor(aColor); aColor=Sgv2SvFarbe(Atr.F.FFarbe,Atr.F.FBFarbe,Atr.F.FIntens); aFont.SetFillColor(aColor); - aFont.SetTransparent(sal_True); + aFont.SetTransparent(true); aFont.SetAlign(ALIGN_BASELINE); Dreh/=10; Dreh=3600-Dreh; if (Dreh==3600) Dreh=0; @@ -601,11 +601,11 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u if ((Atr.Schnitt & TextDbUnBit) !=0) aFont.SetUnderline(UNDERLINE_DOUBLE); if ((Atr.Schnitt & TextStrkBit) !=0) aFont.SetStrikeout(STRIKEOUT_SINGLE); if ((Atr.Schnitt & TextDbStBit) !=0) aFont.SetStrikeout(STRIKEOUT_DOUBLE); - if ((Atr.Schnitt & TextSh2DBit) !=0) aFont.SetShadow(sal_True); - if ((Atr.Schnitt & TextSh3DBit) !=0) aFont.SetShadow(sal_True); - if ((Atr.Schnitt & TextSh4DBit) !=0) aFont.SetShadow(sal_True); - if ((Atr.Schnitt & TextShEbBit) !=0) aFont.SetShadow(sal_True); - if (CheckTextOutl(Atr.F,Atr.L)) aFont.SetOutline(sal_True); + if ((Atr.Schnitt & TextSh2DBit) !=0) aFont.SetShadow(true); + if ((Atr.Schnitt & TextSh3DBit) !=0) aFont.SetShadow(true); + if ((Atr.Schnitt & TextSh4DBit) !=0) aFont.SetShadow(true); + if ((Atr.Schnitt & TextShEbBit) !=0) aFont.SetShadow(true); + if (CheckTextOutl(Atr.F,Atr.L)) aFont.SetOutline(true); if (aFont!=rOut.GetFont()) rOut.SetFont(aFont); @@ -1095,11 +1095,11 @@ SgfFontOne::SgfFontOne() { Next=NULL; IFID=0; - Bold=sal_False; - Ital=sal_False; - Sans=sal_False; - Serf=sal_False; - Fixd=sal_False; + Bold=false; + Ital=false; + Sans=false; + Serf=false; + Fixd=false; SVFamil=FAMILY_DONTKNOW; SVChSet=RTL_TEXTENCODING_DONTKNOW; SVWidth=40; @@ -1134,11 +1134,11 @@ void SgfFontOne::ReadOne( const OString& rID, OString& Dsc ) if (!s.isEmpty()) { s = s.toAsciiUpperCase(); - if (s.match("BOLD")) Bold=sal_True; - else if (s.match("ITAL")) Ital=sal_True; - else if (s.match("SERF")) Serf=sal_True; - else if (s.match("SANS")) Sans=sal_True; - else if (s.match("FIXD")) Fixd=sal_True; + if (s.match("BOLD")) Bold=true; + else if (s.match("ITAL")) Ital=true; + else if (s.match("SERF")) Serf=true; + else if (s.match("SANS")) Sans=true; + else if (s.match("FIXD")) Fixd=true; else if (s.match("ROMAN")) SVFamil=FAMILY_ROMAN; else if (s.match("SWISS")) SVFamil=FAMILY_SWISS; else if (s.match("MODERN")) SVFamil=FAMILY_MODERN; diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index 9a6909f2c418..79497fb344e1 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -178,7 +178,7 @@ void EMFWriter::ImplBeginPlusRecord( sal_uInt16 nType, sal_uInt16 nFlags ) if( !mbRecordPlusOpen ) { - mbRecordPlusOpen = sal_True; + mbRecordPlusOpen = true; mnRecordPlusPos = m_rStm.Tell(); m_rStm.WriteUInt16( (sal_uInt16) nType ).WriteUInt16( (sal_uInt16) nFlags ); @@ -198,7 +198,7 @@ void EMFWriter::ImplEndPlusRecord() m_rStm.WriteUInt32( (sal_uInt32)( nSize ) ) // Size .WriteUInt32( (sal_uInt32) ( nSize - 0xc ) ); // Data Size m_rStm.Seek( nActPos ); - mbRecordPlusOpen = sal_False; + mbRecordPlusOpen = false; } } @@ -283,11 +283,11 @@ void EMFWriter::ImplWritePlusFillPolygonRecord( const Polygon& rPoly, const sal_ ImplEndCommentRecord(); } -sal_Bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pFilterConfigItem ) +bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pFilterConfigItem ) { const sal_uLong nHeaderPos = m_rStm.Tell(); - maVDev.EnableOutput( sal_False ); + maVDev.EnableOutput( false ); maVDev.SetMapMode( rMtf.GetPrefMapMode() ); // don't work with pixel as destination map mode -> higher resolution preferrable maDestMapMode.SetMapUnit( MAP_100TH_MM ); @@ -401,7 +401,7 @@ void EMFWriter::ImplBeginRecord( sal_uInt32 nType ) if( !mbRecordOpen ) { - mbRecordOpen = sal_True; + mbRecordOpen = true; mnRecordPos = m_rStm.Tell(); m_rStm.WriteUInt32( nType ); @@ -426,11 +426,11 @@ void EMFWriter::ImplEndRecord() while( nFillBytes-- ) m_rStm.WriteUChar( (sal_uInt8)0 ); mnRecordCount++; - mbRecordOpen = sal_False; + mbRecordOpen = false; } } -sal_Bool EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType ) +bool EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType ) { if( rHandle != HANDLE_INVALID ) { @@ -664,7 +664,7 @@ void EMFWriter::ImplWriteRect( const Rectangle& rRect ) .WriteInt32( static_cast(aRect.Bottom()) ); } -void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, sal_Bool bClose ) +void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, bool bClose ) { if( rPoly.GetSize() ) { @@ -696,7 +696,7 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ) if( nPolyCount ) { if( 1 == nPolyCount ) - ImplWritePolygonRecord( rPolyPoly[ 0 ], sal_True ); + ImplWritePolygonRecord( rPolyPoly[ 0 ], true ); else { bool bHasFlags = false; @@ -711,7 +711,7 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ) if( nTotalPoints ) { if ( bHasFlags ) - ImplWritePath( rPolyPoly, sal_True ); + ImplWritePath( rPolyPoly, true ); else { ImplCheckFillAttr(); @@ -738,7 +738,7 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ) } } -void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed ) +void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, bool bClosed ) { if ( bClosed ) ImplCheckFillAttr(); @@ -957,7 +957,7 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) { const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); - ImplWritePolygonRecord( Polygon(aCandidate), sal_False ); + ImplWritePolygonRecord( Polygon(aCandidate), false ); } } @@ -1154,7 +1154,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) { if(pA->GetLineInfo().IsDefault()) { - ImplWritePolygonRecord( rPoly, sal_False ); + ImplWritePolygonRecord( rPoly, false ); } else { @@ -1394,14 +1394,14 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( META_LINECOLOR_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); - mbLineChanged = sal_True; + mbLineChanged = true; } break; case( META_FILLCOLOR_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); - mbFillChanged = sal_True; + mbFillChanged = true; } break; @@ -1412,7 +1412,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( META_FONT_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); - mbTextChanged = sal_True; + mbTextChanged = true; } break; @@ -1457,7 +1457,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) ImplEndRecord(); ImplWriteRasterOp( maVDev.GetRasterOp() ); - mbLineChanged = mbFillChanged = mbTextChanged = sal_True; + mbLineChanged = mbFillChanged = mbTextChanged = true; } break; diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx index 54228e6cd8c6..1eddc51e2029 100644 --- a/vcl/source/filter/wmf/emfwr.hxx +++ b/vcl/source/filter/wmf/emfwr.hxx @@ -47,13 +47,13 @@ private: sal_uLong mnRecordCount; sal_uLong mnRecordPos; sal_uLong mnRecordPlusPos; - sal_Bool mbRecordOpen; - sal_Bool mbRecordPlusOpen; - sal_Bool mbLineChanged; + bool mbRecordOpen; + bool mbRecordPlusOpen; + bool mbLineChanged; sal_uInt32 mnLineHandle; - sal_Bool mbFillChanged; + bool mbFillChanged; sal_uInt32 mnFillHandle; - sal_Bool mbTextChanged; + bool mbTextChanged; sal_uInt32 mnTextHandle; sal_uInt32 mnHorTextAlign; @@ -68,7 +68,7 @@ private: sal_uLong ImplAcquireHandle(); void ImplReleaseHandle( sal_uLong nHandle ); - sal_Bool ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType ); + bool ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType ); void ImplCheckLineAttr(); void ImplCheckFillAttr(); void ImplCheckTextAttr(); @@ -79,8 +79,8 @@ private: void ImplWritePoint( const Point& rPoint ); void ImplWriteSize( const Size& rSize); void ImplWriteRect( const Rectangle& rRect ); - void ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClose ); - void ImplWritePolygonRecord( const Polygon& rPoly, sal_Bool bClose ); + void ImplWritePath( const PolyPolygon& rPolyPoly, bool bClose ); + void ImplWritePolygonRecord( const Polygon& rPoly, bool bClose ); void ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ); void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, sal_uInt32 nROP ); void ImplWriteTextRecord( const Point& rPos, const OUString rText, const sal_Int32* pDXArray, sal_uInt32 nWidth ); @@ -97,7 +97,7 @@ public: EMFWriter(SvStream &rStream) : m_rStm(rStream) {} - sal_Bool WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pConfigItem = NULL ); + bool WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pConfigItem = NULL ); }; #endif // INCLUDED_VCL_SOURCE_FILTER_WMF_EMFWR_HXX diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index e2292a0b8f5f..9023c50ad3ed 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -236,7 +236,7 @@ static bool ImplReadRegion( PolyPolygon& rPolyPoly, SvStream& rSt, sal_uInt32 nL return bOk; } -void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC) +void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, bool& bHaveDC) { if (!bEMFPlus) { pOut->PassEMFPlusHeaderInfo(); @@ -306,7 +306,7 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC) * skipFirst: if the first point read is the 0th point or the 1st point in the array. * */ template -void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const sal_Bool skipFirst) +void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const bool skipFirst) { sal_uInt32 nPoints(0), nStartIndex(0); pWMF->SeekRel( 16 ); @@ -379,7 +379,7 @@ void EnhWMFReader::ReadAndDrawPolyLine() for ( i = 0; ( i < nPoly ) && pWMF->good(); i++ ) { Polygon aPolygon = ReadPolygon(0, pnPoints[i]); - pOut->DrawPolyLine( aPolygon, sal_False, bRecordPath ); + pOut->DrawPolyLine( aPolygon, false, bRecordPath ); } delete[] pnPoints; } @@ -450,7 +450,7 @@ void EnhWMFReader::ReadAndDrawPolyPolygon() } } -sal_Bool EnhWMFReader::ReadEnhWMF() +bool EnhWMFReader::ReadEnhWMF() { sal_uInt32 nStretchBltMode = 0; sal_uInt32 nRecType(0), nRecSize(0), nNextPos(0), @@ -458,8 +458,8 @@ sal_Bool EnhWMFReader::ReadEnhWMF() nDat32(0), nNom1(0), nDen1(0), nNom2(0), nDen2(0); sal_Int32 nX32(0), nY32(0), nx32(0), ny32(0); - sal_Bool bFlag(sal_False), bStatus = ReadHeader(); - sal_Bool bHaveDC = false; + bool bFlag(false), bStatus = ReadHeader(); + bool bHaveDC = false; static bool bEnableEMFPlus = ( getenv( "EMF_PLUS_DISABLE" ) == NULL ); @@ -469,7 +469,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() if ( !pWMF->good() || ( nRecSize < 8 ) || ( nRecSize & 3 ) ) // Parameters are always divisible by 4 { - bStatus = sal_False; + bStatus = false; break; } @@ -477,7 +477,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() if ( !pWMF->good() || nNextPos > nEndPos ) { - bStatus = sal_False; + bStatus = false; break; } @@ -488,7 +488,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() pOut->ResolveBitmapActions( aBmpSaveList ); } - bFlag = sal_False; + bFlag = false; SAL_INFO ("vcl.emf", "0x" << std::hex << (nNextPos - nRecSize) << "-0x" << nNextPos << " record type: " << std::dec << nRecType << " size: " << nRecSize << std::dec); @@ -522,21 +522,21 @@ sal_Bool EnhWMFReader::ReadEnhWMF() switch( nRecType ) { case EMR_POLYBEZIERTO : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_True); + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), true); break; case EMR_POLYBEZIER : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_False); + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), false); break; case EMR_POLYGON : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolygon, _1, _2, _3, _4), sal_False); + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolygon, _1, _2, _3, _4), false); break; case EMR_POLYLINETO : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_True); + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), true); break; case EMR_POLYLINE : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_False); + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), false); break; case EMR_POLYPOLYLINE : @@ -727,7 +727,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() if ( aSize.Width() ) aLineInfo.SetWidth( aSize.Width() ); - sal_Bool bTransparent = sal_False; + bool bTransparent = false; switch( nStyle & 0xFF ) { case PS_DASHDOTDOT : @@ -761,7 +761,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() aLineInfo.SetDistance( 100 ); break; case PS_NULL : - bTransparent = sal_True; + bTransparent = true; aLineInfo.SetStyle( LINE_NONE ); break; case PS_INSIDEFRAME : @@ -817,7 +817,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() if ( nWidth ) aLineInfo.SetWidth( nWidth ); - sal_Bool bTransparent = sal_False; + bool bTransparent = false; sal_uInt16 nDashCount = 0; sal_uInt16 nDotCount = 0; @@ -834,7 +834,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() nDashCount++; break; case PS_NULL : - bTransparent = sal_True; + bTransparent = true; aLineInfo.SetStyle( LINE_NONE ); break; @@ -938,21 +938,21 @@ sal_Bool EnhWMFReader::ReadEnhWMF() { sal_uInt32 nStartX, nStartY, nEndX, nEndY; pWMF->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 ).ReadUInt32( nStartX ).ReadUInt32( nStartY ).ReadUInt32( nEndX ).ReadUInt32( nEndY ); - pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), sal_True ); + pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), true ); } break; case EMR_BEGINPATH : { pOut->ClearPath(); - bRecordPath = sal_True; + bRecordPath = true; } break; case EMR_ABORTPATH : pOut->ClearPath(); case EMR_ENDPATH : - bRecordPath = sal_False; + bRecordPath = false; break; case EMR_CLOSEFIGURE : @@ -960,22 +960,22 @@ sal_Bool EnhWMFReader::ReadEnhWMF() break; case EMR_FILLPATH : - pOut->StrokeAndFillPath( sal_False, sal_True ); + pOut->StrokeAndFillPath( false, true ); break; case EMR_STROKEANDFILLPATH : - pOut->StrokeAndFillPath( sal_True, sal_True ); + pOut->StrokeAndFillPath( true, true ); break; case EMR_STROKEPATH : - pOut->StrokeAndFillPath( sal_True, sal_False ); + pOut->StrokeAndFillPath( true, false ); break; case EMR_SELECTCLIPPATH : { sal_Int32 nClippingMode; pWMF->ReadInt32( nClippingMode ); - pOut->SetClipPath( pOut->GetPathObj(), nClippingMode, sal_True ); + pOut->SetClipPath( pOut->GetPathObj(), nClippingMode, true ); } break; @@ -988,7 +988,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() PolyPolygon aPolyPoly; if ( cbRgnData ) ImplReadRegion( aPolyPoly, *pWMF, nRecSize ); - pOut->SetClipPath( aPolyPoly, iMode, sal_True ); + pOut->SetClipPath( aPolyPoly, iMode, true ); } break; @@ -1018,7 +1018,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) ); if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) - bStatus = sal_False; + bStatus = false; else { sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14; @@ -1082,7 +1082,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() cyDest = abs( (int)cyDest ); // and also 122889 if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) - bStatus = sal_False; + bStatus = false; else { sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14; @@ -1151,7 +1151,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc ) ) { - bStatus = sal_False; + bStatus = false; } else { @@ -1238,7 +1238,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() break; case EMR_EXTTEXTOUTA : - bFlag = sal_True; + bFlag = true; case EMR_EXTTEXTOUTW : { sal_Int32 nLeft, nTop, nRight, nBottom, ptlReferenceX, ptlReferenceY, nGfxMode, nXScale, nYScale; @@ -1328,21 +1328,21 @@ sal_Bool EnhWMFReader::ReadEnhWMF() break; case EMR_POLYBEZIERTO16 : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_True); + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), true); break; case EMR_POLYBEZIER16 : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_False); + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), false); break; case EMR_POLYGON16 : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolygon, _1, _2, _3, _4), sal_False); + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolygon, _1, _2, _3, _4), false); break; case EMR_POLYLINETO16 : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_True); + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), true); break; case EMR_POLYLINE16 : - ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_False); + ReadAndDrawPolygon(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), false); break; case EMR_POLYPOLYLINE16 : @@ -1364,7 +1364,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() { pOut->Push(); pOut->SelectObject( nIndex ); - pOut->DrawPolyPolygon( aPolyPoly, sal_False ); + pOut->DrawPolyPolygon( aPolyPoly, false ); pOut->Pop(); } } @@ -1388,7 +1388,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() pWMF->ReadUInt32( cbBits ); if ( (cbBits > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBits < cbBmi) ) - bStatus = sal_False; + bStatus = false; else if ( offBmi ) { sal_uInt32 nSize = cbBmi + cbBits + 14; @@ -1488,7 +1488,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() }; -sal_Bool EnhWMFReader::ReadHeader() +bool EnhWMFReader::ReadHeader() { sal_uInt32 nType, nSignature, nVersion; sal_uInt32 nHeaderSize, nPalEntries; @@ -1499,7 +1499,7 @@ sal_Bool EnhWMFReader::ReadHeader() pWMF->ReadUInt32( nType ).ReadUInt32( nHeaderSize ); if ( nType != 1 ) { // per [MS-EMF] 2.3.4.2 EMF Header Record Types, type MUST be 0x00000001 SAL_WARN("vcl.emf", "EMF header type is not set to 0x00000001 - possibly corrupted file?"); - return sal_False; + return false; } // Start reading the EMR_HEADER Header object @@ -1526,7 +1526,7 @@ sal_Bool EnhWMFReader::ReadHeader() // and 2.1.14 FormatSignature Enumeration if ( nSignature != 0x464d4520 ) { SAL_WARN("vcl.emf", "EMF\t\tSignature is not 0x464d4520 (\"FME\") - possibly corrupted file?"); - return sal_False; + return false; } pWMF->ReadUInt32( nVersion ); // according to [WS-EMF] 2.2.9, this SHOULD be 0x0001000, however @@ -1555,7 +1555,7 @@ sal_Bool EnhWMFReader::ReadHeader() if ( !nRecordCount ) { SAL_WARN("vcl.emf", "EMF\t\tEMF Header object shows record counter as 0! This shouldn't " "be possible... indicator of possible file corruption?"); - return sal_False; + return false; } // the number of "handles", or graphics objects used in the metafile @@ -1591,7 +1591,7 @@ sal_Bool EnhWMFReader::ReadHeader() pOut->SetRefMill( Size( nMillX, nMillY ) ); pWMF->Seek( nStartPos + nHeaderSize ); - return sal_True; + return true; } diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 7d0d479832b9..eca0d4f76798 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -95,7 +95,7 @@ void WinMtfPathObj::AddPoint( const Point& rPoint ) Insert( Polygon(), POLYPOLY_APPEND ); Polygon& rPoly = ((PolyPolygon&)*this)[ Count() - 1 ]; rPoly.Insert( rPoly.GetSize(), rPoint, POLY_NORMAL ); - bClosed = sal_False; + bClosed = false; } void WinMtfPathObj::AddPolyLine( const Polygon& rPolyLine ) @@ -104,13 +104,13 @@ void WinMtfPathObj::AddPolyLine( const Polygon& rPolyLine ) Insert( Polygon(), POLYPOLY_APPEND ); Polygon& rPoly = ((PolyPolygon&)*this)[ Count() - 1 ]; rPoly.Insert( rPoly.GetSize(), rPolyLine ); - bClosed = sal_False; + bClosed = false; } void WinMtfPathObj::AddPolygon( const Polygon& rPoly ) { Insert( rPoly, POLYPOLY_APPEND ); - bClosed = sal_True; + bClosed = true; } void WinMtfPathObj::AddPolyPolygon( const PolyPolygon& rPolyPoly ) @@ -118,7 +118,7 @@ void WinMtfPathObj::AddPolyPolygon( const PolyPolygon& rPolyPoly ) sal_uInt16 i, nCount = rPolyPoly.Count(); for ( i = 0; i < nCount; i++ ) Insert( rPolyPoly[ i ], POLYPOLY_APPEND ); - bClosed = sal_True; + bClosed = true; } void WinMtfPathObj::ClosePath() @@ -133,7 +133,7 @@ void WinMtfPathObj::ClosePath() rPoly.Insert( rPoly.GetSize(), aFirst, POLY_NORMAL ); } } - bClosed = sal_True; + bClosed = true; } @@ -594,7 +594,7 @@ void WinMtfOutput::SelectObject( sal_Int32 nIndex ) break; case NULL_PEN : { - pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), sal_True ) ); + pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), true ) ); } break; default: @@ -611,7 +611,7 @@ void WinMtfOutput::SelectObject( sal_Int32 nIndex ) case GDI_BRUSH : { maFillStyle = (WinMtfFillStyle*)pGDIObj->pStyle; - mbFillStyleSelected = sal_True; + mbFillStyleSelected = true; } break; case GDI_FONT : @@ -813,7 +813,7 @@ void WinMtfOutput::MoveClipRegion( const Size& rSize ) aClipPath.moveClipRegion( ImplMap( rSize ) ); } -void WinMtfOutput::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode, sal_Bool bIsMapped ) +void WinMtfOutput::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode, bool bIsMapped ) { mbClipNeedsUpdate=true; if ( bIsMapped ) @@ -841,8 +841,8 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) : meLatestRasterOp ( ROP_INVERT ), meRasterOp ( ROP_OVERPAINT ), maActPos ( Point() ), - mbNopMode ( sal_False ), - mbFillStyleSelected ( sal_False ), + mbNopMode ( false ), + mbFillStyleSelected ( false ), mbClipNeedsUpdate ( true ), mbComplexClip ( false ), mnGfxMode ( GM_COMPATIBLE ), @@ -861,8 +861,8 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) : mnMillY ( 1 ), mpGDIMetaFile ( &rGDIMetaFile ) { - mbIsMapWinSet = sal_False; - mbIsMapDevSet = sal_False; + mbIsMapWinSet = false; + mbIsMapDevSet = false; mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); // The original clipregion has to be on top // of the stack so it can always be restored // this is necessary to be able to support @@ -923,7 +923,7 @@ void WinMtfOutput::UpdateClipRegion() void WinMtfOutput::ImplSetNonPersistentLineColorTransparenz() { Color aColor( COL_TRANSPARENT); - WinMtfLineStyle aTransparentLine( aColor, sal_True ); + WinMtfLineStyle aTransparentLine( aColor, true ); if ( ! ( maLatestLineStyle == aTransparentLine ) ) { maLatestLineStyle = aTransparentLine; @@ -968,7 +968,7 @@ sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp ) { // changing modes from R2_NOP so set pen and brush maFillStyle = aNopFillStyle; maLineStyle = aNopLineStyle; - mbNopMode = sal_False; + mbNopMode = false; } switch( nRasterOp ) { @@ -983,13 +983,13 @@ sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp ) case R2_NOP: { meRasterOp = ROP_OVERPAINT; - if( mbNopMode == sal_False ) + if( !mbNopMode ) { aNopFillStyle = maFillStyle; aNopLineStyle = maLineStyle; maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), true ); - maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), sal_True ); - mbNopMode = sal_True; + maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), true ); + mbNopMode = true; } } break; @@ -1005,7 +1005,7 @@ sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp ) }; -void WinMtfOutput::StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ) +void WinMtfOutput::StrokeAndFillPath( bool bStroke, bool bFill ) { if ( aPathObj.Count() ) { @@ -1017,7 +1017,7 @@ void WinMtfOutput::StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ) if ( !bStroke ) { mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_LINECOLOR ) ); - mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) ); + mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), false ) ); } if ( aPathObj.Count() == 1 ) mpGDIMetaFile->AddAction( new MetaPolygonAction( aPathObj.GetObject( 0 ) ) ); @@ -1044,7 +1044,7 @@ void WinMtfOutput::DrawPixel( const Point& rSource, const Color& rColor ) } -void WinMtfOutput::MoveTo( const Point& rPoint, sal_Bool bRecordPath ) +void WinMtfOutput::MoveTo( const Point& rPoint, bool bRecordPath ) { Point aDest( ImplMap( rPoint ) ); if ( bRecordPath ) @@ -1059,7 +1059,7 @@ void WinMtfOutput::MoveTo( const Point& rPoint, sal_Bool bRecordPath ) } -void WinMtfOutput::LineTo( const Point& rPoint, sal_Bool bRecordPath ) +void WinMtfOutput::LineTo( const Point& rPoint, bool bRecordPath ) { UpdateClipRegion(); Point aDest( ImplMap( rPoint ) ); @@ -1074,7 +1074,7 @@ void WinMtfOutput::LineTo( const Point& rPoint, sal_Bool bRecordPath ) } -void WinMtfOutput::DrawRect( const Rectangle& rRect, sal_Bool bEdge ) +void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge ) { UpdateClipRegion(); UpdateFillStyle(); @@ -1145,7 +1145,7 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect ) } -void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, sal_Bool bTo ) +void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, bool bTo ) { UpdateClipRegion(); UpdateLineStyle(); @@ -1223,7 +1223,7 @@ void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const } -void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath ) +void WinMtfOutput::DrawPolygon( Polygon& rPolygon, bool bRecordPath ) { UpdateClipRegion(); ImplMap( rPolygon ); @@ -1296,7 +1296,7 @@ void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath ) } -void WinMtfOutput::DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath ) +void WinMtfOutput::DrawPolyPolygon( PolyPolygon& rPolyPolygon, bool bRecordPath ) { UpdateClipRegion(); @@ -1323,7 +1323,7 @@ void WinMtfOutput::DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordP } -void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRecordPath ) +void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, bool bTo, bool bRecordPath ) { UpdateClipRegion(); @@ -1343,7 +1343,7 @@ void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, sal_Bool bTo, sal_Bool bReco } -void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRecordPath ) +void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, bool bTo, bool bRecordPath ) { UpdateClipRegion(); @@ -1374,7 +1374,7 @@ void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRe } -void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, sal_Int32* pDXArry, sal_Bool bRecordPath, sal_Int32 nGfxMode ) +void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, sal_Int32* pDXArry, bool bRecordPath, sal_Int32 nGfxMode ) { UpdateClipRegion(); rPosition = ImplMap( rPosition ); @@ -1443,9 +1443,9 @@ void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, sal_Int32* pDXAr aTmp.SetFillColor( maBkColor ); if( mnBkMode == TRANSPARENT ) - aTmp.SetTransparent( sal_True ); + aTmp.SetTransparent( true ); else - aTmp.SetTransparent( sal_False ); + aTmp.SetTransparent( false ); if ( ( mnTextAlign & TA_BASELINE) == TA_BASELINE ) aTmp.SetAlign( ALIGN_BASELINE ); @@ -1566,7 +1566,7 @@ void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const B const Point aEmptyPoint; // #i50672# Extract whole VDev content (to match size of rBitmap) - aVDev.EnableMapMode( sal_False ); + aVDev.EnableMapMode( false ); Bitmap aMask( aVDev.GetBitmap( aEmptyPoint, aSizePixel ).CreateMask( Color( COL_WHITE ) ) ); if ( aBmpEx.IsTransparent() ) @@ -1636,7 +1636,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) { // patterns aren't well supported yet sal_uInt32 nOldRop = SetRasterOp( ROP_OVERPAINT ); // in this case nRasterOperation is either 0 or 0xff UpdateFillStyle(); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); SetRasterOp( nOldRop ); } else @@ -1701,7 +1701,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) if ( nOperation == 0x1 ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } } break; @@ -1719,7 +1719,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) if ( nOperation == 0x7 ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } } break; @@ -1728,7 +1728,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) case 0xb : { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); SetRasterOp( R2_COPYPEN ); Bitmap aMask( aBitmap ); aBitmap.Invert(); @@ -1739,7 +1739,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) if ( nOperation == 0xb ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } } break; @@ -1756,7 +1756,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) if ( nOperation == 0xd ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } } break; @@ -1768,7 +1768,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) if ( nOperation == 0x9 ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } } break; @@ -1778,7 +1778,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) { // in this case nRasterOperation is either 0 or 0xff maFillStyle = WinMtfFillStyle( Color( nRasterOperation, nRasterOperation, nRasterOperation ) ); UpdateFillStyle(); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } break; @@ -1794,7 +1794,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) case 0x5 : // only destination is used { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } case 0xa : // no operation break; @@ -1830,7 +1830,7 @@ void WinMtfOutput::SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd ) -void WinMtfOutput::SetDevExt( const Size& rSize ,sal_Bool regular) +void WinMtfOutput::SetDevExt( const Size& rSize ,bool regular) { if ( rSize.Width() && rSize.Height() ) { @@ -1845,7 +1845,7 @@ void WinMtfOutput::SetDevExt( const Size& rSize ,sal_Bool regular) } if (regular) { - mbIsMapDevSet=sal_True; + mbIsMapDevSet=true; } } } @@ -1860,7 +1860,7 @@ void WinMtfOutput::ScaleDevExt( double fX, double fY ) -void WinMtfOutput::SetWinOrg( const Point& rPoint , sal_Bool bIsEMF) +void WinMtfOutput::SetWinOrg( const Point& rPoint , bool bIsEMF) { mnWinOrgX = rPoint.X(); mnWinOrgY = rPoint.Y(); @@ -1868,7 +1868,7 @@ void WinMtfOutput::SetWinOrg( const Point& rPoint , sal_Bool bIsEMF) { SetDevByWin(); } - mbIsMapWinSet=sal_True; + mbIsMapWinSet=true; } @@ -1887,14 +1887,14 @@ void WinMtfOutput::SetDevByWin() //mnWinExt...-stuff has to be assigned before. { if ( mnMapMode == MM_ISOTROPIC ) //TODO: WHAT ABOUT ANISOTROPIC??? { - SetDevExt(Size((mnWinExtX+mnWinOrgX)>>MS_FIXPOINT_BITCOUNT_28_4,-((mnWinExtY-mnWinOrgY)>>MS_FIXPOINT_BITCOUNT_28_4)),sal_False); + SetDevExt(Size((mnWinExtX+mnWinOrgX)>>MS_FIXPOINT_BITCOUNT_28_4,-((mnWinExtY-mnWinOrgY)>>MS_FIXPOINT_BITCOUNT_28_4)),false); } } } -void WinMtfOutput::SetWinExt( const Size& rSize, sal_Bool bIsEMF ) +void WinMtfOutput::SetWinExt( const Size& rSize, bool bIsEMF ) { if( rSize.Width() && rSize.Height() ) { @@ -1909,7 +1909,7 @@ void WinMtfOutput::SetWinExt( const Size& rSize, sal_Bool bIsEMF ) { SetDevByWin(); } - mbIsMapWinSet=sal_True; + mbIsMapWinSet=true; } } } @@ -2184,7 +2184,7 @@ void WinMtfOutput::PassEMFPlusHeaderInfo() mem.Flush(); mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS_HEADER_INFO", 0, (const sal_uInt8*) mem.GetData(), mem.GetEndOfData() ) ); - mpGDIMetaFile->UseCanvas( sal_True ); + mpGDIMetaFile->UseCanvas( true ); } void WinMtfOutput::PassEMFPlus( void* pBuffer, sal_uInt32 nLength ) diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx index c20090725f6b..ab7291986de3 100644 --- a/vcl/source/filter/wmf/winmtf.hxx +++ b/vcl/source/filter/wmf/winmtf.hxx @@ -307,12 +307,12 @@ public : class WinMtfPathObj : public PolyPolygon { - sal_Bool bClosed; + bool bClosed; public : - WinMtfPathObj() { bClosed = sal_True; } - void Init() { Clear(); bClosed = sal_True; }; + WinMtfPathObj() { bClosed = true; } + void Init() { Clear(); bClosed = true; }; void ClosePath(); void AddPoint( const Point& rPoint ); void AddPolygon( const Polygon& rPoly ); @@ -400,29 +400,29 @@ struct WinMtfLineStyle { Color aLineColor; LineInfo aLineInfo; - sal_Bool bTransparent; + bool bTransparent; WinMtfLineStyle() : aLineColor ( COL_BLACK ), - bTransparent( sal_False ) {} + bTransparent( false ) {} - WinMtfLineStyle( const Color& rColor, sal_Bool bTrans = sal_False ) : + WinMtfLineStyle( const Color& rColor, bool bTrans = false ) : aLineColor ( rColor ), bTransparent( bTrans ) {} - WinMtfLineStyle( const Color& rColor, const LineInfo& rStyle, sal_Bool bTrans = sal_False ) : + WinMtfLineStyle( const Color& rColor, const LineInfo& rStyle, bool bTrans = false ) : aLineColor ( rColor ), aLineInfo ( rStyle ), bTransparent( bTrans ) {} - sal_Bool operator==( const WinMtfLineStyle& rStyle ) + bool operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); } - sal_Bool operator==( WinMtfLineStyle* pStyle ) + bool operator==( WinMtfLineStyle* pStyle ) { return ( ( aLineColor == pStyle->aLineColor ) && ( bTransparent == pStyle->bTransparent ) @@ -485,8 +485,8 @@ struct SaveStruct WinMtfClipPath aClipPath; XForm aXForm; - sal_Bool bRecordPath; - sal_Bool bFillStyleSelected; + bool bRecordPath; + bool bFillStyleSelected; }; typedef ::boost::shared_ptr< SaveStruct > SaveStructPtr; @@ -601,10 +601,10 @@ class WinMtfOutput Point maActPos; sal_uInt32 mnRop; - sal_Bool mbNopMode; - sal_Bool mbFillStyleSelected; - sal_Bool mbClipNeedsUpdate; - sal_Bool mbComplexClip; + bool mbNopMode; + bool mbFillStyleSelected; + bool mbClipNeedsUpdate; + bool mbComplexClip; std::vector< SaveStructPtr > vSaveStack; @@ -616,8 +616,8 @@ class WinMtfOutput sal_Int32 mnDevWidth, mnDevHeight; sal_Int32 mnWinOrgX, mnWinOrgY; // aktuel window origin sal_Int32 mnWinExtX, mnWinExtY; // aktuel window extend - sal_Bool mbIsMapWinSet; - sal_Bool mbIsMapDevSet; + bool mbIsMapWinSet; + bool mbIsMapDevSet; sal_Int32 mnPixX, mnPixY; // Reference Device in pixel sal_Int32 mnMillX, mnMillY; // Reference Device in Mill @@ -648,12 +648,12 @@ public: void SetDevByWin(); //Hack to set varying defaults for incompletely defined files. void SetDevOrg( const Point& rPoint ); void SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd ); - void SetDevExt( const Size& rSize ,sal_Bool regular = true); + void SetDevExt( const Size& rSize ,bool regular = true); void ScaleDevExt( double fX, double fY ); - void SetWinOrg( const Point& rPoint , sal_Bool bIsEMF = false); + void SetWinOrg( const Point& rPoint , bool bIsEMF = false); void SetWinOrgOffset( sal_Int32 nX, sal_Int32 nY ); - void SetWinExt( const Size& rSize , sal_Bool bIsEMF = false); + void SetWinExt( const Size& rSize , bool bIsEMF = false); void ScaleWinExt( double fX, double fY ); void SetrclBounds( const Rectangle& rRect ); @@ -671,7 +671,7 @@ public: void Pop(); sal_uInt32 SetRasterOp( sal_uInt32 nRasterOp ); - void StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ); + void StrokeAndFillPath( bool bStroke, bool bFill ); void SetGfxMode( sal_Int32 nGfxMode ){ mnGfxMode = nGfxMode; }; sal_Int32 GetGfxMode() const { return mnGfxMode; }; @@ -692,17 +692,17 @@ public: void ClosePath(){ aPathObj.ClosePath(); }; const PolyPolygon& GetPathObj(){ return aPathObj; }; - void MoveTo( const Point& rPoint, sal_Bool bRecordPath = sal_False ); - void LineTo( const Point& rPoint, sal_Bool bRecordPath = sal_False ); + void MoveTo( const Point& rPoint, bool bRecordPath = false ); + void LineTo( const Point& rPoint, bool bRecordPath = false ); void DrawPixel( const Point& rSource, const Color& rColor ); - void DrawRect( const Rectangle& rRect, sal_Bool bEdge = sal_True ); + void DrawRect( const Rectangle& rRect, bool bEdge = true ); void DrawRoundRect( const Rectangle& rRect, const Size& rSize ); void DrawEllipse( const Rectangle& rRect ); void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, - sal_Bool bDrawTo = sal_False + bool bDrawTo = false ); void DrawPie( const Rectangle& rRect, @@ -714,28 +714,28 @@ public: const Point& rStartAngle, const Point& rEndAngle ); - void DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath = sal_False ); - void DrawPolygon( Polygon& rPolygon, sal_Bool /*bDrawTo*/, sal_Bool bRecordPath) + void DrawPolygon( Polygon& rPolygon, bool bRecordPath = false ); + void DrawPolygon( Polygon& rPolygon, bool /*bDrawTo*/, bool bRecordPath) { //For ReadAndDrawPolygon template compatibility DrawPolygon(rPolygon, bRecordPath); } - void DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath = sal_False ); + void DrawPolyPolygon( PolyPolygon& rPolyPolygon, bool bRecordPath = false ); void DrawPolyLine( Polygon& rPolygon, - sal_Bool bDrawTo = sal_False, - sal_Bool bRecordPath = sal_False + bool bDrawTo = false, + bool bRecordPath = false ); void DrawPolyBezier( Polygon& rPolygin, - sal_Bool bDrawTo = sal_False, - sal_Bool bRecordPath = sal_False + bool bDrawTo = false, + bool bRecordPath = false ); void DrawText( Point& rPosition, OUString& rString, sal_Int32* pDXArry = NULL, - sal_Bool bRecordPath = sal_False, + bool bRecordPath = false, sal_Int32 nGraphicsMode = GM_COMPATIBLE ); void ResolveBitmapActions( BSaveStructList_impl& rSaveList ); @@ -746,7 +746,7 @@ public: void SetClipPath( const PolyPolygon& rPolyPoly, sal_Int32 nClippingMode, - sal_Bool bIsMapped + bool bIsMapped ); void UpdateClipRegion(); void AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile ); @@ -791,12 +791,12 @@ protected: class EnhWMFReader : public WinMtf { - sal_Bool bRecordPath; + bool bRecordPath; sal_Int32 nRecordCount; - sal_Bool bEMFPlus; + bool bEMFPlus; - sal_Bool ReadHeader(); + bool ReadHeader(); // reads and converts the rectangle Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 ); @@ -809,18 +809,18 @@ public: : WinMtf( new WinMtfOutput( rGDIMetaFile ) , rStreamWMF , pConfigItem ) - , bRecordPath( sal_False ) - , bEMFPlus( sal_False ) + , bRecordPath( false ) + , bEMFPlus( false ) {}; ~EnhWMFReader(); - sal_Bool ReadEnhWMF(); - void ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC); + bool ReadEnhWMF(); + void ReadEMFPlusComment(sal_uInt32 length, bool& bHaveDC); private: template void ReadAndDrawPolyPolygon(); template void ReadAndDrawPolyLine(); template Polygon ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints); - template void ReadAndDrawPolygon(Drawer drawer, const sal_Bool skipFirst); + template void ReadAndDrawPolygon(Drawer drawer, const bool skipFirst); }; //============================ WMFReader ================================== @@ -851,7 +851,7 @@ private: WMF_EXTERNALHEADER* pExternalHeader; // reads header of the WMF-Datei - sal_Bool ReadHeader(); + bool ReadHeader(); // reads parameters of the record with the functionnumber nFunction. void ReadRecordParams( sal_uInt16 nFunction ); @@ -860,7 +860,7 @@ private: Point ReadYX(); // reads and converts a point (first Y then X) Rectangle ReadRectangle(); // reads and converts a rectangle Size ReadYXExt(); - sal_Bool GetPlaceableBound( Rectangle& rSize, SvStream* pStrm ); + bool GetPlaceableBound( Rectangle& rSize, SvStream* pStrm ); public: diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index f53e396bc3ce..8d6fd89787aa 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -748,7 +748,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) if ( nWidth ) aLineInfo.SetWidth( nWidth ); - sal_Bool bTransparent = sal_False; + bool bTransparent = false; switch( nStyle & 0xFF ) { case PS_DASHDOTDOT : @@ -782,7 +782,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) aLineInfo.SetDistance( 100 ); break; case PS_NULL : - bTransparent = sal_True; + bTransparent = true; aLineInfo.SetStyle( LINE_NONE ); break; default : @@ -891,7 +891,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) pWMF->ReadUInt32( nROP ); Size aSize = ReadYXExt(); nOldROP = pOut->SetRasterOp( nROP ); - pOut->DrawRect( Rectangle( ReadYX(), aSize ), sal_False ); + pOut->DrawRect( Rectangle( ReadYX(), aSize ), false ); pOut->SetRasterOp( nOldROP ); } break; @@ -903,7 +903,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) if ( !nObjIndex ) { PolyPolygon aEmptyPolyPoly; - pOut->SetClipPath( aEmptyPolyPoly, RGN_COPY, sal_True ); + pOut->SetClipPath( aEmptyPolyPoly, RGN_COPY, true ); } } break; @@ -1091,7 +1091,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) // ------------------------------------------------------------------------ -sal_Bool WMFReader::ReadHeader() +bool WMFReader::ReadHeader() { sal_Size nStrmPos = pWMF->Tell(); @@ -1200,7 +1200,7 @@ void WMFReader::ReadWMF() nEMFRec = 0; nEMFSize = 0; - sal_Bool bEMFAvailable = sal_False; + bool bEMFAvailable = false; pOut->SetMapMode( MM_ANISOTROPIC ); pOut->SetWinOrg( Point() ); @@ -1306,9 +1306,9 @@ void WMFReader::ReadWMF() // ------------------------------------------------------------------------ -sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm ) +bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm ) { - sal_Bool bRet = sal_True; + bool bRet = true; rPlaceableBound.Left() = (sal_Int32)0x7fffffff; rPlaceableBound.Top() = (sal_Int32)0x7fffffff; @@ -1335,7 +1335,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt if( pStm->IsEof() ) { pStm->SetError( SVSTREAM_FILEFORMAT_ERROR ); - bRet = sal_False; + bRet = false; } break; } @@ -1419,7 +1419,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt if (!bRecordOk) { pStm->SetError( SVSTREAM_FILEFORMAT_ERROR ); - bRet = sal_False; + bRet = false; break; } @@ -1431,7 +1431,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt if (!bRecordOk) { pStm->SetError( SVSTREAM_FILEFORMAT_ERROR ); - bRet = sal_False; + bRet = false; break; } } @@ -1531,7 +1531,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt else { pStm->SetError( SVSTREAM_FILEFORMAT_ERROR ); - bRet = sal_False; + bRet = false; } } @@ -1539,7 +1539,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt else { pStm->SetError( SVSTREAM_GENERALERROR ); - bRet = sal_False; + bRet = false; } return bRet; } diff --git a/vcl/source/filter/wmf/wmf.cxx b/vcl/source/filter/wmf/wmf.cxx index 002756aaaeed..f9e51a2a8724 100644 --- a/vcl/source/filter/wmf/wmf.cxx +++ b/vcl/source/filter/wmf/wmf.cxx @@ -27,7 +27,7 @@ // ----------------------------------------------------------------------------- -sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem, WMF_EXTERNALHEADER *pExtHeader ) +bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem, WMF_EXTERNALHEADER *pExtHeader ) { sal_uInt32 nMetaType; sal_uInt32 nOrgPos = rStreamWMF.Tell(); @@ -38,7 +38,7 @@ sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaF rStreamWMF.Seek( nOrgPos ); if ( nMetaType == 0x464d4520 ) { - if ( EnhWMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadEnhWMF() == sal_False ) + if ( !EnhWMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadEnhWMF() ) rStreamWMF.SetError( SVSTREAM_FILEFORMAT_ERROR ); } else @@ -58,7 +58,7 @@ sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaF // ----------------------------------------------------------------------------- -sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pFilterConfigItem ) +bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pFilterConfigItem ) { sal_uInt32 nMetaType(0); sal_uInt32 nOrgPos = rStream.Tell(); @@ -79,7 +79,7 @@ sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigI if ( nMetaType == 0x464d4520 ) { - if ( EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() == sal_False ) + if ( !EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() ) rStream.SetError( SVSTREAM_FILEFORMAT_ERROR ); } else @@ -111,7 +111,7 @@ bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream // ----------------------------------------------------------------------------- -sal_Bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, +bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem ) { EMFWriter aEMFWriter(rTargetStream); -- cgit