diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-11-30 18:29:37 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-11-30 22:32:46 +0100 |
commit | f7a5335ef50f4a9775703a038006dfb983a50a15 (patch) | |
tree | 979d14b4145c5b1cf2809b5d3eab32ff4a705ef7 /svx | |
parent | ebb34571c19c5ac939fbf5aed2ab66ee18e298dc (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 'svx')
-rw-r--r-- | svx/source/inc/xmlxtimp.hxx | 2 | ||||
-rw-r--r-- | svx/source/xml/xmlxtimp.cxx | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/svx/source/inc/xmlxtimp.hxx b/svx/source/inc/xmlxtimp.hxx index c7ca90c03859..ba4563efa21b 100644 --- a/svx/source/inc/xmlxtimp.hxx +++ b/svx/source/inc/xmlxtimp.hxx @@ -45,7 +45,7 @@ public: const css::uno::Reference< css::container::XNameContainer >& xTable, bool *bOptLoadedFromStorage ) throw(); protected: - 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; diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index ade13897ecf2..207912fca311 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -417,7 +417,9 @@ bool SvxXMLXTableImport::load( const OUString &rPath, const OUString &rReferer, return bRet; } -SvXMLImportContext *SvxXMLXTableImport::CreateContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& /*xAttrList*/ ) +SvXMLImportContext *SvxXMLXTableImport::CreateDocumentContext( + sal_uInt16 const nPrefix, const OUString& rLocalName, + const uno::Reference< XAttributeList >& /*xAttrList*/) { if( XML_NAMESPACE_OOO == nPrefix || XML_NAMESPACE_OFFICE == nPrefix ) |