summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-24 14:52:44 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-24 15:59:43 +0100
commit2c47eb3df9c6fe8e77bf8f4f4a04f8e5a3224368 (patch)
treeb63de46edb204d1cf3ea9d1510637f9ec6dbfad3 /sw
parentb8d5647180db0f6c7e23d7ca9e14ab95fa4aa557 (diff)
code convention: member names
Conflicts: sw/inc/calbck.hxx Change-Id: I0322261240bee8795e23669306fb846da0ea706f
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/calbck.hxx46
-rw-r--r--sw/source/core/attr/calbck.cxx32
2 files changed, 39 insertions, 39 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 9b03614fa083..101baf4f6601 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -156,12 +156,12 @@ class SW_DLLPUBLIC SwModify: public SwClient
{
friend class sw::ClientIteratorBase;
template<typename E, typename S> friend class SwIterator;
- sw::WriterListener* pRoot; // the start of the linked list of clients
- bool bModifyLocked : 1; // don't broadcast changes now
+ sw::WriterListener* m_pWriterListeners; // the start of the linked list of clients
+ bool m_bModifyLocked : 1; // don't broadcast changes now
bool bLockClientList : 1; // may be set when this instance notifies its clients
- bool bInDocDTOR : 1; // workaround for problems when a lot of objects are destroyed
- bool bInCache : 1;
- bool bInSwFntCache : 1;
+ bool m_bInDocDTOR : 1; // workaround for problems when a lot of objects are destroyed
+ bool m_bInCache : 1;
+ bool m_bInSwFntCache : 1;
// mba: IMHO this method should be pure virtual
// DO NOT USE IN NEW CODE! use CallSwClientNotify instead.
@@ -170,10 +170,10 @@ class SW_DLLPUBLIC SwModify: public SwClient
public:
SwModify()
- : SwClient(nullptr), pRoot(nullptr), bModifyLocked(false), bLockClientList(false), bInDocDTOR(false), bInCache(false), bInSwFntCache(false)
+ : SwClient(nullptr), m_pWriterListeners(nullptr), m_bModifyLocked(false), bLockClientList(false), m_bInDocDTOR(false), m_bInCache(false), m_bInSwFntCache(false)
{}
explicit SwModify( SwModify* pToRegisterIn )
- : SwClient(pToRegisterIn), pRoot(nullptr), bModifyLocked(false), bLockClientList(false), bInDocDTOR(false), bInCache(false), bInSwFntCache(false)
+ : SwClient(pToRegisterIn), m_pWriterListeners(nullptr), m_bModifyLocked(false), bLockClientList(false), m_bInDocDTOR(false), m_bInCache(false), m_bInSwFntCache(false)
{}
// broadcasting: send notifications to all clients
@@ -182,7 +182,7 @@ public:
// DO NOT USE IN NEW CODE! use CallSwClientNotify instead.
void ModifyBroadcast( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue)
{ CallSwClientNotify( sw::LegacyModifyHint{ pOldValue, pNewValue } ); };
- // the same, but without setting bModifyLocked or checking for any of the flags
+ // the same, but without setting m_bModifyLocked or checking for any of the flags
// mba: it would be interesting to know why this is necessary
// also allows to limit callback to certain type (HACK)
// DO NOT USE IN NEW CODE! use CallSwClientNotify instead.
@@ -195,23 +195,23 @@ public:
void Add(SwClient *pDepend);
SwClient* Remove(SwClient *pDepend);
- bool HasWriterListeners() const { return pRoot; }
+ bool HasWriterListeners() const { return m_pWriterListeners; }
// get information about attribute
virtual bool GetInfo( SfxPoolItem& ) const SAL_OVERRIDE;
- void LockModify() { bModifyLocked = true; }
- void UnlockModify() { bModifyLocked = false; }
- void SetInCache( bool bNew ) { bInCache = bNew; }
- void SetInSwFntCache( bool bNew ) { bInSwFntCache = bNew; }
- void SetInDocDTOR() { bInDocDTOR = true; }
- bool IsModifyLocked() const { return bModifyLocked; }
- bool IsInDocDTOR() const { return bInDocDTOR; }
- bool IsInCache() const { return bInCache; }
- bool IsInSwFntCache() const { return bInSwFntCache; }
+ void LockModify() { m_bModifyLocked = true; }
+ void UnlockModify() { m_bModifyLocked = false; }
+ void SetInCache( bool bNew ) { m_bInCache = bNew; }
+ void SetInSwFntCache( bool bNew ) { m_bInSwFntCache = bNew; }
+ void SetInDocDTOR() { m_bInDocDTOR = true; }
+ bool IsModifyLocked() const { return m_bModifyLocked; }
+ bool IsInDocDTOR() const { return m_bInDocDTOR; }
+ bool IsInCache() const { return m_bInCache; }
+ bool IsInSwFntCache() const { return m_bInSwFntCache; }
void CheckCaching( const sal_uInt16 nWhich );
- bool IsLastDepend() { return pRoot && pRoot->IsLast(); }
+ bool IsLastDepend() { return m_pWriterListeners && m_pWriterListeners->IsLast(); }
};
// SwDepend
@@ -265,13 +265,13 @@ namespace sw
{
MoveTo(our_pClientIters);
our_pClientIters = this;
- m_pCurrent = m_pPosition = const_cast<WriterListener*>(m_rRoot.pRoot);
+ m_pCurrent = m_pPosition = const_cast<WriterListener*>(m_rRoot.m_pWriterListeners);
}
WriterListener* GetLeftOfPos() { return m_pPosition->m_pLeft; }
WriterListener* GetRightOfPos() { return m_pPosition->m_pRight; }
WriterListener* GoStart()
{
- if((m_pPosition = const_cast<WriterListener*>(m_rRoot.pRoot)))
+ if((m_pPosition = const_cast<WriterListener*>(m_rRoot.m_pWriterListeners)))
while( m_pPosition->m_pLeft )
m_pPosition = m_pPosition->m_pLeft;
return m_pCurrent = m_pPosition;
@@ -309,7 +309,7 @@ public:
TElementType* Last()
{
if(!m_pPosition)
- m_pPosition = const_cast<sw::WriterListener*>(m_rRoot.pRoot);
+ m_pPosition = const_cast<sw::WriterListener*>(m_rRoot.m_pWriterListeners);
if(!m_pPosition)
return static_cast<TElementType*>(Sync());
while(GetRightOfPos())
@@ -346,7 +346,7 @@ public:
SwClient* Last()
{
if(!m_pPosition)
- m_pPosition = const_cast<sw::WriterListener*>(m_rRoot.pRoot);
+ m_pPosition = const_cast<sw::WriterListener*>(m_rRoot.m_pWriterListeners);
if(!m_pPosition)
return m_pCurrent = nullptr;
while(GetRightOfPos())
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index bd82655c75c3..c0bb422a121a 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -66,7 +66,7 @@ SwModify::~SwModify()
if ( IsInSwFntCache() )
pSwFontCache->Delete( this );
- if( pRoot )
+ if( m_pWriterListeners )
{
// there are depending objects
if( IsInDocDTOR() )
@@ -86,8 +86,8 @@ SwModify::~SwModify()
// remove all clients that have not done themselves
// mba: possibly a hotfix for forgotten base class calls?!
- while( pRoot )
- static_cast<SwClient*>(pRoot)->CheckRegistration( &aDyObject, &aDyObject );
+ while( m_pWriterListeners )
+ static_cast<SwClient*>(m_pWriterListeners)->CheckRegistration( &aDyObject, &aDyObject );
}
}
}
@@ -101,7 +101,7 @@ void SwModify::NotifyClients( const SfxPoolItem* pOldValue, const SfxPoolItem* p
CheckCaching( nWhich );
}
- if ( !pRoot || IsModifyLocked() )
+ if ( !m_pWriterListeners || IsModifyLocked() )
return;
LockModify();
@@ -132,7 +132,7 @@ void SwModify::NotifyClients( const SfxPoolItem* pOldValue, const SfxPoolItem* p
bool SwModify::GetInfo( SfxPoolItem& rInfo ) const
{
- if(!pRoot)
+ if(!m_pWriterListeners)
return true;
SwIterator<SwClient,SwModify> aIter(*this);
for(SwClient* pClient = aIter.First(); pClient; pClient = aIter.Next())
@@ -152,7 +152,7 @@ void SwModify::Add( SwClient* pDepend )
{
for(auto& rIter : sw::ClientIteratorBase::our_pClientIters->GetRingContainer())
{
- OSL_ENSURE( &rIter.m_rRoot != pRoot, "Client added to active ClientIter" );
+ OSL_ENSURE( &rIter.m_rRoot != m_pWriterListeners, "Client added to active ClientIter" );
}
}
#endif
@@ -160,19 +160,19 @@ void SwModify::Add( SwClient* pDepend )
if( pDepend->pRegisteredIn != nullptr )
pDepend->pRegisteredIn->Remove( pDepend );
- if( !pRoot )
+ if( !m_pWriterListeners )
{
// first client added
- pRoot = pDepend;
- pRoot->m_pLeft = nullptr;
- pRoot->m_pRight = nullptr;
+ m_pWriterListeners = pDepend;
+ m_pWriterListeners->m_pLeft = nullptr;
+ m_pWriterListeners->m_pRight = nullptr;
}
else
{
// append client
- pDepend->m_pRight = pRoot->m_pRight;
- pRoot->m_pRight = pDepend;
- pDepend->m_pLeft = pRoot;
+ pDepend->m_pRight = m_pWriterListeners->m_pRight;
+ m_pWriterListeners->m_pRight = pDepend;
+ pDepend->m_pLeft = m_pWriterListeners;
if( pDepend->m_pRight )
pDepend->m_pRight->m_pLeft = pDepend;
}
@@ -184,7 +184,7 @@ void SwModify::Add( SwClient* pDepend )
SwClient* SwModify::Remove( SwClient* pDepend )
{
- if ( bInDocDTOR )
+ if ( m_bInDocDTOR )
return nullptr;
if( pDepend->pRegisteredIn == this )
@@ -193,8 +193,8 @@ SwClient* SwModify::Remove( SwClient* pDepend )
// remove it from my list
::sw::WriterListener* pR = pDepend->m_pRight;
::sw::WriterListener* pL = pDepend->m_pLeft;
- if( pRoot == pDepend )
- pRoot = pL ? pL : pR;
+ if( m_pWriterListeners == pDepend )
+ m_pWriterListeners = pL ? pL : pR;
if( pL )
pL->m_pRight = pR;