summaryrefslogtreecommitdiff
path: root/cppcanvas/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-30 08:29:45 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-30 10:33:25 +0200
commit476f5aad6efc176c88309f18ce686fd3fc1be609 (patch)
treeaac5018be3d261129dee1932f08b449723aabc9f /cppcanvas/source
parentd8e21f0400c5ae77e388ef81b7fcad9f65401c65 (diff)
cppcanvas: std::auto_ptr -> std::unique_ptr
Change-Id: Ic4584e4fe22c81c30d110ff65e79217f690f56f0
Diffstat (limited to 'cppcanvas/source')
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx5
-rw-r--r--cppcanvas/source/mtfrenderer/transparencygroupaction.cxx24
-rw-r--r--cppcanvas/source/mtfrenderer/transparencygroupaction.hxx8
3 files changed, 21 insertions, 16 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index a111fab8983e..e5c622367cec 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -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() ),
diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
index ee1281bb1cb1..a32630889b01 100644
--- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
+++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
@@ -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,
diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx
index 21937485dcd4..391daeb6f776 100644
--- a/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx
+++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx
@@ -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,