diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-08-03 22:59:04 +0300 |
---|---|---|
committer | Arkadiy Illarionov <qarkai@gmail.com> | 2019-08-09 16:58:06 +0200 |
commit | fca94779872b8ba0b0583d0b7068f1a46beb88c5 (patch) | |
tree | c3dd200a046d3c6e54cba570f7661b9c1068ed1b /sc/source/ui/vba/vbachart.cxx | |
parent | d05eb786d408af883500404229b89ffa0d7cde16 (diff) |
Simplify Sequence iterations in sc
Use range-based loops, STL and comphelper functions
Change-Id: I047fb2e6ec9591166339b9748c5013a32185f14b
Reviewed-on: https://gerrit.libreoffice.org/76912
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'sc/source/ui/vba/vbachart.cxx')
-rw-r--r-- | sc/source/ui/vba/vbachart.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx index 9ed6ce0628dc..8534d66c30bf 100644 --- a/sc/source/ui/vba/vbachart.cxx +++ b/sc/source/ui/vba/vbachart.cxx @@ -627,11 +627,8 @@ uno::Sequence< OUString > ScVbaChart::getDefaultSeriesDescriptions( sal_Int32 _nCount ) { uno::Sequence< OUString > sDescriptions ( _nCount ); - sal_Int32 nLen = sDescriptions.getLength(); - for (sal_Int32 i = 0; i < nLen; i++) - { - sDescriptions[i] = DEFAULTSERIESPREFIX + OUString::number(i+1); - } + std::generate_n(sDescriptions.begin(), _nCount, + [i = 1]() mutable -> OUString { return DEFAULTSERIESPREFIX + OUString::number(i++); }); return sDescriptions; } |