diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-28 15:25:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-29 15:28:22 +0200 |
commit | 9814c1f2edf56ecc0f31001db9234ef335488879 (patch) | |
tree | 5087cafe5763b87d6a7775d3e8b396af39dd3513 /xmloff/source/text/XMLTextShapeStyleContext.cxx | |
parent | fee0404b00e1e97f429ae1eaa38458873385355f (diff) |
use fastparser in SvXMLPropertySetContext subclasses
Change-Id: I977f1cf198652d3c73e5a0f473794975a5647617
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101564
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/text/XMLTextShapeStyleContext.cxx')
-rw-r--r-- | xmloff/source/text/XMLTextShapeStyleContext.cxx | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx index 72660d060156..cf43c0452e31 100644 --- a/xmloff/source/text/XMLTextShapeStyleContext.cxx +++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx @@ -53,12 +53,12 @@ public: ::std::vector< XMLPropertyState > &rProps, const rtl::Reference < SvXMLImportPropertyMapper > &rMap ); - using SvXMLPropertySetContext::CreateChildContext; - virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference< XAttributeList >& xAttrList, + using SvXMLPropertySetContext::createFastChildContext; + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList, ::std::vector< XMLPropertyState > &rProperties, - const XMLPropertyState& rProp) override; + const XMLPropertyState& rProp ) override; }; } @@ -74,12 +74,11 @@ XMLTextShapePropertySetContext_Impl::XMLTextShapePropertySetContext_Impl( { } -SvXMLImportContextRef XMLTextShapePropertySetContext_Impl::CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference< XAttributeList > & xAttrList, - ::std::vector< XMLPropertyState > &rProperties, - const XMLPropertyState& rProp ) +css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextShapePropertySetContext_Impl::createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList, + ::std::vector< XMLPropertyState > &rProperties, + const XMLPropertyState& rProp ) { SvXMLImportContextRef xContext; @@ -87,8 +86,8 @@ SvXMLImportContextRef XMLTextShapePropertySetContext_Impl::CreateChildContext( ->GetEntryContextId( rProp.mnIndex ) ) { case CTF_TEXTCOLUMNS: - xContext = new XMLTextColumnsContext( GetImport(), nPrefix, - rLocalName, xAttrList, rProp, + return new XMLTextColumnsContext( GetImport(), nElement, + xAttrList, rProp, rProperties ); break; @@ -102,9 +101,9 @@ SvXMLImportContextRef XMLTextShapePropertySetContext_Impl::CreateChildContext( CTF_BACKGROUND_FILTER == mxMapper->getPropertySetMapper() ->GetEntryContextId( rProp.mnIndex-1 ), "invalid property map!"); - xContext = - new XMLBackgroundImageContext( GetImport(), nPrefix, - rLocalName, xAttrList, + return + new XMLBackgroundImageContext( GetImport(), nElement, + xAttrList, rProp, rProp.mnIndex-2, rProp.mnIndex-1, @@ -114,11 +113,8 @@ SvXMLImportContextRef XMLTextShapePropertySetContext_Impl::CreateChildContext( break; } - if (!xContext) - xContext = XMLShapePropertySetContext::CreateChildContext( - nPrefix, rLocalName, xAttrList, rProperties, rProp ); - - return xContext; + return XMLShapePropertySetContext::createFastChildContext( + nElement, xAttrList, rProperties, rProp ); } void XMLTextShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey, |