diff options
Diffstat (limited to 'chart2/source/tools/ObjectIdentifier.cxx')
-rw-r--r-- | chart2/source/tools/ObjectIdentifier.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx index 256be65e535f..40c7380d3c23 100644 --- a/chart2/source/tools/ObjectIdentifier.cxx +++ b/chart2/source/tools/ObjectIdentifier.cxx @@ -1436,15 +1436,10 @@ TitleHelper::eTitleType ObjectIdentifier::getTitleTypeForCID( const OUString& rC OUString aParentParticle = ObjectIdentifier::getFullParentParticle( rCID ); const tTitleMap& rMap = lcl_getTitleMap(); - tTitleMap::const_iterator aIt( rMap.begin() ); - for( ;aIt != rMap.end(); ++aIt ) - { - if( aParentParticle == (*aIt).second ) - { - eRet = (*aIt).first; - break; - } - } + tTitleMap::const_iterator aIt = std::find_if(rMap.begin(), rMap.end(), + [&aParentParticle](tTitleMap::const_reference rEntry) { return aParentParticle == rEntry.second; }); + if (aIt != rMap.end()) + eRet = (*aIt).first; return eRet; } |