From 43e8797add78ba172abdc75457500d68c15473eb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 19 Jan 2017 08:47:57 +0200 Subject: use rtl::Reference in ExtendedAttributes instead of manual acquire/release Change-Id: Ibf91b19ecace75b7c304f2a1b2acdd8a4ca28452 --- xmlscript/source/xml_helper/xml_impctx.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'xmlscript') diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx index 52999fa83d9c..859197517bd4 100644 --- a/xmlscript/source/xml_helper/xml_impctx.cxx +++ b/xmlscript/source/xml_helper/xml_impctx.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -332,7 +333,7 @@ class ExtendedAttributes : OUString * m_pQNames; OUString * m_pValues; - DocumentHandlerImpl * m_pHandler; + rtl::Reference m_xHandler; public: inline ExtendedAttributes( @@ -383,10 +384,8 @@ inline ExtendedAttributes::ExtendedAttributes( , m_pLocalNames( pLocalNames ) , m_pQNames( pQNames ) , m_pValues( new OUString[ nAttributes ] ) - , m_pHandler( pHandler ) + , m_xHandler( pHandler ) { - m_pHandler->acquire(); - for ( sal_Int32 nPos = 0; nPos < nAttributes; ++nPos ) { m_pValues[ nPos ] = xAttributeList->getValueByIndex( nPos ); @@ -395,8 +394,6 @@ inline ExtendedAttributes::ExtendedAttributes( ExtendedAttributes::~ExtendedAttributes() throw () { - m_pHandler->release(); - delete [] m_pUids; delete [] m_pLocalNames; delete [] m_pQNames; -- cgit