uno::Sequence provides now begin and end

use begin() and end() when calling std::copy on an uno::Sequence

Inspired by commit b34b648fc3262c5d9aa295f621e8fe9c97d4c6b2
"uno::Sequence provides now begin and end"

Change-Id: I08e8c3fd6144e77b95a26f85bc0daf6a9edeeb0b
Reviewed-on: https://gerrit.libreoffice.org/16057
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin 2015-06-03 15:16:19 +02:00 committed by Noel Grandin
parent a9a2375a74
commit 81610561ed
25 changed files with 42 additions and 51 deletions

View File

@ -1277,7 +1277,7 @@ namespace basctl
Sequence< OUString > aUsedNames( getObjectNames( _eType, _rLibName ) ); Sequence< OUString > aUsedNames( getObjectNames( _eType, _rLibName ) );
::std::set< OUString > aUsedNamesCheck; ::std::set< OUString > aUsedNamesCheck;
::std::copy( aUsedNames.getConstArray(), aUsedNames.getConstArray() + aUsedNames.getLength(), ::std::copy( aUsedNames.begin(), aUsedNames.end(),
::std::insert_iterator< ::std::set< OUString > >( aUsedNamesCheck, aUsedNamesCheck.begin() ) ); ::std::insert_iterator< ::std::set< OUString > >( aUsedNamesCheck, aUsedNamesCheck.begin() ) );
bool bValid = false; bool bValid = false;

View File

@ -54,9 +54,7 @@ namespace basegfx
maKeyStops(rKeyStops.getLength()), maKeyStops(rKeyStops.getLength()),
mnLastIndex(0) mnLastIndex(0)
{ {
std::copy( rKeyStops.getConstArray(), std::copy( rKeyStops.begin(), rKeyStops.end(), maKeyStops.begin() );
rKeyStops.getConstArray()+rKeyStops.getLength(),
maKeyStops.begin() );
validateInput(maKeyStops); validateInput(maKeyStops);
} }

View File

@ -522,7 +522,7 @@ DialogModel::tRolesWithRanges DialogModel::getRolesWithRanges(
{ {
Reference< data::XDataSource > xSource( xSeries, uno::UNO_QUERY_THROW ); Reference< data::XDataSource > xSource( xSeries, uno::UNO_QUERY_THROW );
const Sequence< Reference< data::XLabeledDataSequence > > aSeq( xSource->getDataSequences()); const Sequence< Reference< data::XLabeledDataSequence > > aSeq( xSource->getDataSequences());
::std::copy( aSeq.getConstArray(), aSeq.getConstArray() + aSeq.getLength(), ::std::copy( aSeq.begin(), aSeq.end(),
lcl_RolesWithRangeAppend( &aResult, aRoleOfSequenceForLabel )); lcl_RolesWithRangeAppend( &aResult, aRoleOfSequenceForLabel ));
if( xChartType.is()) if( xChartType.is())
{ {

View File

@ -69,8 +69,7 @@ template< class Container >
SequenceToSTLSequenceContainer( const ::com::sun::star::uno::Sequence< typename Container::value_type > & rSeq ) SequenceToSTLSequenceContainer( const ::com::sun::star::uno::Sequence< typename Container::value_type > & rSeq )
{ {
Container aResult( rSeq.getLength()); Container aResult( rSeq.getLength());
::std::copy( rSeq.getConstArray(), rSeq.getConstArray() + rSeq.getLength(), ::std::copy( rSeq.begin(), rSeq.end(), aResult.begin() );
aResult.begin() );
return aResult; return aResult;
} }
@ -95,7 +94,7 @@ template< class Container >
SequenceToSTLContainer( const ::com::sun::star::uno::Sequence< typename Container::value_type > & rSeq ) SequenceToSTLContainer( const ::com::sun::star::uno::Sequence< typename Container::value_type > & rSeq )
{ {
Container aResult; Container aResult;
::std::copy( rSeq.getConstArray(), rSeq.getConstArray() + rSeq.getLength(), ::std::copy( rSeq.begin(), rSeq.end(),
::std::inserter< Container >( aResult, aResult.begin())); ::std::inserter< Container >( aResult, aResult.begin()));
return aResult; return aResult;
} }

View File

@ -854,8 +854,8 @@ void ChartTypeTemplate::createChartTypes(
Sequence< Reference< XDataSeries > > aNewSeriesSeq( xDSCnt->getDataSeries()); Sequence< Reference< XDataSeries > > aNewSeriesSeq( xDSCnt->getDataSeries());
sal_Int32 nNewStartIndex = aNewSeriesSeq.getLength(); sal_Int32 nNewStartIndex = aNewSeriesSeq.getLength();
aNewSeriesSeq.realloc( nNewStartIndex + aSeriesSeq[nSeriesIdx].getLength() ); aNewSeriesSeq.realloc( nNewStartIndex + aSeriesSeq[nSeriesIdx].getLength() );
::std::copy( aSeriesSeq[nSeriesIdx].getConstArray(), ::std::copy( aSeriesSeq[nSeriesIdx].begin(),
aSeriesSeq[nSeriesIdx].getConstArray() + aSeriesSeq[nSeriesIdx].getLength(), aSeriesSeq[nSeriesIdx].end(),
aNewSeriesSeq.getArray() + nNewStartIndex ); aNewSeriesSeq.getArray() + nNewStartIndex );
xDSCnt->setDataSeries( aNewSeriesSeq ); xDSCnt->setDataSeries( aNewSeriesSeq );
} }

View File

@ -214,8 +214,8 @@ void ColumnLineChartTypeTemplate::createChartTypes(
{ {
Reference< XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW ); Reference< XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW );
Sequence< Reference< XDataSeries > > aColumnSeq( nNumberOfColumns ); Sequence< Reference< XDataSeries > > aColumnSeq( nNumberOfColumns );
::std::copy( aFlatSeriesSeq.getConstArray(), ::std::copy( aFlatSeriesSeq.begin(),
aFlatSeriesSeq.getConstArray() + nNumberOfColumns, aFlatSeriesSeq.begin() + nNumberOfColumns,
aColumnSeq.getArray()); aColumnSeq.getArray());
xDSCnt->setDataSeries( aColumnSeq ); xDSCnt->setDataSeries( aColumnSeq );
} }
@ -230,8 +230,8 @@ void ColumnLineChartTypeTemplate::createChartTypes(
{ {
Reference< XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW ); Reference< XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW );
Sequence< Reference< XDataSeries > > aLineSeq( nNumberOfLines ); Sequence< Reference< XDataSeries > > aLineSeq( nNumberOfLines );
::std::copy( aFlatSeriesSeq.getConstArray() + nNumberOfColumns, ::std::copy( aFlatSeriesSeq.begin() + nNumberOfColumns,
aFlatSeriesSeq.getConstArray() + aFlatSeriesSeq.getLength(), aFlatSeriesSeq.end(),
aLineSeq.getArray()); aLineSeq.getArray());
xDSCnt->setDataSeries( aLineSeq ); xDSCnt->setDataSeries( aLineSeq );
} }

View File

@ -74,8 +74,8 @@ InterpretedData SAL_CALL ColumnLineDataInterpreter::interpretDataSource(
Sequence< Reference< XDataSeries > > & rColumnDataSeries = aResult.Series[0]; Sequence< Reference< XDataSeries > > & rColumnDataSeries = aResult.Series[0];
Sequence< Reference< XDataSeries > > & rLineDataSeries = aResult.Series[1]; Sequence< Reference< XDataSeries > > & rLineDataSeries = aResult.Series[1];
rLineDataSeries.realloc( nNumOfLines ); rLineDataSeries.realloc( nNumOfLines );
::std::copy( rColumnDataSeries.getConstArray() + nNumberOfSeries - nNumOfLines, ::std::copy( rColumnDataSeries.begin() + nNumberOfSeries - nNumOfLines,
rColumnDataSeries.getConstArray() + nNumberOfSeries, rColumnDataSeries.begin() + nNumberOfSeries,
rLineDataSeries.getArray() ); rLineDataSeries.getArray() );
rColumnDataSeries.realloc( nNumberOfSeries - nNumOfLines ); rColumnDataSeries.realloc( nNumberOfSeries - nNumOfLines );
} }

View File

@ -248,7 +248,7 @@ getAllDataSequences( const uno::Sequence<uno::Reference<chart2::XDataSeries> >&
if( xSource.is()) if( xSource.is())
{ {
Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeq( xSource->getDataSequences()); Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeq( xSource->getDataSequences());
::std::copy( aSeq.getConstArray(), aSeq.getConstArray() + aSeq.getLength(), ::std::copy( aSeq.begin(), aSeq.end(),
::std::back_inserter( aSeqVec )); ::std::back_inserter( aSeqVec ));
} }
} }

View File

@ -320,7 +320,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
if( !xDataSource.is() ) if( !xDataSource.is() )
continue; continue;
uno::Sequence< uno::Reference< data::XLabeledDataSequence > > aDataSequences( xDataSource->getDataSequences() ); uno::Sequence< uno::Reference< data::XLabeledDataSequence > > aDataSequences( xDataSource->getDataSequences() );
::std::copy( aDataSequences.getConstArray(), aDataSequences.getConstArray() + aDataSequences.getLength(), ::std::copy( aDataSequences.begin(), aDataSequences.end(),
::std::back_inserter( aResult )); ::std::back_inserter( aResult ));
} }
@ -346,7 +346,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
if( !xDataSource.is() ) if( !xDataSource.is() )
continue; continue;
uno::Sequence< uno::Reference< data::XLabeledDataSequence > > aDataSequences( xDataSource->getDataSequences() ); uno::Sequence< uno::Reference< data::XLabeledDataSequence > > aDataSequences( xDataSource->getDataSequences() );
::std::copy( aDataSequences.getConstArray(), aDataSequences.getConstArray() + aDataSequences.getLength(), ::std::copy( aDataSequences.begin(), aDataSequences.end(),
::std::back_inserter( aResult )); ::std::back_inserter( aResult ));
} }

View File

@ -714,7 +714,7 @@ uno::Reference< XChartType > DiagramHelper::getChartTypeOfSeries(
{ {
Reference< XDataSeriesContainer > xDSCnt( aChartTypeSeq[j], uno::UNO_QUERY_THROW ); Reference< XDataSeriesContainer > xDSCnt( aChartTypeSeq[j], uno::UNO_QUERY_THROW );
Sequence< Reference< XDataSeries > > aSeriesSeq( xDSCnt->getDataSeries() ); Sequence< Reference< XDataSeries > > aSeriesSeq( xDSCnt->getDataSeries() );
::std::copy( aSeriesSeq.getConstArray(), aSeriesSeq.getConstArray() + aSeriesSeq.getLength(), ::std::copy( aSeriesSeq.begin(), aSeriesSeq.end(),
::std::back_inserter( aResult )); ::std::back_inserter( aResult ));
} }
} }
@ -1226,9 +1226,8 @@ Sequence< Reference< XChartType > >
{ {
Reference< XChartTypeContainer > xCTCnt( aCooSysSeq[i], uno::UNO_QUERY_THROW ); Reference< XChartTypeContainer > xCTCnt( aCooSysSeq[i], uno::UNO_QUERY_THROW );
Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes()); Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes());
::std::copy( aChartTypeSeq.getConstArray(), ::std::copy( aChartTypeSeq.begin(), aChartTypeSeq.end(),
aChartTypeSeq.getConstArray() + aChartTypeSeq.getLength(), ::std::back_inserter( aResult ));
::std::back_inserter( aResult ));
} }
} }
catch( const uno::Exception & ex ) catch( const uno::Exception & ex )

View File

@ -388,7 +388,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CreateEmbedde
uno::Sequence< beans::PropertyValue > aObjDescr( rArgs.getLength() + 1 ); uno::Sequence< beans::PropertyValue > aObjDescr( rArgs.getLength() + 1 );
aObjDescr[0].Name = "Parent"; aObjDescr[0].Name = "Parent";
aObjDescr[0].Value <<= pImpl->m_xModel.get(); aObjDescr[0].Value <<= pImpl->m_xModel.get();
::std::copy( rArgs.getConstArray(), rArgs.getConstArray() + rArgs.getLength(), aObjDescr.getArray() + 1 ); ::std::copy( rArgs.begin(), rArgs.end(), aObjDescr.getArray() + 1 );
xObj = uno::Reference < embed::XEmbeddedObject >( xFactory->createInstanceInitNew( xObj = uno::Reference < embed::XEmbeddedObject >( xFactory->createInstanceInitNew(
rClassId, OUString(), pImpl->mxStorage, rNewName, rClassId, OUString(), pImpl->mxStorage, rNewName,
aObjDescr ), uno::UNO_QUERY ); aObjDescr ), uno::UNO_QUERY );

View File

@ -391,7 +391,7 @@ namespace
void lcl_copyTypes( TypeBag& _out_rTypes, const Sequence< Type >& _rTypes ) void lcl_copyTypes( TypeBag& _out_rTypes, const Sequence< Type >& _rTypes )
{ {
::std::copy( _rTypes.getConstArray(), _rTypes.getConstArray() + _rTypes.getLength(), ::std::copy( _rTypes.begin(), _rTypes.end(),
::std::insert_iterator< TypeBag >( _out_rTypes, _out_rTypes.begin() ) ); ::std::insert_iterator< TypeBag >( _out_rTypes, _out_rTypes.begin() ) );
} }
} }

View File

@ -308,9 +308,7 @@ namespace pcr
{ {
Sequence< OUString > aModelNames = xForms->getElementNames(); Sequence< OUString > aModelNames = xForms->getElementNames();
_rModelNames.resize( aModelNames.getLength() ); _rModelNames.resize( aModelNames.getLength() );
::std::copy( aModelNames.getConstArray(), aModelNames.getConstArray() + aModelNames.getLength(), ::std::copy( aModelNames.begin(), aModelNames.end(), _rModelNames.begin() );
_rModelNames.begin()
);
} }
} }
catch( const Exception& ) catch( const Exception& )
@ -335,7 +333,7 @@ namespace pcr
{ {
Sequence< OUString > aNames = xBindings->getElementNames(); Sequence< OUString > aNames = xBindings->getElementNames();
_rBindingNames.resize( aNames.getLength() ); _rBindingNames.resize( aNames.getLength() );
::std::copy( aNames.getConstArray(), aNames.getConstArray() + aNames.getLength(), _rBindingNames.begin() ); ::std::copy( aNames.begin(), aNames.end(), _rBindingNames.begin() );
} }
} }
} }

View File

@ -304,8 +304,8 @@ namespace pcr
Sequence< Type > aListeners( xIntrospectionAccess->getSupportedListeners() ); Sequence< Type > aListeners( xIntrospectionAccess->getSupportedListeners() );
::std::copy( aListeners.getConstArray(), aListeners.getConstArray() + aListeners.getLength(), ::std::copy( aListeners.begin(), aListeners.end(),
::std::insert_iterator< TypeBag >( _out_rTypes, _out_rTypes.begin() ) ); ::std::insert_iterator< TypeBag >( _out_rTypes, _out_rTypes.begin() ) );
} }
bool operator ==( const ScriptEventDescriptor& _lhs, const ScriptEventDescriptor& _rhs ) bool operator ==( const ScriptEventDescriptor& _lhs, const ScriptEventDescriptor& _rhs )

View File

@ -1365,8 +1365,7 @@ namespace pcr
Reference< XDatabaseContext > xDatabaseContext = sdb::DatabaseContext::create( m_xContext ); Reference< XDatabaseContext > xDatabaseContext = sdb::DatabaseContext::create( m_xContext );
Sequence< OUString > aDatasources = xDatabaseContext->getElementNames(); Sequence< OUString > aDatasources = xDatabaseContext->getElementNames();
aListEntries.resize( aDatasources.getLength() ); aListEntries.resize( aDatasources.getLength() );
::std::copy( aDatasources.getConstArray(), aDatasources.getConstArray() + aDatasources.getLength(), ::std::copy( aDatasources.begin(), aDatasources.end(), aListEntries.begin() );
aListEntries.begin() );
aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl(
_rxControlFactory, aListEntries, false, true ); _rxControlFactory, aListEntries, false, true );
} }

View File

@ -59,8 +59,8 @@ namespace pcr
template < class BagType > template < class BagType >
void putIntoBag( const Sequence< typename BagType::value_type >& _rArray, BagType& /* [out] */ _rBag ) void putIntoBag( const Sequence< typename BagType::value_type >& _rArray, BagType& /* [out] */ _rBag )
{ {
::std::copy( _rArray.getConstArray(), _rArray.getConstArray() + _rArray.getLength(), ::std::copy( _rArray.begin(), _rArray.end(),
::std::insert_iterator< BagType >( _rBag, _rBag.begin() ) ); ::std::insert_iterator< BagType >( _rBag, _rBag.begin() ) );
} }

