diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-03-19 16:19:50 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 12:20:00 +0100 |
commit | ed953d1842caf0b8a00d1528cd012e3a9b83bdd2 (patch) | |
tree | 8ff6f9e055a11b7f5892dc28d13c2cd3f798b32f /svx/source/svdraw/svdxcgv.cxx | |
parent | 8fa63f31ab84131fc1551563ae5d9bf86208c906 (diff) |
Fix OutputDevice members / stack allocation: svx.
Change-Id: Id28aeb44b4c48fec944e21fed7a9acf9f7f8b68a
Diffstat (limited to 'svx/source/svdraw/svdxcgv.cxx')
-rw-r--r-- | svx/source/svdraw/svdxcgv.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 194231e8f365..569d5a1ac8e2 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -553,16 +553,16 @@ GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked) co if( !aMtf.GetActionSize() ) { - VirtualDevice aOut; + ScopedVclPtr<VirtualDevice> pOut(new VirtualDevice()); const Size aDummySize(2, 2); - aOut.SetOutputSizePixel(aDummySize); - aOut.EnableOutput(false); - aOut.SetMapMode(aMap); + pOut->SetOutputSizePixel(aDummySize); + pOut->EnableOutput(false); + pOut->SetMapMode(aMap); aMtf.Clear(); - aMtf.Record(&aOut); + aMtf.Record(pOut); - DrawMarkedObj(aOut); + DrawMarkedObj(*pOut.get()); aMtf.Stop(); aMtf.WindStart(); @@ -640,7 +640,7 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject* // if graphic could not be retrieved => go the hard way and create a MetaFile if( ( GRAPHIC_NONE == aRet.GetType() ) || ( GRAPHIC_DEFAULT == aRet.GetType() ) ) { - VirtualDevice aOut; + ScopedVclPtr<VirtualDevice> pOut(new VirtualDevice()); GDIMetaFile aMtf; const Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); const MapMode aMap( pModel->GetScaleUnit(), @@ -648,10 +648,10 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject* pModel->GetScaleFraction(), pModel->GetScaleFraction() ); - aOut.EnableOutput( false ); - aOut.SetMapMode( aMap ); - aMtf.Record( &aOut ); - pObj->SingleObjectPainter( aOut ); + pOut->EnableOutput( false ); + pOut->SetMapMode( aMap ); + aMtf.Record( pOut ); + pObj->SingleObjectPainter( *pOut.get() ); aMtf.Stop(); aMtf.WindStart(); |