diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-08-07 23:12:02 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-08-16 21:52:30 +0200 |
commit | 4dc54b837f5b548089f49da84d0dda9c6bae9171 (patch) | |
tree | 71f0b2246754708cc941278b264aa9c0f748f593 /sw | |
parent | bfa5e2f27631282db3f0c68e964fdf9f93dd7ffb (diff) |
Avoid redundant cehck and unneeded local scope
Change-Id: Ifd8359f709a3c11851673921f278b3055ea518c6
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 402a0e8ce3e0..09473b94c11d 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -986,22 +986,16 @@ void SwFEShell::EndTextEdit() { if ( pView->GetMarkedObjectList().GetMarkCount() > 1 ) { + SdrMarkList aSave( pView->GetMarkedObjectList() ); + aSave.DeleteMark( aSave.FindObject( pObj ) ); + if ( aSave.GetMarkCount() ) { - SdrMarkList aSave( pView->GetMarkedObjectList() ); - aSave.DeleteMark( aSave.FindObject( pObj ) ); - if ( aSave.GetMarkCount() ) - { - pView->UnmarkAll(); - pView->MarkObj( pObj, Imp()->GetPageView() ); - } - DelSelectedObj(); - if ( aSave.GetMarkCount() ) - { - for ( size_t i = 0; i < aSave.GetMarkCount(); ++i ) - pView->MarkObj( aSave.GetMark( i )->GetMarkedSdrObj(), - Imp()->GetPageView() ); - } + pView->UnmarkAll(); + pView->MarkObj( pObj, Imp()->GetPageView() ); } + DelSelectedObj(); + for ( size_t i = 0; i < aSave.GetMarkCount(); ++i ) + pView->MarkObj( aSave.GetMark( i )->GetMarkedSdrObj(), Imp()->GetPageView() ); } else DelSelectedObj(); |