summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-12-02 10:30:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-02 12:14:03 +0100
commit549760a68f457f406141c843e8a38a2ee0677c53 (patch)
tree5295a9b9e67136ae43d49b41f08e68690c684763 /editeng
parent20574b4023952c8fbfa728590f3bdcf603633cca (diff)
fastparser in SvxXMLTextImportContext
Change-Id: I702a77ea17ee80270d257e10f56a91b026800e1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107048 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/xml/xmltxtimp.cxx22
1 files changed, 2 insertions, 20 deletions
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index e04d2839d170..ff5a1e9b6131 100644
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -52,7 +52,6 @@ class SvxXMLTextImportContext : public SvXMLImportContext
public:
SvxXMLTextImportContext( SvXMLImport& rImport, const uno::Reference< XText >& xText );
- virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ) override;
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
sal_Int32 nElement,
const uno::Reference< xml::sax::XFastAttributeList >& xAttrList) override;
@@ -70,7 +69,7 @@ SvxXMLTextImportContext::SvxXMLTextImportContext( SvXMLImport& rImport, const un
css::uno::Reference< css::xml::sax::XFastContextHandler > SvxXMLTextImportContext::createFastChildContext(
sal_Int32 nElement,
- const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/)
+ const uno::Reference< xml::sax::XFastAttributeList >& xAttrList)
{
SvXMLImportContext* pContext = nullptr;
if(nElement == XML_ELEMENT(OFFICE, XML_BODY ))
@@ -82,25 +81,8 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SvxXMLTextImportContex
pContext = new SvXMLStylesContext( GetImport() );
GetImport().GetTextImport()->SetAutoStyles( static_cast<SvXMLStylesContext*>(pContext) );
}
- return pContext;
-}
-
-SvXMLImportContextRef SvxXMLTextImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList )
-{
- SvXMLImportContext* pContext = nullptr;
- if(XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_BODY ) )
- {
- // dealt with in createFastChildContext
- }
- else if( XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_AUTOMATIC_STYLES ) )
- {
- // dealt with in createFastChildContext
- }
else
- {
- pContext = GetImport().GetTextImport()->CreateTextChildContext( GetImport(), nPrefix, rLocalName, xAttrList );
- }
-
+ pContext = GetImport().GetTextImport()->CreateTextChildContext( GetImport(), nElement, xAttrList );
return pContext;
}