Kaydet (Commit) ea297dd2 authored tarafından Noel Grandin's avatar Noel Grandin

use comphelper::containerToSequence()

Change-Id: Ic4d3bcec7bda300bca6911a7472cafafdf12f5bd
üst 2a9adf02
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <comphelper/numbers.hxx> #include <comphelper/numbers.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/listenernotification.hxx> #include <comphelper/listenernotification.hxx>
#include <comphelper/sequence.hxx>
#include <connectivity/dbtools.hxx> #include <connectivity/dbtools.hxx>
#include <connectivity/formattedcolumnvalue.hxx> #include <connectivity/formattedcolumnvalue.hxx>
#include <connectivity/dbconversion.hxx> #include <connectivity/dbconversion.hxx>
...@@ -1402,12 +1403,7 @@ namespace frm ...@@ -1402,12 +1403,7 @@ namespace frm
} }
// copy the indexes to the sequence // copy the indexes to the sequence
aSelectIndexes.realloc( aSelectionSet.size() ); aSelectIndexes = comphelper::containerToSequence<sal_Int16>( aSelectionSet );
::std::copy(
aSelectionSet.begin(),
aSelectionSet.end(),
aSelectIndexes.getArray()
);
} }
break; break;
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "cellsuno.hxx" #include "cellsuno.hxx"
#include <vector> #include <vector>
#include <basic/sberrors.hxx> #include <basic/sberrors.hxx>
#include <comphelper/sequence.hxx>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::ooo::vba; using namespace ::ooo::vba;
...@@ -115,11 +116,7 @@ ScVbaChartObjects::getChartObjectNames() throw( css::script::BasicErrorException ...@@ -115,11 +116,7 @@ ScVbaChartObjects::getChartObjectNames() throw( css::script::BasicErrorException
for (sal_Int32 n = 0; n < nChartNames; n++ ) for (sal_Int32 n = 0; n < nChartNames; n++ )
aChartNamesVector.push_back(scurchartnames[n]); aChartNamesVector.push_back(scurchartnames[n]);
} }
sChartNames.realloc( aChartNamesVector.size() ); sChartNames = comphelper::containerToSequence( aChartNamesVector );
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;
} }
catch (uno::Exception& ) catch (uno::Exception& )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment