summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-14 19:06:29 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-16 20:37:25 +0100
commit059b2b0385e632459c3f0a7c110b7a5ab6b6ce51 (patch)
tree4b4d91902b630a5b35df17344c0a3b5473ad2be3
parent32d322a133960a0533403581df1ba7251b7dc700 (diff)
Move SwClientIter::Previous() to SwIterator
Change-Id: Idd1f794f81612d7593095a230580234cdce30725
-rw-r--r--sw/inc/calbck.hxx8
-rw-r--r--sw/inc/switerator.hxx8
2 files changed, 7 insertions, 9 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index bde2e5bff95d..5aab4dd9a255 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -263,14 +263,6 @@ class SwClientIter SAL_FINAL : public sw::Ring<SwClientIter>
static SW_DLLPUBLIC SwClientIter* our_pClientIters;
- SwClient* Previous()
- {
- m_pPosition = static_cast<SwClient*>(m_pPosition->m_pLeft);
- while(m_pPosition && !m_pPosition->IsA( m_aSearchType ) )
- m_pPosition = static_cast<SwClient*>(m_pPosition->m_pLeft);
- return m_pCurrent = m_pPosition;
- }
-
public:
SwClientIter( const SwModify& rModify )
: m_rRoot(rModify)
diff --git a/sw/inc/switerator.hxx b/sw/inc/switerator.hxx
index fd943ba54cea..4a9f277b0afb 100644
--- a/sw/inc/switerator.hxx
+++ b/sw/inc/switerator.hxx
@@ -55,7 +55,13 @@ public:
aClientIter.m_pPosition = static_cast<SwClient*>(aClientIter.m_pPosition->m_pRight);
return PTR_CAST(TElementType,aClientIter.m_pCurrent = aClientIter.m_pPosition);
}
- TElementType* Previous() { SwClient* p = aClientIter.Previous(); return PTR_CAST(TElementType,p); }
+ TElementType* Previous()
+ {
+ aClientIter.m_pPosition = static_cast<SwClient*>(aClientIter.m_pPosition->m_pLeft);
+ while(aClientIter.m_pPosition && !aClientIter.m_pPosition->IsA( TYPE(TElementType) ) )
+ aClientIter.m_pPosition = static_cast<SwClient*>(aClientIter.m_pPosition->m_pLeft);
+ return PTR_CAST(TElementType,aClientIter.m_pCurrent = aClientIter.m_pPosition);
+ }
static TElementType* FirstElement( const TSource& rMod ) { SwClient* p = SwClientIter(rMod).First(TYPE(TElementType)); return PTR_CAST(TElementType,p); }
bool IsChanged() { return aClientIter.IsChanged(); }
};