diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-26 13:12:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-27 14:17:47 +0200 |
commit | 6a33cdd0c440bdf3a563d514da3fdaef841c1588 (patch) | |
tree | 6bd190e42f749931c4be736d812a99a80d9645b7 /xmloff/source/draw/XMLShapeStyleContext.cxx | |
parent | 00791931967170aecc4260e568efa11724386692 (diff) |
convert remaining XMLPropStyleContext subclasses to fastparser
Change-Id: If78be8caf1b1a87ef16abf04a29bc30762ddb90b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101440
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/draw/XMLShapeStyleContext.cxx')
-rw-r--r-- | xmloff/source/draw/XMLShapeStyleContext.cxx | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx index b10ef865ec2d..1096c0aae417 100644 --- a/xmloff/source/draw/XMLShapeStyleContext.cxx +++ b/xmloff/source/draw/XMLShapeStyleContext.cxx @@ -89,40 +89,36 @@ void XMLShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey, const OUString& } } -SvXMLImportContextRef XMLShapeStyleContext::CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference< xml::sax::XAttributeList > & xAttrList ) +css::uno::Reference< css::xml::sax::XFastContextHandler > XMLShapeStyleContext::createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) { SvXMLImportContextRef xContext; - if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) + if( IsTokenInNamespace(nElement, XML_NAMESPACE_STYLE) || + IsTokenInNamespace(nElement, XML_NAMESPACE_LO_EXT) ) { + sal_Int32 nLocalName = nElement & TOKEN_MASK; sal_uInt32 nFamily = 0; - if( IsXMLToken( rLocalName, XML_TEXT_PROPERTIES ) ) + if( nLocalName == XML_TEXT_PROPERTIES ) nFamily = XML_TYPE_PROP_TEXT; - else if( IsXMLToken( rLocalName, XML_PARAGRAPH_PROPERTIES ) ) + else if( nLocalName == XML_PARAGRAPH_PROPERTIES ) nFamily = XML_TYPE_PROP_PARAGRAPH; - else if( IsXMLToken( rLocalName, XML_GRAPHIC_PROPERTIES ) ) + else if( nLocalName == XML_GRAPHIC_PROPERTIES ) nFamily = XML_TYPE_PROP_GRAPHIC; if( nFamily ) { rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) - xContext = new XMLShapePropertySetContext( GetImport(), nPrefix, - rLocalName, xAttrList, + return new XMLShapePropertySetContext( GetImport(), nElement, xAttrList, nFamily, GetProperties(), xImpPrMap ); } } - if (!xContext) - xContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName, - xAttrList ); - - return xContext; + return XMLPropStyleContext::createFastChildContext( nElement, xAttrList ); } void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet > & rPropSet ) |