diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-03 15:16:19 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-06-04 06:35:44 +0000 |
commit | 81610561edfb8c899a062cc09fc1a80e8098577f (patch) | |
tree | cdb746528f25a7d40c51be4b9cd324ceb55035b6 /chart2/source/tools | |
parent | a9a2375a744368415a7ea4c563c8e4776a6ec059 (diff) |
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>
Diffstat (limited to 'chart2/source/tools')
-rw-r--r-- | chart2/source/tools/DataSeriesHelper.cxx | 2 | ||||
-rw-r--r-- | chart2/source/tools/DataSourceHelper.cxx | 4 | ||||
-rw-r--r-- | chart2/source/tools/DiagramHelper.cxx | 7 |
3 files changed, 6 insertions, 7 deletions
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx index 44debefa9255..43291616b047 100644 --- a/chart2/source/tools/DataSeriesHelper.cxx +++ b/chart2/source/tools/DataSeriesHelper.cxx @@ -248,7 +248,7 @@ getAllDataSequences( const uno::Sequence<uno::Reference<chart2::XDataSeries> >& if( xSource.is()) { 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 )); } } diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx index fea62683c3d9..0afe27e51ab7 100644 --- a/chart2/source/tools/DataSourceHelper.cxx +++ b/chart2/source/tools/DataSourceHelper.cxx @@ -320,7 +320,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData( if( !xDataSource.is() ) continue; 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 )); } @@ -346,7 +346,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData( if( !xDataSource.is() ) continue; 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 )); } diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 82dca03fcd16..8023956f936d 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -714,7 +714,7 @@ uno::Reference< XChartType > DiagramHelper::getChartTypeOfSeries( { Reference< XDataSeriesContainer > xDSCnt( aChartTypeSeq[j], uno::UNO_QUERY_THROW ); Sequence< Reference< XDataSeries > > aSeriesSeq( xDSCnt->getDataSeries() ); - ::std::copy( aSeriesSeq.getConstArray(), aSeriesSeq.getConstArray() + aSeriesSeq.getLength(), + ::std::copy( aSeriesSeq.begin(), aSeriesSeq.end(), ::std::back_inserter( aResult )); } } @@ -1226,9 +1226,8 @@ Sequence< Reference< XChartType > > { Reference< XChartTypeContainer > xCTCnt( aCooSysSeq[i], uno::UNO_QUERY_THROW ); Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes()); - ::std::copy( aChartTypeSeq.getConstArray(), - aChartTypeSeq.getConstArray() + aChartTypeSeq.getLength(), - ::std::back_inserter( aResult )); + ::std::copy( aChartTypeSeq.begin(), aChartTypeSeq.end(), + ::std::back_inserter( aResult )); } } catch( const uno::Exception & ex ) |