diff options
Diffstat (limited to 'sw/source/core/bastyp/swcache.cxx')
-rw-r--r-- | sw/source/core/bastyp/swcache.cxx | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx index 5175d404c3b7..34502cdcc920 100644 --- a/sw/source/core/bastyp/swcache.cxx +++ b/sw/source/core/bastyp/swcache.cxx @@ -54,8 +54,8 @@ void SwCache::Check() //Konsistenspruefung. OSL_ENSURE( !pLast->GetNext(), "Last but not last." ); OSL_ENSURE( !pRealFirst->GetPrev(), "First but not first." ); - USHORT nCnt = 0; - BOOL bFirstFound = FALSE; + sal_uInt16 nCnt = 0; + sal_Bool bFirstFound = sal_False; SwCacheObj *pObj = pRealFirst; SwCacheObj *pRekursive = pObj; while ( pObj ) @@ -68,7 +68,7 @@ void SwCache::Check() ++nCnt; if ( pObj == pFirst ) - bFirstFound = TRUE; + bFirstFound = sal_True; if ( !pObj->GetNext() ) OSL_ENSURE( pObj == pLast, "Last not Found." ); pObj = pObj->GetNext(); @@ -92,12 +92,12 @@ void SwCache::Check() |*************************************************************************/ -SwCache::SwCache( const USHORT nInitSize, const USHORT nGrowSize +SwCache::SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize #if OSL_DEBUG_LEVEL > 1 , const ByteString &rNm #endif ) : - SwCacheObjArr( (BYTE)nInitSize, (BYTE)nGrowSize ), + SwCacheObjArr( (sal_uInt8)nInitSize, (sal_uInt8)nGrowSize ), aFreePositions( 5, 5 ), pRealFirst( 0 ), pFirst( 0 ), @@ -166,7 +166,7 @@ SwCache::~SwCache() |*************************************************************************/ -void SwCache::Flush( const BYTE ) +void SwCache::Flush( const sal_uInt8 ) { INCREMENT( nFlushCnt ); SwCacheObj *pObj = pRealFirst; @@ -277,8 +277,8 @@ void SwCache::ToTop( SwCacheObj *pObj ) |*************************************************************************/ -SwCacheObj *SwCache::Get( const void *pOwner, const USHORT nIndex, - const BOOL bToTop ) +SwCacheObj *SwCache::Get( const void *pOwner, const sal_uInt16 nIndex, + const sal_Bool bToTop ) { SwCacheObj *pRet; if ( 0 != (pRet = nIndex < Count() ? operator[]( nIndex ) : 0) ) @@ -301,7 +301,7 @@ SwCacheObj *SwCache::Get( const void *pOwner, const USHORT nIndex, -SwCacheObj *SwCache::Get( const void *pOwner, const BOOL bToTop ) +SwCacheObj *SwCache::Get( const void *pOwner, const sal_Bool bToTop ) { SwCacheObj *pRet = pRealFirst; while ( pRet && !pRet->IsOwner( pOwner ) ) @@ -364,7 +364,7 @@ void SwCache::DeleteObj( SwCacheObj *pObj ) //Unangenehmer Nebeneffekt ist, das die Positionen verschoben werden //muessen, und die Eigentuemer der Objekte diese wahrscheinlich nicht //wiederfinden werden. - for ( USHORT i = 0; i < Count(); ++i ) + for ( sal_uInt16 i = 0; i < Count(); ++i ) { SwCacheObj *pTmpObj = operator[](i); if ( !pTmpObj ) @@ -383,7 +383,7 @@ void SwCache::Delete( const void *pOwner ) { INCREMENT( nDelete ); SwCacheObj *pObj; - if ( 0 != (pObj = Get( pOwner, BOOL(FALSE) )) ) + if ( 0 != (pObj = Get( pOwner, sal_Bool(sal_False) )) ) DeleteObj( pObj ); } @@ -393,12 +393,12 @@ void SwCache::Delete( const void *pOwner ) |*************************************************************************/ -BOOL SwCache::Insert( SwCacheObj *pNew ) +sal_Bool SwCache::Insert( SwCacheObj *pNew ) { CHECK; OSL_ENSURE( !pNew->GetPrev() && !pNew->GetNext(), "New but not new." ); - USHORT nPos;//Wird hinter den if's zum setzen am Obj benutzt. + sal_uInt16 nPos;//Wird hinter den if's zum setzen am Obj benutzt. if ( Count() < nCurMax ) { //Es ist noch Platz frei, also einfach einfuegen. @@ -410,7 +410,7 @@ BOOL SwCache::Insert( SwCacheObj *pNew ) { //Es exitieren Platzhalter, also den letzten benutzen. INCREMENT( nInsertFree ); - const USHORT nFreePos = aFreePositions.Count() - 1; + const sal_uInt16 nFreePos = aFreePositions.Count() - 1; nPos = aFreePositions[ nFreePos ]; *(pData + nPos) = pNew; aFreePositions.Remove( nFreePos ); @@ -425,8 +425,8 @@ BOOL SwCache::Insert( SwCacheObj *pNew ) pObj = pObj->GetPrev(); if ( !pObj ) { - OSL_ENSURE( FALSE, "Cache overflow." ); - return FALSE; + OSL_ENSURE( sal_False, "Cache overflow." ); + return sal_False; } nPos = pObj->GetCachePos(); @@ -467,7 +467,7 @@ BOOL SwCache::Insert( SwCacheObj *pNew ) pFirst = pNew; CHECK; - return TRUE; + return sal_True; } /************************************************************************* @@ -475,14 +475,14 @@ BOOL SwCache::Insert( SwCacheObj *pNew ) |*************************************************************************/ -void SwCache::SetLRUOfst( const USHORT nOfst ) +void SwCache::SetLRUOfst( const sal_uInt16 nOfst ) { if ( !pRealFirst || ((Count() - aFreePositions.Count()) < nOfst) ) return; CHECK; pFirst = pRealFirst; - for ( USHORT i = 0; i < Count() && i < nOfst; ++i ) + for ( sal_uInt16 i = 0; i < Count() && i < nOfst; ++i ) { if ( pFirst->GetNext() && pFirst->GetNext()->GetNext() ) pFirst = pFirst->GetNext(); @@ -562,7 +562,7 @@ void SwCacheAccess::_Get() |* SwCacheAccess::IsAvailable() |*************************************************************************/ -BOOL SwCacheAccess::IsAvailable() const +sal_Bool SwCacheAccess::IsAvailable() const { return pObj != 0; } |