summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-16 08:16:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-16 08:25:04 +0100
commit6b0d5a2aa98f6e201820080eed88f329f6b40cef (patch)
tree5e51f2946a4e9e8e630d1d56521aa088321ddf48 /sw
parent0f0ae0e9fbe5b13c268486d46f545cb514134a65 (diff)
fix use of FastParser in SwXMLTextBlockImport
need to override startFastElement or SvXMLImport will fall back to trying the non-fastparser stuff Change-Id: Ia38e62d529391e490807d77dd265c69beb2d8476 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86901 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/swg/SwXMLBlockImport.cxx25
1 files changed, 20 insertions, 5 deletions
diff --git a/sw/source/core/swg/SwXMLBlockImport.cxx b/sw/source/core/swg/SwXMLBlockImport.cxx
index ceda8003a152..ab5519e27bf4 100644
--- a/sw/source/core/swg/SwXMLBlockImport.cxx
+++ b/sw/source/core/swg/SwXMLBlockImport.cxx
@@ -54,6 +54,9 @@ public:
SwXMLBlockListContext( SwXMLBlockListImport& rImport,
const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList );
+ virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {}
+
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override;
};
@@ -63,6 +66,8 @@ class SwXMLBlockContext : public SvXMLImportContext
public:
SwXMLBlockContext( SwXMLBlockListImport& rImport,
const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList );
+ virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {}
};
class SwXMLTextBlockDocumentContext : public SvXMLImportContext
@@ -73,6 +78,9 @@ private:
public:
SwXMLTextBlockDocumentContext( SwXMLTextBlockImport& rImport );
+ virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {}
+
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override;
};
@@ -85,6 +93,9 @@ private:
public:
SwXMLTextBlockBodyContext( SwXMLTextBlockImport& rImport );
+ virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {}
+
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
sal_Int32, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override;
};
@@ -97,6 +108,9 @@ private:
public:
SwXMLTextBlockTextContext( SwXMLTextBlockImport& rImport );
+ virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {}
+
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
sal_Int32 Element,
const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override;
@@ -110,6 +124,9 @@ private:
public:
SwXMLTextBlockParContext( SwXMLTextBlockImport & rImport );
+ virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {}
+
virtual void SAL_CALL characters( const OUString & aChars ) override;
virtual ~SwXMLTextBlockParContext() override;
@@ -308,8 +325,7 @@ SvXMLImportContext* SwXMLBlockListImport::CreateFastContext( sal_Int32 Element,
{
if( Element == SwXMLBlockListToken::BLOCK_LIST )
return new SwXMLBlockListContext( *this, xAttrList );
- else
- return SvXMLImport::CreateFastContext( Element, xAttrList );
+ return nullptr;
}
SwXMLTextBlockImport::SwXMLTextBlockImport(
@@ -328,13 +344,12 @@ SwXMLTextBlockImport::~SwXMLTextBlockImport()
}
SvXMLImportContext* SwXMLTextBlockImport::CreateFastContext( sal_Int32 Element,
- const uno::Reference< xml::sax::XFastAttributeList > & xAttrList )
+ const uno::Reference< xml::sax::XFastAttributeList > & /*xAttrList*/ )
{
if( Element == SwXMLTextBlockToken::OFFICE_DOCUMENT ||
Element == SwXMLTextBlockToken::OFFICE_DOCUMENT_CONTENT )
return new SwXMLTextBlockDocumentContext( *this );
- else
- return SvXMLImport::CreateFastContext( Element, xAttrList );
+ return nullptr;
}
void SAL_CALL SwXMLTextBlockImport::endDocument()