View File

@ -86,7 +86,7 @@ namespace pcr
aElements = xRepository->getElementNames(); aElements = xRepository->getElementNames();
_rNames.resize( aElements.getLength() ); _rNames.resize( aElements.getLength() );
::std::copy( aElements.getConstArray(), aElements.getConstArray() + aElements.getLength(), _rNames.begin() ); ::std::copy( aElements.begin(), aElements.end(), _rNames.begin() );
} }
catch( const Exception& ) catch( const Exception& )
{ {

View File

@ -3449,7 +3449,7 @@ void AutoRecovery::implts_openOneDoc(const OUString& sURL ,
// re-create all the views // re-create all the views
::std::vector< OUString > aViewsToRestore( rInfo.ViewNames.getLength() ); ::std::vector< OUString > aViewsToRestore( rInfo.ViewNames.getLength() );
if ( rInfo.ViewNames.getLength() ) if ( rInfo.ViewNames.getLength() )
::std::copy( rInfo.ViewNames.getConstArray(), rInfo.ViewNames.getConstArray() + rInfo.ViewNames.getLength(), aViewsToRestore.begin() ); ::std::copy( rInfo.ViewNames.begin(), rInfo.ViewNames.end(), aViewsToRestore.begin() );
// if we don't have views for whatever reason, then create a default-view, at least // if we don't have views for whatever reason, then create a default-view, at least
if ( aViewsToRestore.empty() ) if ( aViewsToRestore.empty() )
aViewsToRestore.push_back( OUString() ); aViewsToRestore.push_back( OUString() );

View File

@ -208,8 +208,7 @@ void CmdImageList::impl_fillCommandToImageNameMap()
m_aImageCommandNameVector.resize(aCmdImageSeq.getLength() ); m_aImageCommandNameVector.resize(aCmdImageSeq.getLength() );
m_aImageNameVector.resize( aCmdImageSeq.getLength() ); m_aImageNameVector.resize( aCmdImageSeq.getLength() );
::std::copy( aCmdImageSeq.getConstArray(), ::std::copy( aCmdImageSeq.begin(), aCmdImageSeq.end(),
aCmdImageSeq.getConstArray()+aCmdImageSeq.getLength(),
m_aImageCommandNameVector.begin() ); m_aImageCommandNameVector.begin() );
// Create a image name vector that must be provided to the vcl imagelist. We also need // Create a image name vector that must be provided to the vcl imagelist. We also need

View File

@ -256,7 +256,7 @@ namespace comphelper
template < typename DstType, typename SrcType > template < typename DstType, typename SrcType >
inline DstType* sequenceToArray( DstType* io_pArray, const ::com::sun::star::uno::Sequence< SrcType >& i_Sequence ) inline DstType* sequenceToArray( DstType* io_pArray, const ::com::sun::star::uno::Sequence< SrcType >& i_Sequence )
{ {
::std::copy( i_Sequence.getConstArray(), i_Sequence.getConstArray()+i_Sequence.getLength(), io_pArray ); ::std::copy( i_Sequence.begin(), i_Sequence.end(), io_pArray );
return io_pArray; return io_pArray;
} }
@ -327,7 +327,7 @@ namespace comphelper
inline DstType sequenceToContainer( const ::com::sun::star::uno::Sequence< SrcType >& i_Sequence ) inline DstType sequenceToContainer( const ::com::sun::star::uno::Sequence< SrcType >& i_Sequence )
{ {
DstType result( i_Sequence.getLength() ); DstType result( i_Sequence.getLength() );
::std::copy( i_Sequence.getConstArray(), i_Sequence.getConstArray()+i_Sequence.getLength(), result.begin() ); ::std::copy( i_Sequence.begin(), i_Sequence.end(), result.begin() );
return result; return result;
} }
@ -365,7 +365,7 @@ namespace comphelper
inline DstType& sequenceToContainer( DstType& o_Output, const ::com::sun::star::uno::Sequence< SrcType >& i_Sequence ) inline DstType& sequenceToContainer( DstType& o_Output, const ::com::sun::star::uno::Sequence< SrcType >& i_Sequence )
{ {
o_Output.resize( i_Sequence.getLength() ); o_Output.resize( i_Sequence.getLength() );
::std::copy( i_Sequence.getConstArray(), i_Sequence.getConstArray()+i_Sequence.getLength(), o_Output.begin() ); ::std::copy( i_Sequence.begin(), i_Sequence.end(), o_Output.begin() );
return o_Output; return o_Output;
} }

View File

@ -4042,7 +4042,7 @@ void SAL_CALL FormController::invalidateFeatures( const Sequence< ::sal_Int16 >&
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
// for now, just copy the ids of the features, because .... // for now, just copy the ids of the features, because ....
::std::copy( _Features.getConstArray(), _Features.getConstArray() + _Features.getLength(), ::std::copy( _Features.begin(), _Features.end(),
::std::insert_iterator< ::std::set< sal_Int16 > >( m_aInvalidFeatures, m_aInvalidFeatures.begin() ) ::std::insert_iterator< ::std::set< sal_Int16 > >( m_aInvalidFeatures, m_aInvalidFeatures.begin() )
); );

View File

@ -246,8 +246,8 @@ namespace toolkitform
static const char FM_PROP_STRINGITEMLIST[] = "StringItemList"; static const char FM_PROP_STRINGITEMLIST[] = "StringItemList";
Sequence< OUString > aListEntries; Sequence< OUString > aListEntries;
OSL_VERIFY( _rxModel->getPropertyValue( FM_PROP_STRINGITEMLIST ) >>= aListEntries ); OSL_VERIFY( _rxModel->getPropertyValue( FM_PROP_STRINGITEMLIST ) >>= aListEntries );
::std::copy( aListEntries.getConstArray(), aListEntries.getConstArray() + aListEntries.getLength(), ::std::copy( aListEntries.begin(), aListEntries.end(),
::std::back_insert_iterator< ::std::vector< OUString > >( _rVector ) ); ::std::back_insert_iterator< ::std::vector< OUString > >( _rVector ) );
} }
} }

