summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorenz Paragas <j.paragas.237@gmail.com>2015-08-01 15:04:02 -0700
committerNoel Grandin <noelgrandin@gmail.com>2015-08-03 07:01:48 +0000
commit4a2e0fa708bb00d35febe9e8939dcc0c2197e2f4 (patch)
tree1e45183fba95e8e541fa088f787e206095884ecc
parentb03f6f45f4a13d97b0b62ea7c54b75dd14a5ad5e (diff)
tdf#91112: replace o3tl::compose1 with lambdas in sd and svx
Change-Id: I53c73c6210ba3eec4d73949a329a35ad7834220e Reviewed-on: https://gerrit.libreoffice.org/17468 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--sd/source/ui/tools/PropertySet.cxx8
-rw-r--r--svx/source/form/formcontroller.cxx10
2 files changed, 8 insertions, 10 deletions
diff --git a/sd/source/ui/tools/PropertySet.cxx b/sd/source/ui/tools/PropertySet.cxx
index eb7c06d0b0fa..dd1e6503446d 100644
--- a/sd/source/ui/tools/PropertySet.cxx
+++ b/sd/source/ui/tools/PropertySet.cxx
@@ -119,10 +119,10 @@ void SAL_CALL PropertySet::removePropertyChangeListener (
::std::find_if(
aRange.first,
aRange.second,
- o3tl::compose1(
- std::bind1st(std::equal_to<Reference<beans::XPropertyChangeListener> >(),
- rxListener),
- o3tl::select2nd<ChangeListenerContainer::value_type>())));
+ [&rxListener] (const ChangeListenerContainer::value_type& listener) {
+ return listener.second == rxListener;
+ }));
+
if (iListener != mpChangeListeners->end())
{
mpChangeListeners->erase(iListener);
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 8c88f64e4394..c90760180efe 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -507,7 +507,7 @@ struct UpdateAllListeners : public ::std::unary_function< Reference< XDispatch >
bool operator()( const Reference< XDispatch >& _rxDispatcher ) const
{
static_cast< svx::OSingleFeatureDispatcher* >( _rxDispatcher.get() )->updateAllListeners();
- // the return is a dummy only so we can use this struct in a o3tl::compose1 call
+ // the return is a dummy only so we can use this struct in a lambda expression
return true;
}
};
@@ -2607,11 +2607,9 @@ void FormController::updateAllDispatchers() const
::std::for_each(
m_aFeatureDispatchers.begin(),
m_aFeatureDispatchers.end(),
- ::o3tl::compose1(
- UpdateAllListeners(),
- ::o3tl::select2nd< DispatcherContainer::value_type >()
- )
- );
+ [] (const DispatcherContainer::value_type& dispatcher) {
+ UpdateAllListeners()(dispatcher.second);
+ });
}