diff options
Diffstat (limited to 'sc/source/ui/view/prevwsh.cxx')
-rw-r--r-- | sc/source/ui/view/prevwsh.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 64af102876be..18eb3a79fa0c 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -81,6 +81,8 @@ using namespace com::sun::star; #define ScPreviewShell #include "scslots.hxx" +#include <boost/scoped_ptr.hpp> + TYPEINIT1( ScPreviewShell, SfxViewShell ); SFX_IMPL_INTERFACE(ScPreviewShell, SfxViewShell, ScResId(SCSTR_PREVIEWSHELL)) @@ -651,7 +653,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - AbstractSvxZoomDialog* pDlg = pFact->CreateSvxZoomDialog(NULL, aSet); + boost::scoped_ptr<AbstractSvxZoomDialog> pDlg(pFact->CreateSvxZoomDialog(NULL, aSet)); OSL_ENSURE(pDlg, "Dialogdiet fail!"); pDlg->SetLimits( 20, 400 ); pDlg->HideButton( ZOOMBTN_OPTIMAL ); @@ -666,8 +668,6 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) eZoom = rZoomItem.GetType(); nZoom = rZoomItem.GetValue(); } - - delete pDlg; } } |