[Libreoffice-commits] core.git: 2 commits - download.lst external/pdfium sc/source

Mohammed Abdul Azeem azeemmysore at gmail.com
Wed Aug 30 08:59:16 UTC 2017


 download.lst                                           |    4 
 external/pdfium/Library_pdfium.mk                      |  108 ++++---
 external/pdfium/ubsan.patch                            |    4 
 external/pdfium/visibility.patch.1                     |   16 -
 sc/source/filter/xml/XMLCalculationSettingsContext.cxx |   49 +--
 sc/source/filter/xml/XMLCalculationSettingsContext.hxx |   12 
 sc/source/filter/xml/XMLCellRangeSourceContext.cxx     |    9 
 sc/source/filter/xml/XMLCellRangeSourceContext.hxx     |    2 
 sc/source/filter/xml/XMLConsolidationContext.cxx       |   11 
 sc/source/filter/xml/XMLConsolidationContext.hxx       |    2 
 sc/source/filter/xml/XMLDDELinksContext.cxx            |   54 +--
 sc/source/filter/xml/XMLDDELinksContext.hxx            |    8 
 sc/source/filter/xml/XMLDetectiveContext.cxx           |   24 -
 sc/source/filter/xml/XMLDetectiveContext.hxx           |    4 
 sc/source/filter/xml/XMLTableSourceContext.cxx         |    9 
 sc/source/filter/xml/XMLTableSourceContext.hxx         |    2 
 sc/source/filter/xml/XMLTrackedChangesContext.cxx      |  237 ++++++-----------
 sc/source/filter/xml/XMLTrackedChangesContext.hxx      |    2 
 sc/source/filter/xml/datastreamimport.cxx              |    9 
 sc/source/filter/xml/datastreamimport.hxx              |    2 
 sc/source/filter/xml/xmlbodyi.cxx                      |   23 -
 sc/source/filter/xml/xmlbodyi.hxx                      |    2 
 sc/source/filter/xml/xmlcelli.cxx                      |   13 
 sc/source/filter/xml/xmlcelli.hxx                      |    2 
 sc/source/filter/xml/xmlcoli.cxx                       |   30 --
 sc/source/filter/xml/xmlcoli.hxx                       |    4 
 sc/source/filter/xml/xmlcondformat.cxx                 |   94 +++---
 sc/source/filter/xml/xmlcondformat.hxx                 |   14 -
 sc/source/filter/xml/xmlcvali.cxx                      |   56 +---
 sc/source/filter/xml/xmldpimp.cxx                      |  222 ++++++---------
 sc/source/filter/xml/xmldpimp.hxx                      |   36 +-
 sc/source/filter/xml/xmldrani.cxx                      |  141 +++-------
 sc/source/filter/xml/xmldrani.hxx                      |   30 --
 sc/source/filter/xml/xmlexternaltabi.cxx               |   50 +--
 sc/source/filter/xml/xmlexternaltabi.hxx               |   14 -
 sc/source/filter/xml/xmlfilti.cxx                      |   73 ++---
 sc/source/filter/xml/xmlfilti.hxx                      |   10 
 sc/source/filter/xml/xmlimprt.cxx                      |    8 
 sc/source/filter/xml/xmlimprt.hxx                      |    2 
 sc/source/filter/xml/xmllabri.cxx                      |   19 -
 sc/source/filter/xml/xmllabri.hxx                      |    7 
 sc/source/filter/xml/xmlmappingi.cxx                   |   25 -
 sc/source/filter/xml/xmlmappingi.hxx                   |    7 
 sc/source/filter/xml/xmlnexpi.cxx                      |   36 --
 sc/source/filter/xml/xmlnexpi.hxx                      |   10 
 sc/source/filter/xml/xmlrowi.cxx                       |   37 +-
 sc/source/filter/xml/xmlrowi.hxx                       |    4 
 sc/source/filter/xml/xmlsceni.cxx                      |   15 -
 sc/source/filter/xml/xmlsceni.hxx                      |    5 
 sc/source/filter/xml/xmlsorti.cxx                      |   23 -
 sc/source/filter/xml/xmlsorti.hxx                      |    4 
 sc/source/filter/xml/xmltabi.cxx                       |   50 +--
 sc/source/filter/xml/xmltabi.hxx                       |    4 
 53 files changed, 690 insertions(+), 948 deletions(-)

New commits:
commit da8cf43b4f2af008df231f5e0629c71bd7f2b762
Author: Mohammed Abdul Azeem <azeemmysore at gmail.com>
Date:   Wed Aug 16 22:51:05 2017 +0530

    Refactoring fastcontexts code:
    
    Moved all the casts inside ::createFastChildContext and
    used reference to it as an argument in the constructors. This
    avoids spreading the cast statements all over the place.
    
    Also removed some of the empty createFastChildContext(), they are
    unnecessary as the parent class already has it.
    
    Change-Id: I344ede732a53878a7e265c0178b07d73b5398237
    Reviewed-on: https://gerrit.libreoffice.org/41178
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
index 896e2e12b8ab..de707ce661a9 100644
--- a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
+++ b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
@@ -32,7 +32,7 @@ using namespace com::sun::star;
 using namespace xmloff::token;
 
 ScXMLCalculationSettingsContext::ScXMLCalculationSettingsContext( ScXMLImport& rImport,
-                                      const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList) :
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
     ScXMLImportContext( rImport ),
     fIterationEpsilon(0.001),
     nIterationCount(100),
