Kaydet (Commit) d50fa33c authored tarafından Sahas's avatar Sahas Kaydeden (comit) Michael Stahl

tdf#93243 - replaced some boost::bind with C++11 lambdas

Did half the file.  Need comments before I finish the rest.

Change-Id: Idbd98277e908dc568008925611ab1fd1fb778ab1
Signed-off-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst eb9e0ddf
...@@ -161,141 +161,87 @@ void setupMethodStubs( functor_vector_type& res ) ...@@ -161,141 +161,87 @@ void setupMethodStubs( functor_vector_type& res )
/* void DrawPixel( const Point& rPt, const Color& rColor ); */ /* void DrawPixel( const Point& rPt, const Color& rColor ); */
add(res, add(res,
"DrawPixel", "DrawPixel",
boost::bind( [aPt1, aBlackColor](OutputDevice *pOutDev) { return pOutDev->DrawPixel(aPt1, aBlackColor); });
(void (OutputDevice::*)( const Point&, const Color& ))(
&OutputDevice::DrawPixel),
_1,
aPt1, aBlackColor ));
/* void DrawLine( const Point& rStartPt, const Point& rEndPt ); */ /* void DrawLine( const Point& rStartPt, const Point& rEndPt ); */
add(res, add(res,
"DrawLine", "DrawLine",
boost::bind( [aPt1, aPt2] (OutputDevice *pOutDev) { return pOutDev->DrawLine(aPt1, aPt2); });
(void (OutputDevice::*)( const Point&, const Point& ))(
&OutputDevice::DrawLine),
_1,
aPt1, aPt2 ));
/* void DrawLine( const Point& rStartPt, const Point& rEndPt, /* void DrawLine( const Point& rStartPt, const Point& rEndPt,
const LineInfo& rLineInfo ); const LineInfo& rLineInfo );
*/ */
add(res, add(res,
"DrawLine(LineInfo)", "DrawLine(LineInfo)",
boost::bind( [aPt1, aPt2, aLineInfo] (OutputDevice *pOutDev) { return pOutDev->DrawLine(aPt1, aPt2, aLineInfo); });
(void (OutputDevice::*)( const Point&, const Point&,const LineInfo& ))(
&OutputDevice::DrawLine),
_1,
aPt1, aPt2, aLineInfo ));
/* void DrawPolyLine( const Polygon& rPoly ); */ /* void DrawPolyLine( const Polygon& rPoly ); */
add(res, add(res,
"DrawPolyLine", "DrawPolyLine",
boost::bind( [aPoly] (OutputDevice *pOutDev) {return pOutDev->DrawPolyLine(aPoly); });
(void (OutputDevice::*)( const tools::Polygon& ))(
&OutputDevice::DrawPolyLine),
_1,
aPoly ));
/* void DrawPolyLine( const Polygon& rPoly, /* void DrawPolyLine( const Polygon& rPoly,
const LineInfo& rLineInfo ); const LineInfo& rLineInfo );
*/ */
add(res, add(res,
"DrawPolyLine(LineInfo)", "DrawPolyLine(LineInfo)",
boost::bind( [aPoly, aLineInfo] (OutputDevice *pOutDev) { return pOutDev->DrawPolyLine(aPoly, aLineInfo); });
(void (OutputDevice::*)( const tools::Polygon&, const LineInfo& ))(
&OutputDevice::DrawPolyLine),
_1,
aPoly, aLineInfo ));
/* void DrawPolygon( const Polygon& rPoly ); */ /* void DrawPolygon( const Polygon& rPoly ); */
add(res, add(res,
"DrawPolygon", "DrawPolygon",
boost::bind( [aPoly] (OutputDevice *pOutDev) { return pOutDev->DrawPolygon(aPoly); });
(void (OutputDevice::*)( const tools::Polygon& ))
&OutputDevice::DrawPolygon,
_1,
aPoly ));
/* void DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ); */ /* void DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ); */
add(res, add(res,
"DrawPolyPolygon", "DrawPolyPolygon",
boost::bind( [aPolyPoly] (OutputDevice *pOutDev) { return pOutDev->DrawPolyPolygon(aPolyPoly); });
(void (OutputDevice::*)( const tools::PolyPolygon& ))
&OutputDevice::DrawPolyPolygon,
_1,
aPolyPoly ));
/* void DrawRect( const Rectangle& rRect ); */ /* void DrawRect( const Rectangle& rRect ); */
add(res, add(res,
"DrawRect", "DrawRect",
boost::bind( [aRect] (OutputDevice *pOutDev) { return pOutDev->DrawRect(aRect); });
(void (OutputDevice::*)( const Rectangle& ))(
&OutputDevice::DrawRect),
_1,
aRect ));
/* void DrawRect( const Rectangle& rRect, /* void DrawRect( const Rectangle& rRect,
sal_uLong nHorzRount, sal_uLong nVertRound ); sal_uLong nHorzRount, sal_uLong nVertRound );
*/ */
add(res, add(res,
"DrawRect(round corners)", "DrawRect(round corners)",
boost::bind( [aRect2] (OutputDevice *pOutDev) { return pOutDev->DrawRect(aRect2,4,4); });
(void (OutputDevice::*)( const Rectangle&, sal_uLong nHorzRount, sal_uLong nVertRound ))(
&OutputDevice::DrawRect),
_1,
aRect2,
4,4));
/* void DrawEllipse( const Rectangle& rRect ); */ /* void DrawEllipse( const Rectangle& rRect ); */
add(res, add(res,
"DrawEllipse", "DrawEllipse",
boost::bind( [aRect] (OutputDevice *pOutDev) { return pOutDev->DrawEllipse(aRect); });
&OutputDevice::DrawEllipse,
_1,
aRect ));
/* void DrawArc( const Rectangle& rRect, /* void DrawArc( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt ); const Point& rStartPt, const Point& rEndPt );
*/ */
add(res, add(res,
"DrawArc", "DrawArc",
boost::bind( [aRect,aPt1,aPt2] (OutputDevice *pOutDev) { return pOutDev->DrawArc(aRect,aPt1,aPt2); });
&OutputDevice::DrawArc,
_1,
aRect,aPt1,aPt2 ));
/* void DrawPie( const Rectangle& rRect, /* void DrawPie( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt ); const Point& rStartPt, const Point& rEndPt );
*/ */
add(res, add(res,
"DrawPie", "DrawPie",
boost::bind( [aRect2,aPt3,aPt4] (OutputDevice *pOutDev) { return pOutDev->DrawPie(aRect2,aPt3,aPt4); });
&OutputDevice::DrawPie,
_1,
aRect2,aPt3,aPt4 ));
/* void DrawChord( const Rectangle& rRect, /* void DrawChord( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt ); const Point& rStartPt, const Point& rEndPt );
*/ */
add(res, add(res,
"DrawChord", "DrawChord",
boost::bind( [aRect2,aPt3,aPt4] (OutputDevice *pOutDev) { return pOutDev->DrawChord(aRect2,aPt3,aPt4); });
&OutputDevice::DrawChord,
_1,
aRect2,aPt3,aPt4 ));
/* void DrawOutDev( const Point& rDestPt, const Size& rDestSize, /* void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPt, const Size& rSrcSize ); const Point& rSrcPt, const Size& rSrcSize );
*/ */
add(res, add(res,
"DrawOutDev", "DrawOutDev",
boost::bind( [aRect,aRect2] (OutputDevice *pOutDev) { return pOutDev->DrawOutDev(aRect2.TopLeft(), aRect2.GetSize(),
(void (OutputDevice::*)( const Point&, const Size&, aRect.TopLeft(), aRect.GetSize()); });
const Point&, const Size& ))(
&OutputDevice::DrawOutDev),
_1,
aRect2.TopLeft(), aRect2.GetSize(),
aRect.TopLeft(), aRect.GetSize()));
#ifdef FIXME_VDEV #ifdef FIXME_VDEV
/* void DrawOutDev( const Point& rDestPt, const Size& rDestSize, /* void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
......
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