summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-25 12:42:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-25 18:22:02 +0200
commit5bf60ba188bb96b4fbda0ff0aa30aa1815ca647f (patch)
treedb53a60ffb66defb694899cb81e76269285870ea /reportdesign
parente2fe4fde592564d35099ad1e2659ad682dfb77f5 (diff)
use more fastparser in OReportStylesContext
Change-Id: Ie8126206d9144ccba1fb120d47af9ebe35a345d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101320 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/filter/xml/xmlStyleImport.cxx32
-rw-r--r--reportdesign/source/filter/xml/xmlStyleImport.hxx17
2 files changed, 19 insertions, 30 deletions
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 57aa5fcd706f..6242d6ea9489 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -67,10 +67,10 @@ public:
}
OControlStyleContext::OControlStyleContext( ORptFilter& 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/*bDefaultStyle*/ ),
+ XMLPropStyleContext( rImport, nElement, xAttrList, rStyles, nFamily, false/*bDefaultStyle*/ ),
pStyles(&rStyles),
m_nNumberFormat(-1),
m_rImport(rImport)
@@ -233,34 +233,24 @@ rtl::Reference < SvXMLImportPropertyMapper >
}
SvXMLStyleContext *OReportStylesContext::CreateDefaultStyleStyleChildContext(
- XmlStyleFamily nFamily, sal_uInt16 nPrefix, const OUString& rLocalName,
- const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+ XmlStyleFamily nFamily, sal_Int32 nElement,
+ const uno::Reference< xml::sax::XFastAttributeList > & xAttrList )
{
- SvXMLStyleContext *pStyle = nullptr;
-
switch( nFamily )
{
case XmlStyleFamily::SD_GRAPHICS_ID:
// There are no writer specific defaults for graphic styles!
- pStyle = new XMLGraphicsDefaultStyle( GetImport(), nPrefix,
- rLocalName, xAttrList, *this );
- break;
+ return new XMLGraphicsDefaultStyle( GetImport(), nElement, xAttrList, *this );
default:
- pStyle = SvXMLStylesContext::CreateDefaultStyleStyleChildContext( nFamily,
- nPrefix,
- rLocalName,
- xAttrList );
- break;
+ return nullptr;
}
- return pStyle;
}
SvXMLStyleContext *OReportStylesContext::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)
{
@@ -270,7 +260,7 @@ SvXMLStyleContext *OReportStylesContext::CreateStyleStyleChildContext(
case XmlStyleFamily::TABLE_COLUMN:
case XmlStyleFamily::TABLE_ROW:
case XmlStyleFamily::TABLE_CELL:
- pStyle = new OControlStyleContext( GetOwnImport(), nPrefix, rLocalName,
+ pStyle = new OControlStyleContext( GetOwnImport(), nElement,
xAttrList, *this, nFamily );
break;
default:
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.hxx b/reportdesign/source/filter/xml/xmlStyleImport.hxx
index 4353bd33d951..d670ccf5d843 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.hxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.hxx
@@ -46,9 +46,8 @@ namespace rptxml
public:
- OControlStyleContext( ORptFilter& rImport, sal_uInt16 nPrfx,
- const OUString& rLName,
- const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList,
+ OControlStyleContext( ORptFilter& rImport, sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList,
SvXMLStylesContext& rStyles, XmlStyleFamily nFamily );
virtual ~OControlStyleContext() override;
@@ -86,16 +85,16 @@ namespace rptxml
protected:
// Create a style context.
+ 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;
+ using SvXMLStylesContext::CreateDefaultStyleStyleChildContext;
virtual SvXMLStyleContext *CreateDefaultStyleStyleChildContext(
- XmlStyleFamily nFamily, sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override;
+ XmlStyleFamily nFamily, sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override;
public: