diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-03 17:57:14 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-04 01:09:51 +0100 |
commit | b9e413c8192be0f962076debf41fec4544697c5b (patch) | |
tree | 403940690cf54bca2277aaa1416a5b87efa79324 | |
parent | 42981b6d8ada48ce9f7144f23f5aa5751cc02664 (diff) |
use C++11 iteration
Change-Id: I104af918584aa49491787536f03ba734acb942bd
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 611865608172..30875f2a9c09 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -856,11 +856,10 @@ SwCntntNotify::~SwCntntNotify() SwFlyFrm *pFly = pCnt->FindFlyFrm(); svt::EmbeddedObjectRef& xObj = pNd->GetOLEObj().GetObject(); SwFEShell *pFESh = 0; - SwViewShell *pTmp = pSh; - do - { if ( pTmp->ISA( SwCrsrShell ) ) + for(SwViewShell& rCurrentShell : pSh->GetRingContainer()) + { if ( rCurrentShell.ISA( SwCrsrShell ) ) { - pFESh = static_cast<SwFEShell*>(pTmp); + pFESh = static_cast<SwFEShell*>(&rCurrentShell); // #108369#: Here used to be the condition if (!bFirst). // I think this should mean "do not call CalcAndSetScale" // if the frame is formatted for the first time. @@ -882,8 +881,7 @@ SwCntntNotify::~SwCntntNotify() &pFly->Prt(), &pFly->Frm(), bNoTxtFrmPrtAreaChanged ); } - pTmp = static_cast<SwViewShell*>(pTmp->GetNext()); - } while ( pTmp != pSh ); + } if ( pFESh && pNd->IsOLESizeInvalid() ) { |