diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-17 18:24:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-18 08:16:49 +0100 |
commit | d8326e80c6f5a6d393c1d18479c31c81ca1d9239 (patch) | |
tree | e04dde7fb89e7202c89e57e39fe11dcd90ebf17f /sax/source | |
parent | 466ec5aa2afca2d8eb3ee509bbb7753f2aec7544 (diff) |
loplugin:referencecasting in sax
Change-Id: Ie7371b2c6ed340ce8417af03aa4f7b60890392ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111081
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sax/source')
-rw-r--r-- | sax/source/expatwrap/sax_expat.cxx | 2 | ||||
-rw-r--r-- | sax/source/fastparser/fastparser.cxx | 5 | ||||
-rw-r--r-- | sax/source/fastparser/legacyfastparser.cxx | 10 |
3 files changed, 8 insertions, 9 deletions
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index 885d9757dc43..6017dc354001 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -718,7 +718,7 @@ void SaxExpatParser_Impl::callbackStartElement( void *pvThis , CALL_ELEMENT_HANDLER_AND_CARE_FOR_EXCEPTIONS( pImpl , rDocumentHandler->startElement( XML_CHAR_TO_OUSTRING( pwName ) , - pImpl->rAttrList.get() ) ); + pImpl->rAttrList ) ); } void SaxExpatParser_Impl::callbackEndElement( void *pvThis , const XML_Char *pwName ) diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index e225f17a1621..f35e56e8ab7f 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -433,7 +433,7 @@ void Entity::startElement( Event const *pEvent ) try { - Reference< XFastAttributeList > xAttr( pEvent->mxAttributes.get() ); + Reference< XFastAttributeList > xAttr( pEvent->mxAttributes ); Reference< XFastContextHandler > xContext; if ( mxNamespaceHandler.is() ) @@ -834,8 +834,7 @@ void FastSaxParserImpl::parseStream(const InputSource& rStructSource) // start the document if( rEntity.mxDocumentHandler.is() ) { - Reference< XLocator > xLoc( mxDocumentLocator.get() ); - rEntity.mxDocumentHandler->setDocumentLocator( xLoc ); + rEntity.mxDocumentHandler->setDocumentLocator( mxDocumentLocator ); rEntity.mxDocumentHandler->startDocument(); } diff --git a/sax/source/fastparser/legacyfastparser.cxx b/sax/source/fastparser/legacyfastparser.cxx index e1aac8df6c9c..c748eb057fbe 100644 --- a/sax/source/fastparser/legacyfastparser.cxx +++ b/sax/source/fastparser/legacyfastparser.cxx @@ -180,7 +180,7 @@ CallbackDocumentHandler::CallbackDocumentHandler( Reference< XDocumentHandler > Reference< XFastTokenHandler > const & xTokenHandler) { m_xDocumentHandler.set( xDocumentHandler ); - m_aNamespaceHandler.set( rNamespaceHandler.get() ); + m_aNamespaceHandler = rNamespaceHandler; m_xTokenHandler.set( xTokenHandler ); } @@ -244,7 +244,7 @@ void SAL_CALL CallbackDocumentHandler::startUnknownElement( const OUString& /*Na rAttrList->AddAttribute( rAttrName, "CDATA", rAttrValue ); } - m_xDocumentHandler->startElement( Name, rAttrList.get() ); + m_xDocumentHandler->startElement( Name, rAttrList ); } void SAL_CALL CallbackDocumentHandler::endFastElement( sal_Int32 nElement ) @@ -283,7 +283,7 @@ void SAL_CALL CallbackDocumentHandler::characters( const OUString& aChars ) SaxLegacyFastParser::SaxLegacyFastParser( ) : m_aNamespaceHandler( new NamespaceHandler ), m_xParser(FastParser::create(::comphelper::getProcessComponentContext() )) { - m_xParser->setNamespaceHandler( m_aNamespaceHandler.get() ); + m_xParser->setNamespaceHandler( m_aNamespaceHandler ); } void SAL_CALL SaxLegacyFastParser::initialize(Sequence< Any > const& rArguments ) @@ -316,8 +316,8 @@ void SAL_CALL SaxLegacyFastParser::initialize(Sequence< Any > const& rArguments void SaxLegacyFastParser::parseStream( const InputSource& structSource ) { - m_xParser->setFastDocumentHandler( new CallbackDocumentHandler( m_xDocumentHandler.get(), - m_aNamespaceHandler.get(), m_xTokenHandler.get() ) ); + m_xParser->setFastDocumentHandler( new CallbackDocumentHandler( m_xDocumentHandler, + m_aNamespaceHandler, m_xTokenHandler ) ); m_xParser->setTokenHandler( m_xTokenHandler ); m_xParser->parseStream( structSource ); } |