diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-03 19:19:00 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-04 01:10:06 +0100 |
commit | f87c46b0fa3c01a163d6aded8889ff305823166b (patch) | |
tree | 45eda4b6e3f4998ed6e515126ebd5177e67b14c4 /sw | |
parent | 12f2bcaee5948c3ac2d14d75180c357ae3830179 (diff) |
use C++11 iteration
Change-Id: Iaf050d7b574864c27b84919aa3a04eadd25312e0
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 2685a0acc44c..fe225ba83683 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -2590,13 +2590,12 @@ SwViewShell *SwHTMLParser::CallEndAction( bool bChkAction, bool bChkPtr ) if( bSetCrsr ) { - // an allen CrsrEditShells die Cursor auf den Doc-Anfang setzen - SwViewShell *pSh = pActionViewShell; - do { - if( pSh->IsA( TYPE( SwCrsrShell ) ) ) - static_cast<SwCrsrShell*>(pSh)->SttEndDoc(true); - pSh = static_cast<SwViewShell *>(pSh->GetNext()); - } while( pSh != pActionViewShell ); + // set the cursor to the doc begin in all CrsrEditShells + for(SwViewShell& rSh : pActionViewShell->GetRingContainer()) + { + if( rSh.IsA( TYPE( SwCrsrShell ) ) ) + static_cast<SwCrsrShell*>(&rSh)->SttEndDoc(true); + } bSetCrsr = false; } |