Kaydet (Commit) a782a3f3 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

use C++11 iteration

Change-Id: Idc13d5c04db1a3529a37c37147079814f5117d14
üst 8145c0bd
...@@ -637,11 +637,8 @@ long SwFEShell::EndDrag( const Point *, bool ) ...@@ -637,11 +637,8 @@ long SwFEShell::EndDrag( const Point *, bool )
SdrView *pView = Imp()->GetDrawView(); SdrView *pView = Imp()->GetDrawView();
if ( pView->IsDragObj() ) if ( pView->IsDragObj() )
{ {
// Setup Start-/EndActions only to the SwViewShell for(SwViewShell& rSh : GetRingContainer())
SwViewShell *pSh = this; rSh.StartAction();
do {
pSh->StartAction();
} while ( this != (pSh = static_cast<SwViewShell*>(pSh->GetNext())) );
StartUndo( UNDO_START ); StartUndo( UNDO_START );
...@@ -662,11 +659,12 @@ long SwFEShell::EndDrag( const Point *, bool ) ...@@ -662,11 +659,12 @@ long SwFEShell::EndDrag( const Point *, bool )
EndUndo( UNDO_END ); EndUndo( UNDO_END );
do { for(SwViewShell& rSh : GetRingContainer())
pSh->EndAction(); {
if( pSh->IsA( TYPE( SwCrsrShell ) ) ) rSh.EndAction();
static_cast<SwCrsrShell*>(pSh)->CallChgLnk(); if( rSh.IsA( TYPE( SwCrsrShell ) ) )
} while ( this != (pSh = static_cast<SwViewShell*>(pSh->GetNext())) ); static_cast<SwCrsrShell*>(&rSh)->CallChgLnk();
}
GetDoc()->getIDocumentState().SetModified(); GetDoc()->getIDocumentState().SetModified();
::FrameNotify( this, FLY_DRAG ); ::FrameNotify( this, FLY_DRAG );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment