diff options
author | David Tardon <dtardon@redhat.com> | 2016-09-08 11:05:39 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-09-09 07:30:30 +0200 |
commit | bb35e4dcf986619edb300f4dcd35d54b04dce034 (patch) | |
tree | 69b631d8e35ad2e4a6f3f6be211feda39e46ddf9 /xmloff | |
parent | 8b229333aeb98dae259dac068b67195a8baa1423 (diff) |
remove direct memory management
Change-Id: I5dd5d9130f11f47c4b48c1aae9748434ac751d95
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/shapeimport.cxx | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 2402aad98a5b..3f40c5691e6f 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -113,8 +113,6 @@ XMLShapeImportHelper::XMLShapeImportHelper( mpPropertySetMapper(nullptr), mpPresPagePropsMapper(nullptr), - mpStylesContext(nullptr), - mpAutoStylesContext(nullptr), mpGroupShapeElemTokenMap(nullptr), mpFrameShapeElemTokenMap(nullptr), mp3DSceneShapeElemTokenMap(nullptr), @@ -184,17 +182,11 @@ XMLShapeImportHelper::~XMLShapeImportHelper() delete mp3DLightAttrTokenMap; // Styles or AutoStyles context? - if(mpStylesContext) - { - mpStylesContext->Clear(); - mpStylesContext->ReleaseRef(); - } + if(mxStylesContext.is()) + mxStylesContext->Clear(); - if(mpAutoStylesContext) - { - mpAutoStylesContext->Clear(); - mpAutoStylesContext->ReleaseRef(); - } + if(mxAutoStylesContext.is()) + mxAutoStylesContext->Clear(); } const SvXMLTokenMap& XMLShapeImportHelper::GetGroupShapeElemTokenMap() @@ -434,16 +426,12 @@ SvXMLShapeContext* XMLShapeImportHelper::Create3DSceneChildContext( void XMLShapeImportHelper::SetStylesContext(SvXMLStylesContext* pNew) { - mpStylesContext = pNew; - if (mpStylesContext) - mpStylesContext->AddFirstRef(); + mxStylesContext.set(pNew); } void XMLShapeImportHelper::SetAutoStylesContext(SvXMLStylesContext* pNew) { - mpAutoStylesContext = pNew; - if (mpAutoStylesContext) - mpAutoStylesContext->AddFirstRef(); + mxAutoStylesContext.set(pNew); } SvXMLShapeContext* XMLShapeImportHelper::CreateGroupChildContext( |