@@ -47,14 +47,11 @@ ScXMLCalculationSettingsContext::ScXMLCalculationSettingsContext( ScXMLImport& r
     aNullDate.Day = 30;
     aNullDate.Month = 12;
     aNullDate.Year = 1899;
-    if( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for( auto &aIter : *pAttribList )
+        for (auto &aIter : *rAttrList)
         {
-            switch( aIter.getToken() )
+            switch (aIter.getToken())
             {
             case XML_ELEMENT( TABLE, XML_CASE_SENSITIVE ):
                 if( IsXMLToken( aIter, XML_FALSE ) )
@@ -99,11 +96,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLCalculationSetting
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     if (nElement == XML_ELEMENT( TABLE, XML_NULL_DATE ))
-        pContext = new ScXMLNullDateContext(GetScImport(), xAttrList, this);
+        pContext = new ScXMLNullDateContext(GetScImport(), pAttribList, this);
     else if (nElement == XML_ELEMENT( TABLE, XML_ITERATION ))
-        pContext = new ScXMLIterationContext(GetScImport(), xAttrList, this);
+        pContext = new ScXMLIterationContext(GetScImport(), pAttribList, this);
 
     if( !pContext )
         pContext = new SvXMLImportContext( GetImport() );
@@ -142,17 +141,14 @@ void SAL_CALL ScXMLCalculationSettingsContext::endFastElement( sal_Int32 /*nElem
 }
 
 ScXMLNullDateContext::ScXMLNullDateContext( ScXMLImport& rImport,
-                                      const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLCalculationSettingsContext* pCalcSet) :
     ScXMLImportContext( rImport )
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        auto &aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_DATE_VALUE ) ) );
-        if (aIter != pAttribList->end())
+        auto &aIter( rAttrList->find( XML_ELEMENT( TABLE, XML_DATE_VALUE ) ) );
+        if (aIter != rAttrList->end())
         {
             util::DateTime aDateTime;
             ::sax::Converter::parseDateTime(aDateTime, nullptr, aIter.toString());
@@ -169,23 +165,14 @@ ScXMLNullDateContext::~ScXMLNullDateContext()
 {
 }
 
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLNullDateContext::createFastChildContext(
-    sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
-{
-    return new SvXMLImportContext( GetImport() );
-}
-
 ScXMLIterationContext::ScXMLIterationContext( ScXMLImport& rImport,
-                                      const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLCalculationSettingsContext* pCalcSet) :
     ScXMLImportContext( rImport )
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -208,10 +195,4 @@ ScXMLIterationContext::~ScXMLIterationContext()
 {
 }
 
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLIterationContext::createFastChildContext(
-    sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
-{
-    return new SvXMLImportContext( GetImport() );
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.hxx b/sc/source/filter/xml/XMLCalculationSettingsContext.hxx
index 6614ab93e9a7..56160860c386 100644
--- a/sc/source/filter/xml/XMLCalculationSettingsContext.hxx
+++ b/sc/source/filter/xml/XMLCalculationSettingsContext.hxx
@@ -42,7 +42,7 @@ class ScXMLCalculationSettingsContext : public ScXMLImportContext
 
 public:
     ScXMLCalculationSettingsContext( ScXMLImport& rImport,
-                        const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList);
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList);
 
     virtual ~ScXMLCalculationSettingsContext() override;
 
@@ -60,24 +60,18 @@ class ScXMLNullDateContext : public ScXMLImportContext
 {
 public:
     ScXMLNullDateContext( ScXMLImport& rImport,
-                        const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList, ScXMLCalculationSettingsContext* pCalcSet);
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, ScXMLCalculationSettingsContext* pCalcSet);
 
     virtual ~ScXMLNullDateContext() 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;
 };
 
 class ScXMLIterationContext : public ScXMLImportContext
 {
 public:
     ScXMLIterationContext( ScXMLImport& rImport,
-                        const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList, ScXMLCalculationSettingsContext* pCalcSet);
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, ScXMLCalculationSettingsContext* pCalcSet);
 
     virtual ~ScXMLIterationContext() 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/sc/source/filter/xml/XMLCellRangeSourceContext.cxx b/sc/source/filter/xml/XMLCellRangeSourceContext.cxx
index f6ba8340124f..74587169d7da 100644
--- a/sc/source/filter/xml/XMLCellRangeSourceContext.cxx
+++ b/sc/source/filter/xml/XMLCellRangeSourceContext.cxx
@@ -37,16 +37,13 @@ ScMyImpCellRangeSource::ScMyImpCellRangeSource() :
 
 ScXMLCellRangeSourceContext::ScXMLCellRangeSourceContext(
         ScXMLImport& rImport,
-        const uno::Reference< xml::sax::XFastAttributeList >& xAttrList,
+        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
         ScMyImpCellRangeSource* pCellRangeSource ) :
     ScXMLImportContext( rImport )
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
diff --git a/sc/source/filter/xml/XMLCellRangeSourceContext.hxx b/sc/source/filter/xml/XMLCellRangeSourceContext.hxx
index c86d5fb54cc5..4d1ed842a140 100644
--- a/sc/source/filter/xml/XMLCellRangeSourceContext.hxx
+++ b/sc/source/filter/xml/XMLCellRangeSourceContext.hxx
@@ -43,7 +43,7 @@ class ScXMLCellRangeSourceContext : public ScXMLImportContext
 public:
                                 ScXMLCellRangeSourceContext(
                                     ScXMLImport& rImport,
-                                    const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
+                                    const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                     ScMyImpCellRangeSource* pCellRangeSource
                                     );
     virtual                     ~ScXMLCellRangeSourceContext() override;
diff --git a/sc/source/filter/xml/XMLConsolidationContext.cxx b/sc/source/filter/xml/XMLConsolidationContext.cxx
index 37aa4c61e9b7..7b08eecb6abd 100644
--- a/sc/source/filter/xml/XMLConsolidationContext.cxx
+++ b/sc/source/filter/xml/XMLConsolidationContext.cxx
@@ -31,21 +31,18 @@ using namespace xmloff::token;
 
 ScXMLConsolidationContext::ScXMLConsolidationContext(
         ScXMLImport& rImport,
-        const uno::Reference< xml::sax::XFastAttributeList >& xAttrList ) :
+        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
     ScXMLImportContext( rImport ),
     eFunction( SUBTOTAL_FUNC_NONE ),
     bLinkToSource( false ),
     bTargetAddr(false)
 {
     rImport.LockSolarMutex();
-    if( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for( auto &aIter : *pAttribList )
+        for (auto &aIter : *rAttrList)
         {
-            switch( aIter.getToken() )
+            switch (aIter.getToken())
             {
                 case XML_ELEMENT( TABLE, XML_FUNCTION ):
                     eFunction = ScXMLConverter::GetSubTotalFuncFromString( aIter.toString() );
diff --git a/sc/source/filter/xml/XMLConsolidationContext.hxx b/sc/source/filter/xml/XMLConsolidationContext.hxx
index e697497c2c6c..70de6d67862e 100644
--- a/sc/source/filter/xml/XMLConsolidationContext.hxx
+++ b/sc/source/filter/xml/XMLConsolidationContext.hxx
@@ -40,7 +40,7 @@ private:
 public:
                                 ScXMLConsolidationContext(
                                     ScXMLImport& rImport,
-                                    const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList
+                                    const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList
                                     );
     virtual                     ~ScXMLConsolidationContext() override;
 
diff --git a/sc/source/filter/xml/XMLDDELinksContext.cxx b/sc/source/filter/xml/XMLDDELinksContext.cxx
index b91cd269695b..5efca911ad4e 100644
--- a/sc/source/filter/xml/XMLDDELinksContext.cxx
+++ b/sc/source/filter/xml/XMLDDELinksContext.cxx
@@ -80,11 +80,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDDELinkContext::cr
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
         case XML_ELEMENT( OFFICE, XML_DDE_SOURCE ):
-            pContext = new ScXMLDDESourceContext(GetScImport(), xAttrList, this);
+            pContext = new ScXMLDDESourceContext(GetScImport(), pAttribList, this);
         break;
         case XML_ELEMENT( TABLE, XML_TABLE ):
             pContext = new ScXMLDDETableContext(GetScImport(), this);
@@ -182,17 +184,14 @@ void SAL_CALL ScXMLDDELinkContext::endFastElement( sal_Int32 /*nElement*/ )
 }
 
 ScXMLDDESourceContext::ScXMLDDESourceContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLDDELinkContext* pTempDDELink) :
     ScXMLImportContext( rImport ),
     pDDELink(pTempDDELink)
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -243,14 +242,16 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDDETableContext::c
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
         case XML_ELEMENT( TABLE, XML_TABLE_COLUMN ):
-            pContext = new ScXMLDDEColumnContext(GetScImport(), xAttrList, pDDELink);
+            pContext = new ScXMLDDEColumnContext(GetScImport(), pAttribList, pDDELink);
         break;
         case XML_ELEMENT( TABLE, XML_TABLE_ROW ):
-            pContext = new ScXMLDDERowContext(GetScImport(), xAttrList, pDDELink);
+            pContext = new ScXMLDDERowContext(GetScImport(), pAttribList, pDDELink);
         break;
     }
 
@@ -261,19 +262,16 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDDETableContext::c
 }
 
 ScXMLDDEColumnContext::ScXMLDDEColumnContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLDDELinkContext* pTempDDELink) :
     ScXMLImportContext( rImport ),
     pDDELink(pTempDDELink)
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
         sal_Int32 nCols(1);
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        auto &aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_NUMBER_COLUMNS_REPEATED ) ) );
-        if (aIter != pAttribList->end())
+        auto &aIter( rAttrList->find( XML_ELEMENT( TABLE, XML_NUMBER_COLUMNS_REPEATED ) ) );
+        if (aIter != rAttrList->end())
             nCols = aIter.toInt32();
 
         pDDELink->AddColumns(nCols);
@@ -285,19 +283,16 @@ ScXMLDDEColumnContext::~ScXMLDDEColumnContext()
 }
 
 ScXMLDDERowContext::ScXMLDDERowContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLDDELinkContext* pTempDDELink) :
     ScXMLImportContext( rImport ),
     pDDELink(pTempDDELink),
     nRows(1)
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        auto &aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_NUMBER_ROWS_REPEATED ) ) );
-        if (aIter != pAttribList->end())
+        auto &aIter( rAttrList->find( XML_ELEMENT( TABLE, XML_NUMBER_ROWS_REPEATED ) ) );
+        if (aIter != rAttrList->end())
             nRows = aIter.toInt32();
 
         pDDELink->AddRows(nRows);
@@ -312,9 +307,11 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDDERowContext::cre
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     if (nElement == XML_ELEMENT( TABLE, XML_TABLE_CELL ))
-        pContext = new ScXMLDDECellContext(GetScImport(), xAttrList, pDDELink);
+        pContext = new ScXMLDDECellContext(GetScImport(), pAttribList, pDDELink);
 
     if (!pContext)
         pContext = new SvXMLImportContext( GetImport() );
@@ -328,7 +325,7 @@ void SAL_CALL ScXMLDDERowContext::endFastElement( sal_Int32 /*nElement*/ )
 }
 
 ScXMLDDECellContext::ScXMLDDECellContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLDDELinkContext* pTempDDELink) :
     ScXMLImportContext( rImport ),
     sValue(),
