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>
This commit is contained in:
Noel Grandin
2020-08-25 15:11:52 +02:00
parent 4d4f7750dc
commit 0ce849d258
2 changed files with 22 additions and 25 deletions

View File

@@ -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

View File

@@ -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: