summaryrefslogtreecommitdiff
path: root/cppcanvas
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 /cppcanvas
parentbf739995fc97ed61a586e949a868ac67fc3b7d95 (diff)
start wrapping OutputDevice in VclPtr
Change-Id: If3ecbb0599b50d50ce6b3997ca7892200c332ffe
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx12
-rw-r--r--cppcanvas/source/mtfrenderer/transparencygroupaction.cxx14
2 files changed, 13 insertions, 13 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index edc3a6ef887d..3f3894681ddf 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2908,16 +2908,16 @@ namespace cppcanvas
VectorOfOutDevStates aStateStack;
- VirtualDevice aVDev;
- aVDev.EnableOutput( false );
+ ScopedVclPtr<VirtualDevice> aVDev = new VirtualDevice;
+ aVDev->EnableOutput( false );
// Setup VDev for state tracking and mapping
// =========================================
- aVDev.SetMapMode( rMtf.GetPrefMapMode() );
+ aVDev->SetMapMode( rMtf.GetPrefMapMode() );
const Size aMtfSize( rMtf.GetPrefSize() );
- const Size aMtfSizePixPre( aVDev.LogicToPixel( aMtfSize,
+ const Size aMtfSizePixPre( aVDev->LogicToPixel( aMtfSize,
rMtf.GetPrefMapMode() ) );
// #i44110# correct null-sized output - there are shapes
@@ -2928,7 +2928,7 @@ namespace cppcanvas
sal_Int32 nCurrActions(0);
ActionFactoryParameters aParms(aStateStack,
rCanvas,
- aVDev,
+ *aVDev.get(),
rParams,
nCurrActions );
@@ -2942,7 +2942,7 @@ namespace cppcanvas
1.0 / aMtfSizePix.Height() );
tools::calcLogic2PixelAffineTransform( aStateStack.getState().mapModeTransform,
- aVDev );
+ *aVDev.get() );
ColorSharedPtr pColor( getCanvas()->createColor() );
diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
index fa91a85f1c3f..74a9505bcf08 100644
--- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
+++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
@@ -242,10 +242,10 @@ namespace cppcanvas
// render our content into an appropriately sized
// VirtualDevice with alpha channel
- VirtualDevice aVDev(
- *::Application::GetDefaultDevice(), 0, 0 );
- aVDev.SetOutputSizePixel( aBitmapSizePixel );
- aVDev.SetMapMode();
+ ScopedVclPtr<VirtualDevice> aVDev(new VirtualDevice(
+ *::Application::GetDefaultDevice(), 0, 0 ));
+ aVDev->SetOutputSizePixel( aBitmapSizePixel );
+ aVDev->SetMapMode();
if( rSubset.mnSubsetBegin != 0 ||
rSubset.mnSubsetEnd != -1 )
@@ -334,7 +334,7 @@ namespace cppcanvas
}
}
- aVDev.DrawTransparent( aMtf,
+ aVDev->DrawTransparent( aMtf,
aEmptyPoint,
aOutputSizePixel,
*mpAlphaGradient );
@@ -342,7 +342,7 @@ namespace cppcanvas
else
{
// no subsetting - render whole mtf
- aVDev.DrawTransparent( *mpGroupMtf,
+ aVDev->DrawTransparent( *mpGroupMtf,
aEmptyPoint,
aOutputSizePixel,
*mpAlphaGradient );
@@ -352,7 +352,7 @@ namespace cppcanvas
// update buffered bitmap and transformation
BitmapSharedPtr aBmp( VCLFactory::getInstance().createBitmap(
mpCanvas,
- aVDev.GetBitmapEx(
+ aVDev->GetBitmapEx(
aEmptyPoint,
aBitmapSizePixel ) ) );
mxBufferBitmap = aBmp->getUNOBitmap();