@@ -339,12 +336,9 @@ ScXMLDDECellContext::ScXMLDDECellContext( ScXMLImport& rImport,
     bEmpty(true),
     pDDELink(pTempDDELink)
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
diff --git a/sc/source/filter/xml/XMLDDELinksContext.hxx b/sc/source/filter/xml/XMLDDELinksContext.hxx
index 86e6fbb5b747..85b543a9e04b 100644
--- a/sc/source/filter/xml/XMLDDELinksContext.hxx
+++ b/sc/source/filter/xml/XMLDDELinksContext.hxx
@@ -85,7 +85,7 @@ class ScXMLDDESourceContext : public ScXMLImportContext
 
 public:
     ScXMLDDESourceContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScXMLDDELinkContext* pDDELink);
 
     virtual ~ScXMLDDESourceContext() override;
@@ -113,7 +113,7 @@ class ScXMLDDEColumnContext : public ScXMLImportContext
 
 public:
     ScXMLDDEColumnContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScXMLDDELinkContext* pDDELink);
 
     virtual ~ScXMLDDEColumnContext() override;
@@ -126,7 +126,7 @@ class ScXMLDDERowContext : public ScXMLImportContext
 
 public:
     ScXMLDDERowContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScXMLDDELinkContext* pDDELink);
 
     virtual ~ScXMLDDERowContext() override;
@@ -150,7 +150,7 @@ class ScXMLDDECellContext : public ScXMLImportContext
 
 public:
     ScXMLDDECellContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScXMLDDELinkContext* pDDELink);
 
     virtual ~ScXMLDDECellContext() override;
diff --git a/sc/source/filter/xml/XMLDetectiveContext.cxx b/sc/source/filter/xml/XMLDetectiveContext.cxx
index b55738341d28..00fddd2e91f9 100644
--- a/sc/source/filter/xml/XMLDetectiveContext.cxx
+++ b/sc/source/filter/xml/XMLDetectiveContext.cxx
@@ -76,14 +76,16 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDetectiveContext::
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext*     pContext    = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
         case XML_ELEMENT( TABLE, XML_HIGHLIGHTED_RANGE ):
-            pContext = new ScXMLDetectiveHighlightedContext( GetScImport(), xAttrList, pDetectiveObjVec );
+            pContext = new ScXMLDetectiveHighlightedContext( GetScImport(), pAttribList, pDetectiveObjVec );
         break;
         case XML_ELEMENT( TABLE, XML_OPERATION ):
-            pContext = new ScXMLDetectiveOperationContext( GetScImport(), xAttrList );
+            pContext = new ScXMLDetectiveOperationContext( GetScImport(), pAttribList );
         break;
     }
     if( !pContext )
@@ -94,19 +96,16 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDetectiveContext::
 
 ScXMLDetectiveHighlightedContext::ScXMLDetectiveHighlightedContext(
         ScXMLImport& rImport,
-        const uno::Reference< xml::sax::XFastAttributeList >& xAttrList,
+        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
         ScMyImpDetectiveObjVec* pNewDetectiveObjVec ):
     ScXMLImportContext( rImport ),
     pDetectiveObjVec( pNewDetectiveObjVec ),
     aDetectiveObj(),
     bValid( false )
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -158,17 +157,14 @@ void SAL_CALL ScXMLDetectiveHighlightedContext::endFastElement( sal_Int32 /*nEle
 
 ScXMLDetectiveOperationContext::ScXMLDetectiveOperationContext(
         ScXMLImport& rImport,
-        const uno::Reference< xml::sax::XFastAttributeList >& xAttrList ) :
+        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
     ScXMLImportContext( rImport ),
     aDetectiveOp(),
     bHasType( false )
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
diff --git a/sc/source/filter/xml/XMLDetectiveContext.hxx b/sc/source/filter/xml/XMLDetectiveContext.hxx
index c3a11bdb1177..b572950173fa 100644
--- a/sc/source/filter/xml/XMLDetectiveContext.hxx
+++ b/sc/source/filter/xml/XMLDetectiveContext.hxx
@@ -101,7 +101,7 @@ private:
 public:
                                 ScXMLDetectiveHighlightedContext(
                                     ScXMLImport& rImport,
-                                    const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
+                                    const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                     ScMyImpDetectiveObjVec* pNewDetectiveObjVec
                                     );
     virtual                     ~ScXMLDetectiveHighlightedContext() override;
@@ -118,7 +118,7 @@ private:
 public:
                                 ScXMLDetectiveOperationContext(
                                     ScXMLImport& rImport,
-                                    const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList
+                                    const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList
                                     );
     virtual                     ~ScXMLDetectiveOperationContext() override;
 
diff --git a/sc/source/filter/xml/XMLTableSourceContext.cxx b/sc/source/filter/xml/XMLTableSourceContext.cxx
index 24e2356d8e3e..ec5ebede6568 100644
--- a/sc/source/filter/xml/XMLTableSourceContext.cxx
+++ b/sc/source/filter/xml/XMLTableSourceContext.cxx
@@ -32,7 +32,7 @@ using namespace com::sun::star;
 using namespace xmloff::token;
 
 ScXMLTableSourceContext::ScXMLTableSourceContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList) :
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
     ScXMLImportContext( rImport ),
     sLink(),
     sTableName(),
@@ -41,12 +41,9 @@ ScXMLTableSourceContext::ScXMLTableSourceContext( ScXMLImport& rImport,
     nRefresh(0),
     nMode(sheet::SheetLinkMode_NORMAL)
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
diff --git a/sc/source/filter/xml/XMLTableSourceContext.hxx b/sc/source/filter/xml/XMLTableSourceContext.hxx
index 1a74d00f10cd..82a7b362a550 100644
--- a/sc/source/filter/xml/XMLTableSourceContext.hxx
+++ b/sc/source/filter/xml/XMLTableSourceContext.hxx
@@ -36,7 +36,7 @@ class ScXMLTableSourceContext : public ScXMLImportContext
 
 public:
     ScXMLTableSourceContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList);
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
 
     virtual ~ScXMLTableSourceContext() override;
 
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index a6cefe70e719..d8aba927a656 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -50,7 +50,7 @@ class ScXMLChangeInfoContext : public ScXMLImportContext
 
 public:
     ScXMLChangeInfoContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
 
     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
@@ -66,11 +66,8 @@ class ScXMLBigRangeContext : public ScXMLImportContext
 
 public:
     ScXMLBigRangeContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScBigRange& rBigRange);
-
-    virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
-            sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
 };
 
 class ScXMLCellContentDeletionContext : public ScXMLImportContext
@@ -92,7 +89,7 @@ class ScXMLCellContentDeletionContext : public ScXMLImportContext
 
 public:
     ScXMLCellContentDeletionContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
 
     virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
@@ -107,11 +104,8 @@ class ScXMLDependenceContext : public ScXMLImportContext
 
 public:
     ScXMLDependenceContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
-
-    virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
-        sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
 };
 
 class ScXMLDependingsContext : public ScXMLImportContext
@@ -132,11 +126,9 @@ class ScXMLChangeDeletionContext : public ScXMLImportContext
 
 public:
     ScXMLChangeDeletionContext( ScXMLImport& rImport,
-                                const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                 ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
 
-    virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
-        sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
 };
 
 class ScXMLDeletionsContext : public ScXMLImportContext
@@ -196,7 +188,7 @@ class ScXMLChangeCellContext : public ScXMLImportContext
 
 public:
     ScXMLChangeCellContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScCellValue& rOldCell, OUString& sAddress,
                                       OUString& rFormula, OUString& rFormulaNmsp,
                                       formula::FormulaGrammar::Grammar& rGrammar,
@@ -232,7 +224,7 @@ class ScXMLPreviousContext : public ScXMLImportContext
 
 public:
     ScXMLPreviousContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
 
     virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
@@ -248,7 +240,7 @@ class ScXMLContentChangeContext : public ScXMLImportContext
 
 public:
     ScXMLContentChangeContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
 
     virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
@@ -263,7 +255,7 @@ class ScXMLInsertionContext : public ScXMLImportContext
 
 public:
     ScXMLInsertionContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
 
     virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
@@ -322,7 +314,7 @@ class ScXMLDeletionContext : public ScXMLImportContext
 
 public:
     ScXMLDeletionContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
 
     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
@@ -343,7 +335,7 @@ class ScXMLMovementContext : public ScXMLImportContext
 
 public:
     ScXMLMovementContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
 
     virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
@@ -358,7 +350,7 @@ class ScXMLRejectionContext : public ScXMLImportContext
 
 public:
     ScXMLRejectionContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
 
     virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
@@ -368,20 +360,17 @@ public:
 };
 
 ScXMLTrackedChangesContext::ScXMLTrackedChangesContext( ScXMLImport& rImport,
-                                              const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+                                              const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                               ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
     ScXMLImportContext( rImport ),
     pChangeTrackingImportHelper(pTempChangeTrackingImportHelper)
 {
     rImport.LockSolarMutex();
 
-    if( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        auto aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_PROTECTION_KEY ) ) );
-        if( aIter != pAttribList->end() )
+        auto aIter( rAttrList->find( XML_ELEMENT( TABLE, XML_PROTECTION_KEY ) ) );
+        if (aIter != rAttrList->end())
         {
             if( !aIter.isEmpty() )
             {
@@ -402,23 +391,25 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLTrackedChangesCont
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext(nullptr);
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
     case XML_ELEMENT( TABLE, XML_CELL_CONTENT_CHANGE ):
-        pContext = new ScXMLContentChangeContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLContentChangeContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     case XML_ELEMENT( TABLE, XML_INSERTION ):
-        pContext = new ScXMLInsertionContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLInsertionContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     case XML_ELEMENT( TABLE, XML_DELETION ):
-        pContext = new ScXMLDeletionContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLDeletionContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     case XML_ELEMENT( TABLE, XML_MOVEMENT ):
-        pContext = new ScXMLMovementContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLMovementContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     case XML_ELEMENT( TABLE, XML_REJECTION ):
-        pContext = new ScXMLRejectionContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLRejectionContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     }
 
@@ -429,19 +420,16 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLTrackedChangesCont
 }
 
 ScXMLChangeInfoContext::ScXMLChangeInfoContext( ScXMLImport& rImport,
-                                              const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+                                              const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                               ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
     ScXMLImportContext( rImport ),
     aInfo(),
     pChangeTrackingImportHelper(pTempChangeTrackingImportHelper),
     nParagraphCount(0)
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for( auto &aIter : *pAttribList )
+        for (auto &aIter : *rAttrList)
         {
             sal_Int32 nToken = aIter.getToken();
             if ( nToken == XML_ELEMENT( OFFICE, XML_CHG_AUTHOR ) )
@@ -491,7 +479,7 @@ void SAL_CALL ScXMLChangeInfoContext::endFastElement( sal_Int32 /*nElement*/ )
 }
 
 ScXMLBigRangeContext::ScXMLBigRangeContext(  ScXMLImport& rImport,
-                                              const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+                                              const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                               ScBigRange& rTempBigRange ) :
     ScXMLImportContext( rImport ),
     rBigRange(rTempBigRange)
