Kaydet (Commit) 476f5aad authored tarafından Stephan Bergmann's avatar Stephan Bergmann

cppcanvas: std::auto_ptr -> std::unique_ptr

Change-Id: Ic4584e4fe22c81c30d110ff65e79217f690f56f0
üst d8e21f04
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
#include <polypolyaction.hxx> #include <polypolyaction.hxx>
#include <textaction.hxx> #include <textaction.hxx>
#include <transparencygroupaction.hxx> #include <transparencygroupaction.hxx>
#include <utility>
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
#include <iterator> #include <iterator>
...@@ -2452,8 +2453,8 @@ namespace cppcanvas ...@@ -2452,8 +2453,8 @@ namespace cppcanvas
ActionSharedPtr pFloatTransAction( ActionSharedPtr pFloatTransAction(
internal::TransparencyGroupActionFactory::createTransparencyGroupAction( internal::TransparencyGroupActionFactory::createTransparencyGroupAction(
pMtf, std::move(pMtf),
pGradient, std::move(pGradient),
rParms, rParms,
rStates.getState().mapModeTransform * rStates.getState().mapModeTransform *
::vcl::unotools::b2DPointFromPoint( pAct->GetPoint() ), ::vcl::unotools::b2DPointFromPoint( pAct->GetPoint() ),
......
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <sal/config.h>
#include <utility>
#include <tools/gen.hxx> #include <tools/gen.hxx>
#include <canvas/debug.hxx> #include <canvas/debug.hxx>
...@@ -87,8 +91,8 @@ namespace cppcanvas ...@@ -87,8 +91,8 @@ namespace cppcanvas
Size of the transparency group object, in current Size of the transparency group object, in current
state coordinate system. state coordinate system.
*/ */
TransparencyGroupAction( MtfAutoPtr& rGroupMtf, TransparencyGroupAction( MtfAutoPtr&& rGroupMtf,
GradientAutoPtr& rAlphaGradient, GradientAutoPtr&& rAlphaGradient,
const Renderer::Parameters& rParms, const Renderer::Parameters& rParms,
const ::basegfx::B2DPoint& rDstPoint, const ::basegfx::B2DPoint& rDstPoint,
const ::basegfx::B2DVector& rDstSize, const ::basegfx::B2DVector& rDstSize,
...@@ -141,15 +145,15 @@ namespace cppcanvas ...@@ -141,15 +145,15 @@ namespace cppcanvas
} }
SAL_WNODEPRECATED_DECLARATIONS_PUSH SAL_WNODEPRECATED_DECLARATIONS_PUSH
TransparencyGroupAction::TransparencyGroupAction( MtfAutoPtr& rGroupMtf, TransparencyGroupAction::TransparencyGroupAction( MtfAutoPtr&& rGroupMtf,
GradientAutoPtr& rAlphaGradient, GradientAutoPtr&& rAlphaGradient,
const Renderer::Parameters& rParms, const Renderer::Parameters& rParms,
const ::basegfx::B2DPoint& rDstPoint, const ::basegfx::B2DPoint& rDstPoint,
const ::basegfx::B2DVector& rDstSize, const ::basegfx::B2DVector& rDstSize,
const CanvasSharedPtr& rCanvas, const CanvasSharedPtr& rCanvas,
const OutDevState& rState ) : const OutDevState& rState ) :
mpGroupMtf( rGroupMtf ), mpGroupMtf( std::move(rGroupMtf) ),
mpAlphaGradient( rAlphaGradient ), mpAlphaGradient( std::move(rAlphaGradient) ),
maParms( rParms ), maParms( rParms ),
maDstSize( rDstSize ), maDstSize( rDstSize ),
mxBufferBitmap(), mxBufferBitmap(),
...@@ -475,16 +479,16 @@ namespace cppcanvas ...@@ -475,16 +479,16 @@ namespace cppcanvas
} }
SAL_WNODEPRECATED_DECLARATIONS_PUSH SAL_WNODEPRECATED_DECLARATIONS_PUSH
ActionSharedPtr TransparencyGroupActionFactory::createTransparencyGroupAction( MtfAutoPtr& rGroupMtf, ActionSharedPtr TransparencyGroupActionFactory::createTransparencyGroupAction( MtfAutoPtr&& rGroupMtf,
GradientAutoPtr& rAlphaGradient, GradientAutoPtr&& rAlphaGradient,
const Renderer::Parameters& rParms, const Renderer::Parameters& rParms,
const ::basegfx::B2DPoint& rDstPoint, const ::basegfx::B2DPoint& rDstPoint,
const ::basegfx::B2DVector& rDstSize, const ::basegfx::B2DVector& rDstSize,
const CanvasSharedPtr& rCanvas, const CanvasSharedPtr& rCanvas,
const OutDevState& rState ) const OutDevState& rState )
{ {
return ActionSharedPtr( new TransparencyGroupAction(rGroupMtf, return ActionSharedPtr( new TransparencyGroupAction(std::move(rGroupMtf),
rAlphaGradient, std::move(rAlphaGradient),
rParms, rParms,
rDstPoint, rDstPoint,
rDstSize, rDstSize,
......
...@@ -43,8 +43,8 @@ namespace cppcanvas ...@@ -43,8 +43,8 @@ namespace cppcanvas
{ {
struct OutDevState; struct OutDevState;
typedef ::std::auto_ptr< GDIMetaFile > MtfAutoPtr; typedef ::std::unique_ptr< GDIMetaFile > MtfAutoPtr;
typedef ::std::auto_ptr< Gradient > GradientAutoPtr; typedef ::std::unique_ptr< Gradient > GradientAutoPtr;
/** Transparency group action. /** Transparency group action.
...@@ -83,8 +83,8 @@ namespace cppcanvas ...@@ -83,8 +83,8 @@ namespace cppcanvas
Size of the transparency group object, in current Size of the transparency group object, in current
state coordinate system. state coordinate system.
*/ */
static ActionSharedPtr createTransparencyGroupAction( MtfAutoPtr& rGroupMtf, static ActionSharedPtr createTransparencyGroupAction( MtfAutoPtr&& rGroupMtf,
GradientAutoPtr& rAlphaGradient, GradientAutoPtr&& rAlphaGradient,
const Renderer::Parameters& rParms, const Renderer::Parameters& rParms,
const ::basegfx::B2DPoint& rDstPoint, const ::basegfx::B2DPoint& rDstPoint,
const ::basegfx::B2DVector& rDstSize, const ::basegfx::B2DVector& rDstSize,
......
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