summaryrefslogtreecommitdiff
path: root/svx/source/unodraw
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2011-11-07 09:01:50 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2011-11-07 09:18:52 +0400
commitda5ec5d1e0823cf53f3f70c074cd3d314b89d4e3 (patch)
tree5a9c342d0dbee4a4daab14a1f546b984c5a7818e /svx/source/unodraw
parentbc858110c2c8c7292a19ed849fd190b2d4aad0b7 (diff)
use boost::scoped_ptr
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 0b60214bd43f..c0b66a42d337 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -724,15 +724,14 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
Size aNewSize;
// create a view
- SdrView* pView;
-
+ boost::scoped_ptr< SdrView > pView;
if( PTR_CAST( FmFormModel, mpDoc ) )
{
- pView = new FmFormView( PTR_CAST( FmFormModel, mpDoc ), &aVDev );
+ pView.reset(new FmFormView( PTR_CAST( FmFormModel, mpDoc ), &aVDev ));
}
else
{
- pView = new SdrView( mpDoc, &aVDev );
+ pView.reset(new SdrView( mpDoc, &aVDev ));
}
pView->SetBordVisible( sal_False );
@@ -773,7 +772,6 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
aGraphic = Graphic(aMtf);
pView->HideSdrPage();
- delete pView;
if( rSettings.mbTranslucent )
{