Kaydet (Commit) 5916d586 authored tarafından Daniel Robertson's avatar Daniel Robertson Kaydeden (comit) David Ostrovsky

tdf#92459 replace deprecated o3tl features

Replace all uses of deprecated features from o3tl/compat_functional.hxx
with lambda expressions.

Change-Id: I6370c80dbe675da517904e535e19bf63830c3e2c
Reviewed-on: https://gerrit.libreoffice.org/17450Reviewed-by: 's avatarDavid Ostrovsky <david@ostrovsky.org>
Tested-by: 's avatarDavid Ostrovsky <david@ostrovsky.org>
üst b593044e
...@@ -193,7 +193,6 @@ ...@@ -193,7 +193,6 @@
#include <map> #include <map>
#include <memory> #include <memory>
#include <numeric> #include <numeric>
#include <o3tl/compat_functional.hxx>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#include <rtl/instance.hxx> #include <rtl/instance.hxx>
......
...@@ -248,7 +248,6 @@ ...@@ -248,7 +248,6 @@
#include <iterator> #include <iterator>
#include <limits> #include <limits>
#include <map> #include <map>
#include <o3tl/compat_functional.hxx>
#include <officecfg/Office/Common.hxx> #include <officecfg/Office/Common.hxx>
#include <osl/conditn.hxx> #include <osl/conditn.hxx>
#include <osl/diagnose.h> #include <osl/diagnose.h>
......
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
#include <vcl/settings.hxx> #include <vcl/settings.hxx>
#include <algorithm> #include <algorithm>
#include <o3tl/compat_functional.hxx>
#include "ChartElementFactory.hxx" #include "ChartElementFactory.hxx"
...@@ -252,7 +251,8 @@ bool AccessibleBase::ImplUpdateChildren() ...@@ -252,7 +251,8 @@ bool AccessibleBase::ImplUpdateChildren()
aAccChildren.reserve( aModelChildren.size()); aAccChildren.reserve( aModelChildren.size());
::std::transform( m_aChildOIDMap.begin(), m_aChildOIDMap.end(), ::std::transform( m_aChildOIDMap.begin(), m_aChildOIDMap.end(),
::std::back_inserter( aAccChildren ), ::std::back_inserter( aAccChildren ),
::o3tl::select1st< ChildOIDMap::value_type >()); []( const ::std::pair<ObjectIdentifier, tAccessible>& cp )
{ return cp.first; } );
::std::sort( aModelChildren.begin(), aModelChildren.end()); ::std::sort( aModelChildren.begin(), aModelChildren.end());
......
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
#include <functional> #include <functional>
#include <o3tl/compat_functional.hxx>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::chart; using namespace ::com::sun::star::chart;
...@@ -1460,7 +1459,8 @@ uno::Sequence< OUString > SAL_CALL ChartDocumentWrapper::getAvailableServiceName ...@@ -1460,7 +1459,8 @@ uno::Sequence< OUString > SAL_CALL ChartDocumentWrapper::getAvailableServiceName
::std::transform( rMap.begin(), rMap.end(), ::std::transform( rMap.begin(), rMap.end(),
aResult.getArray(), aResult.getArray(),
::o3tl::select1st< tServiceNameMap::value_type >() ); []( const ::std::pair< OUString, eServiceType >& cp )
{ return cp.first; } );
return aResult; return aResult;
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
#include <iterator> #include <iterator>
#include <functional> #include <functional>
#include <numeric> #include <numeric>
#include <o3tl/compat_functional.hxx>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2; using namespace ::com::sun::star::chart2;
...@@ -110,10 +109,10 @@ OUString lcl_ConvertRole( const OUString & rRoleString, bool bFromInternalToUI ) ...@@ -110,10 +109,10 @@ OUString lcl_ConvertRole( const OUString & rRoleString, bool bFromInternalToUI )
{ {
tTranslationMap::const_iterator aIt( tTranslationMap::const_iterator aIt(
::std::find_if( aTranslationMap.begin(), aTranslationMap.end(), ::std::find_if( aTranslationMap.begin(), aTranslationMap.end(),
::o3tl::compose1( ::std::bind2nd( [&rRoleString]
::std::equal_to< tTranslationMap::mapped_type >(), ( const ::std::pair< OUString, OUString >& cp )
rRoleString ), { return rRoleString == cp.second; } )
::o3tl::select2nd< tTranslationMap::value_type >()))); );
if( aIt != aTranslationMap.end()) if( aIt != aTranslationMap.end())
aResult = (*aIt).first; aResult = (*aIt).first;
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <algorithm> #include <algorithm>
#include <functional> #include <functional>
#include <o3tl/compat_functional.hxx>
#include <rtl/math.hxx> #include <rtl/math.hxx>
#include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Any.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
...@@ -185,10 +184,9 @@ template< class MapType > ...@@ -185,10 +184,9 @@ template< class MapType >
findValueInMap( const MapType & rMap, const typename MapType::mapped_type & rData ) findValueInMap( const MapType & rMap, const typename MapType::mapped_type & rData )
{ {
return ::std::find_if( rMap.begin(), rMap.end(), return ::std::find_if( rMap.begin(), rMap.end(),
::o3tl::compose1( ::std::bind2nd( [&rData]
::std::equal_to< typename MapType::mapped_type >(), ( const ::std::pair< typename MapType::key_type, typename MapType::mapped_type >& cp )
rData ), { return rData == cp.second; } );
::o3tl::select2nd< typename MapType::value_type >()));
} }
} // namespace CommonFunctors } // namespace CommonFunctors
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <algorithm> #include <algorithm>
#include <functional> #include <functional>
#include <o3tl/compat_functional.hxx>
namespace chart namespace chart
{ {
...@@ -143,7 +142,8 @@ template< class Map > ...@@ -143,7 +142,8 @@ template< class Map >
{ {
::com::sun::star::uno::Sequence< typename Map::key_type > aResult( rCont.size()); ::com::sun::star::uno::Sequence< typename Map::key_type > aResult( rCont.size());
::std::transform( rCont.begin(), rCont.end(), aResult.getArray(), ::std::transform( rCont.begin(), rCont.end(), aResult.getArray(),
::o3tl::select1st< typename Map::value_type >()); []( const ::std::pair< typename Map::key_type, typename Map::mapped_type >& cp )
{ return cp.first; } );
return aResult; return aResult;
} }
...@@ -160,7 +160,8 @@ template< class Map > ...@@ -160,7 +160,8 @@ template< class Map >
{ {
::com::sun::star::uno::Sequence< typename Map::mapped_type > aResult( rCont.size()); ::com::sun::star::uno::Sequence< typename Map::mapped_type > aResult( rCont.size());
::std::transform( rCont.begin(), rCont.end(), aResult.getArray(), ::std::transform( rCont.begin(), rCont.end(), aResult.getArray(),
::o3tl::select2nd< typename Map::value_type >()); []( const ::std::pair< typename Map::key_type, typename Map::mapped_type >& cp )
{ return cp.second; } );
return aResult; return aResult;
} }
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
#include <algorithm> #include <algorithm>
#include <iterator> #include <iterator>
#include <functional> #include <functional>
#include <o3tl/compat_functional.hxx>
using namespace ::com::sun::star; using namespace ::com::sun::star;
...@@ -575,7 +574,8 @@ uno::Sequence< OUString > SAL_CALL ChartTypeManager::getAvailableServiceNames() ...@@ -575,7 +574,8 @@ uno::Sequence< OUString > SAL_CALL ChartTypeManager::getAvailableServiceNames()
// get own default templates // get own default templates
::std::transform( rMap.begin(), rMap.end(), ::std::back_inserter( aServices ), ::std::transform( rMap.begin(), rMap.end(), ::std::back_inserter( aServices ),
::o3tl::select1st< tTemplateMapType::value_type >()); []( const ::std::pair< OUString, TemplateId >& cp )
{ return cp.first; } );
// add components that were registered in the context's factory // add components that were registered in the context's factory
uno::Reference< container::XContentEnumerationAccess > xEnumAcc( uno::Reference< container::XContentEnumerationAccess > xEnumAcc(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment