diff options
Diffstat (limited to 'sw/source/core/inc/swcache.hxx')
-rw-r--r-- | sw/source/core/inc/swcache.hxx | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx index 90803b515080..b23ccb0f834a 100644 --- a/sw/source/core/inc/swcache.hxx +++ b/sw/source/core/inc/swcache.hxx @@ -83,10 +83,10 @@ class SwCache : public SwCacheObjArr SwCacheObj *pFirst; //der virtuelle erste. SwCacheObj *pLast; - const USHORT nMax; //Mehr sollen nicht aufgenommen werden, + const sal_uInt16 nMax; //Mehr sollen nicht aufgenommen werden, //der Cache kann aber dynamisch um jeweils //nMax vergroessert werden. - USHORT nCurMax; //Mehr werden nicht aufgenommen. + sal_uInt16 nCurMax; //Mehr werden nicht aufgenommen. void DeleteObj( SwCacheObj *pObj ); @@ -112,34 +112,34 @@ class SwCache : public SwCacheObjArr public: - //nur BYTE hineinstecken!!! + //nur sal_uInt8 hineinstecken!!! #ifdef DBG_UTIL - SwCache( const USHORT nInitSize, const USHORT nGrowSize, + SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize, const ByteString &rNm ); ~SwCache(); #else - SwCache( const USHORT nInitSize, const USHORT nGrowSize ); + SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize ); #endif - void Flush( const BYTE nPercent = 100 ); + void Flush( const sal_uInt8 nPercent = 100 ); - //bToTop == FALSE -> Keine LRU-Umsortierung! - SwCacheObj *Get( const void *pOwner, const BOOL bToTop = TRUE ); - SwCacheObj *Get( const void *pOwner, const USHORT nIndex, - const BOOL bToTop = TRUE ); + //bToTop == sal_False -> Keine LRU-Umsortierung! + SwCacheObj *Get( const void *pOwner, const sal_Bool bToTop = sal_True ); + SwCacheObj *Get( const void *pOwner, const sal_uInt16 nIndex, + const sal_Bool bToTop = sal_True ); void ToTop( SwCacheObj *pObj ); - BOOL Insert( SwCacheObj *pNew ); + sal_Bool Insert( SwCacheObj *pNew ); void Delete( const void *pOwner ); -// void Delete( const void *pOwner, const USHORT nIndex ); +// void Delete( const void *pOwner, const sal_uInt16 nIndex ); - void SetLRUOfst( const USHORT nOfst ); //nOfst sagt wieviele unangetastet + void SetLRUOfst( const sal_uInt16 nOfst ); //nOfst sagt wieviele unangetastet //bleiben sollen. void ResetLRUOfst() { pFirst = pRealFirst; } - inline void IncreaseMax( const USHORT nAdd ); - inline void DecreaseMax( const USHORT nSub ); - USHORT GetCurMax() const { return nCurMax; } + inline void IncreaseMax( const sal_uInt16 nAdd ); + inline void DecreaseMax( const sal_uInt16 nSub ); + sal_uInt16 GetCurMax() const { return nCurMax; } inline SwCacheObj *First() { return pRealFirst; } inline SwCacheObj *Last() { return pLast; } inline SwCacheObj *Next( SwCacheObj *pCacheObj); @@ -150,7 +150,7 @@ class SwSaveSetLRUOfst { SwCache &rCache; public: - SwSaveSetLRUOfst( SwCache &rC, const USHORT nOfst ) + SwSaveSetLRUOfst( SwCache &rC, const sal_uInt16 nOfst ) : rCache( rC ) { rCache.SetLRUOfst( nOfst ); } ~SwSaveSetLRUOfst() { rCache.ResetLRUOfst(); } @@ -166,16 +166,16 @@ class SwCacheObj SwCacheObj *pNext; //Fuer die LRU-Verkettung. SwCacheObj *pPrev; - USHORT nCachePos; //Position im Cache-Array. + sal_uInt16 nCachePos; //Position im Cache-Array. - BYTE nLock; + sal_uInt8 nLock; inline SwCacheObj *GetNext() { return pNext; } inline SwCacheObj *GetPrev() { return pPrev; } inline void SetNext( SwCacheObj *pNew ) { pNext = pNew; } inline void SetPrev( SwCacheObj *pNew ) { pPrev = pNew; } - inline void SetCachePos( const USHORT nNew ) { nCachePos = nNew; } + inline void SetCachePos( const sal_uInt16 nNew ) { nCachePos = nNew; } protected: const void *pOwner; @@ -187,12 +187,12 @@ public: virtual ~SwCacheObj(); inline const void *GetOwner() const { return pOwner; } - inline BOOL IsOwner( const void *pNew ) const; + inline sal_Bool IsOwner( const void *pNew ) const; - inline USHORT GetCachePos() const { return nCachePos; } + inline sal_uInt16 GetCachePos() const { return nCachePos; } inline void Invalidate() { pOwner = 0; } - inline BOOL IsLocked() const { return 0 != nLock; } + inline sal_Bool IsLocked() const { return 0 != nLock; } #ifndef DBG_UTIL inline void Lock() { ++nLock; } @@ -230,36 +230,36 @@ protected: inline SwCacheObj *Get(); - inline SwCacheAccess( SwCache &rCache, const void *pOwner, BOOL bSeek = TRUE ); - inline SwCacheAccess( SwCache &rCache, const void *pOwner, const USHORT nIndex ); + inline SwCacheAccess( SwCache &rCache, const void *pOwner, sal_Bool bSeek = sal_True ); + inline SwCacheAccess( SwCache &rCache, const void *pOwner, const sal_uInt16 nIndex ); public: virtual ~SwCacheAccess(); - virtual BOOL IsAvailable() const; + virtual sal_Bool IsAvailable() const; //Abkuerzung fuer diejenigen, die wissen, das die Ableitung das IsAvailable //nicht ueberladen haben. - BOOL IsAvail() const { return pObj != 0; } + sal_Bool IsAvail() const { return pObj != 0; } }; -inline void SwCache::IncreaseMax( const USHORT nAdd ) +inline void SwCache::IncreaseMax( const sal_uInt16 nAdd ) { - nCurMax = nCurMax + sal::static_int_cast< USHORT >(nAdd); + nCurMax = nCurMax + sal::static_int_cast< sal_uInt16 >(nAdd); #ifdef DBG_UTIL ++nIncreaseMax; #endif } -inline void SwCache::DecreaseMax( const USHORT nSub ) +inline void SwCache::DecreaseMax( const sal_uInt16 nSub ) { if ( nCurMax > nSub ) - nCurMax = nCurMax - sal::static_int_cast< USHORT >(nSub); + nCurMax = nCurMax - sal::static_int_cast< sal_uInt16 >(nSub); #ifdef DBG_UTIL ++nDecreaseMax; #endif } -inline BOOL SwCacheObj::IsOwner( const void *pNew ) const +inline sal_Bool SwCacheObj::IsOwner( const void *pNew ) const { return pOwner && pOwner == pNew; } @@ -272,7 +272,7 @@ inline SwCacheObj *SwCache::Next( SwCacheObj *pCacheObj) return NULL; } -inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn, BOOL bSeek ) : +inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn, sal_Bool bSeek ) : rCache( rC ), pObj( 0 ), pOwner( pOwn ) @@ -282,7 +282,7 @@ inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn, BOOL bSeek ) } inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn, - const USHORT nIndex ) : + const sal_uInt16 nIndex ) : rCache( rC ), pObj( 0 ), pOwner( pOwn ) |