diff options
Diffstat (limited to 'sw/source/uibase/dbui/mailmergechildwindow.cxx')
-rw-r--r-- | sw/source/uibase/dbui/mailmergechildwindow.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sw/source/uibase/dbui/mailmergechildwindow.cxx b/sw/source/uibase/dbui/mailmergechildwindow.cxx index e43731b1e399..ad16a82acf59 100644 --- a/sw/source/uibase/dbui/mailmergechildwindow.cxx +++ b/sw/source/uibase/dbui/mailmergechildwindow.cxx @@ -43,7 +43,7 @@ SwMailMergeChildWindow::SwMailMergeChildWindow( vcl::Window* _pParent, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) { - pWindow = new SwMailMergeChildWin( pBindings, this, _pParent); + pWindow = VclPtr<SwMailMergeChildWin>::Create( pBindings, this, _pParent); if (!pInfo->aSize.Width() || !pInfo->aSize.Height()) { @@ -59,7 +59,7 @@ SwMailMergeChildWindow::SwMailMergeChildWindow( vcl::Window* _pParent, pInfo->aSize = pWindow->GetSizePixel(); } - static_cast<SwMailMergeChildWin *>(pWindow)->Initialize(pInfo); + static_cast<SwMailMergeChildWin *>(pWindow.get())->Initialize(pInfo); pWindow->Show(); } @@ -73,6 +73,17 @@ SwMailMergeChildWin::SwMailMergeChildWin(SfxBindings* _pBindings, m_pBackTB->SetButtonType( ButtonType::SYMBOLTEXT ); } +SwMailMergeChildWin::~SwMailMergeChildWin() +{ + disposeOnce(); +} + +void SwMailMergeChildWin::dispose() +{ + m_pBackTB.clear(); + SfxFloatingWindow::dispose(); +} + IMPL_LINK_NOARG(SwMailMergeChildWin, BackHdl) { GetBindings().GetDispatcher()->Execute(FN_MAILMERGE_WIZARD, SfxCallMode::ASYNCHRON); |