diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2011-11-07 09:01:50 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2011-11-07 09:18:52 +0400 |
commit | da5ec5d1e0823cf53f3f70c074cd3d314b89d4e3 (patch) | |
tree | 5a9c342d0dbee4a4daab14a1f546b984c5a7818e /svx/source/unodraw | |
parent | bc858110c2c8c7292a19ed849fd190b2d4aad0b7 (diff) |
use boost::scoped_ptr
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r-- | svx/source/unodraw/UnoGraphicExporter.cxx | 8 |
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 ) { |