diff options
author | Arnold Dumas <arnold@dumas.at> | 2016-08-14 23:02:00 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-08-15 06:47:08 +0000 |
commit | b2465ef049d06b9ee91a6e8cd1e4c4e777d9f436 (patch) | |
tree | 1eb8eb7ae0d3c8420e55c0ef6a420cff6dbabb75 /dbaccess | |
parent | d64395704e1a41e8f39e70a219ce3be90928e04d (diff) |
tdf#89329: use unique_ptr for pImpl in dlgsave
Change-Id: I3743637b2ad5747073e61a46cdb28604dd9fb95f
Reviewed-on: https://gerrit.libreoffice.org/28114
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/dlgsave.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dlgsave.hxx | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index 2a08d66ad7a1..ff0d5bfc7ee9 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -179,7 +179,7 @@ OSaveAsDlg::OSaveAsDlg( vcl::Window * pParent, : ModalDialog(pParent, "SaveDialog", "dbaccess/ui/savedialog.ui") , m_xContext( _rxContext ) { - m_pImpl = new OSaveAsDlgImpl(this,_rType,_xConnection,rDefault,_rObjectNameCheck,_nFlags); + m_pImpl.reset( new OSaveAsDlgImpl(this,_rType,_xConnection,rDefault,_rObjectNameCheck,_nFlags) ); switch (_rType) { case CommandType::QUERY: @@ -261,7 +261,7 @@ OSaveAsDlg::OSaveAsDlg( vcl::Window * pParent, : ModalDialog(pParent, "SaveDialog", "dbaccess/ui/savedialog.ui") , m_xContext( _rxContext ) { - m_pImpl = new OSaveAsDlgImpl(this,rDefault,_rObjectNameCheck,_nFlags); + m_pImpl.reset( new OSaveAsDlgImpl(this,rDefault,_rObjectNameCheck,_nFlags) ); implInitOnlyTitle(_sLabel); implInit(); } @@ -273,7 +273,7 @@ OSaveAsDlg::~OSaveAsDlg() void OSaveAsDlg::dispose() { - DELETEZ(m_pImpl); + m_pImpl.reset(); ModalDialog::dispose(); } diff --git a/dbaccess/source/ui/inc/dlgsave.hxx b/dbaccess/source/ui/inc/dlgsave.hxx index e20cec77768c..f8cbcc819cb1 100644 --- a/dbaccess/source/ui/inc/dlgsave.hxx +++ b/dbaccess/source/ui/inc/dlgsave.hxx @@ -25,6 +25,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <vcl/msgbox.hxx> +#include <memory> namespace com { namespace sun { namespace star { namespace sdbc { @@ -49,7 +50,7 @@ namespace dbaui class OSaveAsDlg : public ModalDialog { private: - OSaveAsDlgImpl* m_pImpl; + std::unique_ptr<OSaveAsDlgImpl> m_pImpl; css::uno::Reference< css::uno::XComponentContext > m_xContext; public: OSaveAsDlg( vcl::Window * pParent, sal_Int32 _rType, |