diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-13 10:00:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-13 11:49:29 +0100 |
commit | 187e2dbd6ece29c27c851a71bb02b2b52bb8d13f (patch) | |
tree | e0fabe749fe949085061d7ab52cceee5cb20b79f /xmloff | |
parent | 3a10baaf8faad1a615a53400a9a168144c6d6599 (diff) |
coverity#1372877 I'm guessing this is what might have been the intent
warning is 'Constant' variable guards dead code
Change-Id: I06e65f576180d7ff62417828c26f969982788b55
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 9ac8b593a675..87adeecd75eb 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -659,9 +659,9 @@ void SAL_CALL SvXMLImport::endDocument() } } -void SvXMLImport::processNSAttributes( const uno::Reference< xml::sax::XAttributeList >& xAttrList, - SvXMLNamespaceMap *pRewindMap ) +SvXMLNamespaceMap* SvXMLImport::processNSAttributes(const uno::Reference< xml::sax::XAttributeList >& xAttrList) { + SvXMLNamespaceMap *pRewindMap = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -709,17 +709,17 @@ void SvXMLImport::processNSAttributes( const uno::Reference< xml::sax::XAttribut } } + return pRewindMap; } void SAL_CALL SvXMLImport::startElement( const OUString& rName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) throw(xml::sax::SAXException, uno::RuntimeException, std::exception) { - SvXMLNamespaceMap *pRewindMap = nullptr; // SAL_INFO("svg", "startElement " << rName); // Process namespace attributes. This must happen before creating the // context, because namespace decaration apply to the element name itself. - processNSAttributes( xAttrList, pRewindMap ); + SvXMLNamespaceMap *pRewindMap = processNSAttributes(xAttrList); // Get element's namespace and local name. OUString aLocalName; @@ -873,8 +873,7 @@ void SAL_CALL SvXMLImport::startFastElement (sal_Int32 Element, { rtl::Reference < comphelper::AttributeList > rAttrList = new comphelper::AttributeList; maNamespaceHandler->addNSDeclAttributes( rAttrList ); - SvXMLNamespaceMap *pRewindMap = nullptr; - processNSAttributes( rAttrList.get(), pRewindMap ); + SvXMLNamespaceMap *pRewindMap = processNSAttributes(rAttrList.get()); SvXMLImportContext *pContext = dynamic_cast<SvXMLImportContext*>( xContext.get() ); if( pContext && pRewindMap ) pContext->PutRewindMap( pRewindMap ); |