[Libreoffice-commits] core.git: canvas/source

Mario J. Rugiero mrugiero at gmail.com
Sat Oct 31 12:53:30 UTC 2015


 canvas/source/directx/dx_canvashelper_texturefill.cxx |    6 +-----
 canvas/source/directx/dx_textlayout_drawhelper.cxx    |    5 +----
 2 files changed, 2 insertions(+), 9 deletions(-)

New commits:
commit bd332c2a335b34e209fe2b7fdfb669c855325636
Author: Mario J. Rugiero <mrugiero at gmail.com>
Date:   Sat Oct 31 00:47:15 2015 -0300

    Replace boost::bind by lambdas in canvas/source/directx tree.
    
    Change-Id: I1622f563b921a03234b9cb02de7c8abd00444129
    Reviewed-on: https://gerrit.libreoffice.org/19703
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx
index c2e0c96..3d5f893 100644
--- a/canvas/source/directx/dx_canvashelper_texturefill.cxx
+++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx
@@ -19,7 +19,6 @@
 
 #include <sal/config.h>
 
-#include <boost/bind.hpp>
 #include <boost/tuple/tuple.hpp>
 
 #include <basegfx/matrix/b2dhommatrix.hxx>
@@ -576,10 +575,7 @@ namespace dxcanvas
                     std::transform(&rValues.maColors[0],
                                    &rValues.maColors[0]+rValues.maColors.getLength(),
                                    aColors.begin(),
-                                   boost::bind(
-                                       (Gdiplus::ARGB (*)( const uno::Sequence< double >& ))(
-                                           &tools::sequenceToArgb),
-                                       _1));
+                                   [](const uno::Sequence< double >& aDoubleSequence) { return tools::sequenceToArgb(aDoubleSequence); } );
                     std::vector< Gdiplus::REAL > aStops;
                     comphelper::sequenceToContainer(aStops,rValues.maStops);
 
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index 55c267d..3db3996 100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -20,7 +20,6 @@
 #include <sal/config.h>
 
 #include <memory>
-#include <boost/bind.hpp>
 
 #include <basegfx/polygon/b2dpolypolygon.hxx>
 #include <basegfx/tools/canvastools.hxx>
@@ -80,9 +79,7 @@ namespace dxcanvas
 
         // issue an ReleaseHDC() when leaving the scope
         const ::comphelper::ScopeGuard aGuard(
-            boost::bind( &Gdiplus::Graphics::ReleaseHDC,
-                         rGraphics.get(),
-                         hdc ));
+            [&rGraphics, &hdc]() mutable { rGraphics->ReleaseHDC(hdc); } );
 
         SystemGraphicsData aSystemGraphicsData;
         aSystemGraphicsData.nSize = sizeof(SystemGraphicsData);


More information about the Libreoffice-commits mailing list