diff options
author | Kohei Yoshida <kohei@libreoffice.org> | 2019-08-27 14:05:20 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei@libreoffice.org> | 2019-08-27 23:19:27 +0200 |
commit | 5c59051deb1b1294b3a6985bc753d639bf943fae (patch) | |
tree | 7e48f2244a9c55f6d055499f6db3c92234b83551 /sc | |
parent | ae94ed1ffca7ec7fa86f3fd650dbee74db0565d6 (diff) |
Use lambda expression here instead of a function object.
Change-Id: I469cc9fa0506153e6dc4ff8fe6d5bad19c02b285
Reviewed-on: https://gerrit.libreoffice.org/78208
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/orcus/xmlcontext.cxx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/sc/source/filter/orcus/xmlcontext.cxx b/sc/source/filter/orcus/xmlcontext.cxx index 18574b0c2a1f..489878391b29 100644 --- a/sc/source/filter/orcus/xmlcontext.cxx +++ b/sc/source/filter/orcus/xmlcontext.cxx @@ -135,17 +135,6 @@ public: } }; -class InsertFieldPath -{ - orcus::orcus_xml& mrFilter; -public: - explicit InsertFieldPath(orcus::orcus_xml& rFilter) : mrFilter(rFilter) {} - void operator() (const OString& rPath) - { - mrFilter.append_field_link(rPath.getStr()); - } -}; - void loadContentFromURL(const OUString& rURL, std::string& rStrm) { ucbhelper::Content aContent( @@ -274,7 +263,12 @@ void ScOrcusXMLContextImpl::importXML(const ScOrcusImportXMLParam& rParam) OUStringToOString(aTabName, RTL_TEXTENCODING_UTF8).getStr(), rLink.maPos.Row(), rLink.maPos.Col()); - std::for_each(rLink.maFieldPaths.begin(), rLink.maFieldPaths.end(), InsertFieldPath(filter)); + std::for_each(rLink.maFieldPaths.begin(), rLink.maFieldPaths.end(), + [&filter](const OString& rFieldPath) + { + filter.append_field_link(rFieldPath.getStr()); + } + ); std::for_each(rLink.maRowGroups.begin(), rLink.maRowGroups.end(), [&filter] (const OString& rRowGroup) |