diff options
Diffstat (limited to 'chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx')
-rw-r--r-- | chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index 1672e8d0b6b4..34df8acaca78 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -54,11 +54,7 @@ CreationWizardUnoDlg::CreationWizardUnoDlg( const uno::Reference< uno::XComponen CreationWizardUnoDlg::~CreationWizardUnoDlg() { SolarMutexGuard aSolarGuard; - if( m_pDialog ) - { - delete m_pDialog; - m_pDialog = 0; - } + m_pDialog.disposeAndClear(); } // lang::XServiceInfo OUString SAL_CALL CreationWizardUnoDlg::getImplementationName() @@ -216,7 +212,7 @@ void CreationWizardUnoDlg::createDialogOnDemand() uno::Reference< XComponent > xComp( this ); if( m_xChartModel.is() ) { - m_pDialog = new CreationWizard( pParent, m_xChartModel, m_xCC ); + m_pDialog = VclPtr<CreationWizard>::Create( pParent, m_xChartModel, m_xCC ); m_pDialog->AddEventListener( LINK( this, CreationWizardUnoDlg, DialogEventHdl ) ); } } @@ -272,11 +268,7 @@ void SAL_CALL CreationWizardUnoDlg::disposing() m_xParentWindow.clear(); SolarMutexGuard aSolarGuard; - if( m_pDialog ) - { - delete m_pDialog; - m_pDialog = 0; - } + m_pDialog.disposeAndClear(); try { |