From f7a5335ef50f4a9775703a038006dfb983a50a15 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 30 Nov 2017 18:29:37 +0100 Subject: xmloff: turn SvXMLImportContext into a no-op base class Fix the non-obvious and potentially dangerous recursion that is implicit in xmloff's context code. SvXMLImportContext::CreateChildContext() now always creates a SvXMLImportContext, does not delegate to SvXMLImport. Rename CreateContext to CreateDocumentContext, to make its purpose of creating only the top-level context more obvious. With the previous changes to CreateContext overrides in sw, reportdesign and dbaccess, this hopefully shouldn't break anything. Change-Id: I9e147bf6297bbac9e8470454881da73f6e39db0a --- editeng/source/xml/xmltxtimp.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'editeng/source/xml') diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx index 91c61b1f5a8c..7fad6fa1419d 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -104,14 +104,16 @@ public: const css::uno::Reference< css::uno::XComponentContext >& rContext, const uno::Reference< XText > & rText ); - virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix, + virtual SvXMLImportContext *CreateDocumentContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) override; private: const uno::Reference< XText > mxText; }; -SvXMLImportContext *SvxXMLXTextImportComponent::CreateContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& /*xAttrList*/ ) +SvXMLImportContext *SvxXMLXTextImportComponent::CreateDocumentContext( + sal_uInt16 const nPrefix, const OUString& rLocalName, + const uno::Reference< xml::sax::XAttributeList >& /*xAttrList*/) { SvXMLImportContext* pContext = nullptr; -- cgit