diff options
Diffstat (limited to 'sw/source/uibase/app')
-rw-r--r-- | sw/source/uibase/app/apphdl.cxx | 11 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/app/docst.cxx | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 8d575cc80672..00a9f81b9718 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -382,7 +382,7 @@ class SwMailMergeWizardExecutor : public salhelper::SimpleReferenceObject { SwView* m_pView; // never owner SwView* m_pView2Close; // never owner - AbstractMailMergeWizard* m_pWizard; // always owner + VclPtr<AbstractMailMergeWizard> m_pWizard; // always owner bool m_bDestroyMMToolbarOnCancel; DECL_LINK( EndDialogHdl, Dialog&, void ); @@ -611,15 +611,15 @@ IMPL_LINK_NOARG( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void ) IMPL_LINK_NOARG(SwMailMergeWizardExecutor, DestroyDialogHdl, void*, void) { - delete m_pWizard; - m_pWizard = nullptr; + m_pWizard.disposeAndClear(); release(); } IMPL_STATIC_LINK(SwMailMergeWizardExecutor, DestroyWizardHdl, void*, pDialog, void ) { - delete static_cast<AbstractMailMergeWizard*>(pDialog); + VclPtr<AbstractMailMergeWizard> p = static_cast<AbstractMailMergeWizard*>(pDialog); + p.disposeAndClear(); } IMPL_LINK_NOARG(SwMailMergeWizardExecutor, CancelHdl, void*, void) @@ -653,8 +653,7 @@ IMPL_LINK_NOARG(SwMailMergeWizardExecutor, CancelHdl, void*, void) xMMConfig->Commit(); } - delete m_pWizard; - m_pWizard = nullptr; + m_pWizard.disposeAndClear(); release(); } diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 8b5a6d95f704..28553126d76d 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -372,9 +372,10 @@ void SwDocShell::Execute(SfxRequest& rReq) aSet.Put( *static_cast<const SfxBoolItem*>(pOpenSmartTagOptionsItem) ); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - SfxAbstractTabDialog* pDlg = pFact->CreateAutoCorrTabDialog( &aSet ); + VclPtr<SfxAbstractTabDialog> pDlg = pFact->CreateAutoCorrTabDialog( &aSet ); pDlg->Execute(); - delete pDlg; + pDlg.disposeAndClear(); + rACW.SetLockWordLstLocked( bOldLocked ); diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index bd551ffdc74b..cd5745715e36 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -554,7 +554,7 @@ private: sal_uInt16 m_nRet; rtl::Reference< SwDocStyleSheet > m_xTmp; SfxStyleFamily m_nFamily; - SfxAbstractApplyTabDialog *m_pDlg; + VclPtr<SfxAbstractApplyTabDialog> m_pDlg; rtl::Reference< SfxStyleSheetBasePool > m_xBasePool; bool m_bModified; }; |