diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-21 15:52:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-23 12:14:28 +0200 |
commit | fecf3807f0229450617f35b36e14db14c7c17c87 (patch) | |
tree | a7ae3b5fa617f0a92f30063fa7189613fb183ce7 /sc | |
parent | 2ddf7c865d78f421417a27f3266188461ee8db0d (diff) |
use fastparser in XMLTextMasterStylesContext
Change-Id: I2eaae244264ca9ab726d8e69a3e53a76481b5a36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101173
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/xmlstyli.cxx | 16 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlstyli.hxx | 10 |
2 files changed, 11 insertions, 15 deletions
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index c000fc2ab0fd..d9dd0761e287 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -916,17 +916,15 @@ ScXMLMasterStylesContext::~ScXMLMasterStylesContext() } SvXMLStyleContext *ScXMLMasterStylesContext::CreateStyleChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const uno::Reference< XAttributeList > & xAttrList ) + sal_Int32 nElement, + const uno::Reference< XFastAttributeList > & xAttrList ) { SvXMLStyleContext *pContext(nullptr); - if( (XML_NAMESPACE_STYLE == nPrefix) && - IsXMLToken(rLocalName, XML_MASTER_PAGE) && + if( nElement == XML_ELEMENT(STYLE, XML_MASTER_PAGE) && InsertStyleFamily( XmlStyleFamily::MASTER_PAGE ) ) pContext = new ScMasterPageContext( - GetImport(), nPrefix, rLocalName, xAttrList, + GetImport(), nElement, xAttrList, !GetImport().GetTextImport()->IsInsertMode() ); // any other style will be ignored here! @@ -950,10 +948,10 @@ void ScXMLMasterStylesContext::endFastElement(sal_Int32 ) ScMasterPageContext::ScMasterPageContext( SvXMLImport& rImport, - sal_uInt16 nPrfx, const OUString& rLName, - const uno::Reference< XAttributeList > & xAttrList, + sal_Int32 nElement, + const uno::Reference< XFastAttributeList > & xAttrList, bool bOverwrite ) : - XMLTextMasterPageContext( rImport, nPrfx, rLName, xAttrList, bOverwrite ), + XMLTextMasterPageContext( rImport, nElement, xAttrList, bOverwrite ), bContainsRightHeader(false), bContainsRightFooter(false) { diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx index 221ef801a8e9..e9658cc7c614 100644 --- a/sc/source/filter/xml/xmlstyli.hxx +++ b/sc/source/filter/xml/xmlstyli.hxx @@ -170,9 +170,8 @@ class ScXMLMasterStylesContext : public SvXMLStylesContext { protected: using SvXMLStylesContext::CreateStyleChildContext; - virtual SvXMLStyleContext *CreateStyleChildContext( sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; + virtual SvXMLStyleContext *CreateStyleChildContext( sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override; virtual SvXMLStyleContext *CreateStyleStyleChildContext( XmlStyleFamily nFamily, sal_uInt16 nPrefix, const OUString& rLocalName, @@ -198,9 +197,8 @@ class ScMasterPageContext : public XMLTextMasterPageContext public: - ScMasterPageContext( SvXMLImport& rImport, sal_uInt16 nPrfx, - const OUString& rLName, - const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList, + ScMasterPageContext( SvXMLImport& rImport, sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList, bool bOverwrite ); virtual ~ScMasterPageContext() override; |