diff options
Diffstat (limited to 'chart2')
6 files changed, 11 insertions, 12 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index dc3832dd5a29..d092640d0ea2 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -48,6 +48,7 @@ #include <vcl/window.hxx> #include <vcl/graph.hxx> #include <vcl/settings.hxx> +#include <o3tl/compat_functional.hxx> #include <algorithm> @@ -251,8 +252,7 @@ bool AccessibleBase::ImplUpdateChildren() aAccChildren.reserve( aModelChildren.size()); ::std::transform( m_aChildOIDMap.begin(), m_aChildOIDMap.end(), ::std::back_inserter( aAccChildren ), - []( const ::std::pair<ObjectIdentifier, tAccessible>& cp ) - { return cp.first; } ); + ::o3tl::select1st< ChildOIDMap::value_type >() ); ::std::sort( aModelChildren.begin(), aModelChildren.end()); diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index d34d9977aa23..d89abccf42ae 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -66,6 +66,7 @@ #include <vector> #include <algorithm> #include <functional> +#include <o3tl/compat_functional.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::chart; @@ -1459,8 +1460,7 @@ uno::Sequence< OUString > SAL_CALL ChartDocumentWrapper::getAvailableServiceName ::std::transform( rMap.begin(), rMap.end(), aResult.getArray(), - []( const ::std::pair< OUString, eServiceType >& cp ) - { return cp.first; } ); + ::o3tl::select1st< tServiceNameMap::value_type >() ); return aResult; diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index e017ddc9e377..2a2d799fac22 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -110,7 +110,7 @@ OUString lcl_ConvertRole( const OUString & rRoleString, bool bFromInternalToUI ) tTranslationMap::const_iterator aIt( ::std::find_if( aTranslationMap.begin(), aTranslationMap.end(), [&rRoleString] - ( const ::std::pair< OUString, OUString >& cp ) + ( const tTranslationMap::value_type& cp ) { return rRoleString == cp.second; } ) ); diff --git a/chart2/source/inc/CommonFunctors.hxx b/chart2/source/inc/CommonFunctors.hxx index 596af8ac9bfc..692b0da2fe8c 100644 --- a/chart2/source/inc/CommonFunctors.hxx +++ b/chart2/source/inc/CommonFunctors.hxx @@ -185,7 +185,7 @@ template< class MapType > { return ::std::find_if( rMap.begin(), rMap.end(), [&rData] - ( const ::std::pair< typename MapType::key_type, typename MapType::mapped_type >& cp ) + ( const typename MapType::value_type& cp ) { return rData == cp.second; } ); } diff --git a/chart2/source/inc/ContainerHelper.hxx b/chart2/source/inc/ContainerHelper.hxx index 655a01eb22d3..7e6f68e8fbb6 100644 --- a/chart2/source/inc/ContainerHelper.hxx +++ b/chart2/source/inc/ContainerHelper.hxx @@ -25,6 +25,7 @@ #include <algorithm> #include <functional> +#include <o3tl/compat_functional.hxx> namespace chart { @@ -142,8 +143,7 @@ template< class Map > { ::com::sun::star::uno::Sequence< typename Map::key_type > aResult( rCont.size()); ::std::transform( rCont.begin(), rCont.end(), aResult.getArray(), - []( const ::std::pair< typename Map::key_type, typename Map::mapped_type >& cp ) - { return cp.first; } ); + ::o3tl::select1st< typename Map::value_type >() ); return aResult; } @@ -160,8 +160,7 @@ template< class Map > { ::com::sun::star::uno::Sequence< typename Map::mapped_type > aResult( rCont.size()); ::std::transform( rCont.begin(), rCont.end(), aResult.getArray(), - []( const ::std::pair< typename Map::key_type, typename Map::mapped_type >& cp ) - { return cp.second; } ); + ::o3tl::select2nd< typename Map::value_type >() ); return aResult; } diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx index 17abb3531318..69218d1ef702 100644 --- a/chart2/source/model/template/ChartTypeManager.cxx +++ b/chart2/source/model/template/ChartTypeManager.cxx @@ -45,6 +45,7 @@ #include <algorithm> #include <iterator> #include <functional> +#include <o3tl/compat_functional.hxx> using namespace ::com::sun::star; @@ -574,8 +575,7 @@ uno::Sequence< OUString > SAL_CALL ChartTypeManager::getAvailableServiceNames() // get own default templates ::std::transform( rMap.begin(), rMap.end(), ::std::back_inserter( aServices ), - []( const ::std::pair< OUString, TemplateId >& cp ) - { return cp.first; } ); + ::o3tl::select1st< tTemplateMapType::value_type >() ); // add components that were registered in the context's factory uno::Reference< container::XContentEnumerationAccess > xEnumAcc( |