diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-16 11:40:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-16 13:39:33 +0200 |
commit | 32eb4d56a4ea93e7dbfd947b62e18f05d8215421 (patch) | |
tree | 4594949fcc3cc52878f63f491b9d9bc402975a3b /sc | |
parent | 0c44f702a04db0fffd6884dcb014b28cdff5b21c (diff) |
use rtl::Reference for SvXMLGraphicHelper
Change-Id: I0052b29660fb6157f7e98c4e124f030ba439d304
Reviewed-on: https://gerrit.libreoffice.org/43417
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/xmlwrap.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 7e35690aed86..398f27e14ba8 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -867,12 +867,12 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) rtl::Reference<SvXMLEmbeddedObjectHelper> xObjectHelper; uno::Reference< document::XGraphicObjectResolver > xGrfContainer; - SvXMLGraphicHelper* pGraphicHelper = nullptr; + rtl::Reference<SvXMLGraphicHelper> xGraphicHelper; if( xStorage.is() ) { - pGraphicHelper = SvXMLGraphicHelper::Create( xStorage, SvXMLGraphicHelperMode::Write, false ); - xGrfContainer = pGraphicHelper; + xGraphicHelper = SvXMLGraphicHelper::Create( xStorage, SvXMLGraphicHelperMode::Write, false ); + xGrfContainer = xGraphicHelper.get(); } if( pObjSh ) @@ -928,8 +928,9 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) SAL_INFO( "sc.filter", "content export end" ); } - if( pGraphicHelper ) - SvXMLGraphicHelper::Destroy( pGraphicHelper ); + if( xGraphicHelper ) + xGraphicHelper->dispose(); + xGraphicHelper.clear(); if( xObjectHelper ) xObjectHelper->dispose(); |