summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-03 10:53:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-03 14:15:37 +0200
commit31d4562ca9e21f7b04960ac083765733e9a55118 (patch)
tree977b0cdd4a768a2eed9fef6a0f79ecff0b3250e6 /chart2
parentbce779932b59990fbdf8278993f8bb9514781de2 (diff)
use begin()/end() when working with Sequence
Change-Id: Icf9da6a24d72c073338f6fbb513d7250b3898015 Reviewed-on: https://gerrit.libreoffice.org/39469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx2
-rw-r--r--chart2/source/controller/main/ObjectHierarchy.cxx2
-rw-r--r--chart2/source/inc/CloneHelper.hxx2
-rw-r--r--chart2/source/inc/ModifyListenerHelper.hxx4
-rw-r--r--chart2/source/tools/DataSeriesHelper.cxx2
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx6
-rw-r--r--chart2/source/tools/UncachedDataSequence.cxx4
7 files changed, 11 insertions, 11 deletions
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 438fab7d7e61..f39c49ac78e1 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -440,7 +440,7 @@ std::vector< Reference< XDataSeriesContainer > >
Reference< XChartTypeContainer > xCTCnt( aCooSysSeq[i], uno::UNO_QUERY_THROW );
Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes());
std::transform(
- aChartTypeSeq.getConstArray(), aChartTypeSeq.getConstArray() + aChartTypeSeq.getLength(),
+ aChartTypeSeq.begin(), aChartTypeSeq.end(),
std::back_inserter( aResult ),
lcl_ChartTypeToSeriesCnt() );
}
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx
index ba54572d5c33..6f872f17a062 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -308,7 +308,7 @@ void ImplObjectHierarchy::createAxesTree(
{
Sequence< Reference< XAxis > > aAxes( AxisHelper::getAllAxesOfDiagram( xDiagram, /* bOnlyVisible = */ true ) );
if( !m_bOrderingForElementSelector )
- std::transform( aAxes.getConstArray(), aAxes.getConstArray() + aAxes.getLength(),
+ std::transform( aAxes.begin(), aAxes.end(),
std::back_inserter( rContainer ),
lcl_ObjectToOID( xChartDoc ));
diff --git a/chart2/source/inc/CloneHelper.hxx b/chart2/source/inc/CloneHelper.hxx
index ae739bbc6ab6..5c8b87f307f3 100644
--- a/chart2/source/inc/CloneHelper.hxx
+++ b/chart2/source/inc/CloneHelper.hxx
@@ -64,7 +64,7 @@ template< class Interface >
css::uno::Sequence< css::uno::Reference<Interface> > & rDestination )
{
rDestination.realloc( rSource.getLength());
- std::transform( rSource.getConstArray(), rSource.getConstArray() + rSource.getLength(),
+ std::transform( rSource.begin(), rSource.end(),
rDestination.getArray(),
CreateRefClone< Interface >());
}
diff --git a/chart2/source/inc/ModifyListenerHelper.hxx b/chart2/source/inc/ModifyListenerHelper.hxx
index 48f2e0b149b0..4a8dabc7d2ea 100644
--- a/chart2/source/inc/ModifyListenerHelper.hxx
+++ b/chart2/source/inc/ModifyListenerHelper.hxx
@@ -213,7 +213,7 @@ void addListenerToAllSequenceElements(
const css::uno::Reference< css::util::XModifyListener > & xListener )
{
if( xListener.is())
- std::for_each( rSequence.getConstArray(), rSequence.getConstArray() + rSequence.getLength(),
+ std::for_each( rSequence.begin(), rSequence.end(),
impl::addListenerFunctor< T >( xListener ));
}
@@ -255,7 +255,7 @@ void removeListenerFromAllSequenceElements(
const css::uno::Reference< css::util::XModifyListener > & xListener )
{
if( xListener.is())
- std::for_each( rSequence.getConstArray(), rSequence.getConstArray() + rSequence.getLength(),
+ std::for_each( rSequence.begin(), rSequence.end(),
impl::removeListenerFunctor< T >( xListener ));
}
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index a8a84deb5a67..34fd73540e64 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -230,7 +230,7 @@ std::vector< Reference< chart2::data::XLabeledDataSequence > >
const OUString& aRole, bool bMatchPrefix /* = false */ )
{
std::vector< Reference< chart2::data::XLabeledDataSequence > > aResultVec;
- std::remove_copy_if( aDataSequences.getConstArray(), aDataSequences.getConstArray() + aDataSequences.getLength(),
+ std::remove_copy_if( aDataSequences.begin(), aDataSequences.end(),
std::back_inserter( aResultVec ),
[&aRole, bMatchPrefix](const Reference< chart2::data::XLabeledDataSequence > & xSeq)
{return !(lcl_MatchesRole(aRole, bMatchPrefix).operator()(xSeq));});
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index 384420c0681a..dfa434f41ea6 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -908,7 +908,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
{
Sequence< OUString > aLabels = m_bDataInColumns ? this->getRowDescriptions() : this->getColumnDescriptions();
aResult.realloc( aLabels.getLength() );
- transform( aLabels.getConstArray(), aLabels.getConstArray() + aLabels.getLength(),
+ transform( aLabels.begin(), aLabels.end(),
aResult.getArray(), CommonFunctors::makeAny< OUString >() );
}
}
@@ -925,7 +925,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
if( aData.getLength() )
{
aResult.realloc( aData.getLength());
- transform( aData.getConstArray(), aData.getConstArray() + aData.getLength(),
+ transform( aData.begin(), aData.end(),
aResult.getArray(), CommonFunctors::makeAny< double >());
}
}
@@ -990,7 +990,7 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
if( nIndex>=0 )
{
vector< double > aNewDataVec;
- transform( aNewData.getConstArray(), aNewData.getConstArray() + aNewData.getLength(),
+ transform( aNewData.begin(), aNewData.end(),
back_inserter( aNewDataVec ), CommonFunctors::AnyToDouble());
if( m_bDataInColumns )
m_aInternalData.setColumnValues( nIndex, aNewDataVec );
diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx
index e942b6eaeb5b..855f5c5d2b30 100644
--- a/chart2/source/tools/UncachedDataSequence.cxx
+++ b/chart2/source/tools/UncachedDataSequence.cxx
@@ -174,7 +174,7 @@ Sequence< double > SAL_CALL UncachedDataSequence::getNumericalData()
{
Sequence< uno::Any > aValues( m_xDataProvider->getDataByRangeRepresentation( m_aSourceRepresentation ));
aResult.realloc( aValues.getLength());
- std::transform( aValues.getConstArray(), aValues.getConstArray() + aValues.getLength(),
+ std::transform( aValues.begin(), aValues.end(),
aResult.getArray(), CommonFunctors::AnyToDouble());
}
return aResult;
@@ -189,7 +189,7 @@ Sequence< OUString > SAL_CALL UncachedDataSequence::getTextualData()
{
Sequence< uno::Any > aValues( m_xDataProvider->getDataByRangeRepresentation( m_aSourceRepresentation ));
aResult.realloc( aValues.getLength());
- std::transform( aValues.getConstArray(), aValues.getConstArray() + aValues.getLength(),
+ std::transform( aValues.begin(), aValues.end(),
aResult.getArray(), CommonFunctors::AnyToString());
}
return aResult;