summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-15 04:46:23 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-16 13:24:07 +0100
commitd4267231754c1e6b03c7723a6fecc46750e7c780 (patch)
tree56b94d4d5b538ff975dd727d8fdfdae2f1bc46e7
parente9fc57cf8a3527976fc07285c9446b57eb0f9204 (diff)
use SwIterator<>
Change-Id: I464b22b2a418d20a4b230ebe10d36642ace84b35
-rw-r--r--sw/source/core/layout/atrfrm.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 7d4ee2ad5391..565cd47c6bab 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -118,13 +118,10 @@ void DelHFFormat( SwClient *pToRemove, SwFrmFmt *pFmt )
{
// nested scope because DTOR of SwClientIter resets the flag bTreeChg.
// It's suboptimal if the format is deleted beforehand.
- SwClientIter aIter( *pFmt ); // TODO
- SwClient *pLast = aIter.GoStart();
- if( pLast )
- do {
- bDel = pLast->IsA( TYPE(SwFrm) )
- || SwXHeadFootText::IsXHeadFootText(pLast);
- } while( bDel && 0 != ( pLast = ++aIter ));
+ SwIterator<SwClient,SwFrmFmt> aIter(*pFmt);
+ for(SwClient* pLast = aIter.First(); bDel && pLast; pLast = aIter.Next())
+ if(!pLast->IsA(TYPE(SwFrm)) || !SwXHeadFootText::IsXHeadFootText(pLast))
+ bDel = false;
}
if ( bDel )