summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx5
-rw-r--r--scripting/source/protocolhandler/scripthandler.cxx9
-rw-r--r--sw/source/uibase/shells/textidx.cxx3
3 files changed, 6 insertions, 11 deletions
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index e42917a4d469..36050651c662 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -543,14 +543,13 @@ IMPL_LINK( ScOptSolverDlg, BtnHdl, PushButton*, pBtn )
else if ( pBtn == m_pBtnOpt )
{
//! move options dialog to UI lib?
- ScSolverOptionsDialog* pOptDlg =
- new ScSolverOptionsDialog( this, maImplNames, maDescriptions, maEngine, maProperties );
+ boost::scoped_ptr<ScSolverOptionsDialog> pOptDlg(
+ new ScSolverOptionsDialog( this, maImplNames, maDescriptions, maEngine, maProperties ));
if ( pOptDlg->Execute() == RET_OK )
{
maEngine = pOptDlg->GetEngine();
maProperties = pOptDlg->GetProperties();
}
- delete pOptDlg;
}
return 0;
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index b5760b613bc9..e959d3fe6ef6 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -273,14 +273,11 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
if ( pFact != NULL )
{
- VclAbstractDialog* pDlg =
- pFact->CreateScriptErrorDialog( NULL, aException );
+ boost::scoped_ptr<VclAbstractDialog> pDlg(
+ pFact->CreateScriptErrorDialog( NULL, aException ));
- if ( pDlg != NULL )
- {
+ if ( pDlg )
pDlg->Execute();
- delete pDlg;
- }
}
}
diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx
index 4cbdb6136b8a..49c806a8819f 100644
--- a/sw/source/uibase/shells/textidx.cxx
+++ b/sw/source/uibase/shells/textidx.cxx
@@ -84,10 +84,9 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
{ // Several marks, which should it be?
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- VclAbstractDialog* pMultDlg = pFact->CreateMultiTOXMarkDlg(pMDI, aMgr);
+ boost::scoped_ptr<VclAbstractDialog> pMultDlg(pFact->CreateMultiTOXMarkDlg(pMDI, aMgr));
OSL_ENSURE(pMultDlg, "Dialog creation failed!");
nRet = pMultDlg->Execute();
- delete pMultDlg;
}
if( nRet == RET_OK)
{