diff options
Diffstat (limited to 'sw/source/filter/html/swhtml.cxx')
-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; } |