[Libreoffice-commits] core.git: include/svx svx/source

Arnold Dumas arnold at dumas.at
Mon Aug 22 06:28:29 UTC 2016


 include/svx/svdouno.hxx       |    3 ++-
 svx/source/svdraw/svdouno.cxx |    1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 57574c988c9efda1b9c72338378973a6ce0741e8
Author: Arnold Dumas <arnold at dumas.at>
Date:   Sun Aug 21 18:54:00 2016 +0200

    tdf#89329: use unique_ptr for pImpl in svdouno
    
    Change-Id: I3e2fc34fecb735cb9696d2943e69cc9929930e23
    Reviewed-on: https://gerrit.libreoffice.org/28278
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/include/svx/svdouno.hxx b/include/svx/svdouno.hxx
index 59af7fd..0c68529 100644
--- a/include/svx/svdouno.hxx
+++ b/include/svx/svdouno.hxx
@@ -26,6 +26,7 @@
 #include <com/sun/star/awt/XControlContainer.hpp>
 #include <svx/svxdllapi.h>
 #include <svx/svdorect.hxx>
+#include <memory>
 
 
 // Forward declaration
@@ -45,7 +46,7 @@ class SVX_DLLPUBLIC SdrUnoObj : public SdrRectObj
     friend class                SdrPageView;
     friend class                SdrControlEventListenerImpl;
 
-    SdrUnoObjDataHolder*        m_pImpl;
+    std::unique_ptr<SdrUnoObjDataHolder>        m_pImpl;
 
     OUString                    aUnoControlModelTypeName;
     OUString                    aUnoControlTypeName;
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx
index eac5c32..9ef7d6c 100644
--- a/svx/source/svdraw/svdouno.cxx
+++ b/svx/source/svdraw/svdouno.cxx
@@ -192,7 +192,6 @@ SdrUnoObj::~SdrUnoObj()
     {
         OSL_FAIL( "SdrUnoObj::~SdrUnoObj: caught an exception!" );
     }
-    delete m_pImpl;
 }
 
 void SdrUnoObj::SetModel(SdrModel* pNewModel)


More information about the Libreoffice-commits mailing list