summaryrefslogtreecommitdiff
path: root/sw/source/uibase/envelp/syncbtn.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/envelp/syncbtn.cxx')
-rw-r--r--sw/source/uibase/envelp/syncbtn.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/sw/source/uibase/envelp/syncbtn.cxx b/sw/source/uibase/envelp/syncbtn.cxx
index a6b73da14126..e75751de5a31 100644
--- a/sw/source/uibase/envelp/syncbtn.cxx
+++ b/sw/source/uibase/envelp/syncbtn.cxx
@@ -37,7 +37,7 @@ SwSyncChildWin::SwSyncChildWin( vcl::Window* _pParent,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( _pParent, nId )
{
- pWindow = new SwSyncBtnDlg( pBindings, this, _pParent);
+ pWindow = VclPtr<SwSyncBtnDlg>::Create( pBindings, this, _pParent);
if (!pInfo->aSize.Width() || !pInfo->aSize.Height())
{
@@ -53,7 +53,7 @@ SwSyncChildWin::SwSyncChildWin( vcl::Window* _pParent,
pInfo->aSize = pWindow->GetSizePixel();
}
- static_cast<SwSyncBtnDlg *>(pWindow)->Initialize(pInfo);
+ static_cast<SwSyncBtnDlg *>(pWindow.get())->Initialize(pInfo);
pWindow->Show();
}
@@ -68,6 +68,17 @@ SwSyncBtnDlg::SwSyncBtnDlg( SfxBindings* _pBindings,
Show();
}
+SwSyncBtnDlg::~SwSyncBtnDlg()
+{
+ disposeOnce();
+}
+
+void SwSyncBtnDlg::dispose()
+{
+ m_pSyncBtn.clear();
+ SfxFloatingWindow::dispose();
+}
+
IMPL_LINK_NOARG(SwSyncBtnDlg, BtnHdl)
{
SfxViewFrame::Current()->GetDispatcher()->Execute(FN_UPDATE_ALL_LINKS, SfxCallMode::ASYNCHRON);