From ea297dd2020c03673745428381e8a2b11b83f23b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 3 Dec 2015 11:27:37 +0200 Subject: [PATCH] use comphelper::containerToSequence() Change-Id: Ic4d3bcec7bda300bca6911a7472cafafdf12f5bd --- forms/source/component/ListBox.cxx | 8 ++------ sc/source/ui/vba/vbachartobjects.cxx | 7 ++----- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index a777b255cf41..af6a40ed127e 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -1402,12 +1403,7 @@ namespace frm } // copy the indexes to the sequence - aSelectIndexes.realloc( aSelectionSet.size() ); - ::std::copy( - aSelectionSet.begin(), - aSelectionSet.end(), - aSelectIndexes.getArray() - ); + aSelectIndexes = comphelper::containerToSequence( aSelectionSet ); } break; diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index 0a9435d331ed..abff0fa7edec 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -30,6 +30,7 @@ #include "cellsuno.hxx" #include #include +#include using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -115,11 +116,7 @@ ScVbaChartObjects::getChartObjectNames() throw( css::script::BasicErrorException for (sal_Int32 n = 0; n < nChartNames; n++ ) aChartNamesVector.push_back(scurchartnames[n]); } - sChartNames.realloc( aChartNamesVector.size() ); - std::vector< OUString > ::const_iterator it = aChartNamesVector.begin(); - std::vector< OUString > ::const_iterator it_end = aChartNamesVector.end(); - for ( sal_Int32 index = 0 ; it != it_end; ++it, ++index ) - sChartNames[index] = *it; + sChartNames = comphelper::containerToSequence( aChartNamesVector ); } catch (uno::Exception& ) {