From fbe6619a34b617a04a5135e40c70a172a44eefef Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 13 Jan 2015 14:50:19 +0200 Subject: vcl: VclPtr conversion in sfx2 Change-Id: I78ea3f4304ace27c6db0e3d0651bd65043dcbc68 --- sfx2/source/dialog/newstyle.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'sfx2/source/dialog/newstyle.cxx') diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index a2f43fb10ab3..b8ec5b1a83e5 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(new MessageDialog(this, SfxResId(STR_QUERY_OVERWRITE), + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)) , rPool(rInPool) { get(m_pColBox, "stylename"); @@ -82,6 +82,13 @@ SfxNewStyleDlg::SfxNewStyleDlg( vcl::Window* pParent, SfxStyleSheetBasePool& rIn SfxNewStyleDlg::~SfxNewStyleDlg() { + dispose(); +} + +void SfxNewStyleDlg::dispose() +{ + aQueryOverwriteBox.disposeAndClear(); + ModalDialog::dispose(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit