diff options
144 files changed, 478 insertions, 1137 deletions
diff --git a/compilerplugins/clang/test/xmlimport.cxx b/compilerplugins/clang/test/xmlimport.cxx index 36230ffdb2d8..98dba400b19e 100644 --- a/compilerplugins/clang/test/xmlimport.cxx +++ b/compilerplugins/clang/test/xmlimport.cxx @@ -11,78 +11,185 @@ // Cannot include this, makes clang crash //#include "xmloff/xmlimp.hxx" +// Cannot include this, cannot be found +//#include <xmloff/xmlictxt.hxx> #include <com/sun/star/uno/Reference.hxx> +#include <rtl/ref.hxx> namespace com::sun::star::xml::sax { class XAttributeList; +class XFastContextHandler; } +class SvXMLImportContext; +typedef rtl::Reference<SvXMLImportContext> SvXMLImportContextRef; class SvXMLImportContext { public: virtual ~SvXMLImportContext() {} - virtual void createFastChildContext() {} virtual void startFastElement() {} virtual void endFastElement() {} + virtual void characters(const OUString&) {} + virtual css::uno::Reference<css::xml::sax::XFastContextHandler> createFastChildContext() + { + return nullptr; + } + virtual css::uno::Reference<css::xml::sax::XFastContextHandler> createUnknownChildContext() + { + return nullptr; + } virtual void StartElement(const css::uno::Reference<css::xml::sax::XAttributeList>&) {} virtual void EndElement() {} virtual void Characters(const OUString&) {} + virtual SvXMLImportContextRef CreateChildContext() { return nullptr; } + + void acquire(); + void release(); + + void xxx(); // just here to avoid triggering a warning I don't want to check for }; class Test1 : public SvXMLImportContext { public: - // expected-error@+1 {{must override startFastElement too [loplugin:xmlimport]}} - virtual void createFastChildContext() override; + // expected-error@+1 {{cannot override both startFastElement and StartElement [loplugin:xmlimport]}} + virtual void startFastElement() override { xxx(); } + // expected-error@+1 {{cannot override both startFastElement and StartElement [loplugin:xmlimport]}} + virtual void StartElement(const css::uno::Reference<css::xml::sax::XAttributeList>&) override + { + xxx(); + } }; class Test2 : public SvXMLImportContext { public: - // no warning expected - virtual void createFastChildContext() override; - virtual void startFastElement() override {} + // expected-error@+1 {{cannot override both endFastElement and EndElement [loplugin:xmlimport]}} + virtual void endFastElement() override { xxx(); } + // expected-error@+1 {{cannot override both endFastElement and EndElement [loplugin:xmlimport]}} + virtual void EndElement() override { xxx(); } }; -class Test3 : public Test2 +class Test3 : public SvXMLImportContext { public: - // no warning expected - virtual void createFastChildContext() override; + // expected-error@+1 {{cannot override both characters and Characters [loplugin:xmlimport]}} + virtual void Characters(const OUString&) override { xxx(); } + // expected-error@+1 {{cannot override both characters and Characters [loplugin:xmlimport]}} + virtual void characters(const OUString&) override { xxx(); } }; -class Test4 : public SvXMLImportContext +class Test7 : public SvXMLImportContext { public: - // expected-error@+1 {{must override startFastElement too [loplugin:xmlimport]}} - virtual void endFastElement() override; + virtual void startFastElement() override + { + // expected-error@+1 {{don't call this superclass method [loplugin:xmlimport]}} + SvXMLImportContext::startFastElement(); + } + virtual void endFastElement() override + { + // expected-error@+1 {{don't call this superclass method [loplugin:xmlimport]}} + SvXMLImportContext::endFastElement(); + } + virtual void characters(const OUString& rChars) override + { + // expected-error@+1 {{don't call this superclass method [loplugin:xmlimport]}} + SvXMLImportContext::characters(rChars); + } + virtual css::uno::Reference<css::xml::sax::XFastContextHandler> + createFastChildContext() override + { + // expected-error@+1 {{don't call this superclass method [loplugin:xmlimport]}} + return SvXMLImportContext::createFastChildContext(); + } + virtual css::uno::Reference<css::xml::sax::XFastContextHandler> + createUnknownChildContext() override + { + // expected-error@+1 {{don't call this superclass method [loplugin:xmlimport]}} + return SvXMLImportContext::createUnknownChildContext(); + } }; -class Test5 : public SvXMLImportContext +class Test8 : public SvXMLImportContext { public: - // expected-error@+1 {{overrides startElement, but looks like a fastparser context class, no constructor that takes slowparser args [loplugin:xmlimport]}} virtual void - StartElement(const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList) override; - // expected-error@+1 {{overrides startElement, but looks like a fastparser context class, no constructor that takes slowparser args [loplugin:xmlimport]}} - virtual void EndElement() override; - // expected-error@+1 {{overrides startElement, but looks like a fastparser context class, no constructor that takes slowparser args [loplugin:xmlimport]}} - virtual void Characters(const OUString&) override; + StartElement(const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList) override + { + // expected-error@+1 {{don't call this superclass method [loplugin:xmlimport]}} + SvXMLImportContext::StartElement(xAttrList); + } + virtual void EndElement() override + { + // expected-error@+1 {{don't call this superclass method [loplugin:xmlimport]}} + SvXMLImportContext::EndElement(); + } + virtual void Characters(const OUString& rChars) override + { + // expected-error@+1 {{don't call this superclass method [loplugin:xmlimport]}} + SvXMLImportContext::Characters(rChars); + } + virtual SvXMLImportContextRef CreateChildContext() override + { + // expected-error@+1 {{don't call this superclass method [loplugin:xmlimport]}} + return SvXMLImportContext::CreateChildContext(); + } }; // no warning expected -class Test6 : public SvXMLImportContext +class Test9a : public SvXMLImportContext +{ +public: + virtual void StartElement(const css::uno::Reference<css::xml::sax::XAttributeList>&) override + { + xxx(); + } +}; +class Test9b : public Test9a { public: - Test6(sal_uInt16, const OUString&); virtual void - StartElement(const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList) override; - virtual void EndElement() override; - virtual void Characters(const OUString&) override; + StartElement(const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList) override + { + Test9a::StartElement(xAttrList); + } +}; + +class Test10a : public SvXMLImportContext +{ +public: + // expected-error@+1 {{empty, should be removed [loplugin:xmlimport]}} + virtual void startFastElement() override {} + // expected-error@+1 {{empty, should be removed [loplugin:xmlimport]}} + virtual void endFastElement() override {} + // expected-error@+1 {{empty, should be removed [loplugin:xmlimport]}} + virtual void characters(const OUString&) override {} + // expected-error@+1 {{empty, should be removed [loplugin:xmlimport]}} + virtual css::uno::Reference<css::xml::sax::XFastContextHandler> + createFastChildContext() override + { + return nullptr; + } + // expected-error@+1 {{empty, should be removed [loplugin:xmlimport]}} + virtual css::uno::Reference<css::xml::sax::XFastContextHandler> + createUnknownChildContext() override + { + return nullptr; + } +}; +// no warning expected +class Test10b : public SvXMLImportContext +{ +public: + virtual void StartElement(const css::uno::Reference<css::xml::sax::XAttributeList>&) override {} + virtual void EndElement() override {} + virtual void Characters(const OUString&) override {} + virtual SvXMLImportContextRef CreateChildContext() override { return nullptr; } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/xmlimport.cxx b/compilerplugins/clang/xmlimport.cxx index d6b1aa78e325..72645564a5d1 100644 --- a/compilerplugins/clang/xmlimport.cxx +++ b/compilerplugins/clang/xmlimport.cxx @@ -14,6 +14,7 @@ #include "plugin.hxx" #include "check.hxx" #include <iostream> +#include <unordered_map> #include "clang/AST/CXXInheritance.h" /* @@ -36,8 +37,23 @@ public: bool preRun() override { - // std::string fn(handler.getMainFileName()); - // loplugin::normalizeDotDotInFilePath(fn); + StringRef fn(handler.getMainFileName()); + if (loplugin::isSamePathname(fn, SRCDIR "/xmloff/source/core/xmlictxt.cxx")) + return false; + if (loplugin::isSamePathname(fn, SRCDIR "/xmloff/source/core/xmlimp.cxx")) + return false; + // These are mostly classes delegating calls to other classes + if (loplugin::isSamePathname(fn, SRCDIR "/xmloff/source/text/XMLTextFrameContext.cxx")) + return false; + if (loplugin::isSamePathname(fn, SRCDIR "/xmloff/source/draw/ximpshap.cxx")) + return false; + if (loplugin::isSamePathname(fn, SRCDIR "/xmloff/source/table/XMLTableImport.cxx")) + return false; + if (loplugin::isSamePathname(fn, + SRCDIR "/sc/source/filter/xml/XMLTrackedChangesContext.cxx")) + return false; + if (loplugin::isSamePathname(fn, SRCDIR "/sc/source/filter/xml/xmlannoi.cxx")) + return false; return true; } @@ -50,21 +66,16 @@ public: } bool VisitCXXMethodDecl(const CXXMethodDecl*); -}; + bool VisitCXXMemberCallExpr(const CXXMemberCallExpr*); -static bool containsStartFastElementMethod(const CXXRecordDecl* cxxRecordDecl) -{ - auto dc = loplugin::DeclCheck(cxxRecordDecl); - if (dc.Class("XFastContextHandler")) - return false; - for (auto it = cxxRecordDecl->method_begin(); it != cxxRecordDecl->method_end(); ++it) - { - auto i = *it; - if (i->getIdentifier() && i->getName() == "startFastElement") - return true; - } - return false; -} +private: + std::unordered_map<const CXXRecordDecl*, const CXXMethodDecl*> startFastElementSet; + std::unordered_map<const CXXRecordDecl*, const CXXMethodDecl*> StartElementSet; + std::unordered_map<const CXXRecordDecl*, const CXXMethodDecl*> endFastElementSet; + std::unordered_map<const CXXRecordDecl*, const CXXMethodDecl*> EndElementSet; + std::unordered_map<const CXXRecordDecl*, const CXXMethodDecl*> charactersSet; + std::unordered_map<const CXXRecordDecl*, const CXXMethodDecl*> CharactersSet; +}; bool XmlImport::VisitCXXMethodDecl(const CXXMethodDecl* methodDecl) { @@ -82,111 +93,165 @@ bool XmlImport::VisitCXXMethodDecl(const CXXMethodDecl* methodDecl) if (loplugin::DeclCheck(cxxRecordDecl).Class("SvXMLImportContext")) return true; - if (methodDecl->getName() == "createFastChildContext" || methodDecl->getName() == "characters" - || methodDecl->getName() == "endFastElement") + if (!loplugin::isDerivedFrom(cxxRecordDecl, [](Decl const* decl) -> bool { + auto const dc = loplugin::DeclCheck(decl); + return bool(dc.ClassOrStruct("SvXMLImportContext").GlobalNamespace()); + })) + return true; + + auto name = methodDecl->getName(); + if (name == "startFastElement") + startFastElementSet.insert({ cxxRecordDecl, methodDecl }); + else if (name == "StartElement") + StartElementSet.insert({ cxxRecordDecl, methodDecl }); + else if (name == "endFastElement") + endFastElementSet.insert({ cxxRecordDecl, methodDecl }); + else if (name == "EndElement") + EndElementSet.insert({ cxxRecordDecl, methodDecl }); + else if (name == "characters") { - auto className = cxxRecordDecl->getName(); - if (className == "OOXMLFactory") // writerfilter - return true; - if (className == "SvXMLLegacyToFastDocHandler" || className == "ImportDocumentHandler" - || className == "ExportDocumentHandler") // reportdesign - return true; - if (className == "XMLEmbeddedObjectExportFilter" || className == "XMLBasicExportFilter" - || className == "XMLTransformerBase" || className == "SvXMLMetaExport") // xmloff - return true; - - if (containsStartFastElementMethod(cxxRecordDecl)) - return true; - - bool foundStartFastElement = false; - bool foundImportContext = false; - - CXXBasePaths aPaths; - cxxRecordDecl->lookupInBases( - [&](const CXXBaseSpecifier* Specifier, CXXBasePath & /*Path*/) -> bool { - if (!Specifier->getType().getTypePtr()) - return false; - const CXXRecordDecl* baseCXXRecordDecl = Specifier->getType()->getAsCXXRecordDecl(); - if (!baseCXXRecordDecl) - return false; - if (baseCXXRecordDecl->isInvalidDecl()) - return false; - if (loplugin::DeclCheck(baseCXXRecordDecl).Class("SvXMLImportContext")) - foundImportContext |= true; - else - foundStartFastElement |= containsStartFastElementMethod(baseCXXRecordDecl); - return false; - }, - aPaths); - - if (foundImportContext && !foundStartFastElement) - report(DiagnosticsEngine::Warning, "must override startFastElement too", - compat::getBeginLoc(methodDecl)) - << methodDecl->getSourceRange(); + if (methodDecl->getNumParams() == 1) + charactersSet.insert({ cxxRecordDecl, methodDecl }); } - else if (methodDecl->getName() == "StartElement" || methodDecl->getName() == "EndElement" - || methodDecl->getName() == "Characters") + else if (name == "Characters") { - if (loplugin::DeclCheck(cxxRecordDecl).Class("SchXMLAxisContext")) - return true; - if (loplugin::DeclCheck(cxxRecordDecl).Class("SchXMLChartContext")) - return true; - if (loplugin::DeclCheck(cxxRecordDecl).Class("SchXMLParagraphContext")) - return true; - if (loplugin::DeclCheck(cxxRecordDecl).Class("SchXMLLegendContext")) - return true; - if (loplugin::DeclCheck(cxxRecordDecl).Class("SchXMLPropertyMappingContext")) - return true; - - bool foundImportContext = false; - CXXBasePaths aPaths; - cxxRecordDecl->lookupInBases( - [&](const CXXBaseSpecifier* Specifier, CXXBasePath & /*Path*/) -> bool { - if (!Specifier->getType().getTypePtr()) - return false; - const CXXRecordDecl* baseCXXRecordDecl = Specifier->getType()->getAsCXXRecordDecl(); - if (!baseCXXRecordDecl) - return false; - if (baseCXXRecordDecl->isInvalidDecl()) - return false; - if (loplugin::DeclCheck(baseCXXRecordDecl).Class("SvXMLImportContext")) - foundImportContext |= true; - return false; - }, - aPaths); - - if (!foundImportContext) - return true; - - bool foundConstructor = false; - for (auto it = cxxRecordDecl->ctor_begin(); it != cxxRecordDecl->ctor_end(); ++it) + if (methodDecl->getNumParams() == 1) + CharactersSet.insert({ cxxRecordDecl, methodDecl }); + } + + { + auto it1 = endFastElementSet.find(cxxRecordDecl); + auto it2 = EndElementSet.find(cxxRecordDecl); + if (it1 != endFastElementSet.end() && it2 != EndElementSet.end()) { - const CXXConstructorDecl* ctor = *it; - bool foundInt16 = false; - for (auto paramIt = ctor->param_begin(); paramIt != ctor->param_end(); ++paramIt) - { - const ParmVarDecl* pvd = *paramIt; - auto tc = loplugin::TypeCheck(pvd->getType()); - if (tc.Typedef("sal_uInt16")) - foundInt16 = true; - else if (tc.LvalueReference().Const().Class("OUString") && foundInt16) - foundConstructor = true; - else - foundInt16 = false; - if (tc.LvalueReference().Const().Class("OUString") - && pvd->getName() == "rLocalName") - foundConstructor = true; - } + auto methodDecl1 = it1->second; + report(DiagnosticsEngine::Warning, "cannot override both endFastElement and EndElement", + compat::getBeginLoc(methodDecl1)) + << methodDecl1->getSourceRange(); + auto methodDecl2 = it2->second; + report(DiagnosticsEngine::Warning, "cannot override both endFastElement and EndElement", + compat::getBeginLoc(methodDecl2)) + << methodDecl2->getSourceRange(); } + } - if (!foundConstructor) + { + auto it1 = startFastElementSet.find(cxxRecordDecl); + auto it2 = StartElementSet.find(cxxRecordDecl); + if (it1 != startFastElementSet.end() && it2 != StartElementSet.end()) + { + auto methodDecl1 = it1->second; + report(DiagnosticsEngine::Warning, + "cannot override both startFastElement and StartElement", + compat::getBeginLoc(methodDecl1)) + << methodDecl1->getSourceRange(); + auto methodDecl2 = it2->second; report(DiagnosticsEngine::Warning, - "overrides startElement, but looks like a fastparser context class, no " - "constructor that takes slowparser args", - compat::getBeginLoc(methodDecl)) - << methodDecl->getSourceRange(); + "cannot override both startFastElement and StartElement", + compat::getBeginLoc(methodDecl2)) + << methodDecl2->getSourceRange(); + } + } + { + auto it1 = charactersSet.find(cxxRecordDecl); + auto it2 = CharactersSet.find(cxxRecordDecl); + if (it1 != charactersSet.end() && it2 != CharactersSet.end()) + { + auto methodDecl1 = it1->second; + report(DiagnosticsEngine::Warning, "cannot override both characters and Characters", + compat::getBeginLoc(methodDecl1)) + << methodDecl1->getSourceRange(); + auto methodDecl2 = it2->second; + report(DiagnosticsEngine::Warning, "cannot override both characters and Characters", + compat::getBeginLoc(methodDecl2)) + << methodDecl2->getSourceRange(); + } } + auto checkEmpty = [&]() { + if (!methodDecl->isThisDeclarationADefinition()) + return; + auto compoundStmt = dyn_cast_or_null<CompoundStmt>(methodDecl->getBody()); + if (compoundStmt == nullptr || compoundStmt->size() > 0) + return; + report(DiagnosticsEngine::Warning, "empty, should be removed", + compat::getBeginLoc(methodDecl)) + << methodDecl->getSourceRange(); + auto canonicalDecl = methodDecl->getCanonicalDecl(); + if (canonicalDecl != methodDecl) + report(DiagnosticsEngine::Note, "definition here", compat::getBeginLoc(canonicalDecl)) + << canonicalDecl->getSourceRange(); + }; + auto checkOnlyReturn = [&]() { + if (!methodDecl->isThisDeclarationADefinition()) + return; + auto compoundStmt = dyn_cast_or_null<CompoundStmt>(methodDecl->getBody()); + if (compoundStmt == nullptr || compoundStmt->size() > 1) + return; + auto returnStmt = dyn_cast_or_null<ReturnStmt>(*compoundStmt->body_begin()); + if (!returnStmt) + return; + auto cxxConstructExpr + = dyn_cast_or_null<CXXConstructExpr>(returnStmt->getRetValue()->IgnoreImplicit()); + if (!cxxConstructExpr) + return; + if (cxxConstructExpr->getNumArgs() != 1) + return; + if (!isa<CXXNullPtrLiteralExpr>(cxxConstructExpr->getArg(0)->IgnoreImplicit())) + return; + report(DiagnosticsEngine::Warning, "empty, should be removed", + compat::getBeginLoc(methodDecl)) + << methodDecl->getSourceRange(); + auto canonicalDecl = methodDecl->getCanonicalDecl(); + if (canonicalDecl != methodDecl) + report(DiagnosticsEngine::Note, "definition here", compat::getBeginLoc(canonicalDecl)) + << canonicalDecl->getSourceRange(); + }; + + if (name == "startFastElement") + checkEmpty(); + else if (name == "endFastElement") + checkEmpty(); + else if (name == "characters") + checkEmpty(); + else if (name == "createFastChildContext") + checkOnlyReturn(); + else if (name == "createUnknownChildContext") + checkOnlyReturn(); + + return true; +} + +bool XmlImport::VisitCXXMemberCallExpr(const CXXMemberCallExpr* callExpr) +{ + auto beginLoc = compat::getBeginLoc(callExpr); + if (!beginLoc.isValid() || ignoreLocation(callExpr)) + return true; + + CXXMethodDecl* methodDecl = callExpr->getMethodDecl(); + if (!methodDecl || !methodDecl->getIdentifier()) + return true; + + auto cxxRecordDecl = methodDecl->getParent(); + if (!cxxRecordDecl || !cxxRecordDecl->getIdentifier()) + return true; + + if (!loplugin::DeclCheck(cxxRecordDecl).Class("SvXMLImportContext")) + return true; + + auto name = methodDecl->getName(); + if (name == "startFastElement" || name == "characters" || name == "endFastElement" + || name == "createFastChildContext" || name == "createUnknownChildContext" + || name == "StartElement" || name == "EndElement" || name == "Characters" + || name == "CreateChildContext") + { + /** + * Calling this superclass method from a subclass method will mess with the fallback logic in the superclass. + */ + report(DiagnosticsEngine::Warning, "don't call this superclass method", + compat::getBeginLoc(callExpr)) + << callExpr->getSourceRange(); + } return true; } 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 { diff --git a/editeng/source/misc/SvXMLAutoCorrectImport.hxx b/editeng/source/misc/SvXMLAutoCorrectImport.hxx index d04e8f1a10ef..364b30a37062 100644 --- a/editeng/source/misc/SvXMLAutoCorrectImport.hxx +++ b/editeng/source/misc/SvXMLAutoCorrectImport.hxx @@ -55,7 +55,6 @@ public: virtual css::uno::Reference<XFastContextHandler> SAL_CALL createFastChildContext( sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override; - virtual void SAL_CALL startFastElement( sal_Int32 /*Element*/, const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*Attribs*/ ) override {} virtual ~SvXMLWordListContext() override; }; @@ -65,7 +64,6 @@ class SvXMLWordContext : public SvXMLImportContext public: SvXMLWordContext ( SvXMLAutoCorrectImport& rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ); - virtual void SAL_CALL startFastElement( sal_Int32 /*Element*/, const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*Attribs*/ ) override {} virtual ~SvXMLWordContext() override; }; @@ -96,9 +94,6 @@ private: public: SvXMLExceptionListContext ( SvXMLExceptionListImport& rImport ); - virtual void SAL_CALL startFastElement( - sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} virtual css::uno::Reference<XFastContextHandler> SAL_CALL createFastChildContext( sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override; @@ -111,9 +106,6 @@ public: SvXMLExceptionContext ( SvXMLExceptionListImport& 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 >& /*xAttrList*/ ) override {} virtual ~SvXMLExceptionContext() override; }; diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx index c6607cef4d87..e04d2839d170 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -56,8 +56,6 @@ public: virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList) override; - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} private: const uno::Reference< XText > mxText; diff --git a/include/xmloff/DocumentSettingsContext.hxx b/include/xmloff/DocumentSettingsContext.hxx index f09d0f919dc7..130da3814631 100644 --- a/include/xmloff/DocumentSettingsContext.hxx +++ b/include/xmloff/DocumentSettingsContext.hxx @@ -46,9 +46,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; private: diff --git a/include/xmloff/XMLBase64ImportContext.hxx b/include/xmloff/XMLBase64ImportContext.hxx index 6777ce10c296..94b07422203c 100644 --- a/include/xmloff/XMLBase64ImportContext.hxx +++ b/include/xmloff/XMLBase64ImportContext.hxx @@ -45,14 +45,8 @@ public: virtual ~XMLBase64ImportContext() 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) override; virtual void SAL_CALL characters( const OUString& rChars ) override; - - virtual void EndElement() override; - virtual void Characters( const OUString& rChars ) override; - }; #endif // INCLUDED_XMLOFF_XMLBASE64IMPORTCONTEXT_HXX diff --git a/include/xmloff/XMLCharContext.hxx b/include/xmloff/XMLCharContext.hxx index bb118dc212c7..b17d8ea46d3c 100644 --- a/include/xmloff/XMLCharContext.hxx +++ b/include/xmloff/XMLCharContext.hxx @@ -59,17 +59,10 @@ public: virtual ~XMLCharContext() override; - virtual void SAL_CALL startFastElement( - sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} // EndElement is called before a context will be destructed, but // after an elements context has been parsed. It may be used for actions // that require virtual methods. The default is to do nothing. virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; - // EndElement is called before a context will be destructed, but - // after an elements context has been parsed. It may be used for actions - // that require virtual methods. The default is to do nothing. - virtual void EndElement() override; virtual void InsertControlCharacter(sal_Int16 _nControl); virtual void InsertString(const OUString& _sString); diff --git a/include/xmloff/XMLEventsImportContext.hxx b/include/xmloff/XMLEventsImportContext.hxx index fd0a98396f2b..36b18f86fd90 100644 --- a/include/xmloff/XMLEventsImportContext.hxx +++ b/include/xmloff/XMLEventsImportContext.hxx @@ -107,21 +107,11 @@ public: protected: - virtual void StartElement( - const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override; - - virtual void EndElement() override; - virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) 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 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/include/xmloff/XMLTextMasterPageContext.hxx b/include/xmloff/XMLTextMasterPageContext.hxx index 3d2bd7302f68..d39159890788 100644 --- a/include/xmloff/XMLTextMasterPageContext.hxx +++ b/include/xmloff/XMLTextMasterPageContext.hxx @@ -57,9 +57,6 @@ public: bool bOverwrite ); virtual ~XMLTextMasterPageContext() 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/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index f55ccf46149b..763e24ae6db9 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -214,9 +214,8 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper< std::unique_ptr<SvXMLNamespaceMap> mpNamespaceMap; std::unique_ptr<SvXMLUnitConverter> mpUnitConv; - std::stack<SvXMLImportContextRef> maContexts; - std::stack<css::uno::Reference<css::xml::sax::XFastContextHandler>> - maFastContexts; + std::stack<SvXMLImportContextRef, std::vector<SvXMLImportContextRef>> + maContexts; std::unique_ptr<SvXMLNumFmtHelper> mpNumImport; std::unique_ptr<ProgressBarHelper> mpProgressBarHelper; std::unique_ptr<XMLEventImportHelper> mpEventImportHelper; @@ -227,7 +226,6 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper< SvXMLImportFlags mnImportFlags; std::set< OUString > embeddedFontUrlsKnown; - bool isFastContext; css::uno::Reference< css::xml::sax::XFastParser > mxParser; rtl::Reference< SvXMLImportFastNamespaceHandler > maNamespaceHandler; rtl::Reference < comphelper::AttributeList > maAttrList; @@ -242,7 +240,6 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper< void registerNamespaces(); std::unique_ptr<SvXMLNamespaceMap> processNSAttributes( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList); - void Characters(const OUString& aChars); css::uno::Reference< css::task::XStatusIndicator > mxStatusIndicator; @@ -305,10 +302,6 @@ public: virtual ~SvXMLImport() throw() override; - void startElement(const OUString& aName, - const css::uno::Reference< css::xml::sax::XAttributeList > & xAttribs); - void endElement(const OUString& aName); - virtual void SAL_CALL startDocument() override; virtual void SAL_CALL endDocument() override; virtual void SAL_CALL characters(const OUString& aChars) override; diff --git a/include/xmloff/xmlmetai.hxx b/include/xmloff/xmlmetai.hxx index 3af85c3f4a39..92fe0f085654 100644 --- a/include/xmloff/xmlmetai.hxx +++ b/include/xmloff/xmlmetai.hxx @@ -45,13 +45,9 @@ public: virtual ~SvXMLMetaDocumentContext() override; - virtual void SAL_CALL characters( const OUString& aChars ) override; - virtual void SAL_CALL startFastElement( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; - virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; diff --git a/include/xmloff/xmlprcon.hxx b/include/xmloff/xmlprcon.hxx index 9a430adb97ff..37ce9ba2c0f4 100644 --- a/include/xmloff/xmlprcon.hxx +++ b/include/xmloff/xmlprcon.hxx @@ -48,9 +48,6 @@ public: virtual ~SvXMLPropertySetContext() 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/include/xmloff/xmlscripti.hxx b/include/xmloff/xmlscripti.hxx index bfe390dd68b9..0be5a0c6f904 100644 --- a/include/xmloff/xmlscripti.hxx +++ b/include/xmloff/xmlscripti.hxx @@ -40,9 +40,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 {} }; #endif // INCLUDED_XMLOFF_XMLSCRIPTI_HXX diff --git a/include/xmloff/xmlstyle.hxx b/include/xmloff/xmlstyle.hxx index f606d9aef30b..0f891cacaa34 100644 --- a/include/xmloff/xmlstyle.hxx +++ b/include/xmloff/xmlstyle.hxx @@ -188,9 +188,6 @@ public: virtual ~SvXMLStylesContext() override; - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} - // Create child element. 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/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx index f7503732465f..bc9aede1c32b 100644 --- a/linguistic/source/convdicxml.cxx +++ b/linguistic/source/convdicxml.cxx @@ -85,10 +85,6 @@ public: } // SvXMLImportContext - virtual void SAL_CALL startFastElement( - sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} - virtual void SAL_CALL characters( const OUString &rChars ) override; virtual css::uno::Reference<XFastContextHandler> SAL_CALL createFastChildContext( sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override; }; @@ -156,8 +152,8 @@ public: } -void ConvDicXMLImportContext::characters(const OUString & /*rChars*/) -{ +//void ConvDicXMLImportContext::characters(const OUString & /*rChars*/) +//{ /* Whitespace occurring within the content of token elements is "trimmed" from the ends (i.e. all whitespace at the beginning and end of the @@ -166,7 +162,7 @@ void ConvDicXMLImportContext::characters(const OUString & /*rChars*/) */ //collapsing not done yet! -} +//} css::uno::Reference<XFastContextHandler> ConvDicXMLImportContext::createFastChildContext( sal_Int32 Element, diff --git a/reportdesign/source/filter/xml/xmlCell.hxx b/reportdesign/source/filter/xml/xmlCell.hxx index 998e3a936f54..d11826af3170 100644 --- a/reportdesign/source/filter/xml/xmlCell.hxx +++ b/reportdesign/source/filter/xml/xmlCell.hxx @@ -54,8 +54,6 @@ namespace rptxml 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 {} virtual void SAL_CALL characters( const OUString& rChars ) override; virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; diff --git a/reportdesign/source/filter/xml/xmlColumn.cxx b/reportdesign/source/filter/xml/xmlColumn.cxx index 527b1f252c70..0271084ea5cd 100644 --- a/reportdesign/source/filter/xml/xmlColumn.cxx +++ b/reportdesign/source/filter/xml/xmlColumn.cxx @@ -164,10 +164,6 @@ ORptFilter& OXMLRowColumn::GetOwnImport() return static_cast<ORptFilter&>(GetImport()); } -void OXMLRowColumn::endFastElement(sal_Int32 ) -{ -} - } // namespace rptxml diff --git a/reportdesign/source/filter/xml/xmlColumn.hxx b/reportdesign/source/filter/xml/xmlColumn.hxx index cd87a9cbebb9..e5bed54f7da7 100644 --- a/reportdesign/source/filter/xml/xmlColumn.hxx +++ b/reportdesign/source/filter/xml/xmlColumn.hxx @@ -42,12 +42,8 @@ namespace rptxml ); virtual ~OXMLRowColumn() override; - 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 >& xAttrList ) override; - virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; }; } // namespace rptxml diff --git a/reportdesign/source/filter/xml/xmlComponent.hxx b/reportdesign/source/filter/xml/xmlComponent.hxx index 83216bf91a83..d48d7dcef56a 100644 --- a/reportdesign/source/filter/xml/xmlComponent.hxx +++ b/reportdesign/source/filter/xml/xmlComponent.hxx @@ -37,8 +37,6 @@ namespace rptxml ,const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ,const css::uno::Reference< css::report::XReportComponent >& _xComponent ); - virtual void SAL_CALL startFastElement( - sal_Int32 /*nElement*/, const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} virtual ~OXMLComponent() override; }; diff --git a/reportdesign/source/filter/xml/xmlCondPrtExpr.hxx b/reportdesign/source/filter/xml/xmlCondPrtExpr.hxx index dfa7674e0e1a..a69c5a49329e 100644 --- a/reportdesign/source/filter/xml/xmlCondPrtExpr.hxx +++ b/reportdesign/source/filter/xml/xmlCondPrtExpr.hxx @@ -40,9 +40,6 @@ namespace rptxml ,const css::uno::Reference< css::beans::XPropertySet >& _xComponent); virtual ~OXMLCondPrtExpr() override; - virtual void SAL_CALL startFastElement( - sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} virtual void SAL_CALL characters( const OUString& rChars ) override; virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; }; diff --git a/reportdesign/source/filter/xml/xmlControlProperty.hxx b/reportdesign/source/filter/xml/xmlControlProperty.hxx index 41d6c759ab1d..019ec80635ee 100644 --- a/reportdesign/source/filter/xml/xmlControlProperty.hxx +++ b/reportdesign/source/filter/xml/xmlControlProperty.hxx @@ -55,10 +55,6 @@ namespace rptxml 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 >& /*xAttrList*/ ) override {} - virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; virtual void SAL_CALL characters( const OUString& rChars ) override; diff --git a/reportdesign/source/filter/xml/xmlFormatCondition.hxx b/reportdesign/source/filter/xml/xmlFormatCondition.hxx index a4594b495c7a..56bd5602fb24 100644 --- a/reportdesign/source/filter/xml/xmlFormatCondition.hxx +++ b/reportdesign/source/filter/xml/xmlFormatCondition.hxx @@ -39,9 +39,6 @@ namespace rptxml ,const css::uno::Reference< css::report::XFormatCondition >& _xComponent ); virtual ~OXMLFormatCondition() override; - virtual void SAL_CALL startFastElement( - sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; }; diff --git a/reportdesign/source/filter/xml/xmlFunction.hxx b/reportdesign/source/filter/xml/xmlFunction.hxx index efdd2ba7179b..fbbc38e3efdb 100644 --- a/reportdesign/source/filter/xml/xmlFunction.hxx +++ b/reportdesign/source/filter/xml/xmlFunction.hxx @@ -46,9 +46,6 @@ namespace rptxml ); virtual ~OXMLFunction() override; - virtual void SAL_CALL startFastElement( - sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; }; diff --git a/reportdesign/source/filter/xml/xmlGroup.hxx b/reportdesign/source/filter/xml/xmlGroup.hxx index ac1ba4e530ed..92500cc2174d 100644 --- a/reportdesign/source/filter/xml/xmlGroup.hxx +++ b/reportdesign/source/filter/xml/xmlGroup.hxx @@ -41,9 +41,6 @@ namespace rptxml ); virtual ~OXMLGroup() override; - 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 >& xAttrList ) override; diff --git a/reportdesign/source/filter/xml/xmlMasterFields.hxx b/reportdesign/source/filter/xml/xmlMasterFields.hxx index 5dbb36987bb0..e8e212827e60 100644 --- a/reportdesign/source/filter/xml/xmlMasterFields.hxx +++ b/reportdesign/source/filter/xml/xmlMasterFields.hxx @@ -36,9 +36,6 @@ namespace rptxml ,IMasterDetailFieds* _pReport); virtual ~OXMLMasterFields() override; - 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 >& xAttrList ) override; }; diff --git a/reportdesign/source/filter/xml/xmlReport.hxx b/reportdesign/source/filter/xml/xmlReport.hxx index 7b010d9e74c2..eda2c0462e37 100644 --- a/reportdesign/source/filter/xml/xmlReport.hxx +++ b/reportdesign/source/filter/xml/xmlReport.hxx @@ -42,8 +42,6 @@ namespace rptxml 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 {} virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; virtual void addMasterDetailPair(const ::std::pair< OUString,OUString >& _aPair) override; diff --git a/reportdesign/source/filter/xml/xmlReportElement.hxx b/reportdesign/source/filter/xml/xmlReportElement.hxx index dbf5d180c4d0..5f64dbe732e8 100644 --- a/reportdesign/source/filter/xml/xmlReportElement.hxx +++ b/reportdesign/source/filter/xml/xmlReportElement.hxx @@ -38,9 +38,6 @@ namespace rptxml ,const css::uno::Reference< css::report::XReportControlModel >& _xComponent); virtual ~OXMLReportElement() override; - 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 >& xAttrList ) override; }; diff --git a/reportdesign/source/filter/xml/xmlReportElementBase.hxx b/reportdesign/source/filter/xml/xmlReportElementBase.hxx index 0d06e0717962..c37e17c50428 100644 --- a/reportdesign/source/filter/xml/xmlReportElementBase.hxx +++ b/reportdesign/source/filter/xml/xmlReportElementBase.hxx @@ -52,9 +52,6 @@ namespace rptxml ,OXMLTable* _pContainer); virtual ~OXMLReportElementBase() 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 >& xAttrList ) override; diff --git a/reportdesign/source/filter/xml/xmlSection.hxx b/reportdesign/source/filter/xml/xmlSection.hxx index beed05c9870f..c1e25cd837f8 100644 --- a/reportdesign/source/filter/xml/xmlSection.hxx +++ b/reportdesign/source/filter/xml/xmlSection.hxx @@ -41,9 +41,6 @@ namespace rptxml ,bool _bPageHeader = true); virtual ~OXMLSection() override; - 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 >& xAttrList ) override; }; diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx index 07c2336349c2..5b269a5d7e9d 100644 --- a/reportdesign/source/filter/xml/xmlStyleImport.cxx +++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx @@ -163,9 +163,8 @@ OReportStylesContext::~OReportStylesContext() } -void OReportStylesContext::endFastElement(sal_Int32 nElement) +void OReportStylesContext::endFastElement(sal_Int32 ) { - SvXMLStylesContext::endFastElement(nElement); if (bAutoStyles) GetImport().GetTextImport()->SetAutoStyles( this ); else diff --git a/reportdesign/source/filter/xml/xmlTable.hxx b/reportdesign/source/filter/xml/xmlTable.hxx index b84f7310a59e..508ad5087166 100644 --- a/reportdesign/source/filter/xml/xmlTable.hxx +++ b/reportdesign/source/filter/xml/xmlTable.hxx @@ -65,8 +65,6 @@ namespace rptxml 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 >& /*xAttrList*/ ) override {} virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; void addHeight(sal_Int32 _nHeight) { m_aHeight.push_back(_nHeight); } diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index 5c65664625f3..d3d495d79d0f 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -543,9 +543,6 @@ public: { } - 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 >& /*xAttrList*/ ) override { @@ -565,9 +562,6 @@ public: { } - 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 >& /*xAttrList*/ ) override { @@ -632,9 +626,6 @@ public: { } - 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 >& /*xAttrList*/ ) override { diff --git a/reportdesign/source/filter/xml/xmlfilter.hxx b/reportdesign/source/filter/xml/xmlfilter.hxx index 5165da21884f..33aa2e3b5843 100644 --- a/reportdesign/source/filter/xml/xmlfilter.hxx +++ b/reportdesign/source/filter/xml/xmlfilter.hxx @@ -135,9 +135,6 @@ public: { } - 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 >& /*xAttrList*/ ) override; }; diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx index f9088ebe8f38..2b2138ec0988 100644 --- a/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx +++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx @@ -55,9 +55,6 @@ public: const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) 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; @@ -82,8 +79,6 @@ public: const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) 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; }; diff --git a/sc/source/filter/xml/XMLTableSourceContext.cxx b/sc/source/filter/xml/XMLTableSourceContext.cxx index 38bb4c3bee86..c64fd897087e 100644 --- a/sc/source/filter/xml/XMLTableSourceContext.cxx +++ b/sc/source/filter/xml/XMLTableSourceContext.cxx @@ -77,12 +77,6 @@ ScXMLTableSourceContext::~ScXMLTableSourceContext() { } -uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLTableSourceContext::createFastChildContext( - sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ ) -{ - return nullptr; -} - void SAL_CALL ScXMLTableSourceContext::endFastElement( sal_Int32 /*nElement*/ ) { if (sLink.isEmpty()) diff --git a/sc/source/filter/xml/XMLTableSourceContext.hxx b/sc/source/filter/xml/XMLTableSourceContext.hxx index 23c62ba6da5e..523c28bfc2fb 100644 --- a/sc/source/filter/xml/XMLTableSourceContext.hxx +++ b/sc/source/filter/xml/XMLTableSourceContext.hxx @@ -40,9 +40,6 @@ public: virtual ~ScXMLTableSourceContext() override; - 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 endFastElement( sal_Int32 nElement ) override; }; diff --git a/sc/source/filter/xml/celltextparacontext.cxx b/sc/source/filter/xml/celltextparacontext.cxx index d4feaafead94..8a54d38c2b32 100644 --- a/sc/source/filter/xml/celltextparacontext.cxx +++ b/sc/source/filter/xml/celltextparacontext.cxx @@ -189,12 +189,6 @@ void ScXMLCellFieldSheetNameContext::SetStyleName(const OUString& rStyleName) maStyleName = rStyleName; } -void SAL_CALL ScXMLCellFieldSheetNameContext::startFastElement( sal_Int32 /*nElement*/, - const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ ) -{ - // <text:sheet-name> has no attributes (that I'm aware of). -} - void SAL_CALL ScXMLCellFieldSheetNameContext::endFastElement( sal_Int32 /*nElement*/ ) { mrParentCxt.PushFieldSheetName(maStyleName); diff --git a/sc/source/filter/xml/celltextparacontext.hxx b/sc/source/filter/xml/celltextparacontext.hxx index 3d62077c329e..35a553ce7f9c 100644 --- a/sc/source/filter/xml/celltextparacontext.hxx +++ b/sc/source/filter/xml/celltextparacontext.hxx @@ -68,8 +68,6 @@ public: void SetStyleName(const OUString& rStyleName); - virtual void SAL_CALL startFastElement( sal_Int32 nElement, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; }; diff --git a/sc/source/filter/xml/importcontext.cxx b/sc/source/filter/xml/importcontext.cxx index df219df61679..611c704c75c8 100644 --- a/sc/source/filter/xml/importcontext.cxx +++ b/sc/source/filter/xml/importcontext.cxx @@ -30,22 +30,4 @@ const ScXMLImport& ScXMLImportContext::GetScImport() const return static_cast<const ScXMLImport&>(GetImport()); } -void SAL_CALL ScXMLImportContext::startFastElement(sal_Int32 /*nElement*/, const css::uno::Reference< css::xml::sax::XFastAttributeList > & /*xAttrList*/) -{ -} - -void SAL_CALL ScXMLImportContext::endFastElement(sal_Int32 /*nElement*/) -{ -} - -void SAL_CALL ScXMLImportContext::characters(const OUString &) -{ -} - -css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL ScXMLImportContext::createFastChildContext( - sal_Int32/* nElement */, const css::uno::Reference< css::xml::sax::XFastAttributeList >&/* xAttrList */ ) -{ - return nullptr; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/xml/importcontext.hxx b/sc/source/filter/xml/importcontext.hxx index 90a7a2d0e053..c762469d2360 100644 --- a/sc/source/filter/xml/importcontext.hxx +++ b/sc/source/filter/xml/importcontext.hxx @@ -25,17 +25,6 @@ public: ScXMLImportContext( SvXMLImport& rImport ); - virtual void SAL_CALL startFastElement (sal_Int32 nElement, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList) override; - - virtual void SAL_CALL characters(const OUString & aChars) override; - - virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; - - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( - sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs ) override; - - protected: ScXMLImport& GetScImport(); const ScXMLImport& GetScImport() const; diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx index 47e523f83a0b..8bec39546541 100644 --- a/sc/source/filter/xml/xmlcoli.cxx +++ b/sc/source/filter/xml/xmlcoli.cxx @@ -79,12 +79,6 @@ ScXMLTableColContext::~ScXMLTableColContext() { } -uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLTableColContext::createFastChildContext( - sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ ) -{ - return nullptr; -} - void SAL_CALL ScXMLTableColContext::endFastElement( sal_Int32 /*nElement*/ ) { ScXMLImport& rXMLImport = GetScImport(); diff --git a/sc/source/filter/xml/xmlcoli.hxx b/sc/source/filter/xml/xmlcoli.hxx index bc401698eee6..fe90136e61a3 100644 --- a/sc/source/filter/xml/xmlcoli.hxx +++ b/sc/source/filter/xml/xmlcoli.hxx @@ -37,9 +37,6 @@ public: virtual ~ScXMLTableColContext() override; - 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 endFastElement( sal_Int32 nElement ) override; }; diff --git a/sc/source/filter/xml/xmlconti.cxx b/sc/source/filter/xml/xmlconti.cxx index 2e357163f82b..1c5d55292fdc 100644 --- a/sc/source/filter/xml/xmlconti.cxx +++ b/sc/source/filter/xml/xmlconti.cxx @@ -95,11 +95,6 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > ScXMLContentContext::c return new SvXMLImportContext( GetImport() ); } -void ScXMLContentContext::Characters( const OUString& rChars ) -{ - sValue.append(rChars); -} - void ScXMLContentContext::characters( const OUString& rChars ) { sValue.append(rChars); diff --git a/sc/source/filter/xml/xmlconti.hxx b/sc/source/filter/xml/xmlconti.hxx index 1aabd9f49b5c..7fd2cb0274db 100644 --- a/sc/source/filter/xml/xmlconti.hxx +++ b/sc/source/filter/xml/xmlconti.hxx @@ -40,8 +40,6 @@ public: const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) override; - virtual void Characters( const OUString& rChars ) override; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 84b50188b7b6..e30a54366912 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -215,13 +215,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 >& xAttrList) override; - - virtual void SAL_CALL characters(const OUString & aChars) override; - - virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; }; } @@ -242,13 +235,6 @@ public: ScXMLFlatDocContext_Impl( ScXMLImport& i_rImport, const uno::Reference<document::XDocumentProperties>& i_xDocProps); - virtual void SAL_CALL startFastElement (sal_Int32 nElement, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList) override; - - virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; - - virtual void SAL_CALL characters( const OUString& aChars ) override; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList ) override; @@ -274,22 +260,6 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL return ScXMLDocContext_Impl::createFastChildContext( nElement, xAttrList ); } -void SAL_CALL ScXMLFlatDocContext_Impl::startFastElement(sal_Int32 nElement, - const uno::Reference< xml::sax::XFastAttributeList > & xAttrList) -{ - SvXMLMetaDocumentContext::startFastElement( nElement, xAttrList ); -} - -void SAL_CALL ScXMLFlatDocContext_Impl::endFastElement(sal_Int32 nElement) -{ - SvXMLMetaDocumentContext::endFastElement( nElement ); -} - -void SAL_CALL ScXMLFlatDocContext_Impl::characters(const OUString& rChars) -{ - SvXMLMetaDocumentContext::characters(rChars); -} - namespace { class ScXMLBodyContext_Impl : public ScXMLImportContext @@ -362,19 +332,6 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL return pContext; } -void SAL_CALL ScXMLDocContext_Impl::startFastElement(sal_Int32 /*nElement*/, - const uno::Reference< xml::sax::XFastAttributeList > & /*xAttrList*/) -{ -} - -void SAL_CALL ScXMLDocContext_Impl::endFastElement(sal_Int32 /*nElement*/) -{ -} - -void SAL_CALL ScXMLDocContext_Impl::characters(const OUString &) -{ -} - const SvXMLTokenMap& ScXMLImport::GetTableElemTokenMap() { if( !pTableElemTokenMap ) diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 8712531e526c..3a6df40abfe7 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -339,9 +339,6 @@ public: SvXMLImport& rImport, sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList > & xAttrList ); - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} - ScCondFormatEntry* CreateConditionEntry(); }; @@ -677,9 +674,8 @@ XMLTableStylesContext::~XMLTableStylesContext() { } -void XMLTableStylesContext::endFastElement(sal_Int32 nElement) +void XMLTableStylesContext::endFastElement(sal_Int32 ) { - SvXMLStylesContext::endFastElement(nElement); if (bAutoStyles) GetImport().GetTextImport()->SetAutoStyles( this ); else diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx index f27ab0ca238d..3784b9d54455 100644 --- a/sc/source/filter/xml/xmltabi.cxx +++ b/sc/source/filter/xml/xmltabi.cxx @@ -480,10 +480,4 @@ ScXMLTableProtectionContext::~ScXMLTableProtectionContext() { } -uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLTableProtectionContext::createFastChildContext( - sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ ) -{ - return nullptr; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/xml/xmltabi.hxx b/sc/source/filter/xml/xmltabi.hxx index 2b194d172d16..a20959a58e01 100644 --- a/sc/source/filter/xml/xmltabi.hxx +++ b/sc/source/filter/xml/xmltabi.hxx @@ -71,9 +71,6 @@ public: const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ); virtual ~ScXMLTableProtectionContext() override; - - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( - sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; #endif diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index 2f8dfb4aeab2..675081ef574e 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -518,8 +518,6 @@ public: virtual void TCharacters(const OUString & /*rChars*/); virtual void SAL_CALL characters(const OUString &rChars) override; - virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( - sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList ) override; virtual void SAL_CALL startFastElement(sal_Int32 /*nElement*/, const css::uno::Reference<css::xml::sax::XFastAttributeList>& /*rAttrList*/) override { if (GetSmImport().TooDeep()) @@ -547,12 +545,6 @@ void SmXMLImportContext::characters(const OUString &rChars) TCharacters(rChars2/*.collapse()*/); } -uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SmXMLImportContext::createFastChildContext( - sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ ) -{ - return nullptr; -} - namespace { struct SmXMLContext_Helper @@ -1859,9 +1851,6 @@ public: {} /*Don't do anything with alignment for now*/ - void SAL_CALL endFastElement(sal_Int32 ) override - { - } }; @@ -1888,13 +1877,6 @@ public: SmXMLOfficeContext_Impl( SmXMLImport &rImport ) : SvXMLImportContext(rImport) {} - virtual void SAL_CALL characters( const OUString& /*aChars*/ ) override {} - - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} - - virtual void SAL_CALL endFastElement( sal_Int32 /*nElement*/ ) override {} - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; @@ -1925,13 +1907,6 @@ public: SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport, const uno::Reference<document::XDocumentProperties>& i_xDocProps); - virtual void SAL_CALL characters( const OUString& aChars ) override; - - virtual void SAL_CALL startFastElement( sal_Int32 nElement, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; - - virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; @@ -1946,22 +1921,6 @@ SmXMLFlatDocContext_Impl::SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport, { } -void SAL_CALL SmXMLFlatDocContext_Impl::startFastElement( sal_Int32 nElement, - const uno::Reference< xml::sax::XFastAttributeList >& xAttrList ) -{ - SvXMLMetaDocumentContext::startFastElement(nElement, xAttrList); -} - -void SAL_CALL SmXMLFlatDocContext_Impl::endFastElement( sal_Int32 nElement ) -{ - SvXMLMetaDocumentContext::endFastElement(nElement); -} - -void SAL_CALL SmXMLFlatDocContext_Impl::characters( const OUString& rChars ) -{ - SvXMLMetaDocumentContext::characters(rChars); -} - uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SmXMLFlatDocContext_Impl::createFastChildContext( sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList ) { diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index 0b7c6f8ece27..4fc35c289993 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -68,9 +68,6 @@ public: SvxXMLTableImportContext( SvXMLImport& rImport, SvxXMLTableImportContextEnum eContext, const uno::Reference< XNameContainer >& xTable, bool bOOoFormat ); - 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 > & Attribs) override; diff --git a/sw/source/core/swg/SwXMLBlockImport.cxx b/sw/source/core/swg/SwXMLBlockImport.cxx index ab5519e27bf4..c0358b246773 100644 --- a/sw/source/core/swg/SwXMLBlockImport.cxx +++ b/sw/source/core/swg/SwXMLBlockImport.cxx @@ -54,9 +54,6 @@ 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; }; @@ -66,8 +63,6 @@ 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 @@ -78,9 +73,6 @@ 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; }; @@ -93,9 +85,6 @@ 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; }; @@ -108,9 +97,6 @@ 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; @@ -124,9 +110,6 @@ 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; diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx index 3f0fc562cfda..4fe4c1b0c710 100644 --- a/sw/source/core/swg/SwXMLSectionList.cxx +++ b/sw/source/core/swg/SwXMLSectionList.cxx @@ -36,9 +36,6 @@ private: public: SvXMLSectionListContext(SwXMLSectionList& 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; @@ -55,9 +52,6 @@ public: { } - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} - virtual css::uno::Reference<XFastContextHandler> SAL_CALL createFastChildContext( sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & /*xAttrList*/ ) override { 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; diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx index 4bedb4fa29a4..07d72b222521 100644 --- a/sw/source/uibase/config/StoredChapterNumbering.cxx +++ b/sw/source/uibase/config/StoredChapterNumbering.cxx @@ -318,10 +318,6 @@ public: { } - virtual void SAL_CALL startFastElement( - sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} - virtual void SAL_CALL endFastElement(sal_Int32 /*Element*/) override { assert(m_Contexts.size() < SwChapterNumRules::nMaxRules); diff --git a/xmloff/inc/DomBuilderContext.hxx b/xmloff/inc/DomBuilderContext.hxx index dcdd16819083..81fe98942160 100644 --- a/xmloff/inc/DomBuilderContext.hxx +++ b/xmloff/inc/DomBuilderContext.hxx @@ -79,8 +79,6 @@ public: virtual void StartElement( const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) override; - virtual void EndElement() override; - virtual void Characters( const OUString& rChars ) override; }; diff --git a/xmloff/inc/XMLBackgroundImageContext.hxx b/xmloff/inc/XMLBackgroundImageContext.hxx index 3ad9509e7bca..8d3f466ae353 100644 --- a/xmloff/inc/XMLBackgroundImageContext.hxx +++ b/xmloff/inc/XMLBackgroundImageContext.hxx @@ -63,8 +63,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; }; diff --git a/xmloff/inc/XMLElementPropertyContext.hxx b/xmloff/inc/XMLElementPropertyContext.hxx index 427e6d0f46ac..f6164e75a2a4 100644 --- a/xmloff/inc/XMLElementPropertyContext.hxx +++ b/xmloff/inc/XMLElementPropertyContext.hxx @@ -45,8 +45,6 @@ public: virtual ~XMLElementPropertyContext() 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; }; diff --git a/xmloff/inc/XMLStringBufferImportContext.hxx b/xmloff/inc/XMLStringBufferImportContext.hxx index 9c607480084f..7896667ff357 100644 --- a/xmloff/inc/XMLStringBufferImportContext.hxx +++ b/xmloff/inc/XMLStringBufferImportContext.hxx @@ -50,19 +50,8 @@ public: virtual ~XMLStringBufferImportContext() override; - virtual SvXMLImportContextRef CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference<css::xml::sax::XAttributeList >& xAttrList ) override; - - virtual void Characters( - const OUString& rChars ) override; - - virtual void EndElement() 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; - virtual void SAL_CALL startFastElement( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; virtual void SAL_CALL characters(const OUString& rChars) override; }; diff --git a/xmloff/inc/XMLTextColumnsContext.hxx b/xmloff/inc/XMLTextColumnsContext.hxx index ea020811934f..55a2cd400027 100644 --- a/xmloff/inc/XMLTextColumnsContext.hxx +++ b/xmloff/inc/XMLTextColumnsContext.hxx @@ -51,8 +51,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; }; diff --git a/xmloff/inc/XMLTextHeaderFooterContext.hxx b/xmloff/inc/XMLTextHeaderFooterContext.hxx index 86ac28b1f558..9e0a0b86cec9 100644 --- a/xmloff/inc/XMLTextHeaderFooterContext.hxx +++ b/xmloff/inc/XMLTextHeaderFooterContext.hxx @@ -55,8 +55,6 @@ public: const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) 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; }; diff --git a/xmloff/inc/animationimport.hxx b/xmloff/inc/animationimport.hxx index 5633e0ca3f1a..16e8dfa9becd 100644 --- a/xmloff/inc/animationimport.hxx +++ b/xmloff/inc/animationimport.hxx @@ -48,9 +48,6 @@ public: const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList, const std::shared_ptr<AnimationsImportHelperImpl>& pImpl = nullptr ); - virtual void SAL_CALL startFastElement( sal_Int32 nElement, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; - virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 Element, const css::uno::Reference<css::xml::sax::XFastAttributeList>& Attribs) override; diff --git a/xmloff/inc/animimp.hxx b/xmloff/inc/animimp.hxx index 1511994a89c2..f187ac411e62 100644 --- a/xmloff/inc/animimp.hxx +++ b/xmloff/inc/animimp.hxx @@ -35,8 +35,6 @@ public: XMLAnimationsContext( SvXMLImport& 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; }; diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx index 8f0c1c08440f..6faaa0cd240f 100644 --- a/xmloff/inc/xmlversion.hxx +++ b/xmloff/inc/xmlversion.hxx @@ -77,9 +77,6 @@ public: virtual ~XMLVersionListContext() 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 > & xAttribs) override; @@ -97,9 +94,6 @@ public: XMLVersionContext( XMLVersionListImport& 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 ~XMLVersionContext() override; }; diff --git a/xmloff/source/chart/SchXMLParagraphContext.cxx b/xmloff/source/chart/SchXMLParagraphContext.cxx index fc0d0df12316..95f484888d08 100644 --- a/xmloff/source/chart/SchXMLParagraphContext.cxx +++ b/xmloff/source/chart/SchXMLParagraphContext.cxx @@ -52,45 +52,6 @@ SchXMLParagraphContext::SchXMLParagraphContext( SvXMLImport& rImport, SchXMLParagraphContext::~SchXMLParagraphContext() {} -void SchXMLParagraphContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList ) -{ - // remember the id. It is used for storing the original cell range string in - // a local table (cached data) - if( !mpId ) - return; - - sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; - bool bHaveXmlId( false ); - - for( sal_Int16 i = 0; i < nAttrCount; i++ ) - { - OUString sAttrName = xAttrList->getNameByIndex( i ); - OUString aLocalName; - sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); - - if (IsXMLToken(aLocalName, XML_ID)) - { - if (nPrefix == XML_NAMESPACE_XML) - { - (*mpId) = xAttrList->getValueByIndex( i ); - bHaveXmlId = true; - } - if (nPrefix == XML_NAMESPACE_TEXT) - { // text:id shall be ignored if xml:id exists - if (!bHaveXmlId) - { - (*mpId) = xAttrList->getValueByIndex( i ); - } - } - } - } -} - -void SchXMLParagraphContext::EndElement() -{ - mrText = maBuffer.makeStringAndClear(); -} - void SchXMLParagraphContext::startFastElement( sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList ) @@ -149,11 +110,6 @@ SvXMLImportContextRef SchXMLParagraphContext::CreateChildContext( return nullptr; } -void SchXMLParagraphContext::Characters( const OUString& rChars ) -{ - maBuffer.append( rChars ); -} - void SchXMLParagraphContext::characters( const OUString& rChars ) { maBuffer.append( rChars ); diff --git a/xmloff/source/chart/SchXMLParagraphContext.hxx b/xmloff/source/chart/SchXMLParagraphContext.hxx index a76eceba2bc2..3d2599e9845a 100644 --- a/xmloff/source/chart/SchXMLParagraphContext.hxx +++ b/xmloff/source/chart/SchXMLParagraphContext.hxx @@ -43,10 +43,6 @@ public: OUString& rText ); virtual ~SchXMLParagraphContext() override; - virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; - virtual void EndElement() override; - virtual void Characters( const OUString& rChars ) override; - virtual void SAL_CALL startFastElement( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; diff --git a/xmloff/source/chart/SchXMLTextListContext.cxx b/xmloff/source/chart/SchXMLTextListContext.cxx index 537fe4ce3643..fdaf1f361896 100644 --- a/xmloff/source/chart/SchXMLTextListContext.cxx +++ b/xmloff/source/chart/SchXMLTextListContext.cxx @@ -35,9 +35,6 @@ class SchXMLListItemContext : public SvXMLImportContext public: SchXMLListItemContext( SvXMLImport& rImport, const OUString& rLocalName, OUString& rText ); - virtual void StartElement( const Reference< xml::sax::XAttributeList >& xAttrList ) override; - virtual void EndElement() override; - virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, @@ -58,14 +55,6 @@ SchXMLListItemContext::SchXMLListItemContext( { } -void SchXMLListItemContext::StartElement( const Reference< xml::sax::XAttributeList >& /*xAttrList*/ ) -{ -} - -void SchXMLListItemContext::EndElement() -{ -} - SvXMLImportContextRef SchXMLListItemContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) @@ -91,10 +80,6 @@ SchXMLTextListContext::~SchXMLTextListContext() { } -void SchXMLTextListContext::StartElement( const Reference< xml::sax::XAttributeList >& /*xAttrList*/ ) -{ -} - void SchXMLTextListContext::EndElement() { sal_Int32 nCount = m_aTextVector.size(); diff --git a/xmloff/source/chart/SchXMLTextListContext.hxx b/xmloff/source/chart/SchXMLTextListContext.hxx index 2b15c17c6192..ef728c84fff2 100644 --- a/xmloff/source/chart/SchXMLTextListContext.hxx +++ b/xmloff/source/chart/SchXMLTextListContext.hxx @@ -34,7 +34,6 @@ public: const OUString& rLocalName, css::uno::Sequence< OUString>& rTextList ); virtual ~SchXMLTextListContext() override; - virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; virtual SvXMLImportContextRef CreateChildContext( diff --git a/xmloff/source/chart/XMLLabelSeparatorContext.cxx b/xmloff/source/chart/XMLLabelSeparatorContext.cxx index b43abf82bfdc..11c3710d9d10 100644 --- a/xmloff/source/chart/XMLLabelSeparatorContext.cxx +++ b/xmloff/source/chart/XMLLabelSeparatorContext.cxx @@ -40,10 +40,6 @@ XMLLabelSeparatorContext::XMLLabelSeparatorContext( XMLLabelSeparatorContext::~XMLLabelSeparatorContext() {} -void XMLLabelSeparatorContext::startFastElement( sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ ) -{ -} - css::uno::Reference< css::xml::sax::XFastContextHandler > XMLLabelSeparatorContext::createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) diff --git a/xmloff/source/chart/XMLLabelSeparatorContext.hxx b/xmloff/source/chart/XMLLabelSeparatorContext.hxx index f66b6009b495..fc1451923686 100644 --- a/xmloff/source/chart/XMLLabelSeparatorContext.hxx +++ b/xmloff/source/chart/XMLLabelSeparatorContext.hxx @@ -30,9 +30,6 @@ public: ::std::vector< XMLPropertyState > &rProps ); virtual ~XMLLabelSeparatorContext() override; - 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; virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; diff --git a/xmloff/source/chart/contexts.cxx b/xmloff/source/chart/contexts.cxx index bdde116de6c9..b39ba4efbfae 100644 --- a/xmloff/source/chart/contexts.cxx +++ b/xmloff/source/chart/contexts.cxx @@ -43,9 +43,6 @@ public: SchXMLBodyContext_Impl( SchXMLImportHelper& rImpHelper, SvXMLImport& 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 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; @@ -162,12 +159,6 @@ SchXMLBodyContext::SchXMLBodyContext( SchXMLImportHelper& rImpHelper, SchXMLBodyContext::~SchXMLBodyContext() {} -css::uno::Reference< css::xml::sax::XFastContextHandler > SchXMLBodyContext::createFastChildContext( - sal_Int32 /*nElement*/, const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) -{ - return nullptr; -} - SvXMLImportContextRef SchXMLBodyContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, diff --git a/xmloff/source/chart/contexts.hxx b/xmloff/source/chart/contexts.hxx index 7cfcf2d5f44c..d8fe78be1a9d 100644 --- a/xmloff/source/chart/contexts.hxx +++ b/xmloff/source/chart/contexts.hxx @@ -47,9 +47,6 @@ public: virtual ~SchXMLDocContext() override; - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} - virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, @@ -70,10 +67,6 @@ public: sal_Int32 i_nElement, const css::uno::Reference<css::document::XDocumentProperties>& i_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 >& xAttrList ) override; }; @@ -90,12 +83,6 @@ public: sal_Int32 nElement ); virtual ~SchXMLBodyContext() 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 >& xAttrList ) override; - virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 96313067a491..f221bfbc0f00 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -135,9 +135,6 @@ public: XMLConfigBaseContext* pBaseContext); void AddPropertyValue() { maProps.push_back(maProp); } - - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} }; class XMLConfigItemContext : public SvXMLImportContext @@ -155,9 +152,6 @@ public: const OUString& rItemName, XMLConfigBaseContext* pBaseContext); - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} - virtual void SAL_CALL characters( const OUString& rChars ) override; virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; diff --git a/xmloff/source/core/DomBuilderContext.cxx b/xmloff/source/core/DomBuilderContext.cxx index bd19c4fdc0c2..0deacd18fb4b 100644 --- a/xmloff/source/core/DomBuilderContext.cxx +++ b/xmloff/source/core/DomBuilderContext.cxx @@ -154,11 +154,6 @@ void DomBuilderContext::StartElement( } } -void DomBuilderContext::EndElement() -{ - // nothing to be done! -} - void DomBuilderContext::Characters( const OUString& rCharacters ) { SAL_WARN_IF( !mxNode.is(), "xmloff", "empty XNode not allowed" ); diff --git a/xmloff/source/core/XMLBase64ImportContext.cxx b/xmloff/source/core/XMLBase64ImportContext.cxx index b9049e577d1c..504460bff96a 100644 --- a/xmloff/source/core/XMLBase64ImportContext.cxx +++ b/xmloff/source/core/XMLBase64ImportContext.cxx @@ -50,11 +50,6 @@ XMLBase64ImportContext::~XMLBase64ImportContext() { } -void XMLBase64ImportContext::EndElement() -{ - endFastElement(0); -} - void XMLBase64ImportContext::endFastElement(sal_Int32 ) { OUString sChars = maCharBuffer.makeStringAndClear().trim(); @@ -67,11 +62,6 @@ void XMLBase64ImportContext::endFastElement(sal_Int32 ) xOut->closeOutput(); } -void XMLBase64ImportContext::Characters( const OUString& rChars ) -{ - characters(rChars); -} - void XMLBase64ImportContext::characters( const OUString& rChars ) { maCharBuffer.append(rChars); diff --git a/xmloff/source/core/namespacemap.cxx b/xmloff/source/core/namespacemap.cxx index 96cdc10fcb31..3ff1d65bd1d9 100644 --- a/xmloff/source/core/namespacemap.cxx +++ b/xmloff/source/core/namespacemap.cxx @@ -319,6 +319,7 @@ sal_uInt16 SvXMLNamespaceMap::GetKeyByQName(const OUString& rQName, if (eMode == QNameMode::AttrNameCached && sEntryName.indexOf(':') != -1) { SAL_INFO("xmloff", "invalid attribute name with multiple ':'"); + assert(false); return XML_NAMESPACE_UNKNOWN; } diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx index bc1d2a8486bf..7a32f8455be3 100644 --- a/xmloff/source/core/xmlictxt.cxx +++ b/xmloff/source/core/xmlictxt.cxx @@ -23,6 +23,7 @@ #include <sax/fastattribs.hxx> #include <comphelper/attributelist.hxx> #include <cppuhelper/queryinterface.hxx> +#include <sal/log.hxx> using namespace ::com::sun::star; @@ -70,20 +71,15 @@ void SvXMLImportContext::Characters( const OUString& ) // css::xml::sax::XFastContextHandler: void SAL_CALL SvXMLImportContext::startFastElement(sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) { - mrImport.isFastContext = false; const OUString& rPrefix = SvXMLImport::getNamespacePrefixFromToken(nElement, &GetImport().GetNamespaceMap()); const OUString& rLocalName = SvXMLImport::getNameFromToken( nElement ); startUnknownElement( SvXMLImport::aDefaultNamespace, (rPrefix.isEmpty())? rLocalName : rPrefix + SvXMLImport::aNamespaceSeparator + rLocalName, Attribs ); } -void SAL_CALL SvXMLImportContext::startUnknownElement(const OUString & /*rNamespace*/, const OUString & rElementName, +void SAL_CALL SvXMLImportContext::startUnknownElement(const OUString & /*rNamespace*/, const OUString & /*rElementName*/, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) { - if ( mrImport.maAttrList.is() ) - mrImport.maAttrList->Clear(); - else - mrImport.maAttrList = new comphelper::AttributeList; - + mrImport.maAttrList->Clear(); mrImport.maNamespaceHandler->addNSDeclAttributes( mrImport.maAttrList ); if ( Attribs.is() ) @@ -108,40 +104,34 @@ void SAL_CALL SvXMLImportContext::startUnknownElement(const OUString & /*rNamesp mrImport.maAttrList->AddAttribute( rAttrName, "CDATA", rAttrValue ); } } - mrImport.startElement( rElementName, mrImport.maAttrList.get() ); + StartElement( mrImport.maAttrList.get() ); } -void SAL_CALL SvXMLImportContext::endFastElement(sal_Int32 nElement) +void SAL_CALL SvXMLImportContext::endFastElement(sal_Int32 ) { - mrImport.isFastContext = false; - const OUString& rPrefix = SvXMLImport::getNamespacePrefixFromToken(nElement, &GetImport().GetNamespaceMap()); - const OUString& rLocalName = SvXMLImport::getNameFromToken( nElement ); - endUnknownElement( SvXMLImport::aDefaultNamespace, (rPrefix.isEmpty())? rLocalName : rPrefix + SvXMLImport::aNamespaceSeparator + rLocalName ); + EndElement(); } -void SAL_CALL SvXMLImportContext::endUnknownElement (const OUString & /*rNamespace*/, const OUString & rElementName) +void SAL_CALL SvXMLImportContext::endUnknownElement (const OUString & /*rNamespace*/, const OUString & /*rElementName*/) { - mrImport.endElement( rElementName ); + EndElement(); } uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SvXMLImportContext::createFastChildContext - (sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) + (sal_Int32 /*Element*/, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) { - // Call CreateFastContext only if it's the first element of the document - if ( mrImport.maFastContexts.empty() ) - return mrImport.CreateFastContext( Element, Attribs ); return nullptr; } uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SvXMLImportContext::createUnknownChildContext - (const OUString &, const OUString &, const uno::Reference< xml::sax::XFastAttributeList > &) + (const OUString & /*rNamespace*/, const OUString & /*rName*/, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) { - return this; + return nullptr; } void SAL_CALL SvXMLImportContext::characters(const OUString &rChars) { - mrImport.Characters( rChars ); + Characters(rChars); } // XInterface diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index dbb02f0fe29a..7886d150948b 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -334,6 +334,7 @@ public: SvXMLImportContext *SvXMLImport::CreateFastContext( sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ ) { + assert(false); SAL_WARN( "xmloff.core", "CreateFastContext should be overridden, for element " << nElement); return new SvXMLImportContext( *this ); } @@ -404,7 +405,6 @@ SvXMLImport::SvXMLImport( util::MeasureUnit::MM_100TH, util::MeasureUnit::MM_100TH) ), mnImportFlags( nImportFlags ), - isFastContext( false ), maNamespaceHandler( new SvXMLImportFastNamespaceHandler() ), mbIsFormsSupported( true ), mbIsTableShapeSupported( false ), @@ -421,6 +421,8 @@ SvXMLImport::SvXMLImport( bIsNSMapsInitialized = true; } registerNamespaces(); + maNamespaceAttrList = new comphelper::AttributeList; + maAttrList = new comphelper::AttributeList; } void SvXMLImport::cleanup() throw () @@ -429,12 +431,6 @@ void SvXMLImport::cleanup() throw () mxModel->removeEventListener(mxEventListener); // clear context stacks first in case of parse error because the context // class dtors are full of application logic - while (!maFastContexts.empty()) - { - if (SvXMLStylesContext* pStylesContext = dynamic_cast<SvXMLStylesContext*>(maFastContexts.top().get())) - pStylesContext->dispose(); - maFastContexts.pop(); - } while (!maContexts.empty()) { if (SvXMLStylesContext* pStylesContext = dynamic_cast<SvXMLStylesContext*>(maContexts.top().get())) @@ -725,119 +721,10 @@ std::unique_ptr<SvXMLNamespaceMap> SvXMLImport::processNSAttributes( return pRewindMap; } -void SvXMLImport::startElement( const OUString& rName, - const uno::Reference< xml::sax::XAttributeList >& xAttrList ) -{ - // SAL_INFO("svg", "startElement " << rName); - // Process namespace attributes. This must happen before creating the - // context, because namespace declaration apply to the element name itself. - std::unique_ptr<SvXMLNamespaceMap> pRewindMap(processNSAttributes(xAttrList)); - - // Get element's namespace and local name. - OUString aLocalName; - sal_uInt16 nPrefix = - mpNamespaceMap->GetKeyByAttrName( rName, &aLocalName ); - - // If there are contexts already, call a CreateChildContext at the topmost - // context. Otherwise, create a default context. - SvXMLImportContextRef xContext; - if(!maContexts.empty()) - { - xContext = maContexts.top()->CreateChildContext(nPrefix, aLocalName, xAttrList); - SAL_WARN_IF( xContext.is() && xContext->IsPrefixFilledIn() && (xContext->GetPrefix() != nPrefix), "xmloff.core", - "SvXMLImport::startElement: created context has wrong prefix" ); - } - else - { - Reference<xml::sax::XLocator> xDummyLocator; - Sequence < OUString > aParams { rName }; - - SetError( XMLERROR_FLAG_SEVERE|XMLERROR_UNKNOWN_ROOT, - aParams, "Root element " + rName + " unknown", xDummyLocator ); - } - - if ( !xContext.is() ) - SAL_INFO_IF( !xContext.is(), "xmloff.core", "SvXMLImport::startElement: missing context for element " << rName ); - - if( !xContext.is() ) - xContext.set(new SvXMLImportContext( *this, nPrefix, aLocalName )); - - // Remember old namespace map. - if( pRewindMap ) - xContext->PutRewindMap(std::move(pRewindMap)); - - // Call a startElement at the new context. - xContext->StartElement( xAttrList ); - - // Push context on stack. - maContexts.push(xContext); -} - -void SvXMLImport::endElement( const OUString& -#ifdef DBG_UTIL -rName -#endif -) -{ - if (maContexts.empty()) - { - SAL_WARN("xmloff.core", "SvXMLImport::endElement: no context left"); - return; - } - - std::unique_ptr<SvXMLNamespaceMap> pRewindMap; - - { - // Get topmost context and remove it from the stack. - SvXMLImportContextRef xContext = std::move(maContexts.top()); - maContexts.pop(); - -#ifdef DBG_UTIL - // Non product only: check if endElement call matches startELement call. - if (xContext->IsPrefixFilledIn()) // prefix+localname are only valid in the non-FastParser case - { - OUString aLocalName; - sal_uInt16 nPrefix = - mpNamespaceMap->GetKeyByAttrName( rName, &aLocalName ); - SAL_WARN_IF( xContext->GetPrefix() != nPrefix, "xmloff.core", "SvXMLImport::endElement: popped context has wrong prefix" ); - SAL_WARN_IF( xContext->GetLocalName() != aLocalName, "xmloff.core", "SvXMLImport::endElement: popped context has wrong lname '" - << aLocalName << "' expected. '" << xContext->GetLocalName() << "' with impl " << getImplementationName() ); - } -#endif - - // Call a EndElement at the current context. - xContext->EndElement(); - // Get a namespace map to rewind. - pRewindMap = xContext->TakeRewindMap(); - // note: delete xContext *before* rewinding namespace map! - } - - // Rewind a namespace map. - if (pRewindMap) - { - mpNamespaceMap.reset(); - mpNamespaceMap = std::move(pRewindMap); - } -} void SAL_CALL SvXMLImport::characters( const OUString& rChars ) { - if ( !maFastContexts.empty() ) - { - maFastContexts.top()->characters( rChars ); - } - else if( !maContexts.empty() ) - { - maContexts.top()->Characters( rChars ); - } -} - -void SvXMLImport::Characters( const OUString& rChars ) -{ - if( !maContexts.empty() ) - { - maContexts.top()->Characters( rChars ); - } + maContexts.top()->characters( rChars ); } void SAL_CALL SvXMLImport::processingInstruction( const OUString&, @@ -854,6 +741,7 @@ void SAL_CALL SvXMLImport::setDocumentLocator( const uno::Reference< xml::sax::X void SAL_CALL SvXMLImport::startFastElement (sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) { + SAL_INFO("xmloff.core", "startFastElement " << SvXMLImport::getNameFromToken( Element )); if ( Attribs.is() && !mpImpl->mxODFVersion) { sax_fastparser::FastAttributeList& rAttribList = @@ -874,80 +762,180 @@ void SAL_CALL SvXMLImport::startFastElement (sal_Int32 Element, } } - //Namespace handling is unnecessary. It is done by the fastparser itself. - uno::Reference<XFastContextHandler> xContext; - if (!maFastContexts.empty()) + maNamespaceAttrList->Clear(); + + maNamespaceHandler->addNSDeclAttributes( maNamespaceAttrList ); + std::unique_ptr<SvXMLNamespaceMap> pRewindMap( + processNSAttributes( maNamespaceAttrList.get() )); + + SvXMLImportContextRef xContext; + const bool bRootContext = maContexts.empty(); + if (!maContexts.empty()) { - uno::Reference<XFastContextHandler> pHandler = maFastContexts.top(); - xContext = pHandler->createFastChildContext( Element, Attribs ); + const SvXMLImportContextRef & pHandler = maContexts.top(); + SAL_INFO("xmloff.core", "calling createFastChildContext on " << typeid(*pHandler.get()).name()); + auto tmp = pHandler->createFastChildContext( Element, Attribs ); + if (!tmp) + { + // fall back to slow-parser path + const OUString& rPrefix = SvXMLImport::getNamespacePrefixFromToken(Element, &GetNamespaceMap()); + const OUString& rLocalName = SvXMLImport::getNameFromToken( Element ); + OUString aName = rPrefix.isEmpty() ? rLocalName : rPrefix + SvXMLImport::aNamespaceSeparator + rLocalName; + OUString aLocalName; + sal_uInt16 nPrefix = + mpNamespaceMap->GetKeyByAttrName( aName, &aLocalName ); + + maAttrList->Clear(); + + if ( Attribs.is() ) + { + for( auto &it : sax_fastparser::castToFastAttributeList( Attribs ) ) + { + sal_Int32 nToken = it.getToken(); + const OUString& rAttrNamespacePrefix = SvXMLImport::getNamespacePrefixFromToken(nToken, &GetNamespaceMap()); + OUString sAttrName = SvXMLImport::getNameFromToken( nToken ); + if ( !rAttrNamespacePrefix.isEmpty() ) + sAttrName = rAttrNamespacePrefix + SvXMLImport::aNamespaceSeparator + sAttrName; + + maAttrList->AddAttribute( sAttrName, "CDATA", it.toString() ); + } + + const uno::Sequence< xml::Attribute > unknownAttribs = Attribs->getUnknownAttributes(); + for ( const auto& rUnknownAttrib : unknownAttribs ) + { + const OUString& rAttrValue = rUnknownAttrib.Value; + const OUString& rAttrName = rUnknownAttrib.Name; + // note: rAttrName is expected to be namespace-prefixed here + maAttrList->AddAttribute( rAttrName, "CDATA", rAttrValue ); + } + } + + SAL_INFO("xmloff.core", "calling CreateChildContext on " << typeid(*pHandler).name()); + tmp = pHandler->CreateChildContext(nPrefix, aLocalName, maAttrList.get() ).get(); + } + xContext = dynamic_cast<SvXMLImportContext*>(tmp.get()); + assert(tmp && xContext || (!tmp && !xContext)); } else xContext.set( CreateFastContext( Element, Attribs ) ); SAL_INFO_IF(!xContext.is(), "xmloff.core", "No fast context for element " << getNameFromToken(Element)); - if ( !xContext.is() ) + if (bRootContext && !xContext) + { + OUString aName = getNameFromToken(Element); + SetError( XMLERROR_FLAG_SEVERE | XMLERROR_UNKNOWN_ROOT, + { aName }, "Root element " + aName + " unknown", Reference<xml::sax::XLocator>() ); + } + if ( !xContext ) xContext.set( new SvXMLImportContext( *this ) ); - isFastContext = true; - // Call a startElement at the new context. xContext->startFastElement( Element, Attribs ); - if ( isFastContext ) - { - if ( maNamespaceAttrList.is() ) - maNamespaceAttrList->Clear(); - else - maNamespaceAttrList = new comphelper::AttributeList; - - maNamespaceHandler->addNSDeclAttributes( maNamespaceAttrList ); - std::unique_ptr<SvXMLNamespaceMap> pRewindMap( - processNSAttributes( maNamespaceAttrList.get() )); - assert( dynamic_cast<SvXMLImportContext*>( xContext.get() ) != nullptr ); - SvXMLImportContext *pContext = static_cast<SvXMLImportContext*>( xContext.get() ); - if (pRewindMap) - pContext->PutRewindMap(std::move(pRewindMap)); - maContexts.push(pContext); - } + if (pRewindMap) + xContext->PutRewindMap(std::move(pRewindMap)); // Push context on stack. - maFastContexts.push(xContext); + maContexts.push(xContext); } -void SAL_CALL SvXMLImport::startUnknownElement (const OUString & rPrefix, const OUString & rLocalName, +void SAL_CALL SvXMLImport::startUnknownElement (const OUString & rNamespace, const OUString & rName, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) { - uno::Reference<XFastContextHandler> xContext; - if (!maFastContexts.empty()) + SAL_INFO("xmloff.core", "startUnknownElement " << rNamespace << " " << rName); + SvXMLImportContextRef xContext; + const bool bRootContext = maContexts.empty(); + if (!maContexts.empty()) { - uno::Reference<XFastContextHandler> pHandler = maFastContexts.top(); - xContext = pHandler->createUnknownChildContext( rPrefix, rLocalName, Attribs ); + const SvXMLImportContextRef & pHandler = maContexts.top(); + SAL_INFO("xmloff.core", "calling createUnknownChildContext on " << typeid(*pHandler.get()).name()); + auto tmp = pHandler->createUnknownChildContext( rNamespace, rName, Attribs ); + if (!tmp) + { + // fall back to slow-parser path + OUString aLocalName; + sal_uInt16 nPrefix = mpNamespaceMap->GetKeyByAttrName( rName, &aLocalName ); + + maAttrList->Clear(); + maNamespaceHandler->addNSDeclAttributes( maAttrList ); + + if ( Attribs.is() ) + { + for( auto &it : sax_fastparser::castToFastAttributeList( Attribs ) ) + { + sal_Int32 nToken = it.getToken(); + const OUString& rAttrNamespacePrefix = SvXMLImport::getNamespacePrefixFromToken(nToken, &GetNamespaceMap()); + OUString sAttrName = SvXMLImport::getNameFromToken( nToken ); + if ( !rAttrNamespacePrefix.isEmpty() ) + sAttrName = rAttrNamespacePrefix + SvXMLImport::aNamespaceSeparator + sAttrName; + + maAttrList->AddAttribute( sAttrName, "CDATA", it.toString() ); + } + + const uno::Sequence< xml::Attribute > unknownAttribs = Attribs->getUnknownAttributes(); + for ( const auto& rUnknownAttrib : unknownAttribs ) + { + const OUString& rAttrValue = rUnknownAttrib.Value; + const OUString& rAttrName = rUnknownAttrib.Name; + // note: rAttrName is expected to be namespace-prefixed here + maAttrList->AddAttribute( rAttrName, "CDATA", rAttrValue ); + } + } + + SAL_INFO("xmloff.core", "calling CreateChildContext on " << typeid(*pHandler).name()); + tmp = pHandler->CreateChildContext(nPrefix, aLocalName, maAttrList.get() ).get(); + } + xContext = dynamic_cast<SvXMLImportContext*>(tmp.get()); + assert(tmp && xContext || (!tmp && !xContext)); } else xContext.set( CreateFastContext( -1, Attribs ) ); - SAL_WARN_IF(!xContext.is(), "xmloff.core", "No context for unknown-element " << rLocalName); - if ( !xContext.is() ) - xContext.set( new SvXMLImportContext( *this ) ); + SAL_WARN_IF(!xContext.is(), "xmloff.core", "No context for unknown-element " << rNamespace << " " << rName); + if (bRootContext && !xContext) + { + SetError( XMLERROR_FLAG_SEVERE | XMLERROR_UNKNOWN_ROOT, + { rName }, "Root element " + rName + " unknown", Reference<xml::sax::XLocator>() ); + } + if (!xContext) + { + if (!maContexts.empty()) + // This is pretty weird, but it's what the code did before I simplified it, and some parts of the + // code rely on this behaviour e.g. DocumentBuilderContext + xContext = maContexts.top(); + else + xContext = new SvXMLImportContext( *this ); + } - xContext->startUnknownElement( rPrefix, rLocalName, Attribs ); - maFastContexts.push(xContext); + xContext->startUnknownElement( rNamespace, rName, Attribs ); + maContexts.push(xContext); } void SAL_CALL SvXMLImport::endFastElement (sal_Int32 Element) { - uno::Reference<XFastContextHandler> xContext = std::move(maFastContexts.top()); - maFastContexts.pop(); - isFastContext = true; + SAL_INFO("xmloff.core", "endFastElement " << SvXMLImport::getNameFromToken( Element )); + if (maContexts.empty()) + { + SAL_WARN("xmloff.core", "SvXMLImport::endFastElement: no context left"); + assert(false); + return; + } + SvXMLImportContextRef xContext = std::move(maContexts.top()); + maContexts.pop(); xContext->endFastElement( Element ); - if (isFastContext) - maContexts.pop(); } void SAL_CALL SvXMLImport::endUnknownElement (const OUString & rPrefix, const OUString & rLocalName) { - uno::Reference<XFastContextHandler> xContext = std::move(maFastContexts.top()); - maFastContexts.pop(); + SAL_INFO("xmloff.core", "endUnknownElement " << rPrefix << " " << rLocalName); + if (maContexts.empty()) + { + SAL_WARN("xmloff.core", "SvXMLImport::endUnknownElement: no context left"); + assert(false); + return; + } + SvXMLImportContextRef xContext = std::move(maContexts.top()); + maContexts.pop(); xContext->endUnknownElement( rPrefix, rLocalName ); } diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index cf171cba5c85..2894b0a04616 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -641,8 +641,6 @@ bool SdXMLNumberFormatImportContext::compareStyle( const SdXMLFixedDataStyle* pS void SdXMLNumberFormatImportContext::endFastElement(sal_Int32 ) { - SvXMLNumFormatContext::EndElement(); - for( ; mnIndex < 16; mnIndex++ ) { mnElements[mnIndex] = DataStyleNumber::NONE; diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx index 2c13b36ac187..b8bc00122044 100644 --- a/xmloff/source/draw/XMLShapePropertySetContext.cxx +++ b/xmloff/source/draw/XMLShapePropertySetContext.cxx @@ -60,8 +60,6 @@ void XMLShapePropertySetContext::endFastElement(sal_Int32 ) XMLPropertyState aPropState( mnBulletIndex, Any(xNumRule) ); mrProperties.push_back( aPropState ); - - SvXMLPropertySetContext::EndElement(); } css::uno::Reference< css::xml::sax::XFastContextHandler > XMLShapePropertySetContext::createFastChildContext( diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index bbfe7f29b425..6c8672fa38b4 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -533,14 +533,6 @@ AnimationNodeContext::AnimationNodeContext( } } -void AnimationNodeContext::startFastElement( sal_Int32 /*nElement*/, const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) -{ - // code of StartElement is moved to init_node that is now called - // in c'tor before appending this node to its parent. - // This is needed for random nodes that need the correct target - // set when child nodes are appended. -} - void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) { if( !mxNode.is() ) diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index 490203eaffad..47417bcc27a1 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.cxx @@ -372,9 +372,6 @@ public: const Reference< XFastAttributeList >& xAttrList, XMLAnimationsContext& rAnimationsContext); - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} - virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( @@ -386,9 +383,6 @@ class XMLAnimationsSoundContext : public SvXMLImportContext public: XMLAnimationsSoundContext( SvXMLImport& rImport, sal_Int32 nElement, const Reference< XFastAttributeList >& xAttrList, XMLAnimationsEffectContext* pParent ); - - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} }; } @@ -595,10 +589,6 @@ XMLAnimationsContext::XMLAnimationsContext( SvXMLImport& rImport ) { } -void XMLAnimationsContext::startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) -{} - css::uno::Reference< css::xml::sax::XFastContextHandler > XMLAnimationsContext::createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) { diff --git a/xmloff/source/draw/layerimp.hxx b/xmloff/source/draw/layerimp.hxx index 5779442da6ac..aa1869473ddc 100644 --- a/xmloff/source/draw/layerimp.hxx +++ b/xmloff/source/draw/layerimp.hxx @@ -39,9 +39,6 @@ public: SdXMLLayerSetContext( SvXMLImport& rImport ); virtual ~SdXMLLayerSetContext() override; - virtual void SAL_CALL startFastElement (sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttribs*/) override {} - virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; }; diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 60db53160082..ae5dba2c6639 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -59,9 +59,6 @@ public: SdXMLBodyContext_Impl( SdXMLImport& 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 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; }; @@ -94,13 +91,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 characters( const OUString& /*aChars*/ ) override {} - - virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} - - virtual void SAL_CALL endFastElement( sal_Int32 /*nElement*/ ) override {} }; } @@ -193,13 +183,6 @@ public: SdXMLFlatDocContext_Impl( SdXMLImport& i_rImport, const uno::Reference<document::XDocumentProperties>& i_xDocProps ); - virtual void SAL_CALL startFastElement( sal_Int32 nElement, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; - - virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; - - virtual void SAL_CALL characters( const OUString& aChars ) override; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; @@ -214,22 +197,6 @@ SdXMLFlatDocContext_Impl::SdXMLFlatDocContext_Impl( SdXMLImport& i_rImport, { } -void SAL_CALL SdXMLFlatDocContext_Impl::startFastElement( sal_Int32 nElement, - const uno::Reference< xml::sax::XFastAttributeList >& xAttrList ) -{ - SvXMLMetaDocumentContext::startFastElement(nElement, xAttrList); -} - -void SAL_CALL SdXMLFlatDocContext_Impl::endFastElement( sal_Int32 nElement ) -{ - SvXMLMetaDocumentContext::endFastElement(nElement); -} - -void SAL_CALL SdXMLFlatDocContext_Impl::characters( const OUString& rChars ) -{ - SvXMLMetaDocumentContext::characters(rChars); -} - uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SdXMLFlatDocContext_Impl::createFastChildContext( sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList ) { diff --git a/xmloff/source/draw/ximpbody.hxx b/xmloff/source/draw/ximpbody.hxx index 714c8f8ec07d..c16d875eca7e 100644 --- a/xmloff/source/draw/ximpbody.hxx +++ b/xmloff/source/draw/ximpbody.hxx @@ -53,9 +53,6 @@ public: SdXMLBodyContext( SdXMLImport& rImport ); virtual ~SdXMLBodyContext() 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/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index 88412788d5f8..6b987c42d417 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -68,7 +68,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 SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; - virtual void SAL_CALL startFastElement( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; private: @@ -208,11 +207,6 @@ SvXMLImportContextRef DrawAnnotationContext::CreateChildContext( sal_uInt16 nPre return xContext; } -void DrawAnnotationContext::startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) -{ -} - void DrawAnnotationContext::endFastElement(sal_Int32) { if(mxCursor.is()) diff --git a/xmloff/source/draw/ximpshow.hxx b/xmloff/source/draw/ximpshow.hxx index a97ded31b904..b508b3005c25 100644 --- a/xmloff/source/draw/ximpshow.hxx +++ b/xmloff/source/draw/ximpshow.hxx @@ -37,9 +37,6 @@ public: const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList); virtual ~SdXMLShowsContext() 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; private: diff --git a/xmloff/source/draw/ximpstyl.hxx b/xmloff/source/draw/ximpstyl.hxx index 7d0d94080411..a7eee862783c 100644 --- a/xmloff/source/draw/ximpstyl.hxx +++ b/xmloff/source/draw/ximpstyl.hxx @@ -222,9 +222,6 @@ public: SdXMLMasterStylesContext(SdXMLImport& 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 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; @@ -243,9 +240,6 @@ public: const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ); virtual bool IsTransient() const 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 ) override; virtual void SAL_CALL characters( const OUString& rChars ) override; diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index e9945f49e7aa..38579d399c1e 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -1738,8 +1738,6 @@ namespace xmloff _rxAttrList->getValueByName(sDefaultSelectedAttribute)); if (bDefaultSelected) m_xListBoxImport->implDefaultSelectCurrentItem(); - - SvXMLImportContext::StartElement(_rxAttrList); } //= OComboItemImport @@ -1755,8 +1753,6 @@ namespace xmloff const OUString sLabelAttributeName = GetImport().GetNamespaceMap().GetQNameByKey( GetPrefix(), OUString::createFromAscii(OAttributeMetaData::getCommonControlAttributeName(CCAFlags::Label))); m_xListBoxImport->implPushBackLabel(_rxAttrList->getValueByName(sLabelAttributeName)); - - SvXMLImportContext::StartElement(_rxAttrList); } //= OColumnWrapperImport diff --git a/xmloff/source/forms/eventimport.cxx b/xmloff/source/forms/eventimport.cxx index b30ce9dc953a..5e7d1e815ab9 100644 --- a/xmloff/source/forms/eventimport.cxx +++ b/xmloff/source/forms/eventimport.cxx @@ -89,8 +89,6 @@ namespace xmloff // register the events m_rEventAttacher.registerEvents(aTranslated); - - XMLEventsImportContext::EndElement(); } //= ODefaultEventAttacherManager diff --git a/xmloff/source/forms/officeforms.cxx b/xmloff/source/forms/officeforms.cxx index 1b5091087444..491a8afefb65 100644 --- a/xmloff/source/forms/officeforms.cxx +++ b/xmloff/source/forms/officeforms.cxx @@ -88,7 +88,6 @@ namespace xmloff void OFormsRootImport::StartElement( const Reference< XAttributeList >& _rxAttrList ) { ENTER_LOG_CONTEXT( "xmloff::OFormsRootImport - importing the complete tree" ); - SvXMLImportContext::StartElement( _rxAttrList ); try { @@ -113,7 +112,6 @@ namespace xmloff void OFormsRootImport::EndElement() { - SvXMLImportContext::EndElement(); LEAVE_LOG_CONTEXT( ); } diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 719187fc5f84..e7a3e7914ec0 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -364,15 +364,12 @@ SvXMLImportContextRef OPropertyElementsContext::CreateChildContext(sal_uInt16 _n void OPropertyElementsContext::StartElement(const Reference< XAttributeList >& _rxAttrList) { OSL_ENSURE(0 == _rxAttrList->getLength(), "OPropertyElementsContext::StartElement: the form:properties element should not have attributes!"); - SvXMLImportContext::StartElement(_rxAttrList); } void OPropertyElementsContext::Characters(const OUString& _rChars) { OSL_ENSURE(_rChars.trim().isEmpty(), "OPropertyElementsContext::Characters: non-whitespace characters detected!"); - SvXMLImportContext::Characters(_rChars); } - #endif //= OSinglePropertyContext @@ -383,12 +380,6 @@ OSinglePropertyContext::OSinglePropertyContext(SvXMLImport& _rImport, sal_uInt16 { } -SvXMLImportContextRef OSinglePropertyContext::CreateChildContext(sal_uInt16 /*_nPrefix*/, const OUString& /*_rLocalName*/, - const Reference< XAttributeList >&) -{ - return nullptr; -} - void OSinglePropertyContext::StartElement(const Reference< XAttributeList >& _rxAttrList) { css::beans::PropertyValue aPropValue; // the property the instance imports currently diff --git a/xmloff/source/forms/propertyimport.hxx b/xmloff/source/forms/propertyimport.hxx index 9ea8c1dd797a..46163107b52b 100644 --- a/xmloff/source/forms/propertyimport.hxx +++ b/xmloff/source/forms/propertyimport.hxx @@ -183,10 +183,6 @@ namespace xmloff OSinglePropertyContext(SvXMLImport& _rImport, sal_uInt16 _nPrefix, const OUString& _rName, const OPropertyImportRef& _rPropertyImporter); - virtual SvXMLImportContextRef CreateChildContext( - sal_uInt16 _nPrefix, const OUString& _rLocalName, - const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; - virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; }; diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx index fa24a35e9c5d..14721440bf9b 100644 --- a/xmloff/source/meta/xmlmetai.cxx +++ b/xmloff/source/meta/xmlmetai.cxx @@ -205,10 +205,6 @@ void SAL_CALL SvXMLMetaDocumentContext::startFastElement(sal_Int32 /*nElement*/, mxDocBuilder->startFastElement(XML_ELEMENT(OFFICE, XML_DOCUMENT_META), xAttrList); } -void SAL_CALL SvXMLMetaDocumentContext::endFastElement(sal_Int32 /*nElement*/) -{ -} - void SvXMLMetaDocumentContext::FinishMetaElement() { // hardcode office:document-meta (necessary in case of flat file ODF) @@ -224,10 +220,6 @@ void SvXMLMetaDocumentContext::FinishMetaElement() } } -void SAL_CALL SvXMLMetaDocumentContext::characters( const OUString& /*rChars*/ ) -{ -} - uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SvXMLMetaDocumentContext::createFastChildContext( sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList ) { diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx index 7694bc482d94..012156831671 100644 --- a/xmloff/source/script/XMLEventsImportContext.cxx +++ b/xmloff/source/script/XMLEventsImportContext.cxx @@ -89,17 +89,6 @@ XMLEventsImportContext::~XMLEventsImportContext() } -void XMLEventsImportContext::StartElement( - const Reference<XAttributeList> &) -{ - // nothing to be done -} - -void XMLEventsImportContext::EndElement() -{ - // nothing to be done -} - SvXMLImportContextRef XMLEventsImportContext::CreateChildContext( sal_uInt16 /*p_nPrefix*/, const OUString& /*rLocalName*/, @@ -141,17 +130,6 @@ SvXMLImportContextRef XMLEventsImportContext::CreateChildContext( GetImport(), xAttrList, this, sEventName, sLanguage); } -void XMLEventsImportContext::startFastElement(sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >&) -{ - // nothing to be done -} - -void XMLEventsImportContext::endFastElement(sal_Int32 /*nElement*/) -{ - // nothing to be done -} - css::uno::Reference< css::xml::sax::XFastContextHandler > XMLEventsImportContext::createFastChildContext( sal_Int32 /*nElement*/, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) diff --git a/xmloff/source/script/xmlbasicscript.cxx b/xmloff/source/script/xmlbasicscript.cxx index 0d15f2c4149c..d610e7e4d0f0 100644 --- a/xmloff/source/script/xmlbasicscript.cxx +++ b/xmloff/source/script/xmlbasicscript.cxx @@ -71,11 +71,6 @@ bool BasicElementBase::getBoolAttr(bool* pRet, sal_Int32 nToken, return false; } -void BasicElementBase::startFastElement(sal_Int32 /*nElement*/, - const Reference<XFastAttributeList>& /*xAttributes*/) -{ -} - // BasicLibrariesElement BasicLibrariesElement::BasicLibrariesElement(SvXMLImport& rImport, diff --git a/xmloff/source/script/xmlbasicscript.hxx b/xmloff/source/script/xmlbasicscript.hxx index b8a03a5b72a8..1d94f344b5d6 100644 --- a/xmloff/source/script/xmlbasicscript.hxx +++ b/xmloff/source/script/xmlbasicscript.hxx @@ -38,10 +38,6 @@ protected: public: BasicElementBase(SvXMLImport& rImport); - - virtual void SAL_CALL startFastElement( - sal_Int32 nElement, - const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttribs) override; }; class BasicLibrariesElement : public BasicElementBase diff --git a/xmloff/source/script/xmlscripti.cxx b/xmloff/source/script/xmlscripti.cxx index 35bdfd3abb3c..16bcfaee7281 100644 --- a/xmloff/source/script/xmlscripti.cxx +++ b/xmloff/source/script/xmlscripti.cxx @@ -54,9 +54,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 {} }; } diff --git a/xmloff/source/style/FillStyleContext.hxx b/xmloff/source/style/FillStyleContext.hxx index 026754ac6402..aac0b8b31b15 100644 --- a/xmloff/source/style/FillStyleContext.hxx +++ b/xmloff/source/style/FillStyleContext.hxx @@ -38,8 +38,6 @@ public: const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ); virtual ~XMLGradientStyleContext() 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 bool IsTransient() const override; @@ -59,8 +57,6 @@ public: const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ); virtual ~XMLHatchStyleContext() 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 bool IsTransient() const override; @@ -84,8 +80,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; virtual bool IsTransient() const override; @@ -105,8 +99,6 @@ public: const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ); virtual ~XMLTransGradientStyleContext() 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 bool IsTransient() const override; @@ -126,8 +118,6 @@ public: const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ); virtual ~XMLMarkerStyleContext() 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 bool IsTransient() const override; @@ -147,8 +137,6 @@ public: const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ); virtual ~XMLDashStyleContext() 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 bool IsTransient() const override; diff --git a/xmloff/source/style/PageHeaderFooterContext.hxx b/xmloff/source/style/PageHeaderFooterContext.hxx index b72f3f011dfa..c767f609c47b 100644 --- a/xmloff/source/style/PageHeaderFooterContext.hxx +++ b/xmloff/source/style/PageHeaderFooterContext.hxx @@ -40,9 +40,6 @@ public: virtual ~PageHeaderFooterContext() 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/xmloff/source/style/XMLFontStylesContext_impl.hxx b/xmloff/source/style/XMLFontStylesContext_impl.hxx index 2df396c09796..72f5af7e2347 100644 --- a/xmloff/source/style/XMLFontStylesContext_impl.hxx +++ b/xmloff/source/style/XMLFontStylesContext_impl.hxx @@ -76,8 +76,6 @@ public: XMLFontStyleContextFontFaceSrc( SvXMLImport& rImport, const XMLFontStyleContextFontFace& font ); - 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 > & xAttrList ) override; diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 52e2fc81744c..f02d8964c2d3 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -128,8 +128,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 characters( const OUString& rChars ) override; virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; @@ -147,8 +145,6 @@ public: SvXMLNumFmtElementContext& rParentContext, 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 void SAL_CALL characters( const OUString& rChars ) override; virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; }; @@ -164,8 +160,6 @@ public: SvXMLNumFormatContext& rParentContext, 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 void SAL_CALL endFastElement(sal_Int32 nElement) override; }; @@ -180,8 +174,6 @@ public: SvXMLNumFormatContext& rParentContext, 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 void SAL_CALL endFastElement(sal_Int32 nElement) override; }; diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 2593d2aa0d75..a0325c5abc9a 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -88,8 +88,6 @@ public: const Reference< xml::sax::XFastAttributeList >& xAttrList, SvxXMLListLevelStyleContext_Impl& rLLevel ); - 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 >& xAttrList ) override; @@ -197,8 +195,6 @@ public: SvXMLImport& rImport, sal_Int32 nElement, const Reference< 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 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; diff --git a/xmloff/source/text/XMLAutoTextContainerEventImport.hxx b/xmloff/source/text/XMLAutoTextContainerEventImport.hxx index 1910c301f423..f943ac51653d 100644 --- a/xmloff/source/text/XMLAutoTextContainerEventImport.hxx +++ b/xmloff/source/text/XMLAutoTextContainerEventImport.hxx @@ -51,14 +51,6 @@ public: protected: - 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 > & /*rxAttribs*/) override - { return nullptr; } - virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, diff --git a/xmloff/source/text/XMLChangeInfoContext.cxx b/xmloff/source/text/XMLChangeInfoContext.cxx index 90ff2db3831a..71ed643bc33c 100644 --- a/xmloff/source/text/XMLChangeInfoContext.cxx +++ b/xmloff/source/text/XMLChangeInfoContext.cxx @@ -48,11 +48,6 @@ XMLChangeInfoContext::~XMLChangeInfoContext() { } -void XMLChangeInfoContext::StartElement(const Reference<XAttributeList> &) -{ - // no attributes -} - SvXMLImportContextRef XMLChangeInfoContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, diff --git a/xmloff/source/text/XMLChangeInfoContext.hxx b/xmloff/source/text/XMLChangeInfoContext.hxx index 557ebdad2d64..d86f9ea7b5fd 100644 --- a/xmloff/source/text/XMLChangeInfoContext.hxx +++ b/xmloff/source/text/XMLChangeInfoContext.hxx @@ -60,9 +60,6 @@ public: virtual ~XMLChangeInfoContext() override; - virtual void StartElement( - const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override; - virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx index 2aa5fb939e9f..d4415ff29c04 100644 --- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx @@ -68,8 +68,6 @@ public: XMLFootnoteConfigurationImportContext& rConfigImport, bool bBegin); - 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/xmloff/source/text/XMLFootnoteImportContext.cxx b/xmloff/source/text/XMLFootnoteImportContext.cxx index f0cf15c8dd76..d2db5a883157 100644 --- a/xmloff/source/text/XMLFootnoteImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteImportContext.cxx @@ -150,12 +150,6 @@ void XMLFootnoteImportContext::StartElement( // else: ignore footnote! Content will be merged into document. } -void XMLFootnoteImportContext::Characters(const OUString&) -{ - // ignore characters! Text must be contained in paragraphs! - // rHelper.InsertString(rString); -} - void XMLFootnoteImportContext::EndElement() { // get rid of last dummy paragraph diff --git a/xmloff/source/text/XMLFootnoteImportContext.hxx b/xmloff/source/text/XMLFootnoteImportContext.hxx index b499e5831757..30f197f81c4f 100644 --- a/xmloff/source/text/XMLFootnoteImportContext.hxx +++ b/xmloff/source/text/XMLFootnoteImportContext.hxx @@ -64,9 +64,6 @@ protected: virtual void StartElement( const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override; - virtual void Characters( - const OUString& rChars) override; - virtual void EndElement() override; virtual SvXMLImportContextRef CreateChildContext( diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.cxx b/xmloff/source/text/XMLIndexTOCStylesContext.cxx index 3b543c14bbc9..b116f1cc1e5c 100644 --- a/xmloff/source/text/XMLIndexTOCStylesContext.cxx +++ b/xmloff/source/text/XMLIndexTOCStylesContext.cxx @@ -133,8 +133,7 @@ SvXMLImportContextRef XMLIndexTOCStylesContext::CreateChildContext( } // always return default context; we already got the interesting info - return SvXMLImportContext::CreateChildContext(p_nPrefix, rLocalName, - xAttrList); + return new SvXMLImportContext(GetImport()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx b/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx index bfcf041bba19..c45c3ffe1a2b 100644 --- a/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx +++ b/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx @@ -119,9 +119,4 @@ void XMLSectionSourceDDEImportContext::startFastElement(sal_Int32 /*nElement*/, } -void XMLSectionSourceDDEImportContext::endFastElement(sal_Int32 /*nElement*/) -{ - // nothing to be done! -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionSourceDDEImportContext.hxx b/xmloff/source/text/XMLSectionSourceDDEImportContext.hxx index 7f646c65a067..b7af6c0d3372 100644 --- a/xmloff/source/text/XMLSectionSourceDDEImportContext.hxx +++ b/xmloff/source/text/XMLSectionSourceDDEImportContext.hxx @@ -47,8 +47,6 @@ protected: virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference<css::xml::sax::XFastAttributeList> & xAttrList) override; - - virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; }; #endif diff --git a/xmloff/source/text/XMLSectionSourceImportContext.cxx b/xmloff/source/text/XMLSectionSourceImportContext.cxx index b1cfd6063822..0ceb68eda53d 100644 --- a/xmloff/source/text/XMLSectionSourceImportContext.cxx +++ b/xmloff/source/text/XMLSectionSourceImportContext.cxx @@ -123,9 +123,4 @@ void XMLSectionSourceImportContext::StartElement( } } -void XMLSectionSourceImportContext::EndElement() -{ - // this space intentionally left blank. -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionSourceImportContext.hxx b/xmloff/source/text/XMLSectionSourceImportContext.hxx index 9bdb6b7733eb..33fb2e966291 100644 --- a/xmloff/source/text/XMLSectionSourceImportContext.hxx +++ b/xmloff/source/text/XMLSectionSourceImportContext.hxx @@ -47,8 +47,6 @@ protected: virtual void StartElement( const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override; - - virtual void EndElement() override; }; #endif diff --git a/xmloff/source/text/XMLStringBufferImportContext.cxx b/xmloff/source/text/XMLStringBufferImportContext.cxx index 5d72ffc2f975..f61db1fdf6d3 100644 --- a/xmloff/source/text/XMLStringBufferImportContext.cxx +++ b/xmloff/source/text/XMLStringBufferImportContext.cxx @@ -56,26 +56,11 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLStringBufferImportC return new XMLStringBufferImportContext(GetImport(), rTextBuffer); } -SvXMLImportContextRef XMLStringBufferImportContext::CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference<XAttributeList> &) -{ - return new XMLStringBufferImportContext(GetImport(), nPrefix, - rLocalName, rTextBuffer); -} - void XMLStringBufferImportContext::characters(const OUString& rChars ) { rTextBuffer.append(rChars); } -void XMLStringBufferImportContext::Characters( - const OUString& rChars ) -{ - rTextBuffer.append(rChars); -} - void XMLStringBufferImportContext::endFastElement(sal_Int32 nElement) { // add return for paragraph elements @@ -85,20 +70,4 @@ void XMLStringBufferImportContext::endFastElement(sal_Int32 nElement) } } -void XMLStringBufferImportContext::startFastElement( sal_Int32 /*nElement*/, - const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) -{ -} - -void XMLStringBufferImportContext::EndElement() -{ - // add return for paragraph elements - if ( (XML_NAMESPACE_TEXT == GetPrefix() || - XML_NAMESPACE_LO_EXT == GetPrefix()) && - (IsXMLToken(GetLocalName(), XML_P)) ) - { - rTextBuffer.append(u'\x000a'); - } -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx index 865937aa9dea..8514ef2f2aa0 100644 --- a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx +++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx @@ -97,10 +97,6 @@ XMLTextFrameHyperlinkContext::~XMLTextFrameHyperlinkContext() { } -void XMLTextFrameHyperlinkContext::EndElement() -{ -} - SvXMLImportContextRef XMLTextFrameHyperlinkContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx index f11f81e20de9..1c66a7f3abb6 100644 --- a/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx +++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx @@ -49,8 +49,6 @@ public: css::text::TextContentAnchorType eDefaultAnchorType ); virtual ~XMLTextFrameHyperlinkContext() override; - virtual void EndElement() override; - SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx index f05218b95653..55d564a18737 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.cxx +++ b/xmloff/source/text/XMLTextMarkImportContext.cxx @@ -250,8 +250,6 @@ static auto PopFieldmark(XMLTextImportHelper & rHelper) -> void void XMLTextMarkImportContext::EndElement() { - SvXMLImportContext::EndElement(); - static const char sAPI_bookmark[] = "com.sun.star.text.Bookmark"; lcl_MarkType nTmp{}; diff --git a/xmloff/source/text/txtdropi.hxx b/xmloff/source/text/txtdropi.hxx index c15d83dc95a9..9ddefc812d2b 100644 --- a/xmloff/source/text/txtdropi.hxx +++ b/xmloff/source/text/txtdropi.hxx @@ -43,8 +43,6 @@ public: virtual ~XMLTextDropCapImportContext() 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 OUString& GetStyleName() const { return sStyleName; } diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index ff54d40bc0f9..71172b5d977c 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -1234,8 +1234,7 @@ SvXMLImportContextRef XMLDatabaseFieldImportContext::CreateChildContext( ProcessAttribute( XML_TOKEN_INVALID, OUString() ); } - return SvXMLImportContext::CreateChildContext(p_nPrefix, rLocalName, - xAttrList); + return nullptr; } diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index d438400c4540..e5428059c198 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -200,27 +200,6 @@ XMLCharContext::XMLCharContext( XMLCharContext::~XMLCharContext() { } -void XMLCharContext::EndElement() -{ - if ( !m_nCount ) - InsertControlCharacter( m_nControl ); - else - { - if( 1U == m_nCount ) - { - OUString sBuff( &m_c, 1 ); - InsertString(sBuff); - } - else - { - OUStringBuffer sBuff(static_cast<int>(m_nCount)); - while( m_nCount-- ) - sBuff.append( &m_c, 1 ); - - InsertString(sBuff.makeStringAndClear() ); - } - } -} void XMLCharContext::endFastElement(sal_Int32 ) { if ( !m_nCount ) |