diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-17 15:51:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-18 13:12:55 +0100 |
commit | caa25f8e5f39e95fec1b32e352c841a6c0bf2fb3 (patch) | |
tree | 919330dcf1bbb2a6b28f3d99389f2067ce0a4b49 /filter | |
parent | 8f4e9ea8705af4b6bdced8890410cd537363d18d (diff) |
pass SvxMSDffImportRec around using unique_ptr
Change-Id: Ib2a93682f6d2745489e07cf04e3509146213c7ee
Reviewed-on: https://gerrit.libreoffice.org/66571
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 06deedf59392..e9e6cbfe2f24 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -5056,10 +5056,10 @@ SvxMSDffImportRec* SvxMSDffImportData::find(const SdrObject* pObj) return nullptr; } -void SvxMSDffImportData::insert(SvxMSDffImportRec* pImpRec) +void SvxMSDffImportData::insert(std::unique_ptr<SvxMSDffImportRec> pImpRec) { - m_ObjToRecMap[pImpRec->pObj] = pImpRec; - m_Records.insert(std::unique_ptr<SvxMSDffImportRec>(pImpRec)); + m_ObjToRecMap[pImpRec->pObj] = pImpRec.get(); + m_Records.insert(std::move(pImpRec)); } void SvxMSDffImportData::NotifyFreeObj(SdrObject* pObj) @@ -5576,7 +5576,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, if( pOrgObj ) { pImpRec->pObj = pOrgObj; - rImportData.insert(pImpRec); + rImportData.insert(std::unique_ptr<SvxMSDffImportRec>(pImpRec)); bDeleteImpRec = false; if (pImpRec == pTextImpRec) bDeleteTextImpRec = false; @@ -5587,7 +5587,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, // Modify ShapeId (must be unique) pImpRec->nShapeId |= 0x8000000; pTextImpRec->pObj = pTextObj; - rImportData.insert(pTextImpRec); + rImportData.insert(std::unique_ptr<SvxMSDffImportRec>(pTextImpRec)); bDeleteTextImpRec = false; if (pTextImpRec == pImpRec) bDeleteImpRec = false; |