diff options
-rw-r--r-- | include/xmloff/xmlimp.hxx | 3 | ||||
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 11 |
2 files changed, 6 insertions, 8 deletions
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index 55b7169ea9ad..ba63b84ee65c 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -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: 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 ); |