@@ -508,12 +496,9 @@ ScXMLBigRangeContext::ScXMLBigRangeContext(  ScXMLImport& rImport,
     sal_Int32 nEndRow(0);
     sal_Int32 nStartTable(0);
     sal_Int32 nEndTable(0);
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -561,14 +546,8 @@ ScXMLBigRangeContext::ScXMLBigRangeContext(  ScXMLImport& rImport,
         nEndColumn, nEndRow, nEndTable);
 }
 
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLBigRangeContext::createFastChildContext(
-        sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
-{
-    return new SvXMLImportContext( GetImport() );
-}
-
 ScXMLCellContentDeletionContext::ScXMLCellContentDeletionContext(  ScXMLImport& rImport,
-                                              const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+                                              const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                               ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper) :
     ScXMLImportContext( rImport ),
     fValue(0.0),
@@ -580,13 +559,10 @@ ScXMLCellContentDeletionContext::ScXMLCellContentDeletionContext(  ScXMLImport&
     nType(css::util::NumberFormat::ALL),
     nMatrixFlag(ScMatrixMode::NONE)
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        auto &aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_ID ) ) );
-        if (aIter != pAttribList->end())
+        auto &aIter( rAttrList->find( XML_ELEMENT( TABLE, XML_ID ) ) );
+        if (aIter != rAttrList->end())
             nID = ScXMLChangeTrackingImportHelper::GetIDFromString( aIter.toString() );
     }
 }
@@ -595,16 +571,18 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLCellContentDeletio
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext(nullptr);
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
     case XML_ELEMENT( TABLE, XML_CHANGE_TRACK_TABLE_CELL ):
-        pContext = new ScXMLChangeCellContext(GetScImport(), xAttrList,
+        pContext = new ScXMLChangeCellContext(GetScImport(), pAttribList,
                 maCell, sFormulaAddress, sFormula, sFormulaNmsp, eGrammar, sInputString, fValue, nType, nMatrixFlag, nMatrixCols, nMatrixRows );
         break;
     case XML_ELEMENT( TABLE, XML_CELL_ADDRESS ):
         OSL_ENSURE(!nID, "a action with a ID should not contain a BigRange");
-        pContext = new ScXMLBigRangeContext(GetScImport(), xAttrList, aBigRange);
+        pContext = new ScXMLBigRangeContext(GetScImport(), pAttribList, aBigRange);
         break;
     }
 
@@ -625,30 +603,21 @@ void SAL_CALL ScXMLCellContentDeletionContext::endFastElement( sal_Int32 /*nElem
 }
 
 ScXMLDependenceContext::ScXMLDependenceContext(  ScXMLImport& rImport,
-                                              const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+                                              const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                             ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
     ScXMLImportContext( rImport ),
     pChangeTrackingImportHelper(pTempChangeTrackingImportHelper)
 {
     sal_uInt32 nID(0);
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        auto &aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_ID ) ) );
-        if (aIter != pAttribList->end())
+        auto &aIter( rAttrList->find( XML_ELEMENT( TABLE, XML_ID ) ) );
+        if (aIter != rAttrList->end())
             nID = ScXMLChangeTrackingImportHelper::GetIDFromString(aIter.toString());
     }
     pChangeTrackingImportHelper->AddDependence(nID);
 }
 
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDependenceContext::createFastChildContext(
-    sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
-{
-    return new SvXMLImportContext( GetImport() );
-}
-
 ScXMLDependingsContext::ScXMLDependingsContext(  ScXMLImport& rImport,
                                             ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
     ScXMLImportContext( rImport ),
@@ -661,12 +630,14 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDependingsContext:
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext(nullptr);
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     // #i80033# read both old (dependence) and new (dependency) elements
     if (nElement == XML_ELEMENT( TABLE, XML_DEPENDENCE ) ||
         nElement == XML_ELEMENT( TABLE, XML_DEPENDENCY ))
     {
-        pContext = new ScXMLDependenceContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLDependenceContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
     }
 
     if( !pContext )
@@ -676,30 +647,21 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDependingsContext:
 }
 
 ScXMLChangeDeletionContext::ScXMLChangeDeletionContext(  ScXMLImport& rImport,
-                                              const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+                                              const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                               ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
     ScXMLImportContext( rImport ),
     pChangeTrackingImportHelper(pTempChangeTrackingImportHelper)
 {
     sal_uInt32 nID(0);
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        auto &aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_ID ) ) );
-        if (aIter != pAttribList->end())
+        auto &aIter( rAttrList->find( XML_ELEMENT( TABLE, XML_ID ) ) );
+        if (aIter != rAttrList->end())
             nID = ScXMLChangeTrackingImportHelper::GetIDFromString( aIter.toString() );
     }
     pChangeTrackingImportHelper->AddDeleted(nID);
 }
 
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLChangeDeletionContext::createFastChildContext(
-        sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
-{
-    return new SvXMLImportContext( GetImport() );
-}
-
 ScXMLDeletionsContext::ScXMLDeletionsContext(  ScXMLImport& rImport,
                                             ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
     ScXMLImportContext( rImport ),
@@ -712,14 +674,16 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDeletionsContext::
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext(nullptr);
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
     case XML_ELEMENT( TABLE, XML_CHANGE_DELETION ):
-        pContext = new ScXMLChangeDeletionContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLChangeDeletionContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     case XML_ELEMENT( TABLE, XML_CELL_CONTENT_DELETION ):
-        pContext = new ScXMLCellContentDeletionContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLCellContentDeletionContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     }
 
@@ -811,7 +775,7 @@ void ScXMLChangeTextPContext::EndElement()
 }
 
 ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport,
-                                                const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+                                                const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                                 ScCellValue& rOldCell, OUString& rAddress,
                                                 OUString& rFormula, OUString& rFormulaNmsp,
                                                 formula::FormulaGrammar::Grammar& rGrammar,
@@ -830,12 +794,9 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport,
 {
     bool bIsMatrix(false);
     bool bIsCoveredMatrix(false);
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -996,7 +957,7 @@ void SAL_CALL ScXMLChangeCellContext::endFastElement( sal_Int32 /*nElement*/ )
 }
 
 ScXMLPreviousContext::ScXMLPreviousContext(  ScXMLImport& rImport,
-                                              const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+                                              const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                               ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
     ScXMLImportContext( rImport ),
     fValue(0.0),
@@ -1008,13 +969,10 @@ ScXMLPreviousContext::ScXMLPreviousContext(  ScXMLImport& rImport,
     nType(css::util::NumberFormat::ALL),
     nMatrixFlag(ScMatrixMode::NONE)
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        auto &aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_ID ) ) );
-        if (aIter != pAttribList->end())
+        auto &aIter( rAttrList->find( XML_ELEMENT( TABLE, XML_ID ) ) );
+        if (aIter != rAttrList->end())
             nID = ScXMLChangeTrackingImportHelper::GetIDFromString( aIter.toString() );
     }
 }
