Kaydet (Commit) 2e6327e4 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: prefix members of SwCacheObj

Change-Id: I416c43f5f6819029e279bc2f5fb696b59917ef06
üst 37e0e10f
...@@ -422,11 +422,11 @@ void SwCache::SetLRUOfst( const sal_uInt16 nOfst ) ...@@ -422,11 +422,11 @@ void SwCache::SetLRUOfst( const sal_uInt16 nOfst )
} }
SwCacheObj::SwCacheObj( const void *pOwn ) : SwCacheObj::SwCacheObj( const void *pOwn ) :
pNext( 0 ), m_pNext( 0 ),
pPrev( 0 ), m_pPrev( 0 ),
nCachePos( USHRT_MAX ), m_nCachePos( USHRT_MAX ),
nLock( 0 ), m_nLock( 0 ),
pOwner( pOwn ) m_pOwner( pOwn )
{ {
} }
...@@ -437,14 +437,14 @@ SwCacheObj::~SwCacheObj() ...@@ -437,14 +437,14 @@ SwCacheObj::~SwCacheObj()
#ifdef DBG_UTIL #ifdef DBG_UTIL
void SwCacheObj::Lock() void SwCacheObj::Lock()
{ {
OSL_ENSURE( nLock < UCHAR_MAX, "Too many Locks for CacheObject." ); OSL_ENSURE( m_nLock < UCHAR_MAX, "Too many Locks for CacheObject." );
++nLock; ++m_nLock;
} }
void SwCacheObj::Unlock() void SwCacheObj::Unlock()
{ {
OSL_ENSURE( nLock, "No more Locks available." ); OSL_ENSURE( m_nLock, "No more Locks available." );
--nLock; --m_nLock;
} }
#endif #endif
......
...@@ -136,34 +136,34 @@ class SwCacheObj ...@@ -136,34 +136,34 @@ class SwCacheObj
{ {
friend class SwCache; /// Can do everything friend class SwCache; /// Can do everything
SwCacheObj *pNext; /// For the LRU chaining SwCacheObj *m_pNext; /// For the LRU chaining
SwCacheObj *pPrev; SwCacheObj *m_pPrev;
sal_uInt16 nCachePos; /// Position in the Cache array sal_uInt16 m_nCachePos; /// Position in the Cache array
sal_uInt8 nLock; sal_uInt8 m_nLock;
inline SwCacheObj *GetNext() { return pNext; } inline SwCacheObj *GetNext() { return m_pNext; }
inline SwCacheObj *GetPrev() { return pPrev; } inline SwCacheObj *GetPrev() { return m_pPrev; }
inline void SetNext( SwCacheObj *pNew ) { pNext = pNew; } inline void SetNext( SwCacheObj *pNew ) { m_pNext = pNew; }
inline void SetPrev( SwCacheObj *pNew ) { pPrev = pNew; } inline void SetPrev( SwCacheObj *pNew ) { m_pPrev = pNew; }
inline void SetCachePos( const sal_uInt16 nNew ) { nCachePos = nNew; } inline void SetCachePos( const sal_uInt16 nNew ) { m_nCachePos = nNew; }
protected: protected:
const void *pOwner; const void *m_pOwner;
public: public:
SwCacheObj( const void *pOwner ); SwCacheObj( const void *pOwner );
virtual ~SwCacheObj(); virtual ~SwCacheObj();
inline const void *GetOwner() const { return pOwner; } inline const void *GetOwner() const { return m_pOwner; }
inline bool IsOwner( const void *pNew ) const; inline bool IsOwner( const void *pNew ) const;
inline sal_uInt16 GetCachePos() const { return nCachePos; } inline sal_uInt16 GetCachePos() const { return m_nCachePos; }
inline bool IsLocked() const { return 0 != nLock; } inline bool IsLocked() const { return 0 != m_nLock; }
#ifdef DBG_UTIL #ifdef DBG_UTIL
void Lock(); void Lock();
...@@ -230,7 +230,7 @@ inline void SwCache::DecreaseMax( const sal_uInt16 nSub ) ...@@ -230,7 +230,7 @@ inline void SwCache::DecreaseMax( const sal_uInt16 nSub )
inline bool SwCacheObj::IsOwner( const void *pNew ) const inline bool SwCacheObj::IsOwner( const void *pNew ) const
{ {
return pOwner && pOwner == pNew; return m_pOwner && m_pOwner == pNew;
} }
inline SwCacheObj *SwCache::Next( SwCacheObj *pCacheObj) inline SwCacheObj *SwCache::Next( SwCacheObj *pCacheObj)
......
...@@ -1867,7 +1867,7 @@ SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrm *pConstructor) ...@@ -1867,7 +1867,7 @@ SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrm *pConstructor)
SwBorderAttrs::~SwBorderAttrs() SwBorderAttrs::~SwBorderAttrs()
{ {
const_cast<SwModify *>(static_cast<SwModify const *>(pOwner))->SetInCache( false ); const_cast<SwModify *>(static_cast<SwModify const *>(m_pOwner))->SetInCache( false );
} }
/* All calc methods calculate a safety distance in addition to the values given by the attributes. /* All calc methods calculate a safety distance in addition to the values given by the attributes.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment