summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-12-03 11:27:37 +0200
committerNoel Grandin <noel@peralex.com>2015-12-03 13:57:23 +0200
commitea297dd2020c03673745428381e8a2b11b83f23b (patch)
tree9034b05687a03d22c50b65f783e4f8cb428f47c6
parent2a9adf0288048fdaad21a1d0ab32e1e86e9577ac (diff)
use comphelper::containerToSequence()
Change-Id: Ic4d3bcec7bda300bca6911a7472cafafdf12f5bd
-rw-r--r--forms/source/component/ListBox.cxx8
-rw-r--r--sc/source/ui/vba/vbachartobjects.cxx7
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 <comphelper/numbers.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/listenernotification.hxx>
+#include <comphelper/sequence.hxx>
#include <connectivity/dbtools.hxx>
#include <connectivity/formattedcolumnvalue.hxx>
#include <connectivity/dbconversion.hxx>
@@ -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<sal_Int16>( 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 <vector>
#include <basic/sberrors.hxx>
+#include <comphelper/sequence.hxx>
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& )
{