summaryrefslogtreecommitdiff
path: root/xmloff/inc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-11-30 18:29:37 +0100
committerMichael Stahl <mstahl@redhat.com>2017-11-30 22:32:46 +0100
commitf7a5335ef50f4a9775703a038006dfb983a50a15 (patch)
tree979d14b4145c5b1cf2809b5d3eab32ff4a705ef7 /xmloff/inc
parentebb34571c19c5ac939fbf5aed2ab66ee18e298dc (diff)
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
Diffstat (limited to 'xmloff/inc')
-rw-r--r--xmloff/inc/SchXMLImport.hxx2
-rw-r--r--xmloff/inc/xmlversion.hxx4
2 files changed, 2 insertions, 4 deletions
diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx
index 4119496c5894..3248d4ceadbd 100644
--- a/xmloff/inc/SchXMLImport.hxx
+++ b/xmloff/inc/SchXMLImport.hxx
@@ -154,7 +154,7 @@ private:
rtl::Reference<SchXMLImportHelper> maImportHelper;
protected:
- virtual SvXMLImportContext *CreateContext(
+ virtual SvXMLImportContext *CreateDocumentContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx
index e709efb6f5a4..e39cfdda5521 100644
--- a/xmloff/inc/xmlversion.hxx
+++ b/xmloff/inc/xmlversion.hxx
@@ -56,9 +56,7 @@ private:
protected:
- // This method is called after the namespace map has been updated, but
- // before a context for the current element has been pushed.
- virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix,
+ virtual SvXMLImportContext *CreateDocumentContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override;