dbaccess/source/ui/dlg/dlgsave.cxx |    6 +++---
 dbaccess/source/ui/inc/dlgsave.hxx |    3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit b2465ef049d06b9ee91a6e8cd1e4c4e777d9f436
Author: Arnold Dumas <arn...@dumas.at>
Date:   Sun Aug 14 23:02:00 2016 +0200

    tdf#89329: use unique_ptr for pImpl in dlgsave
    
    Change-Id: I3743637b2ad5747073e61a46cdb28604dd9fb95f
    Reviewed-on: https://gerrit.libreoffice.org/28114
    Reviewed-by: Noel Grandin <noelgran...@gmail.com>
    Tested-by: Noel Grandin <noelgran...@gmail.com>

diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx 
b/dbaccess/source/ui/dlg/dlgsave.cxx
index 2a08d66..ff0d5bf 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 e20cec7..f8cbcc8 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,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to