diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-25 15:11:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-26 07:52:29 +0200 |
commit | 0ce849d2585e9236dd10f0d5859b58d135f20d2e (patch) | |
tree | 2cbdd2e564e4b5f1501a332d516d772eae2fa508 /dbaccess | |
parent | 4d4f7750dce767f864b0e12b448002bb768eb130 (diff) |
use fastparser in OTableStyleContext
Change-Id: Ied05d161811c3b87d00cd99c56940a9f66cb4e59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101342
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/filter/xml/xmlStyleImport.cxx | 37 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlStyleImport.hxx | 10 |
2 files changed, 22 insertions, 25 deletions
diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx index 9e7b1f8cce86..e75a1d57861f 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.cxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx @@ -41,10 +41,10 @@ using namespace xmloff::token; OTableStyleContext::OTableStyleContext( ODBFilter& rImport, - sal_uInt16 nPrfx, const OUString& rLName, - const Reference< XAttributeList > & xAttrList, + sal_Int32 nElement, + const Reference< XFastAttributeList > & xAttrList, SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ) - :XMLPropStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily, false ) + :XMLPropStyleContext( rImport, nElement, xAttrList, rStyles, nFamily, false ) ,pStyles(&rStyles) ,m_nNumberFormat(-1) { @@ -191,27 +191,26 @@ rtl::Reference < SvXMLImportPropertyMapper > } SvXMLStyleContext *OTableStylesContext::CreateStyleStyleChildContext( - XmlStyleFamily nFamily, sal_uInt16 nPrefix, const OUString& rLocalName, - const Reference< xml::sax::XAttributeList > & xAttrList ) + XmlStyleFamily nFamily, sal_Int32 nElement, + const Reference< xml::sax::XFastAttributeList > & xAttrList ) { - SvXMLStyleContext *pStyle = SvXMLStylesContext::CreateStyleStyleChildContext( nFamily, nPrefix, - rLocalName, + SvXMLStyleContext *pStyle = SvXMLStylesContext::CreateStyleStyleChildContext( nFamily, nElement, xAttrList ); - if (!pStyle) + if (pStyle) + return pStyle; + + switch( nFamily ) { - switch( nFamily ) - { - case XmlStyleFamily::TABLE_TABLE: - case XmlStyleFamily::TABLE_COLUMN: - case XmlStyleFamily::TABLE_CELL: - pStyle = new OTableStyleContext( GetOwnImport(), nPrefix, rLocalName, - xAttrList, *this, nFamily ); - break; - default: break; - } + case XmlStyleFamily::TABLE_TABLE: + case XmlStyleFamily::TABLE_COLUMN: + case XmlStyleFamily::TABLE_CELL: + return new OTableStyleContext( GetOwnImport(), nElement, + xAttrList, *this, nFamily ); + break; + default: break; } - return pStyle; + return nullptr; } OUString OTableStylesContext::GetServiceName( XmlStyleFamily nFamily ) const diff --git a/dbaccess/source/filter/xml/xmlStyleImport.hxx b/dbaccess/source/filter/xml/xmlStyleImport.hxx index 326479df74d2..8f962fd42b71 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.hxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.hxx @@ -47,9 +47,8 @@ namespace dbaxml public: - OTableStyleContext( ODBFilter& rImport, sal_uInt16 nPrfx, - const OUString& rLName, - const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList, + OTableStyleContext( ODBFilter& rImport, sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList, SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ); virtual ~OTableStyleContext() override; @@ -80,9 +79,8 @@ namespace dbaxml using SvXMLStylesContext::CreateStyleStyleChildContext; virtual SvXMLStyleContext *CreateStyleStyleChildContext( XmlStyleFamily nFamily, - sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override; public: |