summaryrefslogtreecommitdiff
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
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
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx4
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.hxx2
-rw-r--r--editeng/source/xml/xmltxtimp.cxx6
-rw-r--r--include/xmloff/xmlimp.hxx4
-rw-r--r--linguistic/source/convdicxml.cxx2
-rw-r--r--linguistic/source/convdicxml.hxx2
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx4
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.hxx2
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx4
-rw-r--r--sc/source/filter/xml/xmlimprt.hxx4
-rw-r--r--starmath/source/mathmlimport.cxx2
-rw-r--r--starmath/source/mathmlimport.hxx2
-rw-r--r--svx/source/inc/xmlxtimp.hxx2
-rw-r--r--svx/source/xml/xmlxtimp.cxx4
-rw-r--r--sw/inc/SwXMLSectionList.hxx4
-rw-r--r--sw/source/core/swg/SwXMLSectionList.cxx2
-rw-r--r--sw/source/filter/xml/xmlimp.cxx4
-rw-r--r--sw/source/filter/xml/xmlimp.hxx4
-rw-r--r--sw/source/uibase/config/StoredChapterNumbering.cxx4
-rw-r--r--xmloff/inc/SchXMLImport.hxx2
-rw-r--r--xmloff/inc/xmlversion.hxx4
-rw-r--r--xmloff/source/chart/SchXMLImport.cxx7
-rw-r--r--xmloff/source/core/xmlictxt.cxx6
-rw-r--r--xmloff/source/core/xmlimp.cxx4
-rw-r--r--xmloff/source/draw/animationimport.cxx8
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx4
-rw-r--r--xmloff/source/draw/sdxmlimp_impl.hxx5
-rw-r--r--xmloff/source/meta/MetaImportComponent.cxx6
-rw-r--r--xmloff/source/meta/xmlversion.cxx4
-rw-r--r--xmloff/source/text/XMLAutoTextEventImport.cxx4
-rw-r--r--xmloff/source/text/XMLAutoTextEventImport.hxx2
31 files changed, 59 insertions, 59 deletions
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index e6db6b055d41..553b536e8ec9 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -514,7 +514,7 @@ public:
}
};
-SvXMLImportContext* ODBFilter::CreateContext( sal_uInt16 nPrefix,
+SvXMLImportContext* ODBFilter::CreateDocumentContext(sal_uInt16 const nPrefix,
const OUString& rLocalName,
const uno::Reference< css::xml::sax::XAttributeList >& xAttrList )
{
@@ -538,7 +538,7 @@ SvXMLImportContext* ODBFilter::CreateContext( sal_uInt16 nPrefix,
}
if ( !pContext )
- pContext = SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList );
+ pContext = SvXMLImport::CreateDocumentContext( nPrefix, rLocalName, xAttrList );
return pContext;
}
diff --git a/dbaccess/source/filter/xml/xmlfilter.hxx b/dbaccess/source/filter/xml/xmlfilter.hxx
index abe106cb60b1..9c8188ebb21b 100644
--- a/dbaccess/source/filter/xml/xmlfilter.hxx
+++ b/dbaccess/source/filter/xml/xmlfilter.hxx
@@ -99,7 +99,7 @@ public:
protected:
// SvXMLImport
- 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/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;
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index b6552a297843..483a1a36b660 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -240,9 +240,11 @@ protected:
bool mbIsTableShapeSupported;
bool mbIsGraphicLoadOnDemandSupported;
+ // Create top-level element context.
// 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,
+ // This base class implementation returns a context that ignores everything.
+ virtual SvXMLImportContext *CreateDocumentContext(sal_uInt16 nPrefix,
const OUString& rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList );
virtual SvXMLImportContext *CreateFastContext( sal_Int32 Element,
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index 964a51edc396..97a1d6a56268 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -370,7 +370,7 @@ void SAL_CALL ConvDicXMLImport::startDocument()
SvXMLImport::startDocument();
}
-SvXMLImportContext * ConvDicXMLImport::CreateContext(
+SvXMLImportContext * ConvDicXMLImport::CreateDocumentContext(
sal_uInt16 nPrefix,
const OUString &rLocalName,
const uno::Reference < xml::sax::XAttributeList > & /*rxAttrList*/ )
diff --git a/linguistic/source/convdicxml.hxx b/linguistic/source/convdicxml.hxx
index 5339a85e2dae..9a2b3c776c37 100644
--- a/linguistic/source/convdicxml.hxx
+++ b/linguistic/source/convdicxml.hxx
@@ -87,7 +87,7 @@ public:
virtual void SAL_CALL startDocument() override;
- virtual SvXMLImportContext * CreateContext(
+ virtual SvXMLImportContext * CreateDocumentContext(
sal_uInt16 nPrefix, const OUString &rLocalName,
const css::uno::Reference < css::xml::sax::XAttributeList > &rxAttrList ) override;
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 7d23913ff5e2..b7223bd0ef0d 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -725,7 +725,7 @@ public:
}
};
-SvXMLImportContext* ORptFilter::CreateContext( sal_uInt16 nPrefix,
+SvXMLImportContext* ORptFilter::CreateDocumentContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList )
{
@@ -753,7 +753,7 @@ SvXMLImportContext* ORptFilter::CreateContext( sal_uInt16 nPrefix,
}
if ( !pContext )
- pContext = SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList );
+ pContext = SvXMLImport::CreateDocumentContext( nPrefix, rLocalName, xAttrList );
return pContext;
}
diff --git a/reportdesign/source/filter/xml/xmlfilter.hxx b/reportdesign/source/filter/xml/xmlfilter.hxx
index c858e66f53de..1f6531a9b795 100644
--- a/reportdesign/source/filter/xml/xmlfilter.hxx
+++ b/reportdesign/source/filter/xml/xmlfilter.hxx
@@ -104,7 +104,7 @@ public:
const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList );
protected:
// SvXMLImport
- 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/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index e0795f56808d..b3f464b1def2 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -658,7 +658,7 @@ sc::PivotTableSources& ScXMLImport::GetPivotTableSources()
return *mpPivotSources;
}
-SvXMLImportContext *ScXMLImport::CreateContext( sal_uInt16 nPrefix,
+SvXMLImportContext *ScXMLImport::CreateDocumentContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList )
{
@@ -676,7 +676,7 @@ SvXMLImportContext *ScXMLImport::CreateContext( sal_uInt16 nPrefix,
xDPS->getDocumentProperties());
}
else
- pContext = SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList );
+ pContext = SvXMLImport::CreateDocumentContext( nPrefix, rLocalName, xAttrList );
return pContext;
}
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index 6cf664bdcf8d..c0cfeae34cee 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -373,9 +373,7 @@ class ScXMLImport: public SvXMLImport
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;
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 500ecff58425..2147001061de 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -2789,7 +2789,7 @@ void SmXMLActionContext_Impl::EndElement()
rNodeStack.push_front(std::move(pSelected));
}
-SvXMLImportContext *SmXMLImport::CreateContext(sal_uInt16 nPrefix,
+SvXMLImportContext *SmXMLImport::CreateDocumentContext(sal_uInt16 nPrefix,
const OUString &rLocalName,
const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
{
diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx
index 4db626df4d0a..3d017c1a25a7 100644
--- a/starmath/source/mathmlimport.hxx
+++ b/starmath/source/mathmlimport.hxx
@@ -94,7 +94,7 @@ public:
void SAL_CALL endDocument() override;
- SvXMLImportContext *CreateContext(sal_uInt16 nPrefix,
+ SvXMLImportContext *CreateDocumentContext(sal_uInt16 nPrefix,
const OUString &rLocalName,
const css::uno::Reference <
css::xml::sax::XAttributeList> &xAttrList) override;
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 )
diff --git a/sw/inc/SwXMLSectionList.hxx b/sw/inc/SwXMLSectionList.hxx
index 45fd8bc8c2c7..82c8f66340dd 100644
--- a/sw/inc/SwXMLSectionList.hxx
+++ b/sw/inc/SwXMLSectionList.hxx
@@ -24,9 +24,7 @@
class SwXMLSectionList : public SvXMLImport
{
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;
diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx
index 2e90f05a518a..cad35a9958bd 100644
--- a/sw/source/core/swg/SwXMLSectionList.cxx
+++ b/sw/source/core/swg/SwXMLSectionList.cxx
@@ -103,7 +103,7 @@ SwXMLSectionList::~SwXMLSectionList()
{
}
-SvXMLImportContext *SwXMLSectionList::CreateContext(
+SvXMLImportContext *SwXMLSectionList::CreateDocumentContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
const uno::Reference<xml::sax::XAttributeList> & )
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index d892d7768775..e2118d87ca34 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -353,7 +353,7 @@ const SvXMLTokenMap& SwXMLImport::GetDocElemTokenMap()
return *m_pDocElemTokenMap;
}
-SvXMLImportContext *SwXMLImport::CreateContext(
+SvXMLImportContext *SwXMLImport::CreateDocumentContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
@@ -385,7 +385,7 @@ SvXMLImportContext *SwXMLImport::CreateContext(
xDocProps);
}
else
- pContext = SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList );
+ pContext = SvXMLImport::CreateDocumentContext(nPrefix, rLocalName, xAttrList);
return pContext;
}
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index 444186992c34..aa7ad833e356 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -103,9 +103,7 @@ class SwXMLImport: public SvXMLImport
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;
diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx
index c575863f00e7..531e5b424bbc 100644
--- a/sw/source/uibase/config/StoredChapterNumbering.cxx
+++ b/sw/source/uibase/config/StoredChapterNumbering.cxx
@@ -386,7 +386,7 @@ public:
{
}
- virtual SvXMLImportContext * CreateContext(
+ virtual SvXMLImportContext * CreateDocumentContext(
sal_uInt16 const nPrefix, OUString const& rLocalName,
uno::Reference<xml::sax::XAttributeList> const& xAttrList) override
{
@@ -395,7 +395,7 @@ public:
return new StoredChapterNumberingRootContext(m_rNumRules,
*this, nPrefix, rLocalName);
}
- return SvXMLImport::CreateContext(nPrefix, rLocalName, xAttrList);
+ return SvXMLImport::CreateDocumentContext(nPrefix, rLocalName, xAttrList);
}
};
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;
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index d3c40c78887d..b7dc42566ec3 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -510,7 +510,8 @@ SchXMLImport::~SchXMLImport() throw ()
// create the main context (subcontexts are created
// by the one created here)
-SvXMLImportContext *SchXMLImport::CreateContext( sal_uInt16 nPrefix, const OUString& rLocalName,
+SvXMLImportContext *SchXMLImport::CreateDocumentContext(sal_uInt16 const nPrefix,
+ const OUString& rLocalName,
const Reference< xml::sax::XAttributeList >& xAttrList )
{
SvXMLImportContext* pContext = nullptr;
@@ -540,12 +541,12 @@ SvXMLImportContext *SchXMLImport::CreateContext( sal_uInt16 nPrefix, const OUStr
xDPS->getDocumentProperties());
} else {
pContext = (IsXMLToken(rLocalName, XML_DOCUMENT_META))
- ? SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList )
+ ? SvXMLImport::CreateDocumentContext(nPrefix, rLocalName, xAttrList)
: new SchXMLDocContext( *maImportHelper.get(), *this,
nPrefix, rLocalName );
}
} else {
- pContext = SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList );
+ pContext = SvXMLImport::CreateDocumentContext(nPrefix, rLocalName, xAttrList);
}
return pContext;
diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx
index e1805057dcdd..a00539afce6b 100644
--- a/xmloff/source/core/xmlictxt.cxx
+++ b/xmloff/source/core/xmlictxt.cxx
@@ -48,10 +48,10 @@ SvXMLImportContext::~SvXMLImportContext()
}
SvXMLImportContextRef SvXMLImportContext::CreateChildContext( sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+ const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& )
{
- return mrImport.CreateContext( nPrefix, rLocalName, xAttrList );
+ return new SvXMLImportContext(mrImport, nPrefix, rLocalName);
}
void SvXMLImportContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& )
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index f96940aeb575..676d6be7d071 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -308,7 +308,7 @@ public:
::comphelper::UnoInterfaceToUniqueIdentifierMapper maInterfaceToIdentifierMapper;
};
-SvXMLImportContext *SvXMLImport::CreateContext( sal_uInt16 nPrefix,
+SvXMLImportContext *SvXMLImport::CreateDocumentContext(sal_uInt16 const nPrefix,
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& )
{
@@ -719,7 +719,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName,
}
else
{
- xContext.set(CreateContext( nPrefix, aLocalName, xAttrList ));
+ xContext.set(CreateDocumentContext(nPrefix, aLocalName, xAttrList));
if( (nPrefix & XML_NAMESPACE_UNKNOWN_FLAG) != 0 &&
dynamic_cast< const SvXMLImportContext*>(xContext.get()) != nullptr )
{
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index 8134fd671499..75553fa8a1cd 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -1243,7 +1243,7 @@ class AnimationsImport: public SvXMLImport, public XAnimationNodeSupplier
public:
explicit AnimationsImport( const Reference< XComponentContext > & rxContext );
- SvXMLImportContext* CreateContext(sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList) override;
+ SvXMLImportContext* CreateDocumentContext(sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList) override;
// XInterface
virtual Any SAL_CALL queryInterface( const Type& aType ) override;
@@ -1305,7 +1305,9 @@ void SAL_CALL AnimationsImport::release() throw ()
SvXMLImport::release();
}
-SvXMLImportContext *AnimationsImport::CreateContext(sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList)
+SvXMLImportContext *AnimationsImport::CreateDocumentContext(
+ sal_uInt16 const nPrefix, const OUString& rLocalName,
+ const Reference<XAttributeList>& xAttrList)
{
SvXMLImportContext* pContext = nullptr;
@@ -1315,7 +1317,7 @@ SvXMLImportContext *AnimationsImport::CreateContext(sal_uInt16 nPrefix, const OU
}
else
{
- pContext = SvXMLImport::CreateContext(nPrefix, rLocalName, xAttrList);
+ pContext = SvXMLImport::CreateDocumentContext(nPrefix, rLocalName, xAttrList);
}
return pContext;
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index bb02d346bf24..ed2848036239 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -584,7 +584,7 @@ const SvXMLTokenMap& SdXMLImport::GetPresentationPlaceholderAttrTokenMap()
return *mpPresentationPlaceholderAttrTokenMap;
}
-SvXMLImportContext *SdXMLImport::CreateContext(sal_uInt16 nPrefix,
+SvXMLImportContext *SdXMLImport::CreateDocumentContext(sal_uInt16 nPrefix,
const OUString& rLocalName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList)
{
@@ -607,7 +607,7 @@ SvXMLImportContext *SdXMLImport::CreateContext(sal_uInt16 nPrefix,
pContext = new SdXMLFlatDocContext_Impl( *this, nPrefix, rLocalName,
xAttrList, xDPS->getDocumentProperties());
} else {
- pContext = SvXMLImport::CreateContext(nPrefix, rLocalName, xAttrList);
+ pContext = SvXMLImport::CreateDocumentContext(nPrefix, rLocalName, xAttrList);
}
return pContext;
diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx
index 9dcf7715a76a..3900aa02aaf4 100644
--- a/xmloff/source/draw/sdxmlimp_impl.hxx
+++ b/xmloff/source/draw/sdxmlimp_impl.hxx
@@ -175,9 +175,8 @@ class SdXMLImport: public SvXMLImport
DateTimeDeclMap maDateTimeDeclsMap;
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;
diff --git a/xmloff/source/meta/MetaImportComponent.cxx b/xmloff/source/meta/MetaImportComponent.cxx
index 2ba733d1abc0..2159916ad9cc 100644
--- a/xmloff/source/meta/MetaImportComponent.cxx
+++ b/xmloff/source/meta/MetaImportComponent.cxx
@@ -43,7 +43,7 @@ public:
protected:
- virtual SvXMLImportContext* CreateContext(
+ virtual SvXMLImportContext* CreateDocumentContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override;
@@ -68,7 +68,7 @@ XMLMetaImportComponent::XMLMetaImportComponent(
{
}
-SvXMLImportContext* XMLMetaImportComponent::CreateContext(
+SvXMLImportContext* XMLMetaImportComponent::CreateDocumentContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
const uno::Reference<xml::sax::XAttributeList > & xAttrList )
@@ -86,7 +86,7 @@ SvXMLImportContext* XMLMetaImportComponent::CreateContext(
}
else
{
- return SvXMLImport::CreateContext(nPrefix, rLocalName, xAttrList);
+ return SvXMLImport::CreateDocumentContext(nPrefix, rLocalName, xAttrList);
}
}
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index 080a954536aa..48104f58ff34 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -112,7 +112,7 @@ XMLVersionListImport::XMLVersionListImport(
XMLVersionListImport::~XMLVersionListImport() throw()
{}
-SvXMLImportContext *XMLVersionListImport::CreateContext(
+SvXMLImportContext *XMLVersionListImport::CreateDocumentContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
const Reference< XAttributeList > & xAttrList )
@@ -126,7 +126,7 @@ SvXMLImportContext *XMLVersionListImport::CreateContext(
}
else
{
- pContext = SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList );
+ pContext = SvXMLImport::CreateDocumentContext( nPrefix, rLocalName, xAttrList );
}
return pContext;
diff --git a/xmloff/source/text/XMLAutoTextEventImport.cxx b/xmloff/source/text/XMLAutoTextEventImport.cxx
index dcb7d93554b3..285a8ca1d13b 100644
--- a/xmloff/source/text/XMLAutoTextEventImport.cxx
+++ b/xmloff/source/text/XMLAutoTextEventImport.cxx
@@ -85,7 +85,7 @@ void XMLAutoTextEventImport::initialize(
}
-SvXMLImportContext* XMLAutoTextEventImport::CreateContext(
+SvXMLImportContext* XMLAutoTextEventImport::CreateDocumentContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
const Reference<XAttributeList > & xAttrList )
@@ -98,7 +98,7 @@ SvXMLImportContext* XMLAutoTextEventImport::CreateContext(
}
else
{
- return SvXMLImport::CreateContext(nPrefix, rLocalName, xAttrList);
+ return SvXMLImport::CreateDocumentContext(nPrefix, rLocalName, xAttrList);
}
}
diff --git a/xmloff/source/text/XMLAutoTextEventImport.hxx b/xmloff/source/text/XMLAutoTextEventImport.hxx
index 0d7b4d4787fb..6413033dee4a 100644
--- a/xmloff/source/text/XMLAutoTextEventImport.hxx
+++ b/xmloff/source/text/XMLAutoTextEventImport.hxx
@@ -52,7 +52,7 @@ public:
protected:
- virtual SvXMLImportContext* CreateContext(
+ virtual SvXMLImportContext* CreateDocumentContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override;