summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-08-29 00:47:33 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-29 11:40:29 +0200
commit085269d25a705b656436feac47149296b4b4b35d (patch)
tree3195c0526652ebd9e125507aa17cd15b2acfb368 /chart2/source
parentb0e74b65a86eb965c3e93da2fb77972cc5445f3c (diff)
Replace find_if with proper quantifier algorithms
Change-Id: Icc820a47ac891c358883f9c01224f676c58fdd11 Reviewed-on: https://gerrit.libreoffice.org/59744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.cxx10
-rw-r--r--chart2/source/model/template/DataInterpreter.cxx4
2 files changed, 6 insertions, 8 deletions
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index 7a2a041d41f8..10af6e5cbf4c 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -485,11 +485,9 @@ void DataBrowserModel::removeDataSeriesOrComplexCategoryLevel( sal_Int32 nAtColu
Sequence<Reference<chart2::data::XLabeledDataSequence> > aSequencesOfDeleted = xSourceOfDeleted->getDataSequences();
for (sal_Int32 i = 0; i < aSequencesOfDeleted.getLength(); ++i)
{
- std::vector<Reference<chart2::data::XLabeledDataSequence> >::const_iterator aHitIt(
- std::find_if( aAllDataSeqs.begin(), aAllDataSeqs.end(),
- lcl_RepresentationsOfLSeqMatch( aSequencesOfDeleted[i] )));
// if not used by the remaining series this sequence can be deleted
- if( aHitIt == aAllDataSeqs.end() )
+ if( std::none_of( aAllDataSeqs.begin(), aAllDataSeqs.end(),
+ lcl_RepresentationsOfLSeqMatch( aSequencesOfDeleted[i] )) )
aSequenceIndexesToDelete.push_back( lcl_getValuesRepresentationIndex( aSequencesOfDeleted[i] ) );
}
@@ -873,8 +871,8 @@ void DataBrowserModel::updateFromModel()
else if( aRole == "values-x" )
nSequenceNumberFormatKey = nXAxisNumberFormat;
- if( std::find_if( aSharedSequences.begin(), aSharedSequences.end(),
- lcl_RepresentationsOfLSeqMatch( aLSeqs[nSeqIdx] )) == aSharedSequences.end())
+ if( std::none_of( aSharedSequences.begin(), aSharedSequences.end(),
+ lcl_RepresentationsOfLSeqMatch( aLSeqs[nSeqIdx] )) )
{
// no shared sequence
m_aColumns.emplace_back(
diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx
index dde227a99d98..849c4e3404bf 100644
--- a/chart2/source/model/template/DataInterpreter.cxx
+++ b/chart2/source/model/template/DataInterpreter.cxx
@@ -286,8 +286,8 @@ Reference< data::XDataSource > SAL_CALL DataInterpreter::mergeInterpretedData(
Reference< data::XLabeledDataSequence > xAdd( aSeq[nSeqIdx] );
// only add if sequence is not yet in the result
- if( find_if( aResultVec.begin(), aResultVec.end(),
- lcl_LabeledSequenceEquals( xAdd )) == aResultVec.end())
+ if( none_of( aResultVec.begin(), aResultVec.end(),
+ lcl_LabeledSequenceEquals( xAdd )) )
{
aResultVec.push_back( xAdd );
}