From 0717643f4b061b8fd6bd59dcbdbbaf8c98c4a4dd Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 23 Jan 2015 22:58:28 +0100 Subject: do not use manual iteration Change-Id: Iab5017259e17bbccabdbe7ed660f6235f1301c1e --- sw/source/core/doc/DocumentDeviceManager.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx index 53be5dcc913f..74e73468d010 100644 --- a/sw/source/core/doc/DocumentDeviceManager.cxx +++ b/sw/source/core/doc/DocumentDeviceManager.cxx @@ -335,12 +335,8 @@ void DocumentDeviceManager::PrtDataChanged() std::set aAllLayouts = m_rDoc.GetAllLayouts(); std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::InvalidateAllCntnt), INV_SIZE)); - do - { - pSh->InitPrt( getPrinter(false) ); - pSh = static_cast(pSh->GetNext()); - } - while ( pSh != m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() ); + for(SwViewShell& rShell : pSh->GetRingContainer()) + rShell.InitPrt(getPrinter(false)); } } if ( bDraw && m_rDoc.getIDocumentDrawModelAccess().GetDrawModel() ) -- cgit