diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-03-17 21:42:27 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-03-17 23:08:48 +0100 |
commit | 823ef9ef3238efd92895254e0f8042ff1e543bb6 (patch) | |
tree | 08d58131644869f46319b246b919a33bbf64f46e /framework/source/classes | |
parent | b9cf7da2907f759c98b801939e7c04cf0b80388f (diff) |
Use for-range loops in framework
Change-Id: I72ea832848fd7c76863bcee70a3303de488c0b0f
Reviewed-on: https://gerrit.libreoffice.org/51471
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'framework/source/classes')
-rw-r--r-- | framework/source/classes/framecontainer.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/framework/source/classes/framecontainer.cxx b/framework/source/classes/framecontainer.cxx index a8b028e57822..2e994423e89e 100644 --- a/framework/source/classes/framecontainer.cxx +++ b/framework/source/classes/framecontainer.cxx @@ -242,16 +242,16 @@ css::uno::Reference< css::frame::XFrame > FrameContainer::searchOnAllChildrens( // Step over all child frames. But if direct child isn't the right one search on his children first - before // you go to next direct child of this container! css::uno::Reference< css::frame::XFrame > xSearchedFrame; - for( TFrameContainer::const_iterator pIterator=m_aContainer.begin(); pIterator!=m_aContainer.end(); ++pIterator ) + for (auto const& container : m_aContainer) { - if ((*pIterator)->getName()==sName) + if (container->getName()==sName) { - xSearchedFrame = *pIterator; + xSearchedFrame = container; break; } else { - xSearchedFrame = (*pIterator)->findFrame( sName, css::frame::FrameSearchFlag::CHILDREN ); + xSearchedFrame = container->findFrame( sName, css::frame::FrameSearchFlag::CHILDREN ); if (xSearchedFrame.is()) break; } @@ -274,11 +274,11 @@ css::uno::Reference< css::frame::XFrame > FrameContainer::searchOnDirectChildren { SolarMutexGuard g; css::uno::Reference< css::frame::XFrame > xSearchedFrame; - for( TFrameContainer::const_iterator pIterator=m_aContainer.begin(); pIterator!=m_aContainer.end(); ++pIterator ) + for (auto const& container : m_aContainer) { - if ((*pIterator)->getName()==sName) + if (container->getName()==sName) { - xSearchedFrame = *pIterator; + xSearchedFrame = container; break; } } |