summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/sdrpaintwindow.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-11-18 13:43:28 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-18 17:36:54 +0100
commit587ef41f75b8ea0bcd03366178d42a324dcf481c (patch)
treea672c557221d4fec8abbaf83568ed9e7242323a5 /svx/source/svdraw/sdrpaintwindow.cxx
parent8b83659bb8f3368a1df949d5bc84d7b2dd0370b4 (diff)
Simplify containers iterations in svx/source/[s-u]*
Use range-based loop or replace with STL functions Change-Id: I2ec3e58cc46c9286ef863c732912ca7a729bab62 Reviewed-on: https://gerrit.libreoffice.org/63522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/sdrpaintwindow.cxx')
-rw-r--r--svx/source/svdraw/sdrpaintwindow.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index 0eb8e5c0db29..e6ee0bf0f289 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -53,9 +53,8 @@ IMPL_LINK(CandidateMgr, WindowEventListener, VclWindowEvent&, rEvent, void)
CandidateMgr::~CandidateMgr()
{
- for (auto aI = m_aCandidates.begin(); aI != m_aCandidates.end(); ++aI)
+ for (VclPtr<vcl::Window>& pCandidate : m_aCandidates)
{
- VclPtr<vcl::Window> pCandidate = *aI;
if (m_aDeletedCandidates.find(pCandidate) != m_aDeletedCandidates.end())
continue;
pCandidate->RemoveEventListener(LINK(this, CandidateMgr, WindowEventListener));
@@ -91,9 +90,9 @@ void CandidateMgr::PaintTransparentChildren(vcl::Window const & rWindow, tools::
pCandidate = pCandidate->GetWindow( GetWindowType::Next );
}
- for (auto aI = m_aCandidates.begin(); aI != m_aCandidates.end(); ++aI)
+ for (const auto& rpCandidate : m_aCandidates)
{
- pCandidate = aI->get();
+ pCandidate = rpCandidate.get();
if (m_aDeletedCandidates.find(pCandidate) != m_aDeletedCandidates.end())
continue;
//rhbz#1007697 this can cause the window itself to be
@@ -153,11 +152,11 @@ void SdrPreRenderDevice::OutputPreRenderDevice(const vcl::Region& rExpandedRegio
RectangleVector aRectangles;
aRegionPixel.GetRegionRectangles(aRectangles);
- for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
+ for(const auto& rRect : aRectangles)
{
// for each rectangle, copy the area
- const Point aTopLeft(aRectIter->TopLeft());
- const Size aSize(aRectIter->GetSize());
+ const Point aTopLeft(rRect.TopLeft());
+ const Size aSize(rRect.GetSize());
mpOutputDevice->DrawOutDev(
aTopLeft, aSize,
@@ -177,7 +176,7 @@ void SdrPreRenderDevice::OutputPreRenderDevice(const vcl::Region& rExpandedRegio
mpOutputDevice->SetLineColor(aColor);
mpOutputDevice->SetFillColor();
- mpOutputDevice->DrawRect(*aRectIter);
+ mpOutputDevice->DrawRect(rRect);
}
#endif
}