[Libreoffice-commits] core.git: dbaccess/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 26 05:53:13 UTC 2020
dbaccess/source/filter/xml/xmlStyleImport.cxx | 37 ++++++++++++--------------
dbaccess/source/filter/xml/xmlStyleImport.hxx | 10 ++-----
2 files changed, 22 insertions(+), 25 deletions(-)
New commits:
commit 0ce849d2585e9236dd10f0d5859b58d135f20d2e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Aug 25 15:11:52 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Aug 26 07:52:29 2020 +0200
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 at collabora.co.uk>
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:
More information about the Libreoffice-commits
mailing list