View File

@ -308,7 +308,7 @@ template< typename T >
void lcl_SequenceToVectorAppend( const Sequence< T > & rSource, ::std::vector< T > & rDestination ) void lcl_SequenceToVectorAppend( const Sequence< T > & rSource, ::std::vector< T > & rDestination )
{ {
rDestination.reserve( rDestination.size() + rSource.getLength()); rDestination.reserve( rDestination.size() + rSource.getLength());
::std::copy( rSource.getConstArray(), rSource.getConstArray() + rSource.getLength(), ::std::copy( rSource.begin(), rSource.end(),
::std::back_inserter( rDestination )); ::std::back_inserter( rDestination ));
} }
@ -664,8 +664,8 @@ uno::Sequence< OUString > lcl_DataSequenceToStringSequence(
} }
} }
::std::copy( aValuesSequence.getConstArray(), aValuesSequence.getConstArray() + aValuesSequence.getLength(), ::std::copy( aValuesSequence.begin(), aValuesSequence.end(),
::std::back_inserter( aResult )); ::std::back_inserter( aResult ));
return aResult; return aResult;
} }

View File

@ -54,7 +54,7 @@ using ::com::sun::star::uno::Sequence;
{ {
Reference< chart2::XDataSeriesContainer > xDSCnt( aChartTypeSeq[j], uno::UNO_QUERY_THROW ); Reference< chart2::XDataSeriesContainer > xDSCnt( aChartTypeSeq[j], uno::UNO_QUERY_THROW );
Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xDSCnt->getDataSeries() ); Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xDSCnt->getDataSeries() );
::std::copy( aSeriesSeq.getConstArray(), aSeriesSeq.getConstArray() + aSeriesSeq.getLength(), ::std::copy( aSeriesSeq.begin(), aSeriesSeq.end(),
::std::back_inserter( aResult )); ::std::back_inserter( aResult ));
} }
} }

View File

@ -205,8 +205,7 @@ template< typename T >
::std::vector< T > lcl_SequenceToVector( const uno::Sequence< T > & rSequence ) ::std::vector< T > lcl_SequenceToVector( const uno::Sequence< T > & rSequence )
{ {
::std::vector< T > aResult( rSequence.getLength()); ::std::vector< T > aResult( rSequence.getLength());
::std::copy( rSequence.getConstArray(), rSequence.getConstArray() + rSequence.getLength(), ::std::copy( rSequence.begin(), rSequence.end(), aResult.begin());
aResult.begin());
return aResult; return aResult;
} }