summaryrefslogtreecommitdiff
path: root/sd/source/ui/func/fuprobjs.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/func/fuprobjs.cxx')
-rw-r--r--sd/source/ui/func/fuprobjs.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index a200955bb51f..57536ef76721 100644
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -41,6 +41,8 @@
#include "prlayout.hxx"
#include "unchss.hxx"
#include "sdabstdlg.hxx"
+#include <boost/scoped_ptr.hpp>
+
namespace sd {
TYPEINIT1( FuPresentationObjects, FuPoor );
@@ -142,7 +144,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
SfxStyleSheetBase& rStyleSheet = *pStyleSheet;
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- SfxAbstractTabDialog* pDlg = pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, NULL, SdResId( nDlgId ), rStyleSheet, ePO, pStyleSheetPool ) : 0;
+ boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, NULL, SdResId( nDlgId ), rStyleSheet, ePO, pStyleSheetPool ) : 0);
if( pDlg && (pDlg->Execute() == RET_OK) )
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
@@ -155,7 +157,6 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
pStyleSheet->GetItemSet().Put( *pOutSet );
( (SfxStyleSheet*) pStyleSheet )->Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
}
- delete( pDlg );
}
}
}