coverity#1372877 I'm guessing this is what might have been the intent
warning is 'Constant' variable guards dead code Change-Id: I06e65f576180d7ff62417828c26f969982788b55
This commit is contained in:
@@ -200,8 +200,7 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public ::cppu::WeakImplHelper8<
|
||||
const OUString getNamespacePrefixFromToken( sal_Int32 nToken );
|
||||
void registerNamespaces();
|
||||
void registerNSHelper(sal_Int32 nToken, sal_Int32 nPrefix, sal_Int32 nNamespace );
|
||||
void processNSAttributes( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
|
||||
SvXMLNamespaceMap *pRewindMap );
|
||||
SvXMLNamespaceMap* processNSAttributes(const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList);
|
||||
void Characters(const OUString& aChars);
|
||||
|
||||
protected:
|
||||
|
@@ -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 );
|
||||
|
Reference in New Issue
Block a user