diff options
Diffstat (limited to 'sd/source/ui/func/fucushow.cxx')
-rw-r--r-- | sd/source/ui/func/fucushow.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/ui/func/fucushow.cxx b/sd/source/ui/func/fucushow.cxx index ab1ccd41af32..514520beaf76 100644 --- a/sd/source/ui/func/fucushow.cxx +++ b/sd/source/ui/func/fucushow.cxx @@ -32,6 +32,7 @@ #include <sfx2/viewfrm.hxx> #include "sdabstdlg.hxx" +#include <boost/scoped_ptr.hpp> namespace sd { @@ -59,7 +60,7 @@ rtl::Reference<FuPoor> FuCustomShowDlg::Create( ViewShell* pViewSh, ::sd::Window void FuCustomShowDlg::DoExecute( SfxRequest& ) { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - AbstractSdCustomShowDlg* pDlg = pFact ? pFact->CreateSdCustomShowDlg( NULL, *mpDoc ) : 0; + boost::scoped_ptr<AbstractSdCustomShowDlg> pDlg(pFact ? pFact->CreateSdCustomShowDlg( NULL, *mpDoc ) : 0); if( pDlg ) { sal_uInt16 nRet = pDlg->Execute(); @@ -69,7 +70,7 @@ void FuCustomShowDlg::DoExecute( SfxRequest& ) sd::PresentationSettings& rSettings = mpDoc->getPresentationSettings(); rSettings.mbCustomShow = pDlg->IsCustomShow(); } - delete pDlg; + pDlg.reset(); if( nRet == RET_YES ) { |