summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-07-05 16:23:33 +0200
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2017-07-06 11:20:39 +0200
commit7191d6371002a881f541a9c352d2356b7b9935d0 (patch)
tree418b9b1560f148322def6c044a99b07451039492 /chart2
parent0ca5b52818d98583feeb59a4b61dde1bcd46b42c (diff)
tdf#108782 replace std::bind2nd with lambda
and inline PropertyValueCompare functor Change-Id: Ie8fd33810f7897cad35a727286b546a17db43ab7 Reviewed-on: https://gerrit.libreoffice.org/39603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx18
1 files changed, 3 insertions, 15 deletions
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 2fb5b4863051..cded08bb68c8 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -51,19 +51,6 @@ using namespace ::com::sun::star::frame;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-namespace
-{
-
- // comparing two PropertyValue instances
- struct PropertyValueCompare : public std::binary_function< beans::PropertyValue, OUString, bool >
- {
- bool operator() ( const beans::PropertyValue& rPropValue, const OUString& rName ) const
- {
- return rPropValue.Name.equals( rName );
- }
- };
-
-} // anonymous namespace
namespace chart
{
@@ -372,8 +359,9 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea
const OUString sKeyModifier( "KeyModifier" );
const beans::PropertyValue* pIter = rArgs.getConstArray();
const beans::PropertyValue* pEnd = pIter + rArgs.getLength();
- const beans::PropertyValue* pKeyModifier = std::find_if(
- pIter, pEnd, std::bind2nd( PropertyValueCompare(), std::cref( sKeyModifier ) ) );
+ const beans::PropertyValue* pKeyModifier = std::find_if(pIter, pEnd,
+ [&sKeyModifier](const beans::PropertyValue& lhs)
+ {return lhs.Name == sKeyModifier;} );
sal_Int16 nKeyModifier = 0;
if ( pKeyModifier != pEnd && pKeyModifier && ( pKeyModifier->Value >>= nKeyModifier ) && nKeyModifier == KEY_MOD1 )
{