@@ -1023,9 +981,11 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLPreviousContext::c
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext(nullptr);
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     if ( nElement == XML_ELEMENT( TABLE, XML_CHANGE_TRACK_TABLE_CELL ) )
-        pContext = new ScXMLChangeCellContext(GetScImport(), xAttrList,
+        pContext = new ScXMLChangeCellContext(GetScImport(), pAttribList,
             maOldCell, sFormulaAddress, sFormula, sFormulaNmsp, eGrammar, sInputString, fValue, nType, nMatrixFlag, nMatrixCols, nMatrixRows);
 
     if( !pContext )
@@ -1041,7 +1001,7 @@ void SAL_CALL ScXMLPreviousContext::endFastElement( sal_Int32 /*nElement*/ )
 }
 
 ScXMLContentChangeContext::ScXMLContentChangeContext(  ScXMLImport& rImport,
-                                              const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+                                              const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                               ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
     ScXMLImportContext( rImport ),
     pChangeTrackingImportHelper(pTempChangeTrackingImportHelper)
@@ -1050,12 +1010,9 @@ ScXMLContentChangeContext::ScXMLContentChangeContext(  ScXMLImport& rImport,
     sal_uInt32 nRejectingNumber(0);
     ScChangeActionState nActionState(SC_CAS_VIRGIN);
 
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -1084,14 +1041,16 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLContentChangeConte
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext(nullptr);
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
     case XML_ELEMENT( OFFICE, XML_CHANGE_INFO ):
-        pContext = new ScXMLChangeInfoContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLChangeInfoContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     case XML_ELEMENT( TABLE, XML_CELL_ADDRESS ):
-        pContext = new ScXMLBigRangeContext(GetScImport(), xAttrList, aBigRange);
+        pContext = new ScXMLBigRangeContext(GetScImport(), pAttribList, aBigRange);
         break;
     case XML_ELEMENT( TABLE, XML_DEPENDENCIES ):
         pContext = new ScXMLDependingsContext(GetScImport(), pChangeTrackingImportHelper);
@@ -1100,7 +1059,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLContentChangeConte
         pContext = new ScXMLDeletionsContext(GetScImport(), pChangeTrackingImportHelper);
         break;
     case XML_ELEMENT( TABLE, XML_PREVIOUS ):
-        pContext = new ScXMLPreviousContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLPreviousContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     }
 
@@ -1117,7 +1076,7 @@ void SAL_CALL ScXMLContentChangeContext::endFastElement( sal_Int32 /*nElement*/
 }
 
 ScXMLInsertionContext::ScXMLInsertionContext( ScXMLImport& rImport,
-                                              const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+                                              const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                               ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
     ScXMLImportContext( rImport ),
     pChangeTrackingImportHelper(pTempChangeTrackingImportHelper)
@@ -1130,12 +1089,9 @@ ScXMLInsertionContext::ScXMLInsertionContext( ScXMLImport& rImport,
     ScChangeActionState nActionState(SC_CAS_VIRGIN);
     ScChangeActionType nActionType(SC_CAT_INSERT_COLS);
 
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -1181,11 +1137,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLInsertionContext::
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext(nullptr);
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
     case XML_ELEMENT( OFFICE, XML_CHANGE_INFO ):
-        pContext = new ScXMLChangeInfoContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLChangeInfoContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     case XML_ELEMENT( TABLE, XML_DEPENDENCIES ):
         pContext = new ScXMLDependingsContext(GetScImport(), pChangeTrackingImportHelper);
@@ -1345,7 +1303,7 @@ void ScXMLCutOffsContext::EndElement()
 }
 
 ScXMLDeletionContext::ScXMLDeletionContext( ScXMLImport& rImport,
-                                            const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+                                            const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                             ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
     ScXMLImportContext( rImport ),
     pChangeTrackingImportHelper(pTempChangeTrackingImportHelper)
@@ -1358,12 +1316,9 @@ ScXMLDeletionContext::ScXMLDeletionContext( ScXMLImport& rImport,
     ScChangeActionState nActionState(SC_CAS_VIRGIN);
     ScChangeActionType nActionType(SC_CAT_DELETE_COLS);
 
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             sal_Int32 nToken = aIter.getToken();
             switch (nToken)
@@ -1433,11 +1388,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDeletionContext::c
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext(nullptr);
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
     case XML_ELEMENT( OFFICE, XML_CHANGE_INFO ):
-        pContext = new ScXMLChangeInfoContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLChangeInfoContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     case XML_ELEMENT( TABLE, XML_DEPENDENCIES ):
         pContext = new ScXMLDependingsContext(GetScImport(), pChangeTrackingImportHelper);
@@ -1459,7 +1416,7 @@ void SAL_CALL ScXMLDeletionContext::endFastElement( sal_Int32 /*nElement*/ )
 }
 
 ScXMLMovementContext::ScXMLMovementContext( ScXMLImport& rImport,
-                                            const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+                                            const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                             ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
     ScXMLImportContext( rImport ),
     pChangeTrackingImportHelper(pTempChangeTrackingImportHelper)
@@ -1468,12 +1425,9 @@ ScXMLMovementContext::ScXMLMovementContext( ScXMLImport& rImport,
     sal_uInt32 nRejectingNumber(0);
     ScChangeActionState nActionState(SC_CAS_VIRGIN);
 
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -1503,11 +1457,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLMovementContext::c
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext(nullptr);
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
     case XML_ELEMENT( OFFICE, XML_CHANGE_INFO ):
-        pContext = new ScXMLChangeInfoContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLChangeInfoContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     case XML_ELEMENT( TABLE, XML_DEPENDENCIES ):
         pContext = new ScXMLDependingsContext(GetScImport(), pChangeTrackingImportHelper);
@@ -1516,10 +1472,10 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLMovementContext::c
         pContext = new ScXMLDeletionsContext(GetScImport(), pChangeTrackingImportHelper);
         break;
     case XML_ELEMENT( TABLE, XML_SOURCE_RANGE_ADDRESS ):
-        pContext = new ScXMLBigRangeContext(GetScImport(), xAttrList, aSourceRange);
+        pContext = new ScXMLBigRangeContext(GetScImport(), pAttribList, aSourceRange);
         break;
     case XML_ELEMENT( TABLE, XML_TARGET_RANGE_ADDRESS ):
-        pContext = new ScXMLBigRangeContext(GetScImport(), xAttrList, aTargetRange);
+        pContext = new ScXMLBigRangeContext(GetScImport(), pAttribList, aTargetRange);
         break;
     }
 
@@ -1536,7 +1492,7 @@ void SAL_CALL ScXMLMovementContext::endFastElement( sal_Int32 /*nElement*/ )
 }
 
 ScXMLRejectionContext::ScXMLRejectionContext( ScXMLImport& rImport,
-                                              const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+                                              const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                               ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) :
     ScXMLImportContext( rImport ),
     pChangeTrackingImportHelper(pTempChangeTrackingImportHelper)
@@ -1545,12 +1501,9 @@ ScXMLRejectionContext::ScXMLRejectionContext( ScXMLImport& rImport,
     sal_uInt32 nRejectingNumber(0);
     ScChangeActionState nActionState(SC_CAS_VIRGIN);
 
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -1580,11 +1533,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLRejectionContext::
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext(nullptr);
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
     case XML_ELEMENT( OFFICE, XML_CHANGE_INFO ):
-        pContext = new ScXMLChangeInfoContext(GetScImport(), xAttrList, pChangeTrackingImportHelper);
+        pContext = new ScXMLChangeInfoContext(GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     case XML_ELEMENT( TABLE, XML_DEPENDENCIES ):
         pContext = new ScXMLDependingsContext(GetScImport(), pChangeTrackingImportHelper);
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.hxx b/sc/source/filter/xml/XMLTrackedChangesContext.hxx
index fe0d5f8a12c6..23e47c20a06d 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.hxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.hxx
@@ -35,7 +35,7 @@ class ScXMLTrackedChangesContext : public ScXMLImportContext
 
 public:
     ScXMLTrackedChangesContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper);
     virtual ~ScXMLTrackedChangesContext() override;
 
diff --git a/sc/source/filter/xml/datastreamimport.cxx b/sc/source/filter/xml/datastreamimport.cxx
index f6d2428ceea3..9840c64f46c8 100644
--- a/sc/source/filter/xml/datastreamimport.cxx
+++ b/sc/source/filter/xml/datastreamimport.cxx
@@ -22,17 +22,14 @@ using namespace xmloff::token;
 
 ScXMLDataStreamContext::ScXMLDataStreamContext(
     ScXMLImport& rImport,
-    const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList ) :
+    const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
     ScXMLImportContext(rImport),
     mbRefreshOnEmpty(false),
     meInsertPos(sc::ImportPostProcessData::DataStream::InsertBottom)
 {
-    if( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for( auto &aIter : *pAttribList )
+        for (auto &aIter : *rAttrList)
         {
             switch ( aIter.getToken() )
             {
diff --git a/sc/source/filter/xml/datastreamimport.hxx b/sc/source/filter/xml/datastreamimport.hxx
index 6e174db07177..691ed6430ff9 100644
--- a/sc/source/filter/xml/datastreamimport.hxx
+++ b/sc/source/filter/xml/datastreamimport.hxx
@@ -25,7 +25,7 @@ class ScXMLDataStreamContext : public ScXMLImportContext
 public:
     ScXMLDataStreamContext(
         ScXMLImport& rImport,
-        const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList );
+        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
 
     virtual ~ScXMLDataStreamContext() override;
 
diff --git a/sc/source/filter/xml/xmlbodyi.cxx b/sc/source/filter/xml/xmlbodyi.cxx
index e560028ccd79..352d4bb06d0e 100644
--- a/sc/source/filter/xml/xmlbodyi.cxx
+++ b/sc/source/filter/xml/xmlbodyi.cxx
@@ -58,7 +58,7 @@ using namespace com::sun::star;
 using namespace xmloff::token;
 
 ScXMLBodyContext::ScXMLBodyContext( ScXMLImport& rImport,
-                                    const uno::Reference<xml::sax::XFastAttributeList>& xAttrList ) :
+                                    const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
     ScXMLImportContext( rImport ),
     sPassword(),
     meHash1(PASSHASH_SHA1),
@@ -90,13 +90,10 @@ ScXMLBodyContext::ScXMLBodyContext( ScXMLImport& rImport,
         pDoc->SetStorageGrammar( eGrammar);
     }
 
-    if( !xAttrList.is() )
+    if ( !rAttrList.is() )
         return;
 
-    sax_fastparser::FastAttributeList *pAttribList =
-        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-    for( auto &it : *pAttribList )
+    for (auto &it : *rAttrList)
     {
         sal_Int32 nToken = it.getToken();
         if( NAMESPACE_TOKEN( XML_NAMESPACE_TABLE ) == ( nToken & NMSP_MASK ) )
@@ -135,16 +132,18 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
     }
 
     SvXMLImportContext *pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch( nElement )
     {
     case XML_ELEMENT( TABLE, XML_TRACKED_CHANGES ):
         pChangeTrackingImportHelper = GetScImport().GetChangeTrackingImportHelper();
         if (pChangeTrackingImportHelper)
-            pContext = new ScXMLTrackedChangesContext( GetScImport(), xAttrList, pChangeTrackingImportHelper);
+            pContext = new ScXMLTrackedChangesContext( GetScImport(), pAttribList, pChangeTrackingImportHelper);
         break;
     case XML_ELEMENT( TABLE, XML_CALCULATION_SETTINGS ):
-        pContext = new ScXMLCalculationSettingsContext( GetScImport(), xAttrList );
+        pContext = new ScXMLCalculationSettingsContext( GetScImport(), pAttribList );
         bHadCalculationSettings = true;
         break;
     case XML_ELEMENT( TABLE, XML_CONTENT_VALIDATIONS ):
@@ -161,7 +160,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
         }
         else
         {
-            pContext = new ScXMLTableContext( GetScImport(), xAttrList );
+            pContext = new ScXMLTableContext( GetScImport(), pAttribList );
         }
         break;
     case XML_ELEMENT( TABLE, XML_NAMED_EXPRESSIONS ):
@@ -177,19 +176,19 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
         break;
     case XML_ELEMENT( TABLE, XML_DATABASE_RANGE ):
         pContext = new ScXMLDatabaseRangeContext ( GetScImport(),
-                                                        xAttrList );
+                                                        pAttribList );
         break;
     case XML_ELEMENT( TABLE, XML_DATA_PILOT_TABLES ):
         pContext = new ScXMLDataPilotTablesContext ( GetScImport() );
         break;
     case XML_ELEMENT( TABLE, XML_CONSOLIDATION ):
-        pContext = new ScXMLConsolidationContext ( GetScImport(), xAttrList );
+        pContext = new ScXMLConsolidationContext ( GetScImport(), pAttribList );
         break;
     case XML_ELEMENT( TABLE, XML_DDE_LINKS ):
         pContext = new ScXMLDDELinksContext ( GetScImport() );
         break;
     case XML_ELEMENT( CALC_EXT, XML_DATA_STREAM_SOURCE ):
-        pContext = new ScXMLDataStreamContext(GetScImport(), xAttrList);
+        pContext = new ScXMLDataStreamContext(GetScImport(), pAttribList);
         break;
     }
 
diff --git a/sc/source/filter/xml/xmlbodyi.hxx b/sc/source/filter/xml/xmlbodyi.hxx
index a6cc7d629021..6e6f63ebb844 100644
--- a/sc/source/filter/xml/xmlbodyi.hxx
+++ b/sc/source/filter/xml/xmlbodyi.hxx
@@ -42,7 +42,7 @@ class ScXMLBodyContext : public ScXMLImportContext
 public:
 
     ScXMLBodyContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList );
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
 
     virtual ~ScXMLBodyContext() override;
 
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index a3600057e661..9e73c278e79c 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -118,7 +118,7 @@ ScXMLTableRowCellContext::Field::~Field()
 }
 
 ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       const bool bTempIsCovered,
                                       const sal_Int32 nTempRepeatedRows ) :
     ScXMLImportContext( rImport ),
@@ -157,12 +157,9 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
 
     std::unique_ptr<OUString> xStyleName;
     std::unique_ptr<OUString> xCurrencySymbol;
-    if( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for( auto &it : *pAttribList )
+        for (auto &it : *rAttrList)
         {
             switch ( it.getToken() )
             {
@@ -702,6 +699,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLTableRowCellContex
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     // bool bTextP(false);
     switch (nElement)
@@ -734,7 +733,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLTableRowCellContex
             if (!pCellRangeSource)
                 pCellRangeSource = new ScMyImpCellRangeSource();
             pContext = new ScXMLCellRangeSourceContext(
-                rXMLImport, xAttrList, pCellRangeSource );
+                rXMLImport, pAttribList, pCellRangeSource );
         }
         break;
     }
diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx
index 0a859f6b2c6e..bc30cf4b32be 100644
--- a/sc/source/filter/xml/xmlcelli.hxx
+++ b/sc/source/filter/xml/xmlcelli.hxx
@@ -130,7 +130,7 @@ class ScXMLTableRowCellContext : public ScXMLImportContext
 public:
 
     ScXMLTableRowCellContext( ScXMLImport& rImport,
-                       const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                       const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                        const bool bIsCovered, const sal_Int32 nRepeatedRows );
 
     virtual ~ScXMLTableRowCellContext() override;
diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx
index 3593b48976cf..5600a8257871 100644
--- a/sc/source/filter/xml/xmlcoli.cxx
+++ b/sc/source/filter/xml/xmlcoli.cxx
@@ -40,17 +40,14 @@ using namespace com::sun::star;
 using namespace xmloff::token;
 
 ScXMLTableColContext::ScXMLTableColContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList ) :
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
     ScXMLImportContext( rImport ),
     sVisibility(GetXMLToken(XML_VISIBLE))
 {
     nColCount = 1;
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -146,7 +143,7 @@ void SAL_CALL ScXMLTableColContext::endFastElement( sal_Int32 /*nElement*/ )
 }
 
 ScXMLTableColsContext::ScXMLTableColsContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       const bool bTempHeader, const bool bTempGroup) :
     ScXMLImportContext( rImport ),
     nHeaderStartCol(0),
@@ -163,13 +160,10 @@ ScXMLTableColsContext::ScXMLTableColsContext( ScXMLImport& rImport,
     else if (bGroup)
     {
         nGroupStartCol = rImport.GetTables().GetCurrentColCount();
-        if ( xAttrList.is() )
+        if ( rAttrList.is() )
         {
-            sax_fastparser::FastAttributeList *pAttribList =
-                sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-            auto &aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_DISPLAY ) ) );
-            if ( aIter != pAttribList->end() && IsXMLToken(aIter, XML_FALSE) )
+            auto &aIter( rAttrList->find( XML_ELEMENT( TABLE, XML_DISPLAY ) ) );
+            if ( aIter != rAttrList->end() && IsXMLToken(aIter, XML_FALSE) )
                 bGroupDisplay = false;
         }
     }
@@ -183,23 +177,25 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLTableColsContext::
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
     case XML_ELEMENT( TABLE, XML_TABLE_COLUMN_GROUP ):
-        pContext = new ScXMLTableColsContext( GetScImport(), xAttrList,
+        pContext = new ScXMLTableColsContext( GetScImport(), pAttribList,
                                                    false, true );
         break;
     case XML_ELEMENT( TABLE, XML_TABLE_HEADER_COLUMNS ):
-        pContext = new ScXMLTableColsContext( GetScImport(), xAttrList,
+        pContext = new ScXMLTableColsContext( GetScImport(), pAttribList,
                                                    true, false );
         break;
     case XML_ELEMENT( TABLE, XML_TABLE_COLUMNS ):
-        pContext = new ScXMLTableColsContext( GetScImport(), xAttrList,
+        pContext = new ScXMLTableColsContext( GetScImport(), pAttribList,
                                                    false, false );
         break;
     case XML_ELEMENT( TABLE, XML_TABLE_COLUMN ):
-        pContext = new ScXMLTableColContext( GetScImport(), xAttrList );
+        pContext = new ScXMLTableColContext( GetScImport(), pAttribList );
         break;
     }
 
diff --git a/sc/source/filter/xml/xmlcoli.hxx b/sc/source/filter/xml/xmlcoli.hxx
index 3c33dd706116..9b839098d7ac 100644
--- a/sc/source/filter/xml/xmlcoli.hxx
+++ b/sc/source/filter/xml/xmlcoli.hxx
@@ -34,7 +34,7 @@ class ScXMLTableColContext : public ScXMLImportContext
 public:
 
     ScXMLTableColContext( ScXMLImport& rImport,
-                       const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList );
+                       const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList);
 
     virtual ~ScXMLTableColContext() override;
 
@@ -57,7 +57,7 @@ class ScXMLTableColsContext : public ScXMLImportContext
 public:
 
     ScXMLTableColsContext( ScXMLImport& rImport,
-                       const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                       const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         const bool bHeader, const bool bGroup);
 
     virtual ~ScXMLTableColsContext() override;
diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx
index e2f79aa6c94b..05bf9cf06ae7 100644
--- a/sc/source/filter/xml/xmlcondformat.cxx
+++ b/sc/source/filter/xml/xmlcondformat.cxx
@@ -35,10 +35,13 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL ScXMLConditio
     sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext* pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+
     switch (nElement)
     {
         case XML_ELEMENT( CALC_EXT, XML_CONDITIONAL_FORMAT ):
-            pContext = new ScXMLConditionalFormatContext( GetScImport(), xAttrList );
+            pContext = new ScXMLConditionalFormatContext( GetScImport(), pAttribList );
             break;
     }
 
@@ -57,17 +60,14 @@ void SAL_CALL ScXMLConditionalFormatsContext::endFastElement( sal_Int32 /*nEleme
 }
 
 ScXMLConditionalFormatContext::ScXMLConditionalFormatContext( ScXMLImport& rImport,
-                        const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList):
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ):
     ScXMLImportContext( rImport )
 {
     OUString sRange;
 
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -91,22 +91,25 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL ScXMLConditio
     sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext* pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+
     switch (nElement)
     {
         case XML_ELEMENT( CALC_EXT, XML_CONDITION ):
-            pContext = new ScXMLCondContext( GetScImport(), xAttrList, mxFormat.get() );
+            pContext = new ScXMLCondContext( GetScImport(), pAttribList, mxFormat.get() );
             break;
         case XML_ELEMENT( CALC_EXT, XML_COLOR_SCALE ):
             pContext = new ScXMLColorScaleFormatContext( GetScImport(), mxFormat.get() );
             break;
         case XML_ELEMENT( CALC_EXT, XML_DATA_BAR ):
-            pContext = new ScXMLDataBarFormatContext( GetScImport(), xAttrList, mxFormat.get() );
+            pContext = new ScXMLDataBarFormatContext( GetScImport(), pAttribList, mxFormat.get() );
             break;
         case XML_ELEMENT( CALC_EXT, XML_ICON_SET ):
-            pContext = new ScXMLIconSetFormatContext( GetScImport(), xAttrList, mxFormat.get() );
+            pContext = new ScXMLIconSetFormatContext( GetScImport(), pAttribList, mxFormat.get() );
             break;
         case XML_ELEMENT( CALC_EXT, XML_DATE_IS ):
-            pContext = new ScXMLDateContext( GetScImport(), xAttrList, mxFormat.get() );
+            pContext = new ScXMLDateContext( GetScImport(), pAttribList, mxFormat.get() );
             break;
         default:
             break;
@@ -144,10 +147,13 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL ScXMLColorSca
     sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext* pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+
     switch (nElement)
     {
         case XML_ELEMENT( CALC_EXT, XML_COLOR_SCALE_ENTRY ):
-            pContext = new ScXMLColorScaleFormatEntryContext( GetScImport(), xAttrList, pColorScaleFormat );
+            pContext = new ScXMLColorScaleFormatEntryContext( GetScImport(), pAttribList, pColorScaleFormat );
             break;
         default:
             break;
@@ -157,7 +163,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL ScXMLColorSca
 }
 
 ScXMLDataBarFormatContext::ScXMLDataBarFormatContext( ScXMLImport& rImport,
-                        const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScConditionalFormat* pFormat):
     ScXMLImportContext( rImport ),
     mpDataBarFormat(nullptr),
@@ -173,12 +179,9 @@ ScXMLDataBarFormatContext::ScXMLDataBarFormatContext( ScXMLImport& rImport,
     OUString sMinLength;
     OUString sMaxLength;
 
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -282,13 +285,16 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL ScXMLDataBarF
     sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext* pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+
     switch (nElement)
     {
         case XML_ELEMENT( CALC_EXT, XML_FORMATTING_ENTRY ):
         case XML_ELEMENT( CALC_EXT, XML_DATA_BAR_ENTRY ):
         {
             ScColorScaleEntry* pEntry(nullptr);
-            pContext = new ScXMLFormattingEntryContext( GetScImport(), xAttrList, pEntry );
+            pContext = new ScXMLFormattingEntryContext( GetScImport(), pAttribList, pEntry );
             if(mnIndex == 0)
             {
                 mpFormatData->mpLowerLimit.reset(pEntry);
@@ -313,17 +319,14 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL ScXMLDataBarF
 }
 
 ScXMLIconSetFormatContext::ScXMLIconSetFormatContext(ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScConditionalFormat* pFormat):
     ScXMLImportContext( rImport )
 {
     OUString aIconSetType, sShowValue;
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -372,12 +375,15 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL ScXMLIconSetF
     sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext* pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+
     switch (nElement)
     {
         case XML_ELEMENT( CALC_EXT, XML_FORMATTING_ENTRY ):
             {
                 ScColorScaleEntry* pEntry(nullptr);
-                pContext = new ScXMLFormattingEntryContext( GetScImport(), xAttrList, pEntry );
+                pContext = new ScXMLFormattingEntryContext( GetScImport(), pAttribList, pEntry );
                 mpFormatData->m_Entries.push_back(std::unique_ptr<ScColorScaleEntry>(pEntry));
             }
             break;
@@ -551,7 +557,7 @@ void GetConditionData(const OUString& rValue, ScConditionMode& eMode, OUString&
 }
 
 ScXMLCondContext::ScXMLCondContext( ScXMLImport& rImport,
-                        const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScConditionalFormat* pFormat ):
     ScXMLImportContext( rImport )
 {
@@ -559,12 +565,9 @@ ScXMLCondContext::ScXMLCondContext( ScXMLImport& rImport,
     OUString sStyle;
     OUString sAddress;
 
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -623,7 +626,7 @@ void setColorEntryType(const OUString& rType, ScColorScaleEntry* pEntry, const O
 }
 
 ScXMLColorScaleFormatEntryContext::ScXMLColorScaleFormatEntryContext( ScXMLImport& rImport,
-                        const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScColorScaleFormat* pFormat):
     ScXMLImportContext( rImport ),
     mpFormatEntry( nullptr )
@@ -635,12 +638,9 @@ ScXMLColorScaleFormatEntryContext::ScXMLColorScaleFormatEntryContext( ScXMLImpor
     OUString sVal;
     OUString sColor;
 
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -672,19 +672,16 @@ ScXMLColorScaleFormatEntryContext::ScXMLColorScaleFormatEntryContext( ScXMLImpor
 }
 
 ScXMLFormattingEntryContext::ScXMLFormattingEntryContext( ScXMLImport& rImport,
-                        const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScColorScaleEntry*& pColorScaleEntry):
     ScXMLImportContext( rImport )
 {
     OUString sVal;
     OUString sType;
 
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -746,17 +743,14 @@ condformat::ScCondFormatDateType getDateFromString(const OUString& rString)
 }
 
 ScXMLDateContext::ScXMLDateContext( ScXMLImport& rImport,
-                        const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScConditionalFormat* pFormat ):
     ScXMLImportContext( rImport )
 {
     OUString sDateType, sStyle;
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
diff --git a/sc/source/filter/xml/xmlcondformat.hxx b/sc/source/filter/xml/xmlcondformat.hxx
index ac3c9267eefb..ef52883f2419 100644
--- a/sc/source/filter/xml/xmlcondformat.hxx
+++ b/sc/source/filter/xml/xmlcondformat.hxx
@@ -38,7 +38,7 @@ class ScXMLConditionalFormatContext : public ScXMLImportContext
 {
 public:
     ScXMLConditionalFormatContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList);
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
 
     virtual ~ScXMLConditionalFormatContext() override;
 
@@ -69,7 +69,7 @@ class ScXMLDataBarFormatContext : public ScXMLImportContext
 {
 public:
     ScXMLDataBarFormatContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScConditionalFormat* pFormat);
 
     virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
@@ -88,7 +88,7 @@ class ScXMLIconSetFormatContext : public ScXMLImportContext
 public:
 
     ScXMLIconSetFormatContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScConditionalFormat* pFormat);
 
     virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
@@ -99,7 +99,7 @@ class ScXMLColorScaleFormatEntryContext : public ScXMLImportContext
 {
 public:
     ScXMLColorScaleFormatEntryContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScColorScaleFormat* pFormat);
 
 private:
@@ -110,7 +110,7 @@ class ScXMLFormattingEntryContext : public ScXMLImportContext
 {
 public:
     ScXMLFormattingEntryContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScColorScaleEntry*& pData);
 };
 
@@ -118,7 +118,7 @@ class ScXMLCondContext : public ScXMLImportContext
 {
 public:
     ScXMLCondContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScConditionalFormat* pFormat);
 };
 
@@ -126,7 +126,7 @@ class ScXMLDateContext : public ScXMLImportContext
 {
 public:
     ScXMLDateContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScConditionalFormat* pFormat);
 };
 
diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx
index abc621927e3e..5a37734be65c 100644
--- a/sc/source/filter/xml/xmlcvali.cxx
+++ b/sc/source/filter/xml/xmlcvali.cxx
@@ -59,7 +59,7 @@ class ScXMLContentValidationContext : public ScXMLImportContext
 public:
 
     ScXMLContentValidationContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList);
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
 
     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
                                      const OUString& rLocalName,
@@ -87,7 +87,7 @@ class ScXMLHelpMessageContext : public ScXMLImportContext
 public:
 
     ScXMLHelpMessageContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScXMLContentValidationContext* pValidationContext);
 
     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
@@ -110,7 +110,7 @@ class ScXMLErrorMessageContext : public ScXMLImportContext
 public:
 
     ScXMLErrorMessageContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScXMLContentValidationContext* pValidationContext);
 
     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
@@ -129,7 +129,7 @@ class ScXMLErrorMacroContext : public ScXMLImportContext
 public:
 
     ScXMLErrorMacroContext( ScXMLImport& rImport,
-                        const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                        const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                         ScXMLContentValidationContext* pValidationContext);
 
     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
@@ -152,11 +152,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLContentValidations
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
         case XML_ELEMENT( TABLE, XML_CONTENT_VALIDATION ):
-            pContext = new ScXMLContentValidationContext( GetScImport(), xAttrList);
+            pContext = new ScXMLContentValidationContext( GetScImport(), pAttribList );
         break;
     }
 
@@ -167,19 +169,16 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLContentValidations
 }
 
 ScXMLContentValidationContext::ScXMLContentValidationContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList) :
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
     ScXMLImportContext( rImport ),
     nShowList(sheet::TableValidationVisibility::UNSORTED),
     bAllowEmptyCell(true),
     bDisplayHelp(false),
     bDisplayError(false)
 {
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -245,17 +244,19 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLContentValidationC
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
     case XML_ELEMENT( TABLE, XML_HELP_MESSAGE ):
-        pContext = new ScXMLHelpMessageContext( GetScImport(), xAttrList, this);
+        pContext = new ScXMLHelpMessageContext( GetScImport(), pAttribList, this);
         break;
     case XML_ELEMENT( TABLE, XML_ERROR_MESSAGE ):
-        pContext = new ScXMLErrorMessageContext( GetScImport(), xAttrList, this);
+        pContext = new ScXMLErrorMessageContext( GetScImport(), pAttribList, this);
         break;
     case XML_ELEMENT( TABLE, XML_ERROR_MACRO ):
-        pContext = new ScXMLErrorMacroContext( GetScImport(), xAttrList, this);
+        pContext = new ScXMLErrorMacroContext( GetScImport(), pAttribList, this);
         break;
     }
 
@@ -440,7 +441,7 @@ void ScXMLContentValidationContext::SetErrorMacro(const bool bExecute)
 }
 
 ScXMLHelpMessageContext::ScXMLHelpMessageContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLContentValidationContext* pTempValidationContext) :
     ScXMLImportContext( rImport ),
     sTitle(),
@@ -449,12 +450,9 @@ ScXMLHelpMessageContext::ScXMLHelpMessageContext( ScXMLImport& rImport,
     bDisplay(false)
 {
     pValidationContext = pTempValidationContext;
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -500,7 +498,7 @@ void SAL_CALL ScXMLHelpMessageContext::endFastElement( sal_Int32 /*nElement*/ )
 }
 
 ScXMLErrorMessageContext::ScXMLErrorMessageContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLContentValidationContext* pTempValidationContext) :
     ScXMLImportContext( rImport ),
     sTitle(),
