diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-21 12:12:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-22 11:01:53 +0200 |
commit | 442df6cf8345f8029d5a3b470bc4981a5aa2bf20 (patch) | |
tree | 9efa6f2b29f41d79f968d1e8ad2588c323305776 /xmloff/source/style/prstylei.cxx | |
parent | a411d7729ab2bed05c3c5d22a8cbcf5dde034b91 (diff) |
ofz: don't leak in face of exceptions
Change-Id: Ic15590a13bd3770ee5dd7db76b21c830a4fe73e2
Reviewed-on: https://gerrit.libreoffice.org/42587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmloff/source/style/prstylei.cxx')
-rw-r--r-- | xmloff/source/style/prstylei.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx index 97a6c7861728..51b3578029af 100644 --- a/xmloff/source/style/prstylei.cxx +++ b/xmloff/source/style/prstylei.cxx @@ -172,12 +172,12 @@ const OldFillStyleDefinitionSet& XMLPropStyleContext::getFooterSet() return theFooterSet::get(); } -SvXMLImportContext *XMLPropStyleContext::CreateChildContext( +SvXMLImportContextRef XMLPropStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; sal_uInt32 nFamily = 0; if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) @@ -211,18 +211,18 @@ SvXMLImportContext *XMLPropStyleContext::CreateChildContext( static_cast<SvXMLStylesContext *>(mxStyles.get())->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) - pContext = new SvXMLPropertySetContext( GetImport(), nPrefix, + xContext = new SvXMLPropertySetContext( GetImport(), nPrefix, rLocalName, xAttrList, nFamily, maProperties, xImpPrMap ); } - if( !pContext ) - pContext = SvXMLStyleContext::CreateChildContext( nPrefix, rLocalName, + if (!xContext) + xContext = SvXMLStyleContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } void XMLPropStyleContext::FillPropertySet( |