summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-01-23 22:58:28 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-01-23 23:15:15 +0100
commit0717643f4b061b8fd6bd59dcbdbbaf8c98c4a4dd (patch)
tree49e0de6eef0795e5af7698780e11cc3257d01cb4
parent25df0625880f40dc9f9c2fe5242feb5b7c9db09d (diff)
do not use manual iteration
Change-Id: Iab5017259e17bbccabdbe7ed660f6235f1301c1e
-rw-r--r--sw/source/core/doc/DocumentDeviceManager.cxx8
1 files 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<SwRootFrm*> 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<SwViewShell*>(pSh->GetNext());
- }
- while ( pSh != m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() );
+ for(SwViewShell& rShell : pSh->GetRingContainer())
+ rShell.InitPrt(getPrinter(false));
}
}
if ( bDraw && m_rDoc.getIDocumentDrawModelAccess().GetDrawModel() )