diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-08 11:42:56 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-08 11:48:13 +0200 |
commit | b7d30cb50ede0752f1ee194655f925c77e06879a (patch) | |
tree | e9f1369976e5130ee20704344371060b0637a29a /svtools/source/graphic | |
parent | 2d54aa1d22f404a1a36aaa97d3e3bf5024e89aed (diff) |
svtools: sal_Bool->bool
Change-Id: Idd9a3ccf0eb6d14cec158daa17a6b2da625f7ffa
Diffstat (limited to 'svtools/source/graphic')
-rw-r--r-- | svtools/source/graphic/descriptor.cxx | 6 | ||||
-rw-r--r-- | svtools/source/graphic/grfcache.cxx | 52 | ||||
-rw-r--r-- | svtools/source/graphic/grfcache.hxx | 16 | ||||
-rw-r--r-- | svtools/source/graphic/provider.cxx | 2 |
4 files changed, 38 insertions, 38 deletions
diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index 799902ca2624..9bad92e5ecd1 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -443,19 +443,19 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry** case( UNOGRAPHIC_TRANSPARENT ): { - *pValues <<= static_cast< sal_Bool >( mpGraphic ? mpGraphic->IsTransparent() : mbTransparent ); + *pValues <<= mpGraphic ? mpGraphic->IsTransparent() : mbTransparent; } break; case( UNOGRAPHIC_ALPHA ): { - *pValues <<= static_cast< sal_Bool >( mpGraphic ? mpGraphic->IsAlpha() : mbAlpha ); + *pValues <<= mpGraphic ? mpGraphic->IsAlpha() : mbAlpha; } break; case( UNOGRAPHIC_ANIMATED ): { - *pValues <<= static_cast< sal_Bool >( mpGraphic ? mpGraphic->IsAnimated() : mbAnimated ); + *pValues <<= mpGraphic ? mpGraphic->IsAnimated() : mbAnimated; } break; } diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index 03dbf565680c..26d766af354c 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -52,14 +52,14 @@ public: GraphicID( const GraphicObject& rObj ); ~GraphicID() {} - sal_Bool operator==( const GraphicID& rID ) const + bool operator==( const GraphicID& rID ) const { return( rID.mnID1 == mnID1 && rID.mnID2 == mnID2 && rID.mnID3 == mnID3 && rID.mnID4 == mnID4 ); } OString GetIDString() const; - sal_Bool IsEmpty() const { return( 0 == mnID4 ); } + bool IsEmpty() const { return( 0 == mnID4 ); } }; GraphicID::GraphicID( const GraphicObject& rObj ) @@ -452,7 +452,7 @@ public: void SetReleaseTime( const ::salhelper::TTimeValue& rReleaseTime ) { maReleaseTime = rReleaseTime; } const ::salhelper::TTimeValue& GetReleaseTime() const { return maReleaseTime; } - sal_Bool Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel, + bool Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel, const GraphicCacheEntry* pCacheEntry, const GraphicAttr& rAttr ) const { // #i46805# Additional match @@ -846,7 +846,7 @@ void GraphicCache::AddGraphicObject( const GraphicObject* pCopyObj ) { - sal_Bool bInserted = sal_False; + bool bInserted = false; if( !rObj.IsSwappedOut() && ( pID @@ -869,7 +869,7 @@ void GraphicCache::AddGraphicObject( if( (*it)->HasGraphicObjectReference( *pCopyObj ) ) { (*it)->AddGraphicObjectReference( rObj, rSubstitute ); - bInserted = sal_True; + bInserted = true; } else { @@ -913,14 +913,14 @@ void GraphicCache::AddGraphicObject( if( rID.GetIDString() == *pID ) { (*jt)->AddGraphicObjectReference( rObj, rSubstitute ); - bInserted = sal_True; + bInserted = true; } } if( !bInserted ) { maGraphicCache.push_back( new GraphicCacheEntry( rObj ) ); - bInserted = sal_True; + bInserted = true; } } } @@ -929,7 +929,7 @@ void GraphicCache::AddGraphicObject( if( rEntryID == *apID ) { (*it)->AddGraphicObjectReference( rObj, rSubstitute ); - bInserted = sal_True; + bInserted = true; } } @@ -991,12 +991,12 @@ void GraphicCache::GraphicObjectWasSwappedOut( const GraphicObject& rObj ) pEntry->GraphicObjectWasSwappedOut( rObj ); } -sal_Bool GraphicCache::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ) +bool GraphicCache::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ) { GraphicCacheEntry* pEntry = ImplGetCacheEntry( rObj ); if( !pEntry ) - return sal_False; + return false; return pEntry->FillSwappedGraphicObject( rObj, rSubstitute ); } @@ -1025,9 +1025,9 @@ void GraphicCache::SetMaxDisplayCacheSize( sal_uLong nNewCacheSize ) ImplFreeDisplayCacheSpace( GetUsedDisplayCacheSize() - GetMaxDisplayCacheSize() ); } -void GraphicCache::SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, sal_Bool bDestroyGreaterCached ) +void GraphicCache::SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, bool bDestroyGreaterCached ) { - const sal_Bool bDestroy = ( bDestroyGreaterCached && ( nNewMaxObjSize < mnMaxObjDisplaySize ) ); + const bool bDestroy = ( bDestroyGreaterCached && ( nNewMaxObjSize < mnMaxObjDisplaySize ) ); mnMaxObjDisplaySize = std::min( nNewMaxObjSize, mnMaxDisplaySize ); @@ -1069,20 +1069,20 @@ void GraphicCache::SetCacheTimeout( sal_uLong nTimeoutSeconds ) } } -sal_Bool GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz, +bool GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) const { return( GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr ) <= GetMaxObjDisplayCacheSize() ); } -sal_Bool GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz, +bool GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) const { const Point aPtPixel( pOut->LogicToPixel( rPt ) ); const Size aSzPixel( pOut->LogicToPixel( rSz ) ); const GraphicCacheEntry* pCacheEntry = ( (GraphicCache*) this )->ImplGetCacheEntry( rObj ); - sal_Bool bFound = sal_False; + bool bFound = false; if( pCacheEntry ) { @@ -1090,7 +1090,7 @@ sal_Bool GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, c !bFound && ( it != maDisplayCache.end() ); ++it ) { if( (*it)->Matches( pOut, aPtPixel, aSzPixel, pCacheEntry, rAttr ) ) - bFound = sal_True; + bFound = true; } } @@ -1115,12 +1115,12 @@ OString GraphicCache::GetUniqueID( const GraphicObject& rObj ) const return aRet; } -sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, +bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr, const BitmapEx& rBmpEx ) { const sal_uLong nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr ); - sal_Bool bRet = sal_False; + bool bRet = false; if( nNeededSize <= GetMaxObjDisplayCacheSize() ) { @@ -1141,18 +1141,18 @@ sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& r maDisplayCache.push_back( pNewEntry ); mnUsedDisplaySize += pNewEntry->GetCacheSize(); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, +bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr, const GDIMetaFile& rMtf ) { const sal_uLong nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr ); - sal_Bool bRet = sal_False; + bool bRet = false; if( nNeededSize <= GetMaxObjDisplayCacheSize() ) { @@ -1173,13 +1173,13 @@ sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& r maDisplayCache.push_back( pNewEntry ); mnUsedDisplaySize += pNewEntry->GetCacheSize(); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, +bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) { const Point aPtPixel( pOut->LogicToPixel( rPt ) ); @@ -1187,7 +1187,7 @@ sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt const GraphicCacheEntry* pCacheEntry = ImplGetCacheEntry( rObj ); GraphicDisplayCacheEntry* pDisplayCacheEntry = NULL; GraphicDisplayCacheEntryList::iterator it = maDisplayCache.begin(); - sal_Bool bRet = sal_False; + bool bRet = false; while( !bRet && it != maDisplayCache.end() ) { @@ -1207,7 +1207,7 @@ sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt } pDisplayCacheEntry->SetReleaseTime( aReleaseTime ); - bRet = sal_True; + bRet = true; } else ++it; @@ -1219,7 +1219,7 @@ sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt return bRet; } -sal_Bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree ) +bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree ) { sal_uLong nFreedSize = 0UL; diff --git a/svtools/source/graphic/grfcache.hxx b/svtools/source/graphic/grfcache.hxx index 1569f0c0e726..ddb6f6b4eb4c 100644 --- a/svtools/source/graphic/grfcache.hxx +++ b/svtools/source/graphic/grfcache.hxx @@ -47,7 +47,7 @@ private: sal_uLong mnMaxObjDisplaySize; sal_uLong mnUsedDisplaySize; - sal_Bool ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree ); + bool ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree ); GraphicCacheEntry* ImplGetCacheEntry( const GraphicObject& rObj ); @@ -74,7 +74,7 @@ public: void ReleaseGraphicObject( const GraphicObject& rObj ); void GraphicObjectWasSwappedOut( const GraphicObject& rObj ); - sal_Bool FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ); + bool FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ); void GraphicObjectWasSwappedIn( const GraphicObject& rObj ); OString GetUniqueID( const GraphicObject& rObj ) const; @@ -86,7 +86,7 @@ public: void SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, - sal_Bool bDestroyGreaterCached = sal_False + bool bDestroyGreaterCached = false ); sal_uLong GetMaxObjDisplayCacheSize() const { return mnMaxObjDisplaySize; } @@ -97,7 +97,7 @@ public: void SetCacheTimeout( sal_uLong nTimeoutSeconds ); sal_uLong GetCacheTimeout() const { return mnReleaseTimeoutSeconds; } - sal_Bool IsDisplayCacheable( + bool IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz, @@ -105,7 +105,7 @@ public: const GraphicAttr& rAttr ) const; - sal_Bool IsInDisplayCache( + bool IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz, @@ -113,7 +113,7 @@ public: const GraphicAttr& rAttr ) const; - sal_Bool CreateDisplayCacheObj( + bool CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, @@ -122,7 +122,7 @@ public: const BitmapEx& rBmpEx ); - sal_Bool CreateDisplayCacheObj( + bool CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, @@ -131,7 +131,7 @@ public: const GDIMetaFile& rMtf ); - sal_Bool DrawDisplayCacheObj( + bool DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index 0a4d36b8d7ea..9ad16f7b7bcc 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -593,7 +593,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal sal_Int32 nImageResolution = 0; awt::Size aLogicalSize( 0, 0 ); text::GraphicCrop aCropLogic( 0, 0, 0, 0 ); - sal_Bool bRemoveCropArea = sal_True; + bool bRemoveCropArea = true; for( sal_Int32 i = 0; i < rFilterData.getLength(); ++i ) { |