summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-21 11:17:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-21 14:18:46 +0100
commit996f1b9b325dcccd7b0ebfcacb45a4ffb4cba58e (patch)
tree04af03c2d0fa8a55cd5a549fc1e610c3d62583f6 /starmath
parent08e633d777f1d2cf11a93ccb55f231d084f3220c (diff)
Use FastParser in XMLDocumentSettingsContext
and flatten the pImpl data Change-Id: I8d817cd2af0a3855d10dbfaa580c3379119d5067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87126 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/mathmlimport.cxx27
1 files changed, 5 insertions, 22 deletions
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index c933fae15a28..bcfaae1f7bd6 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -1914,40 +1914,23 @@ public:
virtual void SAL_CALL endFastElement( sal_Int32 /*nElement*/ ) override {}
- virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override;
-
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
};
}
-SvXMLImportContextRef SmXMLOfficeContext_Impl::CreateChildContext(sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference< xml::sax::XAttributeList > &xAttrList)
+uno::Reference< xml::sax::XFastContextHandler > SmXMLOfficeContext_Impl::createFastChildContext(sal_Int32 nElement,
+ const uno::Reference< xml::sax::XFastAttributeList > &/*xAttrList*/)
{
- SvXMLImportContext *pContext = nullptr;
- if ( XML_NAMESPACE_OFFICE == nPrefix &&
- rLocalName == GetXMLToken(XML_META) )
+ if ( nElement == XML_ELEMENT(OFFICE, XML_META) )
{
SAL_WARN("starmath", "XML_TOK_DOC_META: should not have come here, maybe document is invalid?");
}
- else if ( XML_NAMESPACE_OFFICE == nPrefix &&
- rLocalName == GetXMLToken(XML_SETTINGS) )
+ else if ( nElement == XML_ELEMENT(OFFICE, XML_SETTINGS) )
{
- pContext = new XMLDocumentSettingsContext( GetImport(),
- XML_NAMESPACE_OFFICE, rLocalName,
- xAttrList );
+ return new XMLDocumentSettingsContext( GetImport() );
}
-
- return pContext;
-}
-
-uno::Reference< xml::sax::XFastContextHandler > SmXMLOfficeContext_Impl::createFastChildContext(sal_Int32 /*nElement*/,
- const uno::Reference< xml::sax::XFastAttributeList > &/*xAttrList*/)
-{
return nullptr;
}