diff options
Diffstat (limited to 'svtools/source/graphic')
-rw-r--r-- | svtools/source/graphic/descriptor.cxx | 2 | ||||
-rw-r--r-- | svtools/source/graphic/descriptor.hxx | 2 | ||||
-rw-r--r-- | svtools/source/graphic/grfattr.cxx | 8 | ||||
-rw-r--r-- | svtools/source/graphic/grfcache.cxx | 138 | ||||
-rw-r--r-- | svtools/source/graphic/grfcache.hxx | 42 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 136 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr2.cxx | 142 | ||||
-rw-r--r-- | svtools/source/graphic/provider.cxx | 2 |
8 files changed, 236 insertions, 236 deletions
diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index 5db73e6cc2f3..6c808baa169d 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -457,7 +457,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry** case( UNOGRAPHIC_BITSPERPIXEL ): { - USHORT nBitsPerPixel = 0; + sal_uInt16 nBitsPerPixel = 0; if( mpGraphic ) { diff --git a/svtools/source/graphic/descriptor.hxx b/svtools/source/graphic/descriptor.hxx index bed7c64c0411..2a8c06723eb6 100644 --- a/svtools/source/graphic/descriptor.hxx +++ b/svtools/source/graphic/descriptor.hxx @@ -123,7 +123,7 @@ private: ::rtl::OUString maMimeType; Size maSizePixel; Size maSize100thMM; - USHORT mnBitsPerPixel; + sal_uInt16 mnBitsPerPixel; bool mbTransparent; bool mbAlpha; bool mbAnimated; diff --git a/svtools/source/graphic/grfattr.cxx b/svtools/source/graphic/grfattr.cxx index 757be42a104c..68c0ea9ae4a7 100644 --- a/svtools/source/graphic/grfattr.cxx +++ b/svtools/source/graphic/grfattr.cxx @@ -48,7 +48,7 @@ GraphicAttr::GraphicAttr() : mnRPercent ( 0 ), mnGPercent ( 0 ), mnBPercent ( 0 ), - mbInvert ( FALSE ), + mbInvert ( sal_False ), mcTransparency ( 0 ), meDrawMode ( GRAPHICDRAWMODE_STANDARD ) { @@ -62,7 +62,7 @@ GraphicAttr::~GraphicAttr() // ------------------------------------------------------------------------ -BOOL GraphicAttr::operator==( const GraphicAttr& rAttr ) const +sal_Bool GraphicAttr::operator==( const GraphicAttr& rAttr ) const { return( ( mfGamma == rAttr.mfGamma ) && ( mnMirrFlags == rAttr.mnMirrFlags ) && @@ -87,7 +87,7 @@ SvStream& operator>>( SvStream& rIStm, GraphicAttr& rAttr ) { VersionCompat aCompat( rIStm, STREAM_READ ); sal_uInt32 nTmp32; - UINT16 nTmp16; + sal_uInt16 nTmp16; rIStm >> nTmp32 >> nTmp32 >> rAttr.mfGamma >> rAttr.mnMirrFlags >> rAttr.mnRotate10; rIStm >> rAttr.mnContPercent >> rAttr.mnLumPercent >> rAttr.mnRPercent >> rAttr.mnGPercent >> rAttr.mnBPercent; @@ -111,7 +111,7 @@ SvStream& operator<<( SvStream& rOStm, const GraphicAttr& rAttr ) rOStm << nTmp32 << nTmp32 << rAttr.mfGamma << rAttr.mnMirrFlags << rAttr.mnRotate10; rOStm << rAttr.mnContPercent << rAttr.mnLumPercent << rAttr.mnRPercent << rAttr.mnGPercent << rAttr.mnBPercent; - rOStm << rAttr.mbInvert << rAttr.mcTransparency << (UINT16) rAttr.meDrawMode; + rOStm << rAttr.mbInvert << rAttr.mcTransparency << (sal_uInt16) rAttr.meDrawMode; rOStm << rAttr.mnLeftCrop << rAttr.mnTopCrop << rAttr.mnRightCrop << rAttr.mnBottomCrop; return rOStm; diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index 41240c95d113..3768bab7f739 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -70,14 +70,14 @@ public: GraphicID( const GraphicObject& rObj ); ~GraphicID() {} - BOOL operator==( const GraphicID& rID ) const + sal_Bool operator==( const GraphicID& rID ) const { return( rID.mnID1 == mnID1 && rID.mnID2 == mnID2 && rID.mnID3 == mnID3 && rID.mnID4 == mnID4 ); } ByteString GetIDString() const; - BOOL IsEmpty() const { return( 0 == mnID4 ); } + sal_Bool IsEmpty() const { return( 0 == mnID4 ); } }; // ----------------------------------------------------------------------------- @@ -86,7 +86,7 @@ GraphicID::GraphicID( const GraphicObject& rObj ) { const Graphic& rGraphic = rObj.GetGraphic(); - mnID1 = ( (ULONG) rGraphic.GetType() ) << 28; + mnID1 = ( (sal_uIntPtr) rGraphic.GetType() ) << 28; switch( rGraphic.GetType() ) { @@ -105,7 +105,7 @@ GraphicID::GraphicID( const GraphicObject& rObj ) { const BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); - mnID1 |= ( ( ( (ULONG) aBmpEx.GetTransparentType() << 8 ) | ( aBmpEx.IsAlpha() ? 1 : 0 ) ) & 0x0fffffff ); + mnID1 |= ( ( ( (sal_uIntPtr) aBmpEx.GetTransparentType() << 8 ) | ( aBmpEx.IsAlpha() ? 1 : 0 ) ) & 0x0fffffff ); mnID2 = aBmpEx.GetSizePixel().Width(); mnID3 = aBmpEx.GetSizePixel().Height(); mnID4 = rGraphic.GetChecksum(); @@ -167,10 +167,10 @@ private: BitmapEx* mpBmpEx; GDIMetaFile* mpMtf; Animation* mpAnimation; - BOOL mbSwappedAll; + sal_Bool mbSwappedAll; - BOOL ImplInit( const GraphicObject& rObj ); - BOOL ImplMatches( const GraphicObject& rObj ) const { return( GraphicID( rObj ) == maID ); } + sal_Bool ImplInit( const GraphicObject& rObj ); + sal_Bool ImplMatches( const GraphicObject& rObj ) const { return( GraphicID( rObj ) == maID ); } void ImplFillSubstitute( Graphic& rSubstitute ); public: @@ -181,13 +181,13 @@ public: const GraphicID& GetID() const { return maID; } void AddGraphicObjectReference( const GraphicObject& rObj, Graphic& rSubstitute ); - BOOL ReleaseGraphicObjectReference( const GraphicObject& rObj ); - ULONG GetGraphicObjectReferenceCount() { return maGraphicObjectList.Count(); } - BOOL HasGraphicObjectReference( const GraphicObject& rObj ); + sal_Bool ReleaseGraphicObjectReference( const GraphicObject& rObj ); + sal_uIntPtr GetGraphicObjectReferenceCount() { return maGraphicObjectList.Count(); } + sal_Bool HasGraphicObjectReference( const GraphicObject& rObj ); void TryToSwapIn(); void GraphicObjectWasSwappedOut( const GraphicObject& rObj ); - BOOL FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ); + sal_Bool FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ); void GraphicObjectWasSwappedIn( const GraphicObject& rObj ); }; @@ -216,9 +216,9 @@ GraphicCacheEntry::~GraphicCacheEntry() // ----------------------------------------------------------------------------- -BOOL GraphicCacheEntry::ImplInit( const GraphicObject& rObj ) +sal_Bool GraphicCacheEntry::ImplInit( const GraphicObject& rObj ) { - BOOL bRet; + sal_Bool bRet; if( !rObj.IsSwappedOut() ) { @@ -260,10 +260,10 @@ BOOL GraphicCacheEntry::ImplInit( const GraphicObject& rObj ) else maGfxLink = GfxLink(); - bRet = TRUE; + bRet = sal_True; } else - bRet = FALSE; + bRet = sal_False; return bRet; } @@ -277,9 +277,9 @@ void GraphicCacheEntry::ImplFillSubstitute( Graphic& rSubstitute ) const MapMode aPrefMapMode( rSubstitute.GetPrefMapMode() ); const Link aAnimationNotifyHdl( rSubstitute.GetAnimationNotifyHdl() ); const String aDocFileName( rSubstitute.GetDocFileName() ); - const ULONG nDocFilePos = rSubstitute.GetDocFilePos(); + const sal_uIntPtr nDocFilePos = rSubstitute.GetDocFilePos(); const GraphicType eOldType = rSubstitute.GetType(); - const BOOL bDefaultType = ( rSubstitute.GetType() == GRAPHIC_DEFAULT ); + const sal_Bool bDefaultType = ( rSubstitute.GetType() == GRAPHIC_DEFAULT ); if( rSubstitute.IsLink() && ( GFX_LINK_TYPE_NONE == maGfxLink.GetType() ) ) maGfxLink = rSubstitute.GetLink(); @@ -321,16 +321,16 @@ void GraphicCacheEntry::AddGraphicObjectReference( const GraphicObject& rObj, Gr // ----------------------------------------------------------------------------- -BOOL GraphicCacheEntry::ReleaseGraphicObjectReference( const GraphicObject& rObj ) +sal_Bool GraphicCacheEntry::ReleaseGraphicObjectReference( const GraphicObject& rObj ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; for( void* pObj = maGraphicObjectList.First(); !bRet && pObj; pObj = maGraphicObjectList.Next() ) { if( &rObj == (GraphicObject*) pObj ) { maGraphicObjectList.Remove( pObj ); - bRet = TRUE; + bRet = sal_True; } } @@ -339,13 +339,13 @@ BOOL GraphicCacheEntry::ReleaseGraphicObjectReference( const GraphicObject& rObj // ----------------------------------------------------------------------------- -BOOL GraphicCacheEntry::HasGraphicObjectReference( const GraphicObject& rObj ) +sal_Bool GraphicCacheEntry::HasGraphicObjectReference( const GraphicObject& rObj ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; for( void* pObj = maGraphicObjectList.First(); !bRet && pObj; pObj = maGraphicObjectList.Next() ) if( &rObj == (GraphicObject*) pObj ) - bRet = TRUE; + bRet = sal_True; return bRet; } @@ -362,11 +362,11 @@ void GraphicCacheEntry::TryToSwapIn() void GraphicCacheEntry::GraphicObjectWasSwappedOut( const GraphicObject& /*rObj*/ ) { - mbSwappedAll = TRUE; + mbSwappedAll = sal_True; for( void* pObj = maGraphicObjectList.First(); mbSwappedAll && pObj; pObj = maGraphicObjectList.Next() ) if( !( (GraphicObject*) pObj )->IsSwappedOut() ) - mbSwappedAll = FALSE; + mbSwappedAll = sal_False; if( mbSwappedAll ) { @@ -378,17 +378,17 @@ void GraphicCacheEntry::GraphicObjectWasSwappedOut( const GraphicObject& /*rObj* // ----------------------------------------------------------------------------- -BOOL GraphicCacheEntry::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ) +sal_Bool GraphicCacheEntry::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ) { - BOOL bRet; + sal_Bool bRet; if( !mbSwappedAll && rObj.IsSwappedOut() ) { ImplFillSubstitute( rSubstitute ); - bRet = TRUE; + bRet = sal_True; } else - bRet = FALSE; + bRet = sal_False; return bRet; } @@ -415,13 +415,13 @@ private: BitmapEx* mpBmpEx; GraphicAttr maAttr; Size maOutSizePix; - ULONG mnCacheSize; - ULONG mnOutDevDrawMode; - USHORT mnOutDevBitCount; + sal_uIntPtr mnCacheSize; + sal_uIntPtr mnOutDevDrawMode; + sal_uInt16 mnOutDevBitCount; public: - static ULONG GetNeededSize( OutputDevice* pOut, const Point& rPt, const Size& rSz, + static sal_uIntPtr GetNeededSize( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ); public: @@ -457,15 +457,15 @@ public: const GraphicAttr& GetAttr() const { return maAttr; } const Size& GetOutputSizePixel() const { return maOutSizePix; } - ULONG GetCacheSize() const { return mnCacheSize; } + sal_uIntPtr GetCacheSize() const { return mnCacheSize; } const GraphicCacheEntry* GetReferencedCacheEntry() const { return mpRefCacheEntry; } - ULONG GetOutDevDrawMode() const { return mnOutDevDrawMode; } - USHORT GetOutDevBitCount() const { return mnOutDevBitCount; } + sal_uIntPtr GetOutDevDrawMode() const { return mnOutDevDrawMode; } + sal_uInt16 GetOutDevBitCount() const { return mnOutDevBitCount; } void SetReleaseTime( const ::vos::TTimeValue& rReleaseTime ) { maReleaseTime = rReleaseTime; } const ::vos::TTimeValue& GetReleaseTime() const { return maReleaseTime; } - BOOL Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel, + sal_Bool Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel, const GraphicCacheEntry* pCacheEntry, const GraphicAttr& rAttr ) const { // #i46805# Additional match @@ -486,12 +486,12 @@ public: // ----------------------------------------------------------------------------- -ULONG GraphicDisplayCacheEntry::GetNeededSize( OutputDevice* pOut, const Point& /*rPt*/, const Size& rSz, +sal_uIntPtr GraphicDisplayCacheEntry::GetNeededSize( OutputDevice* pOut, const Point& /*rPt*/, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) { const Graphic& rGraphic = rObj.GetGraphic(); const GraphicType eType = rGraphic.GetType(); - ULONG nNeededSize; + sal_uIntPtr nNeededSize; if( GRAPHIC_BITMAP == eType ) { @@ -560,7 +560,7 @@ void GraphicDisplayCacheEntry::Draw( OutputDevice* pOut, const Point& rPt, const // - GraphicCache - // ----------------------- -GraphicCache::GraphicCache( GraphicManager& rMgr, ULONG nDisplayCacheSize, ULONG nMaxObjDisplayCacheSize ) : +GraphicCache::GraphicCache( GraphicManager& rMgr, sal_uIntPtr nDisplayCacheSize, sal_uIntPtr nMaxObjDisplayCacheSize ) : mrMgr ( rMgr ), mnReleaseTimeoutSeconds ( 0UL ), mnMaxDisplaySize ( nDisplayCacheSize ), @@ -585,7 +585,7 @@ GraphicCache::~GraphicCache() void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute, const ByteString* pID, const GraphicObject* pCopyObj ) { - BOOL bInserted = FALSE; + sal_Bool bInserted = sal_False; if( !rObj.IsSwappedOut() && ( pID || ( pCopyObj && ( pCopyObj->GetType() != GRAPHIC_NONE ) ) || ( rObj.GetType() != GRAPHIC_NONE ) ) ) @@ -599,7 +599,7 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti if( pEntry->HasGraphicObjectReference( *pCopyObj ) ) { pEntry->AddGraphicObjectReference( rObj, rSubstitute ); - bInserted = TRUE; + bInserted = sal_True; } else { @@ -640,14 +640,14 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti if( rID.GetIDString() == *pID ) { pEntry->AddGraphicObjectReference( rObj, rSubstitute ); - bInserted = TRUE; + bInserted = sal_True; } } if( !bInserted ) { maGraphicCache.Insert( new GraphicCacheEntry( rObj ), LIST_APPEND ); - bInserted = TRUE; + bInserted = sal_True; } } } @@ -656,7 +656,7 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti if( rEntryID == *apID ) { pEntry->AddGraphicObjectReference( rObj, rSubstitute ); - bInserted = TRUE; + bInserted = sal_True; } } @@ -676,7 +676,7 @@ void GraphicCache::ReleaseGraphicObject( const GraphicObject& rObj ) { // Release cached object GraphicCacheEntry* pEntry = (GraphicCacheEntry*) maGraphicCache.First(); - BOOL bRemoved = FALSE; + sal_Bool bRemoved = sal_False; while( !bRemoved && pEntry ) { @@ -729,12 +729,12 @@ void GraphicCache::GraphicObjectWasSwappedOut( const GraphicObject& rObj ) // ----------------------------------------------------------------------------- -BOOL GraphicCache::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ) +sal_Bool GraphicCache::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ) { GraphicCacheEntry* pEntry = ImplGetCacheEntry( rObj ); if( !pEntry ) - return FALSE; + return sal_False; return pEntry->FillSwappedGraphicObject( rObj, rSubstitute ); } @@ -759,7 +759,7 @@ void GraphicCache::GraphicObjectWasSwappedIn( const GraphicObject& rObj ) // ----------------------------------------------------------------------------- -void GraphicCache::SetMaxDisplayCacheSize( ULONG nNewCacheSize ) +void GraphicCache::SetMaxDisplayCacheSize( sal_uIntPtr nNewCacheSize ) { mnMaxDisplaySize = nNewCacheSize; @@ -769,9 +769,9 @@ void GraphicCache::SetMaxDisplayCacheSize( ULONG nNewCacheSize ) // ----------------------------------------------------------------------------- -void GraphicCache::SetMaxObjDisplayCacheSize( ULONG nNewMaxObjSize, BOOL bDestroyGreaterCached ) +void GraphicCache::SetMaxObjDisplayCacheSize( sal_uIntPtr nNewMaxObjSize, sal_Bool bDestroyGreaterCached ) { - const BOOL bDestroy = ( bDestroyGreaterCached && ( nNewMaxObjSize < mnMaxObjDisplaySize ) ); + const sal_Bool bDestroy = ( bDestroyGreaterCached && ( nNewMaxObjSize < mnMaxObjDisplaySize ) ); mnMaxObjDisplaySize = Min( nNewMaxObjSize, mnMaxDisplaySize ); @@ -796,7 +796,7 @@ void GraphicCache::SetMaxObjDisplayCacheSize( ULONG nNewMaxObjSize, BOOL bDestro // ----------------------------------------------------------------------------- -void GraphicCache::SetCacheTimeout( ULONG nTimeoutSeconds ) +void GraphicCache::SetCacheTimeout( sal_uIntPtr nTimeoutSeconds ) { if( mnReleaseTimeoutSeconds != nTimeoutSeconds ) { @@ -830,7 +830,7 @@ void GraphicCache::ClearDisplayCache() // ----------------------------------------------------------------------------- -BOOL GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz, +sal_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 ) <= @@ -839,20 +839,20 @@ BOOL GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, con // ----------------------------------------------------------------------------- -BOOL GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz, +sal_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 ); //GraphicDisplayCacheEntry* pDisplayEntry = (GraphicDisplayCacheEntry*) ( (GraphicCache*) this )->maDisplayCache.First(); // -Wall removed .... - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if( pCacheEntry ) { for( long i = 0, nCount = maDisplayCache.Count(); !bFound && ( i < nCount ); i++ ) if( ( (GraphicDisplayCacheEntry*) maDisplayCache.GetObject( i ) )->Matches( pOut, aPtPixel, aSzPixel, pCacheEntry, rAttr ) ) - bFound = TRUE; + bFound = sal_True; } return bFound; @@ -880,12 +880,12 @@ ByteString GraphicCache::GetUniqueID( const GraphicObject& rObj ) const // ----------------------------------------------------------------------------- -BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, +sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr, const BitmapEx& rBmpEx ) { - const ULONG nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr ); - BOOL bRet = FALSE; + const sal_uIntPtr nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr ); + sal_Bool bRet = sal_False; if( nNeededSize <= GetMaxObjDisplayCacheSize() ) { @@ -906,7 +906,7 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, maDisplayCache.Insert( pNewEntry, LIST_APPEND ); mnUsedDisplaySize += pNewEntry->GetCacheSize(); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -914,12 +914,12 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, // ----------------------------------------------------------------------------- -BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, +sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr, const GDIMetaFile& rMtf ) { - const ULONG nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr ); - BOOL bRet = FALSE; + const sal_uIntPtr nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr ); + sal_Bool bRet = sal_False; if( nNeededSize <= GetMaxObjDisplayCacheSize() ) { @@ -940,7 +940,7 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, maDisplayCache.Insert( pNewEntry, LIST_APPEND ); mnUsedDisplaySize += pNewEntry->GetCacheSize(); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -948,14 +948,14 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, // ----------------------------------------------------------------------------- -BOOL GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, +sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) { const Point aPtPixel( pOut->LogicToPixel( rPt ) ); const Size aSzPixel( pOut->LogicToPixel( rSz ) ); const GraphicCacheEntry* pCacheEntry = ImplGetCacheEntry( rObj ); GraphicDisplayCacheEntry* pDisplayCacheEntry = (GraphicDisplayCacheEntry*) maDisplayCache.First(); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; while( !bRet && pDisplayCacheEntry ) { @@ -973,7 +973,7 @@ BOOL GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co } pDisplayCacheEntry->SetReleaseTime( aReleaseTime ); - bRet = TRUE; + bRet = sal_True; } else pDisplayCacheEntry = (GraphicDisplayCacheEntry*) maDisplayCache.Next(); @@ -987,9 +987,9 @@ BOOL GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co // ----------------------------------------------------------------------------- -BOOL GraphicCache::ImplFreeDisplayCacheSpace( ULONG nSizeToFree ) +sal_Bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uIntPtr nSizeToFree ) { - ULONG nFreedSize = 0UL; + sal_uIntPtr nFreedSize = 0UL; if( nSizeToFree ) { diff --git a/svtools/source/graphic/grfcache.hxx b/svtools/source/graphic/grfcache.hxx index 55309a00827d..99df81b1d32e 100644 --- a/svtools/source/graphic/grfcache.hxx +++ b/svtools/source/graphic/grfcache.hxx @@ -47,12 +47,12 @@ private: Timer maReleaseTimer; List maGraphicCache; List maDisplayCache; - ULONG mnReleaseTimeoutSeconds; - ULONG mnMaxDisplaySize; - ULONG mnMaxObjDisplaySize; - ULONG mnUsedDisplaySize; + sal_uIntPtr mnReleaseTimeoutSeconds; + sal_uIntPtr mnMaxDisplaySize; + sal_uIntPtr mnMaxObjDisplaySize; + sal_uIntPtr mnUsedDisplaySize; - BOOL ImplFreeDisplayCacheSpace( ULONG nSizeToFree ); + sal_Bool ImplFreeDisplayCacheSpace( sal_uIntPtr nSizeToFree ); GraphicCacheEntry* ImplGetCacheEntry( const GraphicObject& rObj ); @@ -61,8 +61,8 @@ private: public: GraphicCache( GraphicManager& rMgr, - ULONG nDisplayCacheSize = 10000000UL, - ULONG nMaxObjDisplayCacheSize = 2400000UL ); + sal_uIntPtr nDisplayCacheSize = 10000000UL, + sal_uIntPtr nMaxObjDisplayCacheSize = 2400000UL ); ~GraphicCache(); public: @@ -72,37 +72,37 @@ public: void ReleaseGraphicObject( const GraphicObject& rObj ); void GraphicObjectWasSwappedOut( const GraphicObject& rObj ); - BOOL FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ); + sal_Bool FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ); void GraphicObjectWasSwappedIn( const GraphicObject& rObj ); ByteString GetUniqueID( const GraphicObject& rObj ) const; public: - void SetMaxDisplayCacheSize( ULONG nNewCacheSize ); - ULONG GetMaxDisplayCacheSize() const { return mnMaxDisplaySize; }; + void SetMaxDisplayCacheSize( sal_uIntPtr nNewCacheSize ); + sal_uIntPtr GetMaxDisplayCacheSize() const { return mnMaxDisplaySize; }; - void SetMaxObjDisplayCacheSize( ULONG nNewMaxObjSize, BOOL bDestroyGreaterCached = FALSE ); - ULONG GetMaxObjDisplayCacheSize() const { return mnMaxObjDisplaySize; } + void SetMaxObjDisplayCacheSize( sal_uIntPtr nNewMaxObjSize, sal_Bool bDestroyGreaterCached = sal_False ); + sal_uIntPtr GetMaxObjDisplayCacheSize() const { return mnMaxObjDisplaySize; } - ULONG GetUsedDisplayCacheSize() const { return mnUsedDisplaySize; } - ULONG GetFreeDisplayCacheSize() const { return( mnMaxDisplaySize - mnUsedDisplaySize ); } + sal_uIntPtr GetUsedDisplayCacheSize() const { return mnUsedDisplaySize; } + sal_uIntPtr GetFreeDisplayCacheSize() const { return( mnMaxDisplaySize - mnUsedDisplaySize ); } - void SetCacheTimeout( ULONG nTimeoutSeconds ); - ULONG GetCacheTimeout() const { return mnReleaseTimeoutSeconds; } + void SetCacheTimeout( sal_uIntPtr nTimeoutSeconds ); + sal_uIntPtr GetCacheTimeout() const { return mnReleaseTimeoutSeconds; } void ClearDisplayCache(); - BOOL IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz, + sal_Bool IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) const; - BOOL IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz, + sal_Bool IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) const; - BOOL CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, + sal_Bool CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr, const BitmapEx& rBmpEx ); - BOOL CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, + sal_Bool CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr, const GDIMetaFile& rMtf ); - BOOL DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, + sal_Bool DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ); }; diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 221354cc6665..93ef8489412d 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -174,9 +174,9 @@ void GraphicObject::ImplConstruct() mpSwapOutTimer = NULL; mpSimpleCache = NULL; mnAnimationLoopCount = 0; - mbAutoSwapped = FALSE; - mbIsInSwapIn = FALSE; - mbIsInSwapOut = FALSE; + mbAutoSwapped = sal_False; + mbIsInSwapIn = sal_False; + mbIsInSwapOut = sal_False; } // ----------------------------------------------------------------------------- @@ -198,7 +198,7 @@ void GraphicObject::ImplAssignGraphicData() mbEPS = ( rMtf.GetActionCount() >= 1 ) && ( META_EPS_ACTION == rMtf.GetAction( 0 )->GetType() ); } else - mbEPS = FALSE; + mbEPS = sal_False; } // ----------------------------------------------------------------------------- @@ -247,13 +247,13 @@ void GraphicObject::ImplAutoSwapIn() if( IsSwappedOut() ) { if( mpMgr && mpMgr->ImplFillSwappedGraphicObject( *this, maGraphic ) ) - mbAutoSwapped = FALSE; + mbAutoSwapped = sal_False; else { - mbIsInSwapIn = TRUE; + mbIsInSwapIn = sal_True; if( maGraphic.SwapIn() ) - mbAutoSwapped = FALSE; + mbAutoSwapped = sal_False; else { SvStream* pStream = GetSwapStream(); @@ -296,7 +296,7 @@ void GraphicObject::ImplAutoSwapIn() } } - mbIsInSwapIn = FALSE; + mbIsInSwapIn = sal_False; if( !mbAutoSwapped && mpMgr ) mpMgr->ImplGraphicObjectWasSwappedIn( *this ); @@ -305,15 +305,15 @@ void GraphicObject::ImplAutoSwapIn() } // ----------------------------------------------------------------------------- -BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr, - PolyPolygon& rClipPolyPoly, BOOL& bRectClipRegion ) const +sal_Bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr, + PolyPolygon& rClipPolyPoly, sal_Bool& bRectClipRegion ) const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( GetType() != GRAPHIC_NONE ) { Polygon aClipPoly( Rectangle( rPt, rSz ) ); - const USHORT nRot10 = pAttr->GetRotation() % 3600; + const sal_uInt16 nRot10 = pAttr->GetRotation() % 3600; const Point aOldOrigin( rPt ); // --> OD 2005-09-30 #i54875# - It's not needed to get the graphic again. // const Graphic& rGraphic = GetGraphic(); @@ -327,10 +327,10 @@ BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz if( nRot10 ) { aClipPoly.Rotate( rPt, nRot10 ); - bRectClipRegion = FALSE; + bRectClipRegion = sal_False; } else - bRectClipRegion = TRUE; + bRectClipRegion = sal_True; rClipPolyPoly = aClipPoly; @@ -379,7 +379,7 @@ BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz rPt = aOriginPoly[ 0 ]; } - bRet = TRUE; + bRet = sal_True; } } @@ -404,7 +404,7 @@ GraphicObject& GraphicObject::operator=( const GraphicObject& rGraphicObj ) mpLink = rGraphicObj.mpLink ? new String( *rGraphicObj.mpLink ) : NULL; mpUserData = rGraphicObj.mpUserData ? new String( *rGraphicObj.mpUserData ) : NULL; ImplAssignGraphicData(); - mbAutoSwapped = FALSE; + mbAutoSwapped = sal_False; mpMgr = rGraphicObj.mpMgr; mpMgr->ImplRegisterObj( *this, maGraphic, NULL, &rGraphicObj ); @@ -415,7 +415,7 @@ GraphicObject& GraphicObject::operator=( const GraphicObject& rGraphicObj ) // ----------------------------------------------------------------------------- -BOOL GraphicObject::operator==( const GraphicObject& rGraphicObj ) const +sal_Bool GraphicObject::operator==( const GraphicObject& rGraphicObj ) const { return( ( rGraphicObj.maGraphic == maGraphic ) && ( rGraphicObj.maAttr == maAttr ) && @@ -460,7 +460,7 @@ ByteString GraphicObject::GetUniqueID() const // ----------------------------------------------------------------------------- -ULONG GraphicObject::GetChecksum() const +sal_uIntPtr GraphicObject::GetChecksum() const { return( ( maGraphic.IsSupportedGraphic() && !maGraphic.IsSwapOut() ) ? maGraphic.GetChecksum() : 0 ); } @@ -475,7 +475,7 @@ SvStream* GraphicObject::GetSwapStream() const // ----------------------------------------------------------------------------- // !!! to be removed -ULONG GraphicObject::GetReleaseFromCache() const +sal_uIntPtr GraphicObject::GetReleaseFromCache() const { return 0; } @@ -553,7 +553,7 @@ void GraphicObject::SetSwapStreamHdl() // ----------------------------------------------------------------------------- -void GraphicObject::SetSwapStreamHdl( const Link& rHdl, const ULONG nSwapOutTimeout ) +void GraphicObject::SetSwapStreamHdl( const Link& rHdl, const sal_uIntPtr nSwapOutTimeout ) { delete mpSwapStreamHdl, mpSwapStreamHdl = new Link( rHdl ); @@ -614,10 +614,10 @@ void GraphicObject::SetGraphicManager( const GraphicManager& rMgr ) // ----------------------------------------------------------------------------- -BOOL GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz, - const GraphicAttr* pAttr, ULONG nFlags ) const +sal_Bool GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz, + const GraphicAttr* pAttr, sal_uIntPtr nFlags ) const { - BOOL bRet; + sal_Bool bRet; if( nFlags & GRFMGR_DRAW_CACHED ) { @@ -630,13 +630,13 @@ BOOL GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& if ( pAttr->IsCropped() ) { PolyPolygon aClipPolyPoly; - BOOL bRectClip; + sal_Bool bRectClip; ImplGetCropParams( pOut, aPt, aSz, pAttr, aClipPolyPoly, bRectClip ); } bRet = mpMgr->IsInCache( pOut, aPt, aSz, *this, ( pAttr ? *pAttr : GetAttr() ) ); } else - bRet = FALSE; + bRet = sal_False; return bRet; } @@ -665,16 +665,16 @@ List* GraphicObject::GetAnimationInfoList() const // ----------------------------------------------------------------------------- -BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, - const GraphicAttr* pAttr, ULONG nFlags ) +sal_Bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, + const GraphicAttr* pAttr, sal_uIntPtr nFlags ) { GraphicAttr aAttr( pAttr ? *pAttr : GetAttr() ); Point aPt( rPt ); Size aSz( rSz ); const sal_uInt32 nOldDrawMode = pOut->GetDrawMode(); - BOOL bCropped = aAttr.IsCropped(); - BOOL bCached = FALSE; - BOOL bRet; + sal_Bool bCropped = aAttr.IsCropped(); + sal_Bool bCached = sal_False; + sal_Bool bRet; // #i29534# Provide output rects for PDF writer Rectangle aCropRect; @@ -701,8 +701,8 @@ BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, if( bCropped ) { PolyPolygon aClipPolyPoly; - BOOL bRectClip; - const BOOL bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip ); + sal_Bool bRectClip; + const sal_Bool bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip ); pOut->Push( PUSH_CLIPREGION ); @@ -743,10 +743,10 @@ BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, } // --> OD 2010-01-04 #i105243# -BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev, +sal_Bool GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev, const Point& rPt, const Size& rSz, const GraphicAttr* pGrfAttr, - const ULONG nFlags ) + const sal_uIntPtr nFlags ) { const GraphicAttr aGrfAttr( pGrfAttr ? *pGrfAttr : GetAttr() ); @@ -773,8 +773,8 @@ BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev, if( aGrfAttr.IsCropped() ) { PolyPolygon aClipPolyPoly; - BOOL bRectClip; - const BOOL bCrop = ImplGetCropParams( &rOutDev, + sal_Bool bRectClip; + const sal_Bool bCrop = ImplGetCropParams( &rOutDev, aPt, aSz, &aGrfAttr, aClipPolyPoly, @@ -789,7 +789,7 @@ BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev, } } - BOOL bRet = Draw( &rOutDev, rPt, rSz, &aGrfAttr, nFlags ); + sal_Bool bRet = Draw( &rOutDev, rPt, rSz, &aGrfAttr, nFlags ); // Notify PDF writer about linked graphic (if any) if( bWritingPdfLinkedGraphic ) @@ -806,11 +806,11 @@ BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev, // ----------------------------------------------------------------------------- -BOOL GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize, - const Size& rOffset, const GraphicAttr* pAttr, ULONG nFlags, int nTileCacheSize1D ) +sal_Bool GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize, + const Size& rOffset, const GraphicAttr* pAttr, sal_uIntPtr nFlags, int nTileCacheSize1D ) { if( pOut == NULL || rSize.Width() == 0 || rSize.Height() == 0 ) - return FALSE; + return sal_False; const MapMode aOutMapMode( pOut->GetMapMode() ); const MapMode aMapMode( aOutMapMode.GetMapUnit(), Point(), aOutMapMode.GetScaleX(), aOutMapMode.GetScaleY() ); @@ -830,11 +830,11 @@ BOOL GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const // ----------------------------------------------------------------------------- -BOOL GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz, - long nExtraData, const GraphicAttr* pAttr, ULONG /*nFlags*/, +sal_Bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz, + long nExtraData, const GraphicAttr* pAttr, sal_uIntPtr /*nFlags*/, OutputDevice* pFirstFrameOutDev ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; GetGraphic(); @@ -846,13 +846,13 @@ BOOL GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const { Point aPt( rPt ); Size aSz( rSz ); - BOOL bCropped = aAttr.IsCropped(); + sal_Bool bCropped = aAttr.IsCropped(); if( bCropped ) { PolyPolygon aClipPolyPoly; - BOOL bRectClip; - const BOOL bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip ); + sal_Bool bRectClip; + const sal_Bool bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip ); pOut->Push( PUSH_CLIPREGION ); @@ -879,7 +879,7 @@ BOOL GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const if( bCropped ) pOut->Pop(); - bRet = TRUE; + bRet = sal_True; } else bRet = Draw( pOut, rPt, rSz, &aAttr, GRFMGR_DRAW_STANDARD ); @@ -916,7 +916,7 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* pC mpSwapOutTimer->Stop(); maGraphic = rGraphic; - mbAutoSwapped = FALSE; + mbAutoSwapped = sal_False; ImplAssignGraphicData(); delete mpLink, mpLink = NULL; delete mpSimpleCache, mpSimpleCache = NULL; @@ -1042,7 +1042,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo // #105641# Also crop animations if( aTransGraphic.IsAnimated() ) { - USHORT nFrame; + sal_uInt16 nFrame; Animation aAnim( aTransGraphic.GetAnimation() ); for( nFrame=0; nFrame<aAnim.Count(); ++nFrame ) @@ -1059,7 +1059,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo // cropping affects this frame, apply it then // do _not_ apply enlargement, this is done below ImplTransformBitmap( aAnimBmp.aBmpEx, rAttr, Size(), Size(), - aCropRectRel, rDestSize, FALSE ); + aCropRectRel, rDestSize, sal_False ); aAnim.Replace( aAnimBmp, nFrame ); } @@ -1106,7 +1106,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo BitmapEx aBmpEx( aTransGraphic.GetBitmapEx() ); ImplTransformBitmap( aBmpEx, rAttr, aCropLeftTop, aCropRightBottom, - aCropRect, rDestSize, TRUE ); + aCropRect, rDestSize, sal_True ); aTransGraphic = aBmpEx; } @@ -1188,9 +1188,9 @@ void GraphicObject::ResetAnimationLoopCount() // ----------------------------------------------------------------------------- -BOOL GraphicObject::SwapOut() +sal_Bool GraphicObject::SwapOut() { - BOOL bRet = ( !mbAutoSwapped ? maGraphic.SwapOut() : FALSE ); + sal_Bool bRet = ( !mbAutoSwapped ? maGraphic.SwapOut() : sal_False ); if( bRet && mpMgr ) mpMgr->ImplGraphicObjectWasSwappedOut( *this ); @@ -1200,9 +1200,9 @@ BOOL GraphicObject::SwapOut() // ----------------------------------------------------------------------------- -BOOL GraphicObject::SwapOut( SvStream* pOStm ) +sal_Bool GraphicObject::SwapOut( SvStream* pOStm ) { - BOOL bRet = ( !mbAutoSwapped ? maGraphic.SwapOut( pOStm ) : FALSE ); + sal_Bool bRet = ( !mbAutoSwapped ? maGraphic.SwapOut( pOStm ) : sal_False ); if( bRet && mpMgr ) mpMgr->ImplGraphicObjectWasSwappedOut( *this ); @@ -1212,17 +1212,17 @@ BOOL GraphicObject::SwapOut( SvStream* pOStm ) // ----------------------------------------------------------------------------- -BOOL GraphicObject::SwapIn() +sal_Bool GraphicObject::SwapIn() { - BOOL bRet; + sal_Bool bRet; if( mbAutoSwapped ) { ImplAutoSwapIn(); - bRet = TRUE; + bRet = sal_True; } else if( mpMgr && mpMgr->ImplFillSwappedGraphicObject( *this, maGraphic ) ) - bRet = TRUE; + bRet = sal_True; else { bRet = maGraphic.SwapIn(); @@ -1239,17 +1239,17 @@ BOOL GraphicObject::SwapIn() // ----------------------------------------------------------------------------- -BOOL GraphicObject::SwapIn( SvStream* pIStm ) +sal_Bool GraphicObject::SwapIn( SvStream* pIStm ) { - BOOL bRet; + sal_Bool bRet; if( mbAutoSwapped ) { ImplAutoSwapIn(); - bRet = TRUE; + bRet = sal_True; } else if( mpMgr && mpMgr->ImplFillSwappedGraphicObject( *this, maGraphic ) ) - bRet = TRUE; + bRet = sal_True; else { bRet = maGraphic.SwapIn( pIStm ); @@ -1270,7 +1270,7 @@ void GraphicObject::SetSwapState() { if( !IsSwappedOut() ) { - mbAutoSwapped = TRUE; + mbAutoSwapped = sal_True; if( mpMgr ) mpMgr->ImplGraphicObjectWasSwappedOut( *this ); @@ -1283,7 +1283,7 @@ IMPL_LINK( GraphicObject, ImplAutoSwapOutHdl, void*, EMPTYARG ) { if( !IsSwappedOut() ) { - mbIsInSwapOut = TRUE; + mbIsInSwapOut = sal_True; SvStream* pStream = GetSwapStream(); @@ -1303,7 +1303,7 @@ IMPL_LINK( GraphicObject, ImplAutoSwapOutHdl, void*, EMPTYARG ) } } - mbIsInSwapOut = FALSE; + mbIsInSwapOut = sal_False; } if( mpSwapOutTimer ) @@ -1320,7 +1320,7 @@ SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj ) Graphic aGraphic; GraphicAttr aAttr; ByteString aLink; - BOOL bLink; + sal_Bool bLink; rIStm >> aGraphic >> aAttr >> bLink; @@ -1345,7 +1345,7 @@ SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj ) SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj ) { VersionCompat aCompat( rOStm, STREAM_WRITE, 1 ); - const BOOL bLink = rGraphicObj.HasLink(); + const sal_Bool bLink = rGraphicObj.HasLink(); rOStm << rGraphicObj.GetGraphic() << rGraphicObj.GetAttr() << bLink; diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 7e1255aabc56..c0ed79a417d2 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -47,7 +47,7 @@ // ----------- #define MAX_PRINTER_EXT 1024 -#define MAP( cVal0, cVal1, nFrac ) ((BYTE)((((long)(cVal0)<<20L)+nFrac*((long)(cVal1)-(cVal0)))>>20L)) +#define MAP( cVal0, cVal1, nFrac ) ((sal_uInt8)((((long)(cVal0)<<20L)+nFrac*((long)(cVal1)-(cVal0)))>>20L)) #define WATERMARK_LUM_OFFSET 50 #define WATERMARK_CON_OFFSET -70 @@ -113,7 +113,7 @@ BitmapEx muckWithBitmap( const BitmapEx& rBmpEx, // - GraphicManager - // ------------------ -GraphicManager::GraphicManager( ULONG nCacheSize, ULONG nMaxObjCacheSize ) : +GraphicManager::GraphicManager( sal_uIntPtr nCacheSize, sal_uIntPtr nMaxObjCacheSize ) : mpCache( new GraphicCache( *this, nCacheSize, nMaxObjCacheSize ) ) { } @@ -130,56 +130,56 @@ GraphicManager::~GraphicManager() // ----------------------------------------------------------------------------- -void GraphicManager::SetMaxCacheSize( ULONG nNewCacheSize ) +void GraphicManager::SetMaxCacheSize( sal_uIntPtr nNewCacheSize ) { mpCache->SetMaxDisplayCacheSize( nNewCacheSize ); } // ----------------------------------------------------------------------------- -ULONG GraphicManager::GetMaxCacheSize() const +sal_uIntPtr GraphicManager::GetMaxCacheSize() const { return mpCache->GetMaxDisplayCacheSize(); } // ----------------------------------------------------------------------------- -void GraphicManager::SetMaxObjCacheSize( ULONG nNewMaxObjSize, BOOL bDestroyGreaterCached ) +void GraphicManager::SetMaxObjCacheSize( sal_uIntPtr nNewMaxObjSize, sal_Bool bDestroyGreaterCached ) { mpCache->SetMaxObjDisplayCacheSize( nNewMaxObjSize, bDestroyGreaterCached ); } // ----------------------------------------------------------------------------- -ULONG GraphicManager::GetMaxObjCacheSize() const +sal_uIntPtr GraphicManager::GetMaxObjCacheSize() const { return mpCache->GetMaxObjDisplayCacheSize(); } // ----------------------------------------------------------------------------- -ULONG GraphicManager::GetUsedCacheSize() const +sal_uIntPtr GraphicManager::GetUsedCacheSize() const { return mpCache->GetUsedDisplayCacheSize(); } // ----------------------------------------------------------------------------- -ULONG GraphicManager::GetFreeCacheSize() const +sal_uIntPtr GraphicManager::GetFreeCacheSize() const { return mpCache->GetFreeDisplayCacheSize(); } // ----------------------------------------------------------------------------- -void GraphicManager::SetCacheTimeout( ULONG nTimeoutSeconds ) +void GraphicManager::SetCacheTimeout( sal_uIntPtr nTimeoutSeconds ) { mpCache->SetCacheTimeout( nTimeoutSeconds ); } // ----------------------------------------------------------------------------- -ULONG GraphicManager::GetCacheTimeout() const +sal_uIntPtr GraphicManager::GetCacheTimeout() const { return mpCache->GetCacheTimeout(); } @@ -200,7 +200,7 @@ void GraphicManager::ReleaseFromCache( const GraphicObject& /*rObj*/ ) // ----------------------------------------------------------------------------- -BOOL GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt, +sal_Bool GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) const { @@ -209,15 +209,15 @@ BOOL GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt, // ----------------------------------------------------------------------------- -BOOL GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, +sal_Bool GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, GraphicObject& rObj, const GraphicAttr& rAttr, - const ULONG nFlags, BOOL& rCached ) + const sal_uIntPtr nFlags, sal_Bool& rCached ) { Point aPt( rPt ); Size aSz( rSz ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; - rCached = FALSE; + rCached = sal_False; if( ( rObj.GetType() == GRAPHIC_BITMAP ) || ( rObj.GetType() == GRAPHIC_GDIMETAFILE ) ) { @@ -235,7 +235,7 @@ BOOL GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& if( aGraphic.IsSupportedGraphic() ) { - const USHORT nRot10 = rAttr.GetRotation() % 3600; + const sal_uInt16 nRot10 = rAttr.GetRotation() % 3600; if( nRot10 ) { @@ -250,7 +250,7 @@ BOOL GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& aGraphic.Draw( pOut, aPt, aSz ); } - bRet = TRUE; + bRet = sal_True; } if( !bRet ) @@ -259,7 +259,7 @@ BOOL GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& if( !mpCache->DrawDisplayCacheObj( pOut, aPt, aSz, rObj, rAttr ) ) bRet = ImplDraw( pOut, aPt, aSz, rObj, rAttr, nFlags, rCached ); else - bRet = rCached = TRUE; + bRet = rCached = sal_True; } } @@ -299,7 +299,7 @@ ByteString GraphicManager::ImplGetUniqueID( const GraphicObject& rObj ) const // ----------------------------------------------------------------------------- -BOOL GraphicManager::ImplFillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ) +sal_Bool GraphicManager::ImplFillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ) { return( mpCache->FillSwappedGraphicObject( rObj, rSubstitute ) ); } @@ -313,13 +313,13 @@ void GraphicManager::ImplGraphicObjectWasSwappedIn( const GraphicObject& rObj ) // ----------------------------------------------------------------------------- -BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, +sal_Bool GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, const Size& rSz, GraphicObject& rObj, const GraphicAttr& rAttr, - const ULONG nFlags, BOOL& rCached ) + const sal_uIntPtr nFlags, sal_Bool& rCached ) { const Graphic& rGraphic = rObj.GetGraphic(); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rGraphic.IsSupportedGraphic() && !rGraphic.IsSwapOut() ) { @@ -337,7 +337,7 @@ BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, if( ImplCreateOutput( pOut, rPt, rSz, aSrcBmpEx, rAttr, nFlags, &aDstBmpEx ) ) { rCached = mpCache->CreateDisplayCacheObj( pOut, rPt, rSz, rObj, rAttr, aDstBmpEx ); - bRet = TRUE; + bRet = sal_True; } } @@ -365,13 +365,13 @@ BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, if( ImplCreateOutput( pOut, rPt, rSz, aContainedBmpEx, rAttr, nFlags, &aDstBmpEx ) ) { rCached = mpCache->CreateDisplayCacheObj( pOut, rPt, rSz, rObj, rAttr, aDstBmpEx ); - bRet = TRUE; + bRet = sal_True; } } else { rCached = mpCache->CreateDisplayCacheObj( pOut, rPt, rSz, rObj, rAttr, aDstMtf ); - bRet = TRUE; + bRet = sal_True; } } } @@ -383,7 +383,7 @@ BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, if( aGraphic.IsSupportedGraphic() ) { aGraphic.Draw( pOut, rPt, rSz ); - bRet = TRUE; + bRet = sal_True; } } } @@ -394,16 +394,16 @@ BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, // ----------------------------------------------------------------------------- -BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut, +sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut, const Point& rPt, const Size& rSz, const BitmapEx& rBmpEx, const GraphicAttr& rAttr, - const ULONG nFlags, BitmapEx* pBmpEx ) + const sal_uIntPtr nFlags, BitmapEx* pBmpEx ) { - USHORT nRot10 = rAttr.GetRotation() % 3600; + sal_uInt16 nRot10 = rAttr.GetRotation() % 3600; Point aOutPtPix; Size aOutSzPix; Size aUnrotatedSzPix( pOut->LogicToPixel( rSz ) ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( nRot10 ) { @@ -438,8 +438,8 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut, long* pMapFY = new long[ nNewH ]; long nStartX = -1, nStartY = -1, nEndX = -1, nEndY = -1; long nX, nY, nTmp, nTmpX, nTmpY; - BOOL bHMirr = ( rAttr.GetMirrorFlags() & BMP_MIRROR_HORZ ) != 0; - BOOL bVMirr = ( rAttr.GetMirrorFlags() & BMP_MIRROR_VERT ) != 0; + sal_Bool bHMirr = ( rAttr.GetMirrorFlags() & BMP_MIRROR_HORZ ) != 0; + sal_Bool bVMirr = ( rAttr.GetMirrorFlags() & BMP_MIRROR_VERT ) != 0; if( nFlags & GRFMGR_DRAW_BILINEAR ) { @@ -541,7 +541,7 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut, // do transformation if( nStartX >= 0L ) { - const BOOL bSimple = ( 1 == nW || 1 == nH ); + const sal_Bool bSimple = ( 1 == nW || 1 == nH ); if( nRot10 ) { @@ -570,7 +570,7 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut, aOutPt = pOut->PixelToLogic( aOutPtPix ); aOutSz = pOut->PixelToLogic( aOutSzPix ); aOutBmpEx = aBmpEx; - bRet = TRUE; + bRet = sal_True; } else { @@ -624,10 +624,10 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut, // ----------------------------------------------------------------------------- -BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut, +sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GDIMetaFile& rMtf, const GraphicAttr& rAttr, - const ULONG /*nFlags*/, GDIMetaFile& rOutMtf, BitmapEx& rOutBmpEx ) + const sal_uIntPtr /*nFlags*/, GDIMetaFile& rOutMtf, BitmapEx& rOutBmpEx ) { const Size aNewSize( rMtf.GetPrefSize() ); @@ -919,12 +919,12 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut, rOutBmpEx = BitmapEx(); } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- -BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx, +sal_Bool GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx, long* pMapIX, long* pMapFX, long* pMapIY, long* pMapFY, long nStartX, long nEndX, long nStartY, long nEndY, BitmapEx& rOutBmpEx ) @@ -938,8 +938,8 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx, const long nDstH = nEndY - nStartY + 1L; long nX, nY, nTmpX, nTmpY, nTmpFX, nTmpFY; long nXDst, nYDst; - BYTE cR0, cG0, cB0, cR1, cG1, cB1; - BOOL bRet = FALSE; + sal_uInt8 cR0, cG0, cB0, cR1, cG1, cB1; + sal_Bool bRet = sal_False; DBG_ASSERT( aBmp.GetSizePixel() == rBmpEx.GetSizePixel(), "GraphicManager::ImplCreateScaled(): bmp size inconsistent" ); @@ -1117,7 +1117,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx, } aOutBmp.ReleaseAccess( pWAcc ); - bRet = TRUE; + bRet = sal_True; } aBmp.ReleaseAccess( pAcc ); @@ -1125,7 +1125,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx, if( bRet && rBmpEx.IsTransparent() ) { - bRet = FALSE; + bRet = sal_False; if( rBmpEx.IsAlpha() ) { @@ -1198,7 +1198,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx, } aOutAlpha.ReleaseAccess( pWAcc ); - bRet = TRUE; + bRet = sal_True; } aAlpha.ReleaseAccess( pAcc ); @@ -1277,7 +1277,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx, { for( nX = 0L; nX < nDstW; nX++ ) { - if( pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( pMapLY[ nY ], pMapLX[ nX ] ) ) == aB ) + if( pAcc->GetPaletteColor( (sal_uInt8) pAcc->GetPixel( pMapLY[ nY ], pMapLX[ nX ] ) ) == aB ) pWAcc->SetPixel( nY, nX, aWB ); else pWAcc->SetPixel( nY, nX, aWW ); @@ -1302,7 +1302,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx, delete[] pMapLX; delete[] pMapLY; aOutMsk.ReleaseAccess( pWAcc ); - bRet = TRUE; + bRet = sal_True; } aMsk.ReleaseAccess( pAcc ); @@ -1323,8 +1323,8 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx, // ----------------------------------------------------------------------------- -BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx, - USHORT nRot10, const Size& /*rOutSzPix*/, const Size& rUnrotatedSzPix, +sal_Bool GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx, + sal_uInt16 nRot10, const Size& /*rOutSzPix*/, const Size& rUnrotatedSzPix, long* pMapIX, long* pMapFX, long* pMapIY, long* pMapFY, long nStartX, long nEndX, long nStartY, long nEndY, BitmapEx& rOutBmpEx ) @@ -1347,8 +1347,8 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx, long* pCosY = new long[ nDstH ]; long* pSinY = new long[ nDstH ]; long nX, nY, nTmpX, nTmpY, nTmpFX, nTmpFY, nUnRotX, nUnRotY, nSinY, nCosY; - BYTE cR0, cG0, cB0, cR1, cG1, cB1; - BOOL bRet = FALSE; + sal_uInt8 cR0, cG0, cB0, cR1, cG1, cB1; + sal_Bool bRet = sal_False; // create horizontal mapping table for( nX = 0L, nTmpX = aNewBound.Left() + nStartX; nX < nDstW; nX++ ) @@ -1453,7 +1453,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx, } aOutBmp.ReleaseAccess( pWAcc ); - bRet = TRUE; + bRet = sal_True; } aBmp.ReleaseAccess( pAcc ); @@ -1462,7 +1462,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx, // mask processing if( bRet && ( rBmpEx.IsTransparent() || ( nRot10 != 900 && nRot10 != 1800 && nRot10 != 2700 ) ) ) { - bRet = FALSE; + bRet = sal_False; if( rBmpEx.IsAlpha() ) { @@ -1553,7 +1553,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx, } aOutAlpha.ReleaseAccess( pWAcc ); - bRet = TRUE; + bRet = sal_True; } aAlpha.ReleaseAccess( pAcc ); @@ -1626,7 +1626,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx, if( pMAcc ) aMsk.ReleaseAccess( pMAcc ); - bRet = TRUE; + bRet = sal_True; } aOutMsk.ReleaseAccess( pWAcc ); @@ -1652,7 +1652,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx, // ----------------------------------------------------------------------------- -void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULONG nAdjustmentFlags ) +void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, sal_uIntPtr nAdjustmentFlags ) { GraphicAttr aAttr( rAttr ); @@ -1700,7 +1700,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO if( ( nAdjustmentFlags & ADJUSTMENT_TRANSPARENCY ) && aAttr.IsTransparent() ) { AlphaMask aAlpha; - BYTE cTrans = aAttr.GetTransparency(); + sal_uInt8 cTrans = aAttr.GetTransparency(); if( !rBmpEx.IsTransparent() ) aAlpha = AlphaMask( rBmpEx.GetSizePixel(), &cTrans ); @@ -1716,7 +1716,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO if( pA ) { - ULONG nTrans = cTrans, nNewTrans; + sal_uIntPtr nTrans = cTrans, nNewTrans; const long nWidth = pA->Width(), nHeight = pA->Height(); if( pA->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL ) @@ -1728,7 +1728,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO for( long nX = 0; nX < nWidth; nX++ ) { nNewTrans = nTrans + *pAScan; - *pAScan++ = (BYTE) ( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans ); + *pAScan++ = (sal_uInt8) ( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans ); } } } @@ -1741,7 +1741,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO for( long nX = 0; nX < nWidth; nX++ ) { nNewTrans = nTrans + pA->GetPixel( nY, nX ).GetIndex(); - aAlphaValue.SetIndex( (BYTE) ( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans ) ); + aAlphaValue.SetIndex( (sal_uInt8) ( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans ) ); pA->SetPixel( nY, nX, aAlphaValue ); } } @@ -1757,7 +1757,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO // ----------------------------------------------------------------------------- -void GraphicManager::ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, ULONG nAdjustmentFlags ) +void GraphicManager::ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, sal_uIntPtr nAdjustmentFlags ) { GraphicAttr aAttr( rAttr ); @@ -1810,7 +1810,7 @@ void GraphicManager::ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, UL // ----------------------------------------------------------------------------- -void GraphicManager::ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr, ULONG nAdjustmentFlags ) +void GraphicManager::ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr, sal_uIntPtr nAdjustmentFlags ) { GraphicAttr aAttr( rAttr ); @@ -1866,7 +1866,7 @@ void GraphicManager::ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr void GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GDIMetaFile& rMtf, const GraphicAttr& rAttr ) { - USHORT nRot10 = rAttr.GetRotation() % 3600; + sal_uInt16 nRot10 = rAttr.GetRotation() % 3600; Point aOutPt( rPt ); Size aOutSz( rSz ); @@ -1924,7 +1924,7 @@ struct ImplTileInfo bool GraphicObject::ImplRenderTempTile( VirtualDevice& rVDev, int nExponent, int nNumTilesX, int nNumTilesY, const Size& rTileSizePixel, - const GraphicAttr* pAttr, ULONG nFlags ) + const GraphicAttr* pAttr, sal_uIntPtr nFlags ) { if( nExponent <= 1 ) return false; @@ -1944,8 +1944,8 @@ bool GraphicObject::ImplRenderTempTile( VirtualDevice& rVDev, int nExponent, // #105229# Switch off mapping (converting to logic and back to // pixel might cause roundoff errors) - BOOL bOldMap( rVDev.IsMapModeEnabled() ); - rVDev.EnableMapMode( FALSE ); + sal_Bool bOldMap( rVDev.IsMapModeEnabled() ); + rVDev.EnableMapMode( sal_False ); bool bRet( ImplRenderTileRecursive( rVDev, nExponent, nMSBFactor, nNumTilesX, nNumTilesY, nNumTilesX, nNumTilesY, rTileSizePixel, pAttr, nFlags, aTileInfo ) ); @@ -1968,7 +1968,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent int nNumOrigTilesX, int nNumOrigTilesY, int nRemainderTilesX, int nRemainderTilesY, const Size& rTileSizePixel, const GraphicAttr* pAttr, - ULONG nFlags, ImplTileInfo& rTileInfo ) + sal_uIntPtr nFlags, ImplTileInfo& rTileInfo ) { // gets loaded with our tile bitmap GraphicObject aTmpGraphic; @@ -2143,7 +2143,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent // ----------------------------------------------------------------------------- bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSizePixel, - const Size& rOffset, const GraphicAttr* pAttr, ULONG nFlags, int nTileCacheSize1D ) + const Size& rOffset, const GraphicAttr* pAttr, sal_uIntPtr nFlags, int nTileCacheSize1D ) { // how many tiles to generate per recursion step enum{ SubdivisionExponent=2 }; @@ -2254,7 +2254,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, c bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel, int nNumTilesX, int nNumTilesY, - const Size& rTileSizePixel, const GraphicAttr* pAttr, ULONG nFlags ) + const Size& rTileSizePixel, const GraphicAttr* pAttr, sal_uIntPtr nFlags ) { Point aCurrPos( rPosPixel ); Size aTileSizeLogic( rOut.PixelToLogic( rTileSizePixel ) ); @@ -2262,14 +2262,14 @@ bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel, // #107607# Use logical coordinates for metafile playing, too bool bDrawInPixel( rOut.GetConnectMetaFile() == NULL && GRAPHIC_BITMAP == GetType() ); - BOOL bRet( FALSE ); + sal_Bool bRet( sal_False ); // #105229# Switch off mapping (converting to logic and back to // pixel might cause roundoff errors) - BOOL bOldMap( rOut.IsMapModeEnabled() ); + sal_Bool bOldMap( rOut.IsMapModeEnabled() ); if( bDrawInPixel ) - rOut.EnableMapMode( FALSE ); + rOut.EnableMapMode( sal_False ); for( nY=0; nY < nNumTilesY; ++nY ) { @@ -2308,7 +2308,7 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx, const Size& rCropRightBottom, const Rectangle& rCropRect, const Size& rDstSize, - BOOL bEnlarge ) const + sal_Bool bEnlarge ) const { // #107947# Extracted from svdograf.cxx diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index f1674dcd7d4a..5645f7ee9ddf 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -337,7 +337,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const : if( 0 < nImageId ) { - const Image aImage( aImageList.GetImage( sal::static_int_cast< USHORT >(nImageId) ) ); + const Image aImage( aImageList.GetImage( sal::static_int_cast< sal_uInt16 >(nImageId) ) ); aBmpEx = aImage.GetBitmapEx(); } else |