Kaydet (Commit) 07c7c88b authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

do not use manual iteration

Change-Id: Icc19ac8ea555f1b7b553e03596b936f38781a932
üst 0717643f
......@@ -49,24 +49,19 @@ namespace
{
if (!m_pViewShell)
return;
SwViewShell *pSh = m_pViewShell;
do
for(SwViewShell& rShell : m_pViewShell->GetRingContainer())
{
if (!pSh->IsViewLocked())
if(rShell.IsViewLocked())
{
m_aViewWasUnLocked.push_back(pSh);
pSh->LockView(true);
m_aViewWasUnLocked.push_back(&rShell);
rShell.LockView(true);
}
pSh = static_cast<SwViewShell*>(pSh->GetNext());
} while (pSh != m_pViewShell);
}
}
~LockAllViews()
{
for (std::vector<SwViewShell*>::iterator aI = m_aViewWasUnLocked.begin(); aI != m_aViewWasUnLocked.end(); ++aI)
{
SwViewShell *pSh = *aI;
pSh->LockView(false);
}
for(SwViewShell* pShell : m_aViewWasUnLocked)
pShell->LockView(false);
}
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment