From ce69d6e9e1b776b9cd60b2db5ca002234ea36d8f Mon Sep 17 00:00:00 2001 From: "Mario J. Rugiero" Date: Sat, 31 Oct 2015 14:57:09 -0300 Subject: [PATCH] boost::bind -> lambdas in canvas/source/vcl subtree Change-Id: I2b2e746197b94222c73b78379d64086adfb5e693 Reviewed-on: https://gerrit.libreoffice.org/19712 Tested-by: Jenkins Reviewed-by: Noel Grandin --- canvas/source/vcl/canvashelper_texturefill.cxx | 7 +++---- canvas/source/vcl/spritecanvas.cxx | 16 ++++------------ 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index e87a26b217a0..155498f749ad 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -19,7 +19,6 @@ #include -#include #include #include @@ -701,9 +700,9 @@ namespace vclcanvas std::transform(&rValues.maColors[0], &rValues.maColors[0]+rValues.maColors.getLength(), aColors.begin(), - boost::bind( - &vcl::unotools::stdColorSpaceSequenceToColor, - _1)); + [](const uno::Sequence< double >& aColor) { + return vcl::unotools::stdColorSpaceSequenceToColor( aColor ); + } ); // TODO(E1): Return value // TODO(F1): FillRule diff --git a/canvas/source/vcl/spritecanvas.cxx b/canvas/source/vcl/spritecanvas.cxx index f6eb7c6e6ce9..39e3ad746944 100644 --- a/canvas/source/vcl/spritecanvas.cxx +++ b/canvas/source/vcl/spritecanvas.cxx @@ -21,8 +21,6 @@ #include -#include - #include #include #include @@ -64,17 +62,11 @@ namespace vclcanvas maPropHelper.addProperties( ::canvas::PropertySetHelper::MakeMap ("UnsafeScrolling", - boost::bind(&SpriteCanvasHelper::isUnsafeScrolling, - boost::ref(maCanvasHelper)), - boost::bind(&SpriteCanvasHelper::enableUnsafeScrolling, - boost::ref(maCanvasHelper), - _1)) + [this]() { return this->maCanvasHelper.isUnsafeScrolling(); }, + [this](css::uno::Any const& aAny) mutable { this->maCanvasHelper.enableUnsafeScrolling(aAny); } ) ("SpriteBounds", - boost::bind(&SpriteCanvasHelper::isSpriteBounds, - boost::ref(maCanvasHelper)), - boost::bind(&SpriteCanvasHelper::enableSpriteBounds, - boost::ref(maCanvasHelper), - _1))); + [this]() { return this->maCanvasHelper.isSpriteBounds(); }, + [this](css::uno::Any const& aAny) mutable { this->maCanvasHelper.enableSpriteBounds(aAny); } )); SAL_INFO("canvas.vcl", "VCLSpriteCanvas::initialize called" );