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