summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-16 21:48:48 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-16 21:48:48 +0100
commit4a33504d31a24fead3191b9aa6602bde86ef3d17 (patch)
treecddd913f0357496b08d5bb36790b202182b01ac0 /canvas
parentd24f93dcf004dc81d4d5e9acec0b4e663fa09cd8 (diff)
formula & canvas: convert new to ::Create to get initial ref-counting right.
Change-Id: I96e2e59c2f880632cf719f3346e345a5d03cc858
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/directx/dx_9rm.cxx3
-rw-r--r--canvas/source/vcl/backbuffer.cxx2
-rw-r--r--canvas/source/vcl/bitmapbackbuffer.cxx4
3 files changed, 5 insertions, 4 deletions
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index b9ee8833a769..34e393897839 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -666,7 +666,8 @@ namespace dxcanvas
maVertexCache.reserve(1024);
mpWindow.reset(
- new SystemChildWindow(
+ VclPtr<SystemChildWindow>::Create(
+
const_cast<vcl::Window *>(&rWindow), 0) );
// system child window must not receive mouse events
diff --git a/canvas/source/vcl/backbuffer.cxx b/canvas/source/vcl/backbuffer.cxx
index 216b5eb4c6d5..356caa9254e7 100644
--- a/canvas/source/vcl/backbuffer.cxx
+++ b/canvas/source/vcl/backbuffer.cxx
@@ -25,7 +25,7 @@ namespace vclcanvas
{
BackBuffer::BackBuffer( const OutputDevice& rRefDevice,
bool bMonochromeBuffer ) :
- maVDev( new VirtualDevice( rRefDevice,
+ maVDev( VclPtr<VirtualDevice>::Create( rRefDevice,
sal_uInt16(bMonochromeBuffer) ) )
{
if( !bMonochromeBuffer )
diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx
index 1bbf73c5b224..bd01d71b5c54 100644
--- a/canvas/source/vcl/bitmapbackbuffer.cxx
+++ b/canvas/source/vcl/bitmapbackbuffer.cxx
@@ -112,8 +112,8 @@ namespace vclcanvas
// VDev not yet created, do it now. Create an alpha-VDev,
// if bitmap has transparency.
mpVDev = maBitmap->IsTransparent() ?
- new VirtualDevice( mrRefDevice, 0, 0 ) :
- new VirtualDevice( mrRefDevice );
+ VclPtr<VirtualDevice>::Create( mrRefDevice, 0, 0 ) :
+ VclPtr<VirtualDevice>::Create( mrRefDevice );
OSL_ENSURE( mpVDev,
"BitmapBackBuffer::createVDev(): Unable to create VirtualDevice" );