summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-15 04:50:32 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-16 23:35:29 +0100
commite3167924fd28c8b854f23139dbf49f53e6282ef7 (patch)
treea190280a5fde354820bbe38a8c564ee37355b3bb
parenta21948bddfefa8554fb2d468616ec1bfda128e9d (diff)
make SwClientIter::GoStart/GoEnd private
Change-Id: I0c0f84d110e8ea4f84404a8ca17d0c982c9200c4
-rw-r--r--sw/inc/calbck.hxx36
1 files changed, 17 insertions, 19 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 7fc2e6d574be..214165307090 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -243,10 +243,8 @@ protected:
class SwClientIter SAL_FINAL : public sw::Ring<SwClientIter>
{
- friend SwClient* SwModify::Remove(SwClient*); ///< for pointer adjustments
- friend void SwModify::Add(SwClient*); ///< for pointer adjustments
+ friend class SwModify;
template<typename E, typename S> friend class SwIterator; ///< for typed interation
- friend void SwModify::ModifyBroadcast( const SfxPoolItem*, const SfxPoolItem*, TypeId); ///< for typed iteration
const SwModify& m_rRoot;
@@ -259,6 +257,22 @@ class SwClientIter SAL_FINAL : public sw::Ring<SwClientIter>
SwClient* m_pPosition;
SwClient* GetLeftOfPos() { return static_cast<SwClient*>(m_pPosition->m_pLeft); }
SwClient* GetRighOfPos() { return static_cast<SwClient*>(m_pPosition->m_pRight); }
+ SwClient* GoStart()
+ {
+ if((m_pPosition = const_cast<SwClient*>(m_rRoot.GetDepends())))
+ while( m_pPosition->m_pLeft )
+ m_pPosition = static_cast<SwClient*>(m_pPosition->m_pLeft);
+ return m_pCurrent = m_pPosition;
+ }
+ SwClient* GoEnd()
+ {
+ if(!m_pPosition)
+ m_pPosition = const_cast<SwClient*>(m_rRoot.GetDepends());
+ if(m_pPosition)
+ while( m_pPosition->m_pRight )
+ m_pPosition = static_cast<SwClient*>(m_pPosition->m_pRight);
+ return m_pCurrent = m_pPosition;
+ }
static SW_DLLPUBLIC SwClientIter* our_pClientIters;
@@ -286,22 +300,6 @@ public:
m_pPosition = static_cast<SwClient*>(m_pPosition->m_pRight);
return m_pCurrent = m_pPosition;
}
- SwClient* GoStart()
- {
- if((m_pPosition = const_cast<SwClient*>(m_rRoot.GetDepends())))
- while( m_pPosition->m_pLeft )
- m_pPosition = static_cast<SwClient*>(m_pPosition->m_pLeft);
- return m_pCurrent = m_pPosition;
- }
- SwClient* GoEnd()
- {
- if(!m_pPosition)
- m_pPosition = const_cast<SwClient*>(m_rRoot.GetDepends());
- if(m_pPosition)
- while( m_pPosition->m_pRight )
- m_pPosition = static_cast<SwClient*>(m_pPosition->m_pRight);
- return m_pCurrent = m_pPosition;
- }
// returns the current SwClient object, wether it is still a client or not
SwClient& operator*() const