@@ -510,12 +508,9 @@ ScXMLErrorMessageContext::ScXMLErrorMessageContext( ScXMLImport& rImport,
     bDisplay(false)
 {
     pValidationContext = pTempValidationContext;
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
@@ -564,19 +559,16 @@ void SAL_CALL ScXMLErrorMessageContext::endFastElement( sal_Int32 /*nElement*/ )
 }
 
 ScXMLErrorMacroContext::ScXMLErrorMacroContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
                                       ScXMLContentValidationContext* pTempValidationContext) :
     ScXMLImportContext( rImport ),
     sName(),
     bExecute(false)
 {
     pValidationContext = pTempValidationContext;
-    if ( xAttrList.is() )
+    if ( rAttrList.is() )
     {
-        sax_fastparser::FastAttributeList *pAttribList =
-            sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
-        for (auto &aIter : *pAttribList)
+        for (auto &aIter : *rAttrList)
         {
             switch (aIter.getToken())
             {
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 7bc8a7f54146..73108271cc95 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -71,12 +71,14 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotTablesCon
     sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
     SvXMLImportContext *pContext = nullptr;
+    sax_fastparser::FastAttributeList *pAttribList =
+        sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
 
     switch (nElement)
     {
         case XML_ELEMENT( TABLE, XML_DATA_PILOT_TABLE ) :
         {
-            pContext = new ScXMLDataPilotTableContext( GetScImport(), xAttrList);
+            pContext = new ScXMLDataPilotTableContext( GetScImport(), pAttribList );
         }
         break;
     }
@@ -91,7 +93,7 @@ ScXMLDataPilotTableContext::GrandTotalItem::GrandTotalItem() :
     mbVisible(true) {}
 
 ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport,
-                                      const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList) :
+                                      const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
     ScXMLImportContext( rImport ),
     pDoc(GetScImport().GetDocument()),
     pDPObject(nullptr),

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list