diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-28 15:35:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-05 07:28:43 +0100 |
commit | cab19696ce0a441e83ff1012de014265a6d4c471 (patch) | |
tree | c8d59e597601fde2d097318a22959bc633d6f227 | |
parent | e7fe6de011c34223352ad6b60d47a442b44ac5c9 (diff) |
loplugin:useuniqueptr in SvxMSDffManager
Change-Id: I2e3ef185d370ccacc0d1e99b5f9e732a829fdc55
Reviewed-on: https://gerrit.libreoffice.org/50693
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 5 | ||||
-rw-r--r-- | include/filter/msfilter/msdffimp.hxx | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index ec6311454449..5cf0b9f90d8b 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -4248,8 +4248,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r if ( aObjData.bOpt2 ) { maShapeRecords.Current()->SeekToBegOfRecord( rSt ); - delete pSecPropSet; - pSecPropSet = new DffPropertyReader( *this ); + pSecPropSet.reset( new DffPropertyReader( *this ) ); pSecPropSet->ReadPropSet( rSt, nullptr ); } @@ -5698,8 +5697,6 @@ SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const OUString& rBaseURL ) SvxMSDffManager::~SvxMSDffManager() { - delete pSecPropSet; - delete m_pBLIPInfos; } void SvxMSDffManager::InitSvxMSDffManager( sal_uInt32 nOffsDgg_, SvStream* pStData_, sal_uInt32 nOleConvFlags ) diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index 0600f7dbdfde..aafb47b3bc88 100644 --- a/include/filter/msfilter/msdffimp.hxx +++ b/include/filter/msfilter/msdffimp.hxx @@ -397,7 +397,7 @@ public: */ class MSFILTER_DLLPUBLIC SvxMSDffManager : public DffPropertyReader { - SvxMSDffBLIPInfos* m_pBLIPInfos; + std::unique_ptr<SvxMSDffBLIPInfos> m_pBLIPInfos; std::unique_ptr<SvxMSDffShapeInfos_ByTxBxComp> m_xShapeInfosByTxBxComp; std::unique_ptr<SvxMSDffShapeInfos_ById> m_xShapeInfosById; SvxMSDffShapeOrders m_aShapeOrders; @@ -528,7 +528,7 @@ protected: virtual bool ShapeHasText(sal_uLong nShapeId, sal_uLong nFilePos) const; public: - DffPropertyReader* pSecPropSet; + std::unique_ptr<DffPropertyReader> pSecPropSet; std::map<sal_uInt32,OString> aEscherBlipCache; DffRecordManager maShapeRecords; |