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

Xisco Fauli anistenis at gmail.com
Mon Jun 6 07:07:42 UTC 2016


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

New commits:
commit fd393faa68d5979d319900438a789d40630a56ec
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Mon Jun 6 00:50:58 2016 +0200

    tdf#89329: use unique_ptr for pImpl in svdmodel
    
    Change-Id: Ied5f57b2cf4004de70d0aec8e1b6b69603428a69
    Reviewed-on: https://gerrit.libreoffice.org/25940
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 65889f4..b0e4d56 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -226,7 +226,7 @@ public:
     SdrOutlinerCache*   mpOutlinerCache;
     //get a vector of all the SdrOutliner belonging to the model
     std::vector<SdrOutliner*> GetActiveOutliners() const;
-    SdrModelImpl*       mpImpl;
+    std::unique_ptr<SdrModelImpl>       mpImpl;
     sal_uInt16          mnCharCompressType;
     sal_uInt16          mnHandoutPageCount;
     sal_uInt16          nReserveUInt6;
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index b654568..acef3ac 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -107,7 +107,7 @@ struct SdrModelImpl
 void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbeddedHelper,
     bool bUseExtColorTable)
 {
-    mpImpl = new SdrModelImpl;
+    mpImpl.reset(new SdrModelImpl);
     mpImpl->mpUndoManager=nullptr;
     mpImpl->mpUndoFactory=nullptr;
     mbInDestruction = false;
@@ -316,7 +316,6 @@ SdrModel::~SdrModel()
     delete mpNumberFormatter;
 
     delete mpImpl->mpUndoFactory;
-    delete mpImpl;
 }
 
 void SdrModel::SetSwapGraphics()


More information about the Libreoffice-commits mailing list