From 8a65284fe31e6c0a927cb88b75df7845cd248572 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 31 Mar 2015 23:04:14 +0100 Subject: Automated conversion of VclPtr construction to use Instance template. Change-Id: I8be9141b9653e73ebd23a5a3d810f240c376f97e --- canvas/source/cairo/cairo_textlayout.cxx | 2 +- canvas/source/opengl/ogl_canvashelper.cxx | 2 +- canvas/source/vcl/canvasfont.cxx | 2 +- canvas/source/vcl/canvashelper_texturefill.cxx | 2 +- canvas/source/vcl/textlayout.cxx | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'canvas/source') diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index dd428a17af09..03d319473e7c 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -179,7 +179,7 @@ namespace cairocanvas if( !pOutDev ) return geometry::RealRectangle2D(); - ScopedVclPtr pVDev( new VirtualDevice( *pOutDev ) ); + ScopedVclPtrInstance< VirtualDevice > pVDev( *pOutDev ); pVDev->SetFont( mpFont->getVCLFont() ); // need metrics for Y offset, the XCanvas always renders diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx index 6a75c8f9144c..501e7f83fe6b 100644 --- a/canvas/source/opengl/ogl_canvashelper.cxx +++ b/canvas/source/opengl/ogl_canvashelper.cxx @@ -725,7 +725,7 @@ namespace oglcanvas if( mpDevice ) { - ScopedVclPtr pVDev(new VirtualDevice()); + ScopedVclPtrInstance< VirtualDevice > pVDev; pVDev->EnableOutput(false); CanvasFont* pFont=dynamic_cast(xLayoutetText->getFont().get()); diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx index 8930748af984..aa28e3bd4ab6 100644 --- a/canvas/source/vcl/canvasfont.cxx +++ b/canvas/source/vcl/canvasfont.cxx @@ -121,7 +121,7 @@ namespace vclcanvas SolarMutexGuard aGuard; OutputDevice& rOutDev = mpOutDevProvider->getOutDev(); - ScopedVclPtr pVDev( new VirtualDevice( rOutDev ) ); + ScopedVclPtrInstance< VirtualDevice > pVDev( rOutDev ); pVDev->SetFont(getVCLFont()); const ::FontMetric& aMetric( pVDev->GetFontMetric() ); diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index ea7889042465..b46746e2cf8b 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -1026,7 +1026,7 @@ namespace vclcanvas // cannot do direct XOR, but have to // prepare the filled polygon within a // VDev - ScopedVclPtr pVDev( new VirtualDevice( rOutDev ) ); + ScopedVclPtrInstance< VirtualDevice > pVDev( rOutDev ); pVDev->SetOutputSizePixel( aPolygonDeviceRect.GetSize() ); // shift output to origin of VDev diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx index c3efe7745053..6cf534220e26 100644 --- a/canvas/source/vcl/textlayout.cxx +++ b/canvas/source/vcl/textlayout.cxx @@ -104,7 +104,7 @@ namespace vclcanvas SolarMutexGuard aGuard; OutputDevice& rOutDev = mpOutDevProvider->getOutDev(); - ScopedVclPtr pVDev( new VirtualDevice( rOutDev ) ); + ScopedVclPtrInstance< VirtualDevice > pVDev( rOutDev ); pVDev->SetFont( mpFont->getVCLFont() ); setupLayoutMode( *pVDev.get(), mnTextDirection ); @@ -157,7 +157,7 @@ namespace vclcanvas OutputDevice& rOutDev = mpOutDevProvider->getOutDev(); - ScopedVclPtr pVDev( new VirtualDevice( rOutDev ) ); + ScopedVclPtrInstance< VirtualDevice > pVDev( rOutDev ); pVDev->SetFont( mpFont->getVCLFont() ); setupLayoutMode( *pVDev.get(), mnTextDirection ); @@ -237,7 +237,7 @@ namespace vclcanvas OutputDevice& rOutDev = mpOutDevProvider->getOutDev(); - ScopedVclPtr pVDev( new VirtualDevice( rOutDev ) ); + ScopedVclPtrInstance< VirtualDevice > pVDev( rOutDev ); pVDev->SetFont( mpFont->getVCLFont() ); // need metrics for Y offset, the XCanvas always renders -- cgit