diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-04 15:53:03 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-04 17:46:20 +0100 |
commit | f5a42cf7afa2d5a1899f1c0d7c7093820703fba4 (patch) | |
tree | af87e33ef8e445aa65fd09a5a3ccb1677e1d0583 /sw | |
parent | 359ebc27849e570d14f805bd676a0af5fd03df5c (diff) |
use C++11 iteration
Change-Id: Icc47b1ead273ee02e85c35cb7ab0e06b48cc42c2
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/DocumentTimerManager.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx index 0c8bff2dcfb9..0e90c8c6e2a9 100644 --- a/sw/source/core/doc/DocumentTimerManager.cxx +++ b/sw/source/core/doc/DocumentTimerManager.cxx @@ -89,20 +89,19 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer *, pTimer ) if( pTmpRoot && !SfxProgress::GetActiveProgress( m_rDoc.GetDocShell() ) ) { - SwViewShell *pSh, *pStartSh; - pSh = pStartSh = m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell(); - do { - if( pSh->ActionPend() ) + SwViewShell* pShell(m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell()); + for(SwViewShell& rSh : pShell->GetRingContainer()) + { + if( rSh.ActionPend() ) { pTimer->Start(); return 0; } - pSh = static_cast<SwViewShell*>(pSh->GetNext()); - } while( pSh != pStartSh ); + } if( pTmpRoot->IsNeedGrammarCheck() ) { - bool bIsOnlineSpell = pSh->GetViewOptions()->IsOnlineSpell(); + bool bIsOnlineSpell = pShell->GetViewOptions()->IsOnlineSpell(); bool bIsAutoGrammar = false; SvtLinguConfig().GetProperty( OUString( UPN_IS_GRAMMAR_AUTO ) ) >>= bIsAutoGrammar; @@ -145,8 +144,8 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer *, pTimer ) pTmpRoot->StartAllAction(); // no jump on update of fields #i85168# - const bool bOldLockView = pStartSh->IsViewLocked(); - pStartSh->LockView( true ); + const bool bOldLockView = pShell->IsViewLocked(); + pShell->LockView( true ); m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_CHAPTERFLD )->ModifyNotification( 0, 0 ); // ChapterField m_rDoc.getIDocumentFieldsAccess().UpdateExpFlds( 0, false ); // Updates ExpressionFields @@ -155,7 +154,7 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer *, pTimer ) pTmpRoot->EndAllAction(); - pStartSh->LockView( bOldLockView ); + pShell->LockView( bOldLockView ); m_rDoc.getIDocumentFieldsAccess().GetUpdtFlds().SetInUpdateFlds( false ); m_rDoc.getIDocumentFieldsAccess().GetUpdtFlds().SetFieldsDirty( false ); |