summaryrefslogtreecommitdiff
path: root/canvas/source/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-23 15:17:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 07:18:28 +0100
commit8d23f9c2c1e0479a95cb44a09066740213b0f99a (patch)
tree46034a164cbfd4d5a17f8eaec722e89fdfd172ee /canvas/source/vcl
parent8dd247044f976d93e13370738418fcd2ac167e9c (diff)
loplugin:makeshared in basctl..canvas
Change-Id: I1461da594db222abbaeccfb636194b9790f5dbe8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87271 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas/source/vcl')
-rw-r--r--canvas/source/vcl/canvas.cxx2
-rw-r--r--canvas/source/vcl/canvasbitmaphelper.cxx2
-rw-r--r--canvas/source/vcl/canvascustomsprite.cxx6
-rw-r--r--canvas/source/vcl/canvashelper.cxx4
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx4
-rw-r--r--canvas/source/vcl/spritecanvas.cxx2
-rw-r--r--canvas/source/vcl/spritedevicehelper.cxx2
7 files changed, 11 insertions, 11 deletions
diff --git a/canvas/source/vcl/canvas.cxx b/canvas/source/vcl/canvas.cxx
index 9cbb1c0d7467..4713f8ab9d34 100644
--- a/canvas/source/vcl/canvas.cxx
+++ b/canvas/source/vcl/canvas.cxx
@@ -87,7 +87,7 @@ namespace vclcanvas
if( !pOutDev )
throw lang::NoSupportException("Passed OutDev invalid!", nullptr);
- OutDevProviderSharedPtr pOutdevProvider( new OutDevHolder(*pOutDev) );
+ OutDevProviderSharedPtr pOutdevProvider = std::make_shared<OutDevHolder>(*pOutDev);
// setup helper
maDeviceHelper.init( pOutdevProvider );
diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx
index 44c6dcce1230..43fed2754430 100644
--- a/canvas/source/vcl/canvasbitmaphelper.cxx
+++ b/canvas/source/vcl/canvasbitmaphelper.cxx
@@ -45,7 +45,7 @@ namespace vclcanvas
const OutDevProviderSharedPtr& rOutDevReference )
{
mpOutDevReference = rOutDevReference;
- mpBackBuffer.reset( new BitmapBackBuffer( rBitmap, rOutDevReference->getOutDev() ));
+ mpBackBuffer = std::make_shared<BitmapBackBuffer>( rBitmap, rOutDevReference->getOutDev() );
// forward new settings to base class (ref device, output
// surface, no protection (own backbuffer), alpha depends on
diff --git a/canvas/source/vcl/canvascustomsprite.cxx b/canvas/source/vcl/canvascustomsprite.cxx
index 5a92bc64ef10..74ed15836004 100644
--- a/canvas/source/vcl/canvascustomsprite.cxx
+++ b/canvas/source/vcl/canvascustomsprite.cxx
@@ -55,12 +55,12 @@ namespace vclcanvas
ceil( rSpriteSize.Height ))) );
// create content backbuffer in screen depth
- BackBufferSharedPtr pBackBuffer( new BackBuffer( rOutDevProvider->getOutDev() ) );
+ BackBufferSharedPtr pBackBuffer = std::make_shared<BackBuffer>( rOutDevProvider->getOutDev() );
pBackBuffer->setSize( aSize );
// create mask backbuffer, with one bit color depth
- BackBufferSharedPtr pBackBufferMask( new BackBuffer( rOutDevProvider->getOutDev(),
- true ) );
+ BackBufferSharedPtr pBackBufferMask = std::make_shared<BackBuffer>( rOutDevProvider->getOutDev(),
+ true );
pBackBufferMask->setSize( aSize );
// TODO(F1): Implement alpha vdev (could prolly enable
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index d1e1de400687..7a1578bef92b 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -776,7 +776,7 @@ namespace vclcanvas
const double nAngleInTenthOfDegrees (3600.0 - nRotate * 3600.0 / (2*M_PI));
aGrfAttr.SetRotation( static_cast< sal_uInt16 >(::basegfx::fround(nAngleInTenthOfDegrees)) );
- pGrfObj.reset( new GraphicObject( aBmpEx ) );
+ pGrfObj = std::make_shared<GraphicObject>( aBmpEx );
}
else
{
@@ -799,7 +799,7 @@ namespace vclcanvas
aBmpEx = tools::transformBitmap( aBmpEx,
aMatrix );
- pGrfObj.reset( new GraphicObject( aBmpEx ) );
+ pGrfObj = std::make_shared<GraphicObject>( aBmpEx );
// clear scale values, generated bitmap already
// contains scaling
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 3650c8317513..bd17a8883d21 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -756,7 +756,7 @@ namespace vclcanvas
const double nAngleInTenthOfDegrees (3600.0 - nRotate * 3600.0 / (2*M_PI));
aGrfAttr.SetRotation( static_cast< sal_uInt16 >(::basegfx::fround(nAngleInTenthOfDegrees)) );
- pGrfObj.reset( new GraphicObject( aBmpEx ) );
+ pGrfObj = std::make_shared<GraphicObject>( aBmpEx );
}
else
{
@@ -779,7 +779,7 @@ namespace vclcanvas
aBmpEx = tools::transformBitmap( aBmpEx,
aTotalTransform);
- pGrfObj.reset( new GraphicObject( aBmpEx ) );
+ pGrfObj = std::make_shared<GraphicObject>( aBmpEx );
// clear scale values, generated bitmap already
// contains scaling
diff --git a/canvas/source/vcl/spritecanvas.cxx b/canvas/source/vcl/spritecanvas.cxx
index f40be1a54049..90aa55228b28 100644
--- a/canvas/source/vcl/spritecanvas.cxx
+++ b/canvas/source/vcl/spritecanvas.cxx
@@ -77,7 +77,7 @@ namespace vclcanvas
uno::Reference< awt::XWindow > xParentWindow;
maArguments[3] >>= xParentWindow;
- OutDevProviderSharedPtr pOutDev( new WindowOutDevHolder(xParentWindow) );
+ OutDevProviderSharedPtr pOutDev = std::make_shared<WindowOutDevHolder>(xParentWindow);
// setup helper
maDeviceHelper.init( pOutDev );
diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx
index cc36193f08ec..01994f55c0d6 100644
--- a/canvas/source/vcl/spritedevicehelper.cxx
+++ b/canvas/source/vcl/spritedevicehelper.cxx
@@ -41,7 +41,7 @@ namespace vclcanvas
// setup back buffer
OutputDevice& rOutDev( pOutDev->getOutDev() );
- mpBackBuffer.reset( new BackBuffer( rOutDev ));
+ mpBackBuffer = std::make_shared<BackBuffer>( rOutDev );
mpBackBuffer->setSize( rOutDev.GetOutputSizePixel() );
// #i95645#