summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-03 18:01:28 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-04 01:09:52 +0100
commitf0d0c8a4d6ca0371cabca56a095f6c00bd828287 (patch)
treee6c004dec404dd124fd8dcd80291c84ef8f0ad56 /sw
parentb9e413c8192be0f962076debf41fec4544697c5b (diff)
use C++11 iteration
Change-Id: Ifc772d50d6431d9c377d00729bfa77b4359af98a
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/layact.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 7f23905d3bb2..137b42948a06 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -2147,17 +2147,16 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
// We remember the shells where the cursor is visible, so we can make
// it visible again if needed after a document change.
std::vector<bool> aBools;
- SwViewShell *pSh = pImp->GetShell();
- do
- { ++pSh->mnStartAction;
+ for(SwViewShell& rSh : pImp->GetShell()->GetRingContainer())
+ {
+ ++rSh.mnStartAction;
bool bVis = false;
- if ( pSh->ISA(SwCrsrShell) )
+ if ( rSh.ISA(SwCrsrShell) )
{
- bVis = static_cast<SwCrsrShell*>(pSh)->GetCharRect().IsOver(pSh->VisArea());
+ bVis = static_cast<SwCrsrShell*>(&rSh)->GetCharRect().IsOver(rSh.VisArea());
}
aBools.push_back( bVis );
- pSh = static_cast<SwViewShell*>(pSh->GetNext());
- } while ( pSh != pImp->GetShell() );
+ }
bool bInterrupt(false);
{