From 81610561edfb8c899a062cc09fc1a80e8098577f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 3 Jun 2015 15:16:19 +0200 Subject: 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 Tested-by: Noel Grandin --- xmloff/source/chart/SchXMLExport.cxx | 6 +++--- xmloff/source/chart/SchXMLSeriesHelper.cxx | 2 +- xmloff/source/chart/SchXMLTableContext.cxx | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 07a83724ca43..131a368b2eb1 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -308,7 +308,7 @@ template< typename T > void lcl_SequenceToVectorAppend( const Sequence< T > & rSource, ::std::vector< T > & rDestination ) { rDestination.reserve( rDestination.size() + rSource.getLength()); - ::std::copy( rSource.getConstArray(), rSource.getConstArray() + rSource.getLength(), + ::std::copy( rSource.begin(), rSource.end(), ::std::back_inserter( rDestination )); } @@ -664,8 +664,8 @@ uno::Sequence< OUString > lcl_DataSequenceToStringSequence( } } - ::std::copy( aValuesSequence.getConstArray(), aValuesSequence.getConstArray() + aValuesSequence.getLength(), - ::std::back_inserter( aResult )); + ::std::copy( aValuesSequence.begin(), aValuesSequence.end(), + ::std::back_inserter( aResult )); return aResult; } diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx index 3666e01d7464..610a69ab04c2 100644 --- a/xmloff/source/chart/SchXMLSeriesHelper.cxx +++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx @@ -54,7 +54,7 @@ using ::com::sun::star::uno::Sequence; { Reference< chart2::XDataSeriesContainer > xDSCnt( aChartTypeSeq[j], uno::UNO_QUERY_THROW ); 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 )); } } diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index d129944c297c..4f460f9c71e8 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -205,8 +205,7 @@ template< typename T > ::std::vector< T > lcl_SequenceToVector( const uno::Sequence< T > & rSequence ) { ::std::vector< T > aResult( rSequence.getLength()); - ::std::copy( rSequence.getConstArray(), rSequence.getConstArray() + rSequence.getLength(), - aResult.begin()); + ::std::copy( rSequence.begin(), rSequence.end(), aResult.begin()); return aResult; } -- cgit