summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-10-14 20:25:12 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-15 08:00:08 +0200
commit40ab4d8fda9b69b388ac674c1ee4e88084af9519 (patch)
tree4e793d89f6e5001cd8f43ead80ffa26a5798ac4e /uui
parent9ec8bf8f22fe74884185492ef2576ce79b41e4f1 (diff)
Simplify containers iterations in unotools, unoxml, uui, vbahelper
Use range-based loop or replace with STL functions. Change-Id: I5a43f6fc62c81453dcef3820bb715f4da76915af Reviewed-on: https://gerrit.libreoffice.org/61762 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'uui')
-rw-r--r--uui/source/fltdlg.cxx6
-rw-r--r--uui/source/iahndl.cxx11
2 files changed, 4 insertions, 13 deletions
diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx
index 100f0e90bcb2..fb9516a50498 100644
--- a/uui/source/fltdlg.cxx
+++ b/uui/source/fltdlg.cxx
@@ -93,11 +93,9 @@ void FilterDialog::ChangeFilters( const FilterNameList* pFilterNames )
m_xLbFilters->clear();
if( m_pFilterNames != nullptr )
{
- for( FilterNameListPtr pItem = m_pFilterNames->begin();
- pItem != m_pFilterNames->end() ;
- ++pItem )
+ for( const auto& rItem : *m_pFilterNames )
{
- m_xLbFilters->append_text(pItem->sUI);
+ m_xLbFilters->append_text(rItem.sUI);
}
}
}
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index eca18bd79a16..7b8ee8b8afe0 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -284,15 +284,8 @@ UUIInteractionHelper::tryOtherInteractionHandler(
InteractionHandlerDataList dataList;
getInteractionHandlerList(dataList);
- InteractionHandlerDataList::const_iterator aEnd(dataList.end());
- for (InteractionHandlerDataList::const_iterator aIt(dataList.begin());
- aIt != aEnd;
- ++aIt)
- {
- if ( handleCustomRequest( rRequest, aIt->ServiceName ) )
- return true;
- }
- return false;
+ return std::any_of(dataList.cbegin(), dataList.cend(),
+ [&](const InteractionHandlerData& rData) { return handleCustomRequest( rRequest, rData.ServiceName ); });
}
namespace