diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-23 15:12:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-02 08:17:00 +0100 |
commit | 8c5ffecf1dbd3f93128910433da11d5315661680 (patch) | |
tree | 4263d40f2e6e118f42b7eed7bc40e92ad504036d /sw/source/filter/xml | |
parent | 0f3a8a972421aa440f4276b92463a481e5cd4267 (diff) |
make SvXMLImport capable of mixing fast- and slow- contexts adhoc
so I can convert even *ImportContext subclasses in the middle of
a context stack, and thus break the cyclic dependency nature
of the writer import.
and adjust the xmlimport loplugin for the new rules.
As a consequence of the loplugin:xmlimport's checking, we remove
a bunch of now unnecessary overrides of startFastElement.
Change-Id: I97464522ede8ec5e345e928cdafa4b18364b1b80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104730
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/xml')
-rw-r--r-- | sw/source/filter/xml/xmlbrshi.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 11 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlitem.hxx | 3 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltext.cxx | 7 |
4 files changed, 0 insertions, 23 deletions
diff --git a/sw/source/filter/xml/xmlbrshi.hxx b/sw/source/filter/xml/xmlbrshi.hxx index 4e0af97bda30..117cfa0b34dd 100644 --- a/sw/source/filter/xml/xmlbrshi.hxx +++ b/sw/source/filter/xml/xmlbrshi.hxx @@ -67,8 +67,6 @@ public: virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; const SvxBrushItem& GetItem() const { return *pItem; } diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 752125c3c2ab..15c71e820fe1 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -131,10 +131,6 @@ public: SwXMLBodyContext_Impl( SwXMLImport& rImport ); - virtual void SAL_CALL startFastElement( - sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; }; @@ -198,9 +194,6 @@ public: virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; - - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} }; } @@ -278,10 +271,6 @@ public: SwXMLOfficeDocContext_Impl( SwXMLImport& rImport, const Reference< document::XDocumentProperties >& xDocProps); - virtual void SAL_CALL startFastElement( sal_Int32 nElement, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override - { SvXMLMetaDocumentContext::startFastElement(nElement, xAttrList); } - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs ) override; }; diff --git a/sw/source/filter/xml/xmlitem.hxx b/sw/source/filter/xml/xmlitem.hxx index 55971f339a0d..dcdafd2022c1 100644 --- a/sw/source/filter/xml/xmlitem.hxx +++ b/sw/source/filter/xml/xmlitem.hxx @@ -46,9 +46,6 @@ public: virtual ~SwXMLItemSetContext() override; - 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 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; diff --git a/sw/source/filter/xml/xmltext.cxx b/sw/source/filter/xml/xmltext.cxx index 09571b5350a5..0da867359fdb 100644 --- a/sw/source/filter/xml/xmltext.cxx +++ b/sw/source/filter/xml/xmltext.cxx @@ -34,17 +34,10 @@ public: SwXMLBodyContentContext_Impl( SwXMLImport& rImport ); - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( - sal_Int32 /*nElement*/, const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override - { return nullptr; } - virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) override; - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} - // The body element's text:global attribute can be ignored, because // we must have the correct object shell already. virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; |