summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-03 17:43:17 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-04 01:09:49 +0100
commita782a3f3292dfeec40c2bf8c463a8ab913d8e1d7 (patch)
tree2d53e4c2e811a57559fcd2110167926ded21424e /sw
parent8145c0bdfbab7295d78daea12236742a46eec192 (diff)
use C++11 iteration
Change-Id: Idc13d5c04db1a3529a37c37147079814f5117d14
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/frmedt/feshview.cxx18
1 files changed, 8 insertions, 10 deletions
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 026e3af759fa..fafe8631766a 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -637,11 +637,8 @@ long SwFEShell::EndDrag( const Point *, bool )
SdrView *pView = Imp()->GetDrawView();
if ( pView->IsDragObj() )
{
- // Setup Start-/EndActions only to the SwViewShell
- SwViewShell *pSh = this;
- do {
- pSh->StartAction();
- } while ( this != (pSh = static_cast<SwViewShell*>(pSh->GetNext())) );
+ for(SwViewShell& rSh : GetRingContainer())
+ rSh.StartAction();
StartUndo( UNDO_START );
@@ -662,11 +659,12 @@ long SwFEShell::EndDrag( const Point *, bool )
EndUndo( UNDO_END );
- do {
- pSh->EndAction();
- if( pSh->IsA( TYPE( SwCrsrShell ) ) )
- static_cast<SwCrsrShell*>(pSh)->CallChgLnk();
- } while ( this != (pSh = static_cast<SwViewShell*>(pSh->GetNext())) );
+ for(SwViewShell& rSh : GetRingContainer())
+ {
+ rSh.EndAction();
+ if( rSh.IsA( TYPE( SwCrsrShell ) ) )
+ static_cast<SwCrsrShell*>(&rSh)->CallChgLnk();
+ }
GetDoc()->getIDocumentState().SetModified();
::FrameNotify( this, FLY_DRAG );