diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-03 17:52:12 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-04 01:09:51 +0100 |
commit | dd53ee608dd06ef4db95e36f6786a95df21517a0 (patch) | |
tree | cc258684577760f1f0613f016b2ac770f8664dc4 /sw | |
parent | b9b8095cd11ffb4b7299f03ff03e543468fd5251 (diff) |
use C++11 iteration
Change-Id: Iff18fa8d3860437f9d9a14ba52d06b1aa4d38076
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/graphic/ndgrf.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 0989b788967d..6e60afa1c24e 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -1095,15 +1095,15 @@ bool SwGrfNode::IsSelected() const { const SwNode* pN = this; const SwViewShell* pV = pESh; - do { - if( pV->ISA( SwEditShell ) && pN == &static_cast<const SwCrsrShell*>(pV) + for(const SwViewShell& rCurrentShell : pESh->GetRingContainer()) + { + if( rCurrentShell.ISA( SwEditShell ) && pN == &static_cast<const SwCrsrShell*>(&rCurrentShell) ->GetCrsr()->GetPoint()->nNode.GetNode() ) { bRet = true; break; } } - while( pESh != ( pV = static_cast<SwViewShell*>(pV->GetNext()) )); } return bRet; } |