diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-12-22 19:54:56 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-25 18:36:29 +0100 |
commit | 48b35ed43db87d21a943e66cfa4f59213dcfe3a1 (patch) | |
tree | 1352839eee90888fa987baec1887b4d3f5414cc5 /sc/source/ui/xmlsource | |
parent | 68259f3663ba61a5f15f04793ac32a200100a8a5 (diff) |
Simplify containers iterations in sc/source/ui/{view,xmlsource}
Use range-based loop or replace with STL functions
Change-Id: I5604325cd25c099d3b5580956417620f298faa1e
Reviewed-on: https://gerrit.libreoffice.org/65572
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/xmlsource')
-rw-r--r-- | sc/source/ui/xmlsource/xmlsourcedlg.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index b87765d0afd8..5a83b66c4aae 100644 --- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx +++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx @@ -558,10 +558,9 @@ void ScXMLSourceDlg::OkPressed() // Convert single cell links. { - std::set<const SvTreeListEntry*>::const_iterator it = maCellLinks.begin(), itEnd = maCellLinks.end(); - for (; it != itEnd; ++it) + for (const SvTreeListEntry* pCellLink : maCellLinks) { - const SvTreeListEntry& rEntry = **it; + const SvTreeListEntry& rEntry = *pCellLink; OUString aPath = getXPath(*mpLbTree, rEntry, aParam.maNamespaces); const ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(rEntry); @@ -573,10 +572,9 @@ void ScXMLSourceDlg::OkPressed() // Convert range links. For now, an element with range link takes all its // child elements as its fields. { - std::set<const SvTreeListEntry*>::const_iterator it = maRangeLinks.begin(), itEnd = maRangeLinks.end(); - for (; it != itEnd; ++it) + for (const SvTreeListEntry* pRangeLink : maRangeLinks) { - const SvTreeListEntry& rEntry = **it; + const SvTreeListEntry& rEntry = *pRangeLink; const ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(rEntry); ScOrcusImportXMLParam::RangeLink aRangeLink; |