summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-06-06 00:50:58 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-06 07:07:21 +0000
commitfd393faa68d5979d319900438a789d40630a56ec (patch)
treebfe2043301ca06d919dce9799ed4b9296edd1420
parenta6ea18a9cc83a85f4bf4fce78b7dbef3d1a419c6 (diff)
tdf#89329: use unique_ptr for pImpl in svdmodel
Change-Id: Ied5f57b2cf4004de70d0aec8e1b6b69603428a69 Reviewed-on: https://gerrit.libreoffice.org/25940 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--include/svx/svdmodel.hxx2
-rw-r--r--svx/source/svdraw/svdmodel.cxx3
2 files changed, 2 insertions, 3 deletions
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 65889f4569eb..b0e4d56c8e20 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 b654568ec920..acef3ac0a307 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()