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& ) {