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 /dbaccess | |
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 'dbaccess')
21 files changed, 1 insertions, 55 deletions
diff --git a/dbaccess/source/filter/xml/xmlColumn.hxx b/dbaccess/source/filter/xml/xmlColumn.hxx index 42bf80d209f2..8deca87c7c42 100644 --- a/dbaccess/source/filter/xml/xmlColumn.hxx +++ b/dbaccess/source/filter/xml/xmlColumn.hxx @@ -46,8 +46,6 @@ namespace dbaxml ,const css::uno::Reference< css::beans::XPropertySet >& _xTable ); virtual ~OXMLColumn() 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; }; } // namespace dbaxml diff --git a/dbaccess/source/filter/xml/xmlComponent.hxx b/dbaccess/source/filter/xml/xmlComponent.hxx index dee94cfdf186..136d5b6854a5 100644 --- a/dbaccess/source/filter/xml/xmlComponent.hxx +++ b/dbaccess/source/filter/xml/xmlComponent.hxx @@ -33,8 +33,6 @@ namespace dbaxml ,const css::uno::Reference< css::container::XNameAccess >& _xParentContainer ,const OUString& _sComponentServiceName ); - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} virtual ~OXMLComponent() override; }; } // namespace dbaxml diff --git a/dbaccess/source/filter/xml/xmlConnectionData.hxx b/dbaccess/source/filter/xml/xmlConnectionData.hxx index 0d2abae839a6..466c047888f3 100644 --- a/dbaccess/source/filter/xml/xmlConnectionData.hxx +++ b/dbaccess/source/filter/xml/xmlConnectionData.hxx @@ -33,8 +33,6 @@ namespace dbaxml OXMLConnectionData( ODBFilter& rImport ); virtual ~OXMLConnectionData() 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/dbaccess/source/filter/xml/xmlConnectionResource.hxx b/dbaccess/source/filter/xml/xmlConnectionResource.hxx index 71ca5b197ede..357bbe1e117a 100644 --- a/dbaccess/source/filter/xml/xmlConnectionResource.hxx +++ b/dbaccess/source/filter/xml/xmlConnectionResource.hxx @@ -29,8 +29,6 @@ namespace dbaxml OXMLConnectionResource( ODBFilter& 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 ~OXMLConnectionResource() override; }; } // namespace dbaxml diff --git a/dbaccess/source/filter/xml/xmlDataSource.hxx b/dbaccess/source/filter/xml/xmlDataSource.hxx index ee9c6d59daed..5b78ff4fe40d 100644 --- a/dbaccess/source/filter/xml/xmlDataSource.hxx +++ b/dbaccess/source/filter/xml/xmlDataSource.hxx @@ -39,8 +39,6 @@ namespace dbaxml const UsedFor _eUsedFor ); virtual ~OXMLDataSource() 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/dbaccess/source/filter/xml/xmlDataSourceInfo.hxx b/dbaccess/source/filter/xml/xmlDataSourceInfo.hxx index e96e9290f86e..e29d37a7d3a8 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceInfo.hxx +++ b/dbaccess/source/filter/xml/xmlDataSourceInfo.hxx @@ -30,8 +30,6 @@ namespace dbaxml OXMLDataSourceInfo( ODBFilter& rImport, sal_Int32 nElement, 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 ~OXMLDataSourceInfo() override; }; } // namespace dbaxml diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx index 49008d93e897..3ed92f80e79b 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx @@ -45,9 +45,6 @@ namespace dbaxml 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; virtual void SAL_CALL characters( const OUString& rChars ) override; diff --git a/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx b/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx index 0cba86f5a1dd..50fea5c000aa 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx @@ -31,8 +31,6 @@ namespace dbaxml OXMLDataSourceSettings( ODBFilter& rImport ); virtual ~OXMLDataSourceSettings() 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/dbaccess/source/filter/xml/xmlDatabase.hxx b/dbaccess/source/filter/xml/xmlDatabase.hxx index 989dab658662..0dab56c51ca7 100644 --- a/dbaccess/source/filter/xml/xmlDatabase.hxx +++ b/dbaccess/source/filter/xml/xmlDatabase.hxx @@ -34,8 +34,6 @@ namespace dbaxml 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; }; } // namespace dbaxml diff --git a/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx b/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx index 1d20f52fb217..146ecb401747 100644 --- a/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx +++ b/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx @@ -33,8 +33,6 @@ namespace dbaxml OXMLDatabaseDescription( ODBFilter& rImport); virtual ~OXMLDatabaseDescription() 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/dbaccess/source/filter/xml/xmlDocuments.hxx b/dbaccess/source/filter/xml/xmlDocuments.hxx index f6afc1d3a562..c0542dcfb1a3 100644 --- a/dbaccess/source/filter/xml/xmlDocuments.hxx +++ b/dbaccess/source/filter/xml/xmlDocuments.hxx @@ -48,8 +48,6 @@ namespace dbaxml virtual ~OXMLDocuments() 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/dbaccess/source/filter/xml/xmlFileBasedDatabase.hxx b/dbaccess/source/filter/xml/xmlFileBasedDatabase.hxx index b50149b62bb1..3720e1da354a 100644 --- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.hxx +++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.hxx @@ -29,8 +29,6 @@ namespace dbaxml OXMLFileBasedDatabase( ODBFilter& 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 ~OXMLFileBasedDatabase() override; }; } // namespace dbaxml diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx index 953de765141e..689434822922 100644 --- a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx +++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx @@ -47,8 +47,6 @@ namespace dbaxml ); virtual ~OXMLHierarchyCollection() 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/dbaccess/source/filter/xml/xmlLogin.hxx b/dbaccess/source/filter/xml/xmlLogin.hxx index aefb60298214..adb25c739b78 100644 --- a/dbaccess/source/filter/xml/xmlLogin.hxx +++ b/dbaccess/source/filter/xml/xmlLogin.hxx @@ -29,8 +29,6 @@ namespace dbaxml OXMLLogin( ODBFilter& 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 ~OXMLLogin() override; }; diff --git a/dbaccess/source/filter/xml/xmlQuery.hxx b/dbaccess/source/filter/xml/xmlQuery.hxx index 067e8cbf5c5c..d3e01193c473 100644 --- a/dbaccess/source/filter/xml/xmlQuery.hxx +++ b/dbaccess/source/filter/xml/xmlQuery.hxx @@ -38,8 +38,6 @@ namespace dbaxml ); virtual ~OXMLQuery() 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/dbaccess/source/filter/xml/xmlServerDatabase.hxx b/dbaccess/source/filter/xml/xmlServerDatabase.hxx index 1491ed6f3e35..ec3401fff795 100644 --- a/dbaccess/source/filter/xml/xmlServerDatabase.hxx +++ b/dbaccess/source/filter/xml/xmlServerDatabase.hxx @@ -29,8 +29,6 @@ namespace dbaxml OXMLServerDatabase( ODBFilter& 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 ~OXMLServerDatabase() override; }; } // namespace dbaxml diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx index 46534bb233c7..91ccd77c462a 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.cxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx @@ -141,9 +141,8 @@ OTableStylesContext::~OTableStylesContext() } -void OTableStylesContext::endFastElement(sal_Int32 nElement) +void OTableStylesContext::endFastElement(sal_Int32 ) { - SvXMLStylesContext::endFastElement(nElement); if (bAutoStyles) GetImport().GetTextImport()->SetAutoStyles( this ); else diff --git a/dbaccess/source/filter/xml/xmlTable.hxx b/dbaccess/source/filter/xml/xmlTable.hxx index 9d46a7275d83..cee19ef19e40 100644 --- a/dbaccess/source/filter/xml/xmlTable.hxx +++ b/dbaccess/source/filter/xml/xmlTable.hxx @@ -60,8 +60,6 @@ namespace dbaxml 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; }; } // namespace dbaxml diff --git a/dbaccess/source/filter/xml/xmlTableFilterList.hxx b/dbaccess/source/filter/xml/xmlTableFilterList.hxx index 007d06eab8b3..1988bdd29cf7 100644 --- a/dbaccess/source/filter/xml/xmlTableFilterList.hxx +++ b/dbaccess/source/filter/xml/xmlTableFilterList.hxx @@ -39,9 +39,6 @@ namespace dbaxml 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; /** pushes a new TableFilterPattern to the list of patterns diff --git a/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx b/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx index 5aa7d405c033..8f0b64f37a3a 100644 --- a/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx +++ b/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx @@ -36,8 +36,6 @@ namespace dbaxml virtual ~OXMLTableFilterPattern() 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; virtual void SAL_CALL characters( const OUString& rChars ) override; }; diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index 942ef787c171..7a6cda3b5b79 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -374,9 +374,6 @@ public: { } - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} - virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ ) override { @@ -396,10 +393,6 @@ public: { } - virtual void SAL_CALL startFastElement( - sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} - virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ ) override { @@ -429,9 +422,6 @@ public: { } - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} - virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ ) override { @@ -456,9 +446,6 @@ public: { } - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} - virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ ) override { |