sw/inc/calbck.hxx | 12 ++++++------ sw/source/core/attr/calbck.cxx | 26 +++++++++++++------------- 2 files changed, 19 insertions(+), 19 deletions(-)
New commits: commit cc27d038955fef806ebf516a59300bc6a82df3b3 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Mon Dec 12 10:10:00 2016 +0100 sw: prefix members of SwClient Change-Id: If35981bce951dfab4a784d4cb54ac911249572ed diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index ef3d464..872de59 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -100,18 +100,18 @@ class SW_DLLPUBLIC SwClient : public ::sw::WriterListener friend class sw::ClientIteratorBase; template<typename E, typename S> friend class SwIterator; - SwModify *pRegisteredIn; ///< event source + SwModify *m_pRegisteredIn; ///< event source protected: // single argument ctors shall be explicit. inline explicit SwClient( SwModify* pToRegisterIn ); // write access to pRegisteredIn shall be granted only to the object itself (protected access) - SwModify* GetRegisteredInNonConst() const { return pRegisteredIn; } + SwModify* GetRegisteredInNonConst() const { return m_pRegisteredIn; } public: - SwClient() : pRegisteredIn(nullptr) {} + SwClient() : m_pRegisteredIn(nullptr) {} virtual ~SwClient() override; // callbacks received from SwModify (friend class - so these methods can be private) // should be called only from SwModify the client is registered in @@ -130,8 +130,8 @@ public: void ModifyNotification( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue ) { this->Modify ( pOldValue, pNewValue ); } void SwClientNotifyCall( const SwModify& rModify, const SfxHint& rHint ) { SwClientNotify( rModify, rHint ); } - const SwModify* GetRegisteredIn() const { return pRegisteredIn; } - SwModify* GetRegisteredIn() { return pRegisteredIn; } + const SwModify* GetRegisteredIn() const { return m_pRegisteredIn; } + SwModify* GetRegisteredIn() { return m_pRegisteredIn; } // get information about attribute @@ -342,7 +342,7 @@ public: }; SwClient::SwClient( SwModify* pToRegisterIn ) - : pRegisteredIn( nullptr ) + : m_pRegisteredIn( nullptr ) { if(pToRegisterIn) pToRegisterIn->Add(this); diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index 54a036b..10d0af7 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -31,9 +31,9 @@ SwClient::~SwClient() { if(GetRegisteredIn()) DBG_TESTSOLARMUTEX(); - OSL_ENSURE( !pRegisteredIn || pRegisteredIn->HasWriterListeners(), "SwModify still known, but Client already disconnected!" ); - if( pRegisteredIn && pRegisteredIn->HasWriterListeners() ) - pRegisteredIn->Remove( this ); + OSL_ENSURE( !m_pRegisteredIn || m_pRegisteredIn->HasWriterListeners(), "SwModify still known, but Client already disconnected!" ); + if( m_pRegisteredIn && m_pRegisteredIn->HasWriterListeners() ) + m_pRegisteredIn->Remove( this ); } void SwClient::CheckRegistration( const SfxPoolItem* pOld, const SfxPoolItem* ) @@ -44,10 +44,10 @@ void SwClient::CheckRegistration( const SfxPoolItem* pOld, const SfxPoolItem* ) return; const SwPtrMsgPoolItem* pDead = static_cast<const SwPtrMsgPoolItem*>(pOld); - if(pDead && pDead->pObject == pRegisteredIn) + if(pDead && pDead->pObject == m_pRegisteredIn) { // I've got a notification from the object I know - SwModify* pAbove = pRegisteredIn->GetRegisteredIn(); + SwModify* pAbove = m_pRegisteredIn->GetRegisteredIn(); if(pAbove) { // if the dying object itself was listening at an SwModify, I take over @@ -56,7 +56,7 @@ void SwClient::CheckRegistration( const SfxPoolItem* pOld, const SfxPoolItem* ) return; } // destroy connection - pRegisteredIn->Remove(this); + m_pRegisteredIn->Remove(this); } } @@ -80,7 +80,7 @@ void SwModify::SetInDocDTOR() // later when they also get destroyed SwIterator<SwClient,SwModify> aIter(*this); for(SwClient* pClient = aIter.First(); pClient; pClient = aIter.Next()) - pClient->pRegisteredIn = nullptr; + pClient->m_pRegisteredIn = nullptr; m_pWriterListeners = nullptr; } @@ -160,7 +160,7 @@ void SwModify::Add( SwClient* pDepend ) DBG_TESTSOLARMUTEX(); OSL_ENSURE( !m_bLockClientList, "Client inserted while in Modify" ); - if(pDepend->pRegisteredIn != this ) + if(pDepend->m_pRegisteredIn != this ) { #if OSL_DEBUG_LEVEL > 0 if(sw::ClientIteratorBase::our_pClientIters) @@ -172,8 +172,8 @@ void SwModify::Add( SwClient* pDepend ) } #endif // deregister new client in case it is already registered elsewhere - if( pDepend->pRegisteredIn != nullptr ) - pDepend->pRegisteredIn->Remove( pDepend ); + if( pDepend->m_pRegisteredIn != nullptr ) + pDepend->m_pRegisteredIn->Remove( pDepend ); if( !m_pWriterListeners ) { @@ -193,14 +193,14 @@ void SwModify::Add( SwClient* pDepend ) } // connect client to me - pDepend->pRegisteredIn = this; + pDepend->m_pRegisteredIn = this; } } SwClient* SwModify::Remove( SwClient* pDepend ) { DBG_TESTSOLARMUTEX(); - assert(pDepend->pRegisteredIn == this); + assert(pDepend->m_pRegisteredIn == this); // SwClient is my listener // remove it from my list @@ -229,7 +229,7 @@ SwClient* SwModify::Remove( SwClient* pDepend ) } pDepend->m_pLeft = nullptr; pDepend->m_pRight = nullptr; - pDepend->pRegisteredIn = nullptr; + pDepend->m_pRegisteredIn = nullptr; return pDepend; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits