summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/ximpgrp.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-09-21 12:12:33 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-09-22 11:01:53 +0200
commit442df6cf8345f8029d5a3b470bc4981a5aa2bf20 (patch)
tree9efa6f2b29f41d79f968d1e8ad2588c323305776 /xmloff/source/draw/ximpgrp.cxx
parenta411d7729ab2bed05c3c5d22a8cbcf5dde034b91 (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/draw/ximpgrp.cxx')
-rw-r--r--xmloff/source/draw/ximpgrp.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/xmloff/source/draw/ximpgrp.cxx b/xmloff/source/draw/ximpgrp.cxx
index 555f446433b6..3e3284bdccbf 100644
--- a/xmloff/source/draw/ximpgrp.cxx
+++ b/xmloff/source/draw/ximpgrp.cxx
@@ -42,21 +42,21 @@ SdXMLGroupShapeContext::~SdXMLGroupShapeContext()
{
}
-SvXMLImportContext* SdXMLGroupShapeContext::CreateChildContext( sal_uInt16 nPrefix,
+SvXMLImportContextRef SdXMLGroupShapeContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext* pContext = nullptr;
+ SvXMLImportContextRef xContext;
// #i68101#
if( nPrefix == XML_NAMESPACE_SVG &&
(IsXMLToken( rLocalName, XML_TITLE ) || IsXMLToken( rLocalName, XML_DESC ) ) )
{
- pContext = new SdXMLDescriptionContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape );
+ xContext = new SdXMLDescriptionContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape );
}
else if( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken( rLocalName, XML_EVENT_LISTENERS ) )
{
- pContext = new SdXMLEventsContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape );
+ xContext = new SdXMLEventsContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape );
}
else if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_GLUE_POINT ) )
{
@@ -65,16 +65,16 @@ SvXMLImportContext* SdXMLGroupShapeContext::CreateChildContext( sal_uInt16 nPref
else
{
// call GroupChildContext function at common ShapeImport
- pContext = GetImport().GetShapeImport()->CreateGroupChildContext(
+ xContext = GetImport().GetShapeImport()->CreateGroupChildContext(
GetImport(), nPrefix, rLocalName, xAttrList, mxChildren);
}
// call parent when no own context was created
- if(!pContext)
- pContext = SvXMLImportContext::CreateChildContext(
+ if (!xContext)
+ xContext = SvXMLImportContext::CreateChildContext(
nPrefix, rLocalName, xAttrList);
- return pContext;
+ return xContext;
}
void SdXMLGroupShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>&)