summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-03 16:32:24 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-04 01:09:36 +0100
commite6678eba1c3d768d4cc468721ee865814d13cb4f (patch)
tree62115f0a0a8870937da48871059cadc43f9eeb81
parentf97c68cdbe3f086a73e1523ae5a7742be6184dfa (diff)
use C++11 iteration
Change-Id: I780df3b23e6ee9ad61dcd57472d0efb37d640d15
-rw-r--r--sw/source/core/crsr/trvltbl.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index aa4a78da20b9..2eabdde5c5bd 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -882,13 +882,13 @@ void SwCrsrShell::ClearTblBoxCntnt()
bool SwCrsrShell::EndAllTblBoxEdit()
{
bool bRet = false;
- SwViewShell *pSh = this;
- do {
- if( pSh->IsA( TYPE( SwCrsrShell ) ) )
- bRet |= static_cast<SwCrsrShell*>(pSh)->CheckTblBoxCntnt(
- static_cast<SwCrsrShell*>(pSh)->m_pCurCrsr->GetPoint() );
+ for(SwViewShell& rSh : GetRingContainer())
+ {
+ if( rSh.IsA( TYPE( SwCrsrShell ) ) )
+ bRet |= static_cast<SwCrsrShell*>(&rSh)->CheckTblBoxCntnt(
+ static_cast<SwCrsrShell*>(&rSh)->m_pCurCrsr->GetPoint() );
- } while( this != (pSh = static_cast<SwViewShell *>(pSh->GetNext())) );
+ }
return bRet;
}