summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/newstyle.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/dialog/newstyle.cxx')
-rw-r--r--sfx2/source/dialog/newstyle.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index a2f43fb10ab3..d3f26dc748cb 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -41,7 +41,7 @@ IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl )
return 0;
}
- if ( RET_YES == aQueryOverwriteBox.Execute() )
+ if ( RET_YES == aQueryOverwriteBox->Execute() )
EndDialog( RET_OK );
}
else
@@ -59,8 +59,8 @@ IMPL_LINK_INLINE_END( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
SfxNewStyleDlg::SfxNewStyleDlg( vcl::Window* pParent, SfxStyleSheetBasePool& rInPool )
: ModalDialog(pParent, "CreateStyleDialog", "sfx/ui/newstyle.ui")
- , aQueryOverwriteBox(this, SfxResId(STR_QUERY_OVERWRITE),
- VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)
+ , aQueryOverwriteBox(VclPtr<MessageDialog>::Create(this, SfxResId(STR_QUERY_OVERWRITE),
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO))
, rPool(rInPool)
{
get(m_pColBox, "stylename");
@@ -82,6 +82,15 @@ SfxNewStyleDlg::SfxNewStyleDlg( vcl::Window* pParent, SfxStyleSheetBasePool& rIn
SfxNewStyleDlg::~SfxNewStyleDlg()
{
+ disposeOnce();
+}
+
+void SfxNewStyleDlg::dispose()
+{
+ aQueryOverwriteBox.disposeAndClear();
+ m_pColBox.clear();
+ m_pOKBtn.clear();
+ ModalDialog::dispose();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */