summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/bitmap.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-19 13:54:12 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 12:10:43 +0100
commit820576af4fd6441a752742b43d804e9837839925 (patch)
tree205b0a04d1bd5063ad3005b9679c1facea2ca2c8 /vcl/source/outdev/bitmap.cxx
parentbf739995fc97ed61a586e949a868ac67fc3b7d95 (diff)
start wrapping OutputDevice in VclPtr
Change-Id: If3ecbb0599b50d50ce6b3997ca7892200c332ffe
Diffstat (limited to 'vcl/source/outdev/bitmap.cxx')
-rw-r--r--vcl/source/outdev/bitmap.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 35ef02d1498a..711a64a61a94 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -410,11 +410,11 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
// If the visible part has been clipped, we have to create a
// Bitmap with the correct size in which we copy the clipped
// Bitmap to the correct position.
- VirtualDevice aVDev( *this );
+ ScopedVclPtr<VirtualDevice> aVDev = new VirtualDevice( *this );
- if ( aVDev.SetOutputSizePixel( aRect.GetSize() ) )
+ if ( aVDev->SetOutputSizePixel( aRect.GetSize() ) )
{
- if ( ((OutputDevice*)&aVDev)->mpGraphics || ((OutputDevice*)&aVDev)->AcquireGraphics() )
+ if ( ((OutputDevice*)aVDev.get())->mpGraphics || ((OutputDevice*)aVDev.get())->AcquireGraphics() )
{
if ( (nWidth > 0) && (nHeight > 0) )
{
@@ -422,14 +422,14 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
(aRect.Left() < mnOutOffX) ? (mnOutOffX - aRect.Left()) : 0L,
(aRect.Top() < mnOutOffY) ? (mnOutOffY - aRect.Top()) : 0L,
nWidth, nHeight);
- (((OutputDevice*)&aVDev)->mpGraphics)->CopyBits( aPosAry, mpGraphics, this, this );
+ (((OutputDevice*)aVDev.get())->mpGraphics)->CopyBits( aPosAry, mpGraphics, this, this );
}
else
{
OSL_ENSURE(false, "CopyBits with negative width or height (!)");
}
- aBmp = aVDev.GetBitmap( Point(), aVDev.GetOutputSizePixel() );
+ aBmp = aVDev->GetBitmap( Point(), aVDev->GetOutputSizePixel() );
}
else
bClipped = false;