summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-15 04:48:05 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-16 13:24:09 +0100
commit2c93ae21a3883bf23b867c7bbc0cbb742de183bf (patch)
treef97866dfb32d34d4e74bf9549b778ac7d8b8a12b
parent8b41d4292b7c72643602cdfd89358972d14faf27 (diff)
use SwIterator<>
Change-Id: Ia0a432019dc856c6c12996a898e8137789cbc76b
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index de6f3dd60e03..c391d49a55ae 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -50,6 +50,7 @@
#include <tabfrm.hxx>
#include <cntfrm.hxx>
#include <htmltbl.hxx>
+#include <switerator.hxx>
using namespace com::sun::star;
@@ -64,18 +65,16 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
// after a Paint will be swapped out! So all other "behind"
// them havent't a loaded Graphic.
rGrfNd.LockModify();
-
- SwClientIter aIter( rGrfNd ); // TODO
- for( int n = 0; n < 2; ++n )
{
- SwClient * pLast = aIter.GoStart();
- if( pLast ) // Were we able to jump to the beginning?
- {
- do {
- if( (0 == n) != pLast->ISA( SwCntntFrm ) )
- pLast->ModifyNotification( &rItem, &rItem );
- } while( 0 != ( pLast = ++aIter ));
- }
+ SwIterator<SwClient,SwGrfNode> aIter(rGrfNd);
+ for(SwClient* pLast = aIter.First(); pLast; pLast = aIter.Next())
+ if(!pLast->ISA(SwCntntFrm))
+ pLast->ModifyNotification(&rItem, &rItem);
+ }
+ {
+ SwIterator<SwCntntFrm,SwGrfNode> aIter(rGrfNd);
+ for(SwClient* pLast = aIter.First(); pLast; pLast = aIter.Next())
+ pLast->ModifyNotification(&rItem, &rItem);
}
rGrfNd.UnlockModify();
}