summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMohammed Abdul Azeem <azeemmysore@gmail.com>2017-08-16 22:51:05 +0530
committerMichael Meeks <michael.meeks@collabora.com>2017-08-30 10:55:28 +0200
commitda8cf43b4f2af008df231f5e0629c71bd7f2b762 (patch)
treeba63371e3f32af2d8c2dc4612bf6970c731ba96e /sc/source
parent0365ca351aac534d3fc09d22f6a91017525bfef8 (diff)
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@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/filter/xml/XMLCalculationSettingsContext.cxx49
-rw-r--r--sc/source/filter/xml/XMLCalculationSettingsContext.hxx12
-rw-r--r--sc/source/filter/xml/XMLCellRangeSourceContext.cxx9
-rw-r--r--sc/source/filter/xml/XMLCellRangeSourceContext.hxx2
-rw-r--r--sc/source/filter/xml/XMLConsolidationContext.cxx11
-rw-r--r--sc/source/filter/xml/XMLConsolidationContext.hxx2
-rw-r--r--sc/source/filter/xml/XMLDDELinksContext.cxx54
-rw-r--r--sc/source/filter/xml/XMLDDELinksContext.hxx8
-rw-r--r--sc/source/filter/xml/XMLDetectiveContext.cxx24
-rw-r--r--sc/source/filter/xml/XMLDetectiveContext.hxx4
-rw-r--r--sc/source/filter/xml/XMLTableSourceContext.cxx9
-rw-r--r--sc/source/filter/xml/XMLTableSourceContext.hxx2
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.cxx237
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.hxx2
-rw-r--r--sc/source/filter/xml/datastreamimport.cxx9
-rw-r--r--sc/source/filter/xml/datastreamimport.hxx2
-rw-r--r--sc/source/filter/xml/xmlbodyi.cxx23
-rw-r--r--sc/source/filter/xml/xmlbodyi.hxx2
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx13
-rw-r--r--sc/source/filter/xml/xmlcelli.hxx2
-rw-r--r--sc/source/filter/xml/xmlcoli.cxx30
-rw-r--r--sc/source/filter/xml/xmlcoli.hxx4
-rw-r--r--sc/source/filter/xml/xmlcondformat.cxx94
-rw-r--r--sc/source/filter/xml/xmlcondformat.hxx14
-rw-r--r--sc/source/filter/xml/xmlcvali.cxx56
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx222
-rw-r--r--sc/source/filter/xml/xmldpimp.hxx36
-rw-r--r--sc/source/filter/xml/xmldrani.cxx141
-rw-r--r--sc/source/filter/xml/xmldrani.hxx30
-rw-r--r--sc/source/filter/xml/xmlexternaltabi.cxx50
-rw-r--r--sc/source/filter/xml/xmlexternaltabi.hxx14
-rw-r--r--sc/source/filter/xml/xmlfilti.cxx73
-rw-r--r--sc/source/filter/xml/xmlfilti.hxx10
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx8
-rw-r--r--sc/source/filter/xml/xmlimprt.hxx2
-rw-r--r--sc/source/filter/xml/xmllabri.cxx19
-rw-r--r--sc/source/filter/xml/xmllabri.hxx7
-rw-r--r--sc/source/filter/xml/xmlmappingi.cxx25
-rw-r--r--sc/source/filter/xml/xmlmappingi.hxx7
-rw-r--r--sc/source/filter/xml/xmlnexpi.cxx36
-rw-r--r--sc/source/filter/xml/xmlnexpi.hxx10
-rw-r--r--sc/source/filter/xml/xmlrowi.cxx37
-rw-r--r--sc/source/filter/xml/xmlrowi.hxx4
-rw-r--r--sc/source/filter/xml/xmlsceni.cxx15
-rw-r--r--sc/source/filter/xml/xmlsceni.hxx5
-rw-r--r--sc/source/filter/xml/xmlsorti.cxx23
-rw-r--r--sc/source/filter/xml/xmlsorti.hxx4
-rw-r--r--sc/source/filter/xml/xmltabi.cxx50
-rw-r--r--sc/source/filter/xml/xmltabi.hxx4
49 files changed, 612 insertions, 894 deletions
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),
@@ -113,12 +115,9 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport,
bDrillDown(true),
bHeaderGridLayout(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())
{
@@ -208,47 +207,49 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotTableCont
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_DATABASE_SOURCE_SQL ):
{
- pContext = new ScXMLDPSourceSQLContext(GetScImport(), xAttrList, this);
+ pContext = new ScXMLDPSourceSQLContext(GetScImport(), pAttribList, this);
nSourceType = SQL;
}
break;
case XML_ELEMENT( TABLE, XML_DATABASE_SOURCE_TABLE ):
{
- pContext = new ScXMLDPSourceTableContext(GetScImport(), xAttrList, this);
+ pContext = new ScXMLDPSourceTableContext(GetScImport(), pAttribList, this);
nSourceType = TABLE;
}
break;
case XML_ELEMENT( TABLE, XML_DATABASE_SOURCE_QUERY ):
{
- pContext = new ScXMLDPSourceQueryContext(GetScImport(), xAttrList, this);
+ pContext = new ScXMLDPSourceQueryContext(GetScImport(), pAttribList, this);
nSourceType = QUERY;
}
break;
case XML_ELEMENT( TABLE, XML_SOURCE_SERVICE ):
{
- pContext = new ScXMLSourceServiceContext(GetScImport(), xAttrList, this);
+ pContext = new ScXMLSourceServiceContext(GetScImport(), pAttribList, this);
nSourceType = SERVICE;
}
break;
case XML_ELEMENT( TABLE, XML_DATA_PILOT_GRAND_TOTAL ):
case XML_ELEMENT( TABLE_EXT, XML_DATA_PILOT_GRAND_TOTAL ):
{
- pContext = new ScXMLDataPilotGrandTotalContext(GetScImport(), xAttrList, this);
+ pContext = new ScXMLDataPilotGrandTotalContext(GetScImport(), pAttribList, this);
}
break;
case XML_ELEMENT( TABLE, XML_SOURCE_CELL_RANGE ):
{
- pContext = new ScXMLSourceCellRangeContext(GetScImport(), xAttrList, this);
+ pContext = new ScXMLSourceCellRangeContext(GetScImport(), pAttribList, this);
nSourceType = CELLRANGE;
}
break;
case XML_ELEMENT( TABLE, XML_DATA_PILOT_FIELD ):
- pContext = new ScXMLDataPilotFieldContext(GetScImport(), xAttrList, this);
+ pContext = new ScXMLDataPilotFieldContext(GetScImport(), pAttribList, this);
break;
}
@@ -572,17 +573,14 @@ void ScXMLDataPilotTableContext::SetGrandTotal(
}
ScXMLDPSourceSQLContext::ScXMLDPSourceSQLContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pTempDataPilotTable) :
ScXMLImportContext( rImport ),
pDataPilotTable(pTempDataPilotTable)
{
- 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())
{
@@ -605,17 +603,14 @@ ScXMLDPSourceSQLContext::~ScXMLDPSourceSQLContext()
}
ScXMLDPSourceTableContext::ScXMLDPSourceTableContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pTempDataPilotTable) :
ScXMLImportContext( rImport ),
pDataPilotTable(pTempDataPilotTable)
{
- 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())
{
@@ -636,17 +631,14 @@ ScXMLDPSourceTableContext::~ScXMLDPSourceTableContext()
}
ScXMLDPSourceQueryContext::ScXMLDPSourceQueryContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pTempDataPilotTable) :
ScXMLImportContext( rImport ),
pDataPilotTable(pTempDataPilotTable)
{
- 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())
{
@@ -666,17 +658,14 @@ ScXMLDPSourceQueryContext::~ScXMLDPSourceQueryContext()
}
ScXMLSourceServiceContext::ScXMLSourceServiceContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pTempDataPilotTable) :
ScXMLImportContext( rImport ),
pDataPilotTable(pTempDataPilotTable)
{
- 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())
{
@@ -705,19 +694,16 @@ ScXMLSourceServiceContext::~ScXMLSourceServiceContext()
}
ScXMLDataPilotGrandTotalContext::ScXMLDataPilotGrandTotalContext(
- ScXMLImport& rImport, const Reference<xml::sax::XFastAttributeList>& xAttrList,
+ ScXMLImport& rImport, const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pTableContext ) :
ScXMLImportContext( rImport ),
mpTableContext(pTableContext),
meOrientation(NONE),
mbVisible(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())
{
@@ -768,17 +754,14 @@ ScXMLDataPilotGrandTotalContext::~ScXMLDataPilotGrandTotalContext()
}
ScXMLSourceCellRangeContext::ScXMLSourceCellRangeContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pTempDataPilotTable) :
ScXMLImportContext( rImport ),
pDataPilotTable(pTempDataPilotTable)
{
- 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())
{
@@ -806,11 +789,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSourceCellRangeCon
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_FILTER ):
- pContext = new ScXMLDPFilterContext(GetScImport(), xAttrList, pDataPilotTable);
+ pContext = new ScXMLDPFilterContext(GetScImport(), pAttribList, pDataPilotTable);
break;
}
@@ -821,7 +806,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSourceCellRangeCon
}
ScXMLDataPilotFieldContext::ScXMLDataPilotFieldContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pTempDataPilotTable) :
ScXMLImportContext( rImport ),
pDataPilotTable(pTempDataPilotTable),
@@ -844,12 +829,9 @@ ScXMLDataPilotFieldContext::ScXMLDataPilotFieldContext( ScXMLImport& rImport,
bool bDataLayout = false;
bool bIgnoreSelectedPage = false;
OUString aDisplayName;
- 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())
{
@@ -904,17 +886,19 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotFieldCont
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_LEVEL ):
- pContext = new ScXMLDataPilotLevelContext(GetScImport(), xAttrList, this);
+ pContext = new ScXMLDataPilotLevelContext(GetScImport(), pAttribList, this);
break;
case XML_ELEMENT( TABLE, XML_DATA_PILOT_FIELD_REFERENCE ):
- pContext = new ScXMLDataPilotFieldReferenceContext(GetScImport(), xAttrList, this);
+ pContext = new ScXMLDataPilotFieldReferenceContext(GetScImport(), pAttribList, this);
break;
case XML_ELEMENT( TABLE, XML_DATA_PILOT_GROUPS ):
- pContext = new ScXMLDataPilotGroupsContext(GetScImport(), xAttrList, this);
+ pContext = new ScXMLDataPilotGroupsContext(GetScImport(), pAttribList, this);
break;
}
@@ -1010,18 +994,15 @@ void SAL_CALL ScXMLDataPilotFieldContext::endFastElement( sal_Int32 /*nElement*/
}
ScXMLDataPilotFieldReferenceContext::ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport,
- const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pDataPilotField) :
ScXMLImportContext( rImport )
{
sheet::DataPilotFieldReference aReference;
- 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())
{
@@ -1078,17 +1059,14 @@ ScXMLDataPilotFieldReferenceContext::~ScXMLDataPilotFieldReferenceContext()
}
ScXMLDataPilotLevelContext::ScXMLDataPilotLevelContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pTempDataPilotField) :
ScXMLImportContext( rImport ),
pDataPilotField(pTempDataPilotField)
{
- 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())
{
@@ -1111,6 +1089,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotLevelCont
sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
{
SvXMLImportContext *pContext = nullptr;
+ sax_fastparser::FastAttributeList *pAttribList =
+ sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -1121,13 +1101,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotLevelCont
pContext = new ScXMLDataPilotMembersContext(GetScImport(), pDataPilotField);
break;
case XML_ELEMENT( TABLE, XML_DATA_PILOT_DISPLAY_INFO ):
- pContext = new ScXMLDataPilotDisplayInfoContext(GetScImport(), xAttrList, pDataPilotField);
+ pContext = new ScXMLDataPilotDisplayInfoContext(GetScImport(), pAttribList, pDataPilotField);
break;
case XML_ELEMENT( TABLE, XML_DATA_PILOT_SORT_INFO ):
- pContext = new ScXMLDataPilotSortInfoContext(GetScImport(), xAttrList, pDataPilotField);
+ pContext = new ScXMLDataPilotSortInfoContext(GetScImport(), pAttribList, pDataPilotField);
break;
case XML_ELEMENT( TABLE, XML_DATA_PILOT_LAYOUT_INFO ):
- pContext = new ScXMLDataPilotLayoutInfoContext(GetScImport(), xAttrList, pDataPilotField);
+ pContext = new ScXMLDataPilotLayoutInfoContext(GetScImport(), pAttribList, pDataPilotField);
break;
}
@@ -1138,18 +1118,15 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotLevelCont
}
ScXMLDataPilotDisplayInfoContext::ScXMLDataPilotDisplayInfoContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pDataPilotField) :
ScXMLImportContext( rImport )
{
sheet::DataPilotFieldAutoShowInfo aInfo;
- 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())
{
@@ -1182,18 +1159,15 @@ ScXMLDataPilotDisplayInfoContext::~ScXMLDataPilotDisplayInfoContext()
}
ScXMLDataPilotSortInfoContext::ScXMLDataPilotSortInfoContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pDataPilotField) :
ScXMLImportContext( rImport )
{
sheet::DataPilotFieldSortInfo aInfo;
- 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())
{
@@ -1227,18 +1201,15 @@ ScXMLDataPilotSortInfoContext::~ScXMLDataPilotSortInfoContext()
}
ScXMLDataPilotLayoutInfoContext::ScXMLDataPilotLayoutInfoContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pDataPilotField) :
ScXMLImportContext( rImport )
{
sheet::DataPilotFieldLayoutInfo aInfo;
- 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())
{
@@ -1282,11 +1253,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotSubTotals
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_SUBTOTAL ):
- pContext = new ScXMLDataPilotSubTotalContext(GetScImport(), xAttrList, this);
+ pContext = new ScXMLDataPilotSubTotalContext(GetScImport(), pAttribList, this);
break;
}
@@ -1314,17 +1287,14 @@ void ScXMLDataPilotSubTotalsContext::SetDisplayName(const OUString& rName)
}
ScXMLDataPilotSubTotalContext::ScXMLDataPilotSubTotalContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotSubTotalsContext* pTempDataPilotSubTotals) :
ScXMLImportContext( rImport ),
pDataPilotSubTotals(pTempDataPilotSubTotals)
{
- 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())
{
@@ -1360,11 +1330,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotMembersCo
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_MEMBER ):
- pContext = new ScXMLDataPilotMemberContext(GetScImport(), xAttrList, pDataPilotField);
+ pContext = new ScXMLDataPilotMemberContext(GetScImport(), pAttribList, pDataPilotField);
break;
}
@@ -1375,7 +1347,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotMembersCo
}
ScXMLDataPilotMemberContext::ScXMLDataPilotMemberContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pTempDataPilotField) :
ScXMLImportContext( rImport ),
pDataPilotField(pTempDataPilotField),
@@ -1383,12 +1355,9 @@ ScXMLDataPilotMemberContext::ScXMLDataPilotMemberContext( ScXMLImport& rImport,
bDisplayDetails( true ),
bHasName( 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())
{
@@ -1429,7 +1398,7 @@ void SAL_CALL ScXMLDataPilotMemberContext::endFastElement( sal_Int32 /*nElement*
}
ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pTempDataPilotField) :
ScXMLImportContext( rImport ),
pDataPilotField(pTempDataPilotField)
@@ -1443,12 +1412,9 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport,
bool bAutoStart(true);
bool bAutoEnd(true);
- 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() & TOKEN_MASK)
{
@@ -1540,10 +1506,12 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotGroupsCon
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_DATA_PILOT_GROUP ))
{
- pContext = new ScXMLDataPilotGroupContext(GetScImport(), xAttrList, pDataPilotField);
+ pContext = new ScXMLDataPilotGroupContext(GetScImport(), pAttribList, pDataPilotField);
}
if( !pContext )
@@ -1553,18 +1521,15 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotGroupsCon
}
ScXMLDataPilotGroupContext::ScXMLDataPilotGroupContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pTempDataPilotField) :
ScXMLImportContext( rImport ),
pDataPilotField(pTempDataPilotField)
{
- if ( xAttrList.is() )
+ if ( rAttrList.is() )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
- auto &aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_NAME ) ) );
- if (aIter != pAttribList->end())
+ auto &aIter( rAttrList->find( XML_ELEMENT( TABLE, XML_NAME ) ) );
+ if (aIter != rAttrList->end())
sName = aIter.toString();
}
}
@@ -1577,11 +1542,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotGroupCont
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_DATA_PILOT_MEMBER ) ||
nElement == XML_ELEMENT( TABLE, XML_DATA_PILOT_GROUP_MEMBER ))
{
- pContext = new ScXMLDataPilotGroupMemberContext(GetScImport(), xAttrList, this);
+ pContext = new ScXMLDataPilotGroupMemberContext(GetScImport(), pAttribList, this);
}
if( !pContext )
@@ -1596,18 +1563,15 @@ void SAL_CALL ScXMLDataPilotGroupContext::endFastElement( sal_Int32 /*nElement*/
}
ScXMLDataPilotGroupMemberContext::ScXMLDataPilotGroupMemberContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotGroupContext* pTempDataPilotGroup) :
ScXMLImportContext( rImport ),
pDataPilotGroup(pTempDataPilotGroup)
{
- if ( xAttrList.is() )
+ if ( rAttrList.is() )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
- auto &aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_NAME ) ) );
- if (aIter != pAttribList->end())
+ auto &aIter( rAttrList->find( XML_ELEMENT( TABLE, XML_NAME ) ) );
+ if (aIter != rAttrList->end())
sName = aIter.toString();
}
}
diff --git a/sc/source/filter/xml/xmldpimp.hxx b/sc/source/filter/xml/xmldpimp.hxx
index cf0a53fa4c37..13e315bfcb30 100644
--- a/sc/source/filter/xml/xmldpimp.hxx
+++ b/sc/source/filter/xml/xmldpimp.hxx
@@ -113,7 +113,7 @@ class ScXMLDataPilotTableContext : public ScXMLImportContext
public:
ScXMLDataPilotTableContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList);
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
virtual ~ScXMLDataPilotTableContext() override;
@@ -150,7 +150,7 @@ class ScXMLDPSourceSQLContext : public ScXMLImportContext
public:
ScXMLDPSourceSQLContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pDataPilotTable);
virtual ~ScXMLDPSourceSQLContext() override;
@@ -163,7 +163,7 @@ class ScXMLDPSourceTableContext : public ScXMLImportContext
public:
ScXMLDPSourceTableContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pDataPilotTable);
virtual ~ScXMLDPSourceTableContext() override;
@@ -176,7 +176,7 @@ class ScXMLDPSourceQueryContext : public ScXMLImportContext
public:
ScXMLDPSourceQueryContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pDataPilotTable);
virtual ~ScXMLDPSourceQueryContext() override;
@@ -189,7 +189,7 @@ class ScXMLSourceServiceContext : public ScXMLImportContext
public:
ScXMLSourceServiceContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pDataPilotTable);
virtual ~ScXMLSourceServiceContext() override;
@@ -207,7 +207,7 @@ class ScXMLDataPilotGrandTotalContext : public ScXMLImportContext
public:
ScXMLDataPilotGrandTotalContext(
ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pTableContext );
virtual ~ScXMLDataPilotGrandTotalContext() override;
@@ -222,7 +222,7 @@ class ScXMLSourceCellRangeContext : public ScXMLImportContext
public:
ScXMLSourceCellRangeContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pDataPilotTable);
virtual ~ScXMLSourceCellRangeContext() override;
@@ -264,7 +264,7 @@ class ScXMLDataPilotFieldContext : public ScXMLImportContext
public:
ScXMLDataPilotFieldContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pDataPilotTable);
virtual ~ScXMLDataPilotFieldContext() override;
@@ -304,7 +304,7 @@ class ScXMLDataPilotFieldReferenceContext : public ScXMLImportContext
public:
ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pDataPilotField);
virtual ~ScXMLDataPilotFieldReferenceContext() override;
@@ -317,7 +317,7 @@ class ScXMLDataPilotLevelContext : public ScXMLImportContext
public:
ScXMLDataPilotLevelContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pDataPilotField);
virtual ~ScXMLDataPilotLevelContext() override;
@@ -331,7 +331,7 @@ class ScXMLDataPilotDisplayInfoContext : public ScXMLImportContext
public:
ScXMLDataPilotDisplayInfoContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pDataPilotField);
virtual ~ScXMLDataPilotDisplayInfoContext() override;
@@ -342,7 +342,7 @@ class ScXMLDataPilotSortInfoContext : public ScXMLImportContext
public:
ScXMLDataPilotSortInfoContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pDataPilotField);
virtual ~ScXMLDataPilotSortInfoContext() override;
@@ -353,7 +353,7 @@ class ScXMLDataPilotLayoutInfoContext : public ScXMLImportContext
public:
ScXMLDataPilotLayoutInfoContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pDataPilotField);
virtual ~ScXMLDataPilotLayoutInfoContext() override;
@@ -387,7 +387,7 @@ class ScXMLDataPilotSubTotalContext : public ScXMLImportContext
public:
ScXMLDataPilotSubTotalContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotSubTotalsContext* pDataPilotSubTotals);
virtual ~ScXMLDataPilotSubTotalContext() override;
@@ -421,7 +421,7 @@ class ScXMLDataPilotMemberContext : public ScXMLImportContext
public:
ScXMLDataPilotMemberContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pDataPilotField);
virtual ~ScXMLDataPilotMemberContext() override;
@@ -436,7 +436,7 @@ class ScXMLDataPilotGroupsContext : public ScXMLImportContext
public:
ScXMLDataPilotGroupsContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pDataPilotField);
virtual ~ScXMLDataPilotGroupsContext() override;
@@ -455,7 +455,7 @@ class ScXMLDataPilotGroupContext : public ScXMLImportContext
public:
ScXMLDataPilotGroupContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotFieldContext* pDataPilotField);
virtual ~ScXMLDataPilotGroupContext() override;
@@ -476,7 +476,7 @@ class ScXMLDataPilotGroupMemberContext : public ScXMLImportContext
public:
ScXMLDataPilotGroupMemberContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotGroupContext* pDataPilotGroup);
virtual ~ScXMLDataPilotGroupMemberContext() override;
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index dcace1cd141a..06df21a81c3f 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -69,12 +69,14 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDatabaseRangesCont
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_DATABASE_RANGE ):
{
- pContext = new ScXMLDatabaseRangeContext( GetScImport(), xAttrList );
+ pContext = new ScXMLDatabaseRangeContext( GetScImport(), pAttribList );
}
break;
}
@@ -86,7 +88,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDatabaseRangesCont
}
ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList) :
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
ScXMLImportContext( rImport ),
mpQueryParam(new ScQueryParam),
sDatabaseRangeName(STR_DB_LOCAL_NONAME),
@@ -114,12 +116,9 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport,
meRangeType(ScDBCollection::GlobalNamed)
{
nSourceType = sheet::DataImportMode_NONE;
- 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() )
{
@@ -205,40 +204,42 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDatabaseRangeConte
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_DATABASE_SOURCE_SQL ):
{
- pContext = new ScXMLSourceSQLContext( GetScImport(), xAttrList, this);
+ pContext = new ScXMLSourceSQLContext( GetScImport(), pAttribList, this);
}
break;
case XML_ELEMENT( TABLE, XML_DATABASE_SOURCE_TABLE ):
{
- pContext = new ScXMLSourceTableContext( GetScImport(), xAttrList, this);
+ pContext = new ScXMLSourceTableContext( GetScImport(), pAttribList, this);
}
break;
case XML_ELEMENT( TABLE, XML_DATABASE_SOURCE_QUERY ):
{
- pContext = new ScXMLSourceQueryContext( GetScImport(), xAttrList, this);
+ pContext = new ScXMLSourceQueryContext( GetScImport(), pAttribList, this);
}
break;
case XML_ELEMENT( TABLE, XML_FILTER ):
{
pContext = new ScXMLFilterContext(
- GetScImport(), xAttrList, *mpQueryParam, this);
+ GetScImport(), pAttribList, *mpQueryParam, this);
}
break;
case XML_ELEMENT( TABLE, XML_SORT ):
{
bContainsSort = true;
- pContext = new ScXMLSortContext( GetScImport(), xAttrList, this);
+ pContext = new ScXMLSortContext( GetScImport(), pAttribList, this);
}
break;
case XML_ELEMENT( TABLE, XML_SUBTOTAL_RULES ):
{
bContainsSubTotal = true;
- pContext = new ScXMLSubTotalRulesContext( GetScImport(), xAttrList, this);
+ pContext = new ScXMLSubTotalRulesContext( GetScImport(), pAttribList, this);
}
break;
}
@@ -452,17 +453,14 @@ void SAL_CALL ScXMLDatabaseRangeContext::endFastElement( sal_Int32 /*nElement*/
}
ScXMLSourceSQLContext::ScXMLSourceSQLContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext) :
ScXMLImportContext( rImport ),
pDatabaseRangeContext(pTempDatabaseRangeContext)
{
- 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())
{
@@ -489,10 +487,12 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSourceSQLContext::
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( FORM, XML_CONNECTION_RESOURCE ) && sDBName.isEmpty() )
{
- pContext = new ScXMLConResContext( GetScImport(), xAttrList, pDatabaseRangeContext);
+ pContext = new ScXMLConResContext( GetScImport(), pAttribList, pDatabaseRangeContext);
}
if( !pContext )
@@ -508,17 +508,14 @@ void SAL_CALL ScXMLSourceSQLContext::endFastElement( sal_Int32 /*nElement*/ )
}
ScXMLSourceTableContext::ScXMLSourceTableContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext) :
ScXMLImportContext( rImport ),
pDatabaseRangeContext(pTempDatabaseRangeContext)
{
- 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())
{
@@ -543,10 +540,12 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSourceTableContext
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( FORM, XML_CONNECTION_RESOURCE ) && sDBName.isEmpty() )
{
- pContext = new ScXMLConResContext( GetScImport(), xAttrList, pDatabaseRangeContext);
+ pContext = new ScXMLConResContext( GetScImport(), pAttribList, pDatabaseRangeContext);
}
if( !pContext )
@@ -562,17 +561,14 @@ void SAL_CALL ScXMLSourceTableContext::endFastElement( sal_Int32 /*nElement*/ )
}
ScXMLSourceQueryContext::ScXMLSourceQueryContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext) :
ScXMLImportContext( rImport ),
pDatabaseRangeContext(pTempDatabaseRangeContext)
{
- 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())
{
@@ -596,10 +592,12 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSourceQueryContext
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( FORM, XML_CONNECTION_RESOURCE ) && sDBName.isEmpty() )
{
- pContext = new ScXMLConResContext( GetScImport(), xAttrList, pDatabaseRangeContext);
+ pContext = new ScXMLConResContext( GetScImport(), pAttribList, pDatabaseRangeContext);
}
if( !pContext )
@@ -615,19 +613,16 @@ void SAL_CALL ScXMLSourceQueryContext::endFastElement( sal_Int32 /*nElement*/ )
}
ScXMLConResContext::ScXMLConResContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext) :
ScXMLImportContext( rImport ),
pDatabaseRangeContext( pTempDatabaseRangeContext )
{
OUString sConRes;
- if ( xAttrList.is() )
+ if ( rAttrList.is() )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
- auto &aIter( pAttribList->find( XML_ELEMENT( XLINK, XML_HREF ) ) );
- if (aIter != pAttribList->end())
+ auto &aIter( rAttrList->find( XML_ELEMENT( XLINK, XML_HREF ) ) );
+ if (aIter != rAttrList->end())
sConRes = aIter.toString();
}
if (!sConRes.isEmpty())
@@ -638,24 +633,15 @@ ScXMLConResContext::~ScXMLConResContext()
{
}
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLConResContext::createFastChildContext(
- sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
-{
- return new SvXMLImportContext( GetImport() );
-}
-
ScXMLSubTotalRulesContext::ScXMLSubTotalRulesContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext) :
ScXMLImportContext( rImport ),
pDatabaseRangeContext(pTempDatabaseRangeContext)
{
- 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())
{
@@ -681,17 +667,19 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSubTotalRulesConte
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_SORT_GROUPS ):
{
- pContext = new ScXMLSortGroupsContext( GetScImport(), xAttrList, pDatabaseRangeContext);
+ pContext = new ScXMLSortGroupsContext( GetScImport(), pAttribList, pDatabaseRangeContext);
}
break;
case XML_ELEMENT( TABLE, XML_SUBTOTAL_RULE ):
{
- pContext = new ScXMLSubTotalRuleContext( GetScImport(), xAttrList, pDatabaseRangeContext);
+ pContext = new ScXMLSubTotalRuleContext( GetScImport(), pAttribList, pDatabaseRangeContext);
}
break;
}
@@ -703,18 +691,15 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSubTotalRulesConte
}
ScXMLSortGroupsContext::ScXMLSortGroupsContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext) :
ScXMLImportContext( rImport ),
pDatabaseRangeContext(pTempDatabaseRangeContext)
{
pDatabaseRangeContext->SetSubTotalsSortGroups(true);
- 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())
{
@@ -765,24 +750,15 @@ ScXMLSortGroupsContext::~ScXMLSortGroupsContext()
{
}
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSortGroupsContext::createFastChildContext(
- sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
-{
- return new SvXMLImportContext( GetImport() );
-}
-
ScXMLSubTotalRuleContext::ScXMLSubTotalRuleContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext) :
ScXMLImportContext( rImport ),
pDatabaseRangeContext(pTempDatabaseRangeContext)
{
- 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())
{
@@ -802,12 +778,14 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSubTotalRuleContex
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_SUBTOTAL_FIELD ):
{
- pContext = new ScXMLSubTotalFieldContext( GetScImport(), xAttrList, this);
+ pContext = new ScXMLSubTotalFieldContext( GetScImport(), pAttribList, this);
}
break;
}
@@ -825,17 +803,14 @@ void SAL_CALL ScXMLSubTotalRuleContext::endFastElement( sal_Int32 /*nElement*/ )
}
ScXMLSubTotalFieldContext::ScXMLSubTotalFieldContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLSubTotalRuleContext* pTempSubTotalRuleContext) :
ScXMLImportContext( rImport ),
pSubTotalRuleContext(pTempSubTotalRuleContext)
{
- 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())
{
@@ -854,12 +829,6 @@ ScXMLSubTotalFieldContext::~ScXMLSubTotalFieldContext()
{
}
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSubTotalFieldContext::createFastChildContext(
- sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
-{
- return new SvXMLImportContext( GetImport() );
-}
-
void SAL_CALL ScXMLSubTotalFieldContext::endFastElement( sal_Int32 /*nElement*/ )
{
sheet::SubTotalColumn aSubTotalColumn;
diff --git a/sc/source/filter/xml/xmldrani.hxx b/sc/source/filter/xml/xmldrani.hxx
index 6e7dbbe5ed8f..4defcb6188e5 100644
--- a/sc/source/filter/xml/xmldrani.hxx
+++ b/sc/source/filter/xml/xmldrani.hxx
@@ -93,7 +93,7 @@ class ScXMLDatabaseRangeContext : public ScXMLImportContext
public:
ScXMLDatabaseRangeContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList);
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
virtual ~ScXMLDatabaseRangeContext() override;
@@ -128,7 +128,7 @@ class ScXMLSourceSQLContext : public ScXMLImportContext
public:
ScXMLSourceSQLContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
virtual ~ScXMLSourceSQLContext() override;
@@ -147,7 +147,7 @@ class ScXMLSourceTableContext : public ScXMLImportContext
public:
ScXMLSourceTableContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
virtual ~ScXMLSourceTableContext() override;
@@ -166,7 +166,7 @@ class ScXMLSourceQueryContext : public ScXMLImportContext
public:
ScXMLSourceQueryContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
virtual ~ScXMLSourceQueryContext() override;
@@ -184,13 +184,10 @@ class ScXMLConResContext : public ScXMLImportContext
public:
ScXMLConResContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
virtual ~ScXMLConResContext() 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 ScXMLSubTotalRulesContext : public ScXMLImportContext
@@ -200,9 +197,8 @@ class ScXMLSubTotalRulesContext : public ScXMLImportContext
public:
ScXMLSubTotalRulesContext( ScXMLImport& rImport,
- const css::uno::Reference<
- css::xml::sax::XFastAttributeList>& xAttrList,
- ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
+ ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
virtual ~ScXMLSubTotalRulesContext() override;
@@ -217,13 +213,10 @@ class ScXMLSortGroupsContext : public ScXMLImportContext
public:
ScXMLSortGroupsContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
virtual ~ScXMLSortGroupsContext() 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 ScXMLSubTotalRuleContext : public ScXMLImportContext
@@ -234,7 +227,7 @@ class ScXMLSubTotalRuleContext : public ScXMLImportContext
public:
ScXMLSubTotalRuleContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
virtual ~ScXMLSubTotalRuleContext() override;
@@ -258,14 +251,11 @@ class ScXMLSubTotalFieldContext : public ScXMLImportContext
public:
ScXMLSubTotalFieldContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLSubTotalRuleContext* pSubTotalRuleContext);
virtual ~ScXMLSubTotalFieldContext() 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;
-
virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
};
diff --git a/sc/source/filter/xml/xmlexternaltabi.cxx b/sc/source/filter/xml/xmlexternaltabi.cxx
index 33b92fc2dcdb..e2b0dae21d0f 100644
--- a/sc/source/filter/xml/xmlexternaltabi.cxx
+++ b/sc/source/filter/xml/xmlexternaltabi.cxx
@@ -43,19 +43,16 @@ using ::com::sun::star::uno::Reference;
ScXMLExternalRefTabSourceContext::ScXMLExternalRefTabSourceContext(
ScXMLImport& rImport,
- const Reference<XFastAttributeList>& xAttrList, ScXMLExternalTabData& rRefInfo ) :
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, ScXMLExternalTabData& rRefInfo ) :
ScXMLImportContext( rImport ),
mrScImport(rImport),
mrExternalRefInfo(rRefInfo)
{
using namespace ::xmloff::token;
- if( xAttrList.is() )
+ if ( rAttrList.is() )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
- for( auto &it : *pAttribList )
+ for (auto &it : *rAttrList)
{
sal_Int32 nAttrToken = it.getToken();
if ( nAttrToken == XML_ELEMENT( XLINK, XML_HREF ) )
@@ -74,12 +71,6 @@ ScXMLExternalRefTabSourceContext::~ScXMLExternalRefTabSourceContext()
{
}
-Reference< XFastContextHandler > SAL_CALL ScXMLExternalRefTabSourceContext::createFastChildContext(
- sal_Int32/* nElement */, const Reference< XFastAttributeList >&/* xAttrList */ )
-{
- return new SvXMLImportContext( GetImport() );
-}
-
/**
* Make sure the URL is a valid relative URL, mainly to avoid storing
* absolute URL as relative URL by accident. For now, we only check the first
@@ -138,6 +129,9 @@ Reference< XFastContextHandler > SAL_CALL ScXMLExternalRefRowsContext::createFas
const SvXMLTokenMap& rTokenMap = mrScImport.GetTableRowsElemTokenMap();
sal_uInt16 nToken = rTokenMap.Get( nElement );
+ sax_fastparser::FastAttributeList *pAttribList =
+ sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+
switch (nToken)
{
case XML_TOK_TABLE_ROWS_ROW_GROUP:
@@ -147,7 +141,7 @@ Reference< XFastContextHandler > SAL_CALL ScXMLExternalRefRowsContext::createFas
mrScImport, mrExternalRefInfo);
case XML_TOK_TABLE_ROWS_ROW:
return new ScXMLExternalRefRowContext(
- mrScImport, xAttrList, mrExternalRefInfo);
+ mrScImport, pAttribList, mrExternalRefInfo);
default:
;
}
@@ -156,7 +150,7 @@ Reference< XFastContextHandler > SAL_CALL ScXMLExternalRefRowsContext::createFas
ScXMLExternalRefRowContext::ScXMLExternalRefRowContext(
ScXMLImport& rImport,
- const Reference<XFastAttributeList>& xAttrList, ScXMLExternalTabData& rRefInfo ) :
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, ScXMLExternalTabData& rRefInfo ) :
ScXMLImportContext( rImport ),
mrScImport(rImport),
mrExternalRefInfo(rRefInfo),
@@ -165,12 +159,9 @@ ScXMLExternalRefRowContext::ScXMLExternalRefRowContext(
mrExternalRefInfo.mnCol = 0;
const SvXMLTokenMap& rAttrTokenMap = mrScImport.GetTableRowAttrTokenMap();
- if ( xAttrList.is() )
+ if ( rAttrList.is() )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
- for( auto &it : *pAttribList )
+ for (auto &it : *rAttrList)
{
switch ( rAttrTokenMap.Get( it.getToken() ) )
{
@@ -193,8 +184,11 @@ Reference< XFastContextHandler > SAL_CALL ScXMLExternalRefRowContext::createFast
{
const SvXMLTokenMap& rTokenMap = mrScImport.GetTableRowElemTokenMap();
sal_uInt16 nToken = rTokenMap.Get( nElement );
+ sax_fastparser::FastAttributeList *pAttribList =
+ sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+
if (nToken == XML_TOK_TABLE_ROW_CELL || nToken == XML_TOK_TABLE_ROW_COVERED_CELL)
- return new ScXMLExternalRefCellContext(mrScImport, xAttrList, mrExternalRefInfo);
+ return new ScXMLExternalRefCellContext(mrScImport, pAttribList, mrExternalRefInfo);
return new SvXMLImportContext( GetImport() );
}
@@ -231,7 +225,7 @@ void SAL_CALL ScXMLExternalRefRowContext::endFastElement( sal_Int32 /* nElement
ScXMLExternalRefCellContext::ScXMLExternalRefCellContext(
ScXMLImport& rImport,
- const Reference<XFastAttributeList>& xAttrList, ScXMLExternalTabData& rRefInfo ) :
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, ScXMLExternalTabData& rRefInfo ) :
ScXMLImportContext( rImport ),
mrScImport(rImport),
mrExternalRefInfo(rRefInfo),
@@ -245,12 +239,9 @@ ScXMLExternalRefCellContext::ScXMLExternalRefCellContext(
using namespace ::xmloff::token;
const SvXMLTokenMap& rTokenMap = rImport.GetTableRowCellAttrTokenMap();
- if( xAttrList.is() )
+ if ( rAttrList.is() )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
- for( auto &it : *pAttribList )
+ for (auto &it : *rAttrList)
{
switch ( rTokenMap.Get( it.getToken() ) )
{
@@ -339,6 +330,7 @@ Reference< XFastContextHandler > SAL_CALL ScXMLExternalRefCellContext::createFas
{
const SvXMLTokenMap& rTokenMap = mrScImport.GetTableRowCellElemTokenMap();
sal_uInt16 nToken = rTokenMap.Get( nElement );
+
if (nToken == XML_TOK_TABLE_ROW_CELL_P)
return new ScXMLExternalRefCellTextContext(mrScImport, *this);
@@ -390,12 +382,6 @@ ScXMLExternalRefCellTextContext::~ScXMLExternalRefCellTextContext()
{
}
-Reference< XFastContextHandler > SAL_CALL ScXMLExternalRefCellTextContext::createFastChildContext(
- sal_Int32/* nElement */, const Reference< XFastAttributeList >&/* xAttrList */ )
-{
- return new SvXMLImportContext( GetImport() );
-}
-
void SAL_CALL ScXMLExternalRefCellTextContext::characters( const OUString& rChars )
{
maCellStrBuf.append( rChars );
diff --git a/sc/source/filter/xml/xmlexternaltabi.hxx b/sc/source/filter/xml/xmlexternaltabi.hxx
index 230a1382e6ac..88ef648c6f20 100644
--- a/sc/source/filter/xml/xmlexternaltabi.hxx
+++ b/sc/source/filter/xml/xmlexternaltabi.hxx
@@ -31,17 +31,13 @@ class ScXMLExternalRefTabSourceContext : public ScXMLImportContext
{
public:
ScXMLExternalRefTabSourceContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLExternalTabData& rRefInfo );
virtual ~ScXMLExternalRefTabSourceContext() override;
virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
- virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(
- sal_Int32 nElement,
- const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
-
private:
ScXMLImport& mrScImport;
ScXMLExternalTabData& mrExternalRefInfo;
@@ -73,7 +69,7 @@ class ScXMLExternalRefRowContext : public ScXMLImportContext
{
public:
ScXMLExternalRefRowContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLExternalTabData& rRefInfo );
virtual ~ScXMLExternalRefRowContext() override;
@@ -94,7 +90,7 @@ class ScXMLExternalRefCellContext : public ScXMLImportContext
{
public:
ScXMLExternalRefCellContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLExternalTabData& rRefInfo );
virtual ~ScXMLExternalRefCellContext() override;
@@ -130,10 +126,6 @@ public:
virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
virtual void SAL_CALL characters( const OUString& rChars ) override;
- virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(
- sal_Int32 nElement,
- const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
-
private:
ScXMLExternalRefCellContext& mrParent;
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index ebe15e1b7f7d..9ccdc8bda4cb 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -41,7 +41,7 @@ using ::com::sun::star::xml::sax::XAttributeList;
ScXMLFilterContext::ConnStackItem::ConnStackItem(bool bOr) : mbOr(bOr), mnCondCount(0) {}
ScXMLFilterContext::ScXMLFilterContext( ScXMLImport& rImport,
- const Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScQueryParam& rParam,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext) :
ScXMLImportContext( rImport ),
@@ -53,12 +53,9 @@ ScXMLFilterContext::ScXMLFilterContext( ScXMLImport& rImport,
{
ScDocument* pDoc(GetScImport().GetDocument());
- 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())
{
@@ -103,6 +100,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLFilterContext::cre
sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
{
SvXMLImportContext *pContext(nullptr);
+ sax_fastparser::FastAttributeList *pAttribList =
+ sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -121,7 +120,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLFilterContext::cre
case XML_ELEMENT( TABLE, XML_FILTER_CONDITION ):
{
pContext = new ScXMLConditionContext(
- GetScImport(), nElement, xAttrList, mrQueryParam, this);
+ GetScImport(), nElement, pAttribList, mrQueryParam, this);
}
break;
}
@@ -208,6 +207,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLAndContext::create
sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
{
SvXMLImportContext *pContext(nullptr);
+ sax_fastparser::FastAttributeList *pAttribList =
+ sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -219,7 +220,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLAndContext::create
case XML_ELEMENT( TABLE, XML_FILTER_CONDITION ):
{
pContext = new ScXMLConditionContext(
- GetScImport(), nElement, xAttrList, mrQueryParam, pFilterContext);
+ GetScImport(), nElement, pAttribList, mrQueryParam, pFilterContext);
}
break;
}
@@ -253,6 +254,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLOrContext::createF
sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
{
SvXMLImportContext *pContext(nullptr);
+ sax_fastparser::FastAttributeList *pAttribList =
+ sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -265,7 +268,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLOrContext::createF
case XML_ELEMENT( TABLE, XML_FILTER_CONDITION ):
{
pContext = new ScXMLConditionContext(
- GetScImport(), nElement, xAttrList, mrQueryParam, pFilterContext);
+ GetScImport(), nElement, pAttribList, mrQueryParam, pFilterContext);
}
break;
}
@@ -283,7 +286,7 @@ void SAL_CALL ScXMLOrContext::endFastElement( sal_Int32 /*nElement*/ )
ScXMLConditionContext::ScXMLConditionContext(
ScXMLImport& rImport, sal_Int32 /*nElement*/,
- const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScQueryParam& rParam,
ScXMLFilterContext* pTempFilterContext) :
ScXMLImportContext( rImport ),
@@ -294,12 +297,9 @@ ScXMLConditionContext::ScXMLConditionContext(
{
sDataType = GetXMLToken(XML_TEXT);
- 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())
{
@@ -341,13 +341,15 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLConditionContext::
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_FILTER_SET_ITEM ):
{
pContext = new ScXMLSetItemContext(
- GetScImport(), nElement, xAttrList, *this);
+ GetScImport(), nElement, pAttribList, *this);
}
break;
}
@@ -450,15 +452,12 @@ void SAL_CALL ScXMLConditionContext::endFastElement( sal_Int32 /*nElement*/ )
ScXMLSetItemContext::ScXMLSetItemContext(
ScXMLImport& rImport, sal_Int32 /*nElement*/,
- const Reference<xml::sax::XFastAttributeList>& xAttrList, ScXMLConditionContext& rParent) :
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, ScXMLConditionContext& rParent) :
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())
{
@@ -482,7 +481,7 @@ ScXMLSetItemContext::~ScXMLSetItemContext()
}
ScXMLDPFilterContext::ScXMLDPFilterContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pTempDataPilotTableContext) :
ScXMLImportContext( rImport ),
pDataPilotTable(pTempDataPilotTableContext),
@@ -498,12 +497,9 @@ ScXMLDPFilterContext::ScXMLDPFilterContext( ScXMLImport& rImport,
{
ScDocument* pDoc(GetScImport().GetDocument());
- 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())
{
@@ -548,6 +544,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDPFilterContext::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)
{
@@ -563,7 +561,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDPFilterContext::c
break;
case XML_ELEMENT( TABLE, XML_FILTER_CONDITION ):
{
- pContext = new ScXMLDPConditionContext( GetScImport(), nElement, xAttrList, this);
+ pContext = new ScXMLDPConditionContext( GetScImport(), nElement, pAttribList, this);
}
break;
}
@@ -612,6 +610,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDPAndContext::crea
sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
{
SvXMLImportContext *pContext(nullptr);
+ sax_fastparser::FastAttributeList *pAttribList =
+ sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -622,7 +622,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDPAndContext::crea
break;
case XML_ELEMENT( TABLE, XML_FILTER_CONDITION ):
{
- pContext = new ScXMLDPConditionContext( GetScImport(), nElement, xAttrList, pFilterContext);
+ pContext = new ScXMLDPConditionContext( GetScImport(), nElement, pAttribList, pFilterContext);
}
break;
}
@@ -654,6 +654,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDPOrContext::creat
sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
{
SvXMLImportContext *pContext(nullptr);
+ sax_fastparser::FastAttributeList *pAttribList =
+ sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -664,7 +666,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDPOrContext::creat
break;
case XML_ELEMENT( TABLE, XML_FILTER_CONDITION ):
{
- pContext = new ScXMLDPConditionContext( GetScImport(), nElement, xAttrList, pFilterContext);
+ pContext = new ScXMLDPConditionContext( GetScImport(), nElement, pAttribList, pFilterContext);
}
break;
}
@@ -682,7 +684,7 @@ void SAL_CALL ScXMLDPOrContext::endFastElement( sal_Int32 /*nElement*/ )
ScXMLDPConditionContext::ScXMLDPConditionContext( ScXMLImport& rImport,
sal_Int32 /*nElement*/,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDPFilterContext* pTempFilterContext) :
ScXMLImportContext( rImport ),
pFilterContext(pTempFilterContext),
@@ -691,12 +693,9 @@ ScXMLDPConditionContext::ScXMLDPConditionContext( ScXMLImport& rImport,
bIsCaseSensitive(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/xmlfilti.hxx b/sc/source/filter/xml/xmlfilti.hxx
index a7161e6a9296..c889573164c7 100644
--- a/sc/source/filter/xml/xmlfilti.hxx
+++ b/sc/source/filter/xml/xmlfilti.hxx
@@ -56,7 +56,7 @@ class ScXMLFilterContext : public ScXMLImportContext
public:
ScXMLFilterContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScQueryParam& rParam,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
@@ -125,7 +125,7 @@ class ScXMLConditionContext : public ScXMLImportContext
public:
ScXMLConditionContext( ScXMLImport& rImport, sal_Int32 nElement,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScQueryParam& rParam,
ScXMLFilterContext* pTempFilterContext);
@@ -144,7 +144,7 @@ class ScXMLSetItemContext : public ScXMLImportContext
{
public:
ScXMLSetItemContext(ScXMLImport& rImport, sal_Int32 nElement,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLConditionContext& rParent);
virtual ~ScXMLSetItemContext() override;
@@ -172,7 +172,7 @@ class ScXMLDPFilterContext : public ScXMLImportContext
public:
ScXMLDPFilterContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDataPilotTableContext* pTempDataPilotTableContext);
virtual ~ScXMLDPFilterContext() override;
@@ -260,7 +260,7 @@ class ScXMLDPConditionContext : public ScXMLImportContext
public:
ScXMLDPConditionContext( ScXMLImport& rImport, sal_Int32 nElement,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDPFilterContext* pTempFilterContext);
virtual ~ScXMLDPConditionContext() override;
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index e0bbdb671353..188a687d20cf 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -362,7 +362,9 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
ScXMLBodyContext_Impl::createFastChildContext( sal_Int32 /*nElement*/,
const uno::Reference< xml::sax::XFastAttributeList > & xAttrList )
{
- return GetScImport().CreateBodyContext( xAttrList );
+ sax_fastparser::FastAttributeList *pAttribList =
+ sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ return GetScImport().CreateBodyContext( pAttribList );
}
SvXMLImportContext *ScXMLDocContext_Impl::CreateChildContext( sal_uInt16 nPrefix,
@@ -831,9 +833,9 @@ SvXMLImportContext *ScXMLImport::CreateStylesContext(const OUString& rLocalName,
return pContext;
}
-SvXMLImportContext *ScXMLImport::CreateBodyContext(const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
+SvXMLImportContext *ScXMLImport::CreateBodyContext(const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList)
{
- return new ScXMLBodyContext(*this, xAttrList);
+ return new ScXMLBodyContext(*this, rAttrList);
}
SvXMLImportContext *ScXMLImport::CreateMetaContext(
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index e4410dfc5b2f..828efd191b53 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -678,7 +678,7 @@ public:
bool bAutoStyles );
SvXMLImportContext *CreateBodyContext(
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList );
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
virtual void SetStatistics( const css::uno::Sequence< css::beans::NamedValue> & i_rStats) override;
diff --git a/sc/source/filter/xml/xmllabri.cxx b/sc/source/filter/xml/xmllabri.cxx
index be44364abb75..91ba82d26222 100644
--- a/sc/source/filter/xml/xmllabri.cxx
+++ b/sc/source/filter/xml/xmllabri.cxx
@@ -44,11 +44,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLLabelRangesContext
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_LABEL_RANGE ):
- pContext = new ScXMLLabelRangeContext( GetScImport(), xAttrList );
+ pContext = new ScXMLLabelRangeContext( GetScImport(), pAttribList );
break;
}
if( !pContext )
@@ -59,16 +61,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLLabelRangesContext
ScXMLLabelRangeContext::ScXMLLabelRangeContext(
ScXMLImport& rImport,
- const uno::Reference< xml::sax::XFastAttributeList >& xAttrList ) :
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
ScXMLImportContext( rImport ),
bColumnOrientation( 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())
{
@@ -90,12 +89,6 @@ ScXMLLabelRangeContext::~ScXMLLabelRangeContext()
{
}
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLLabelRangeContext::createFastChildContext(
- sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
-{
- return new SvXMLImportContext( GetImport() );
-}
-
void SAL_CALL ScXMLLabelRangeContext::endFastElement( sal_Int32 /*nElement*/ )
{
// Label ranges must be stored as strings until all sheets are loaded
diff --git a/sc/source/filter/xml/xmllabri.hxx b/sc/source/filter/xml/xmllabri.hxx
index 873f249a417e..99b74172cab3 100644
--- a/sc/source/filter/xml/xmllabri.hxx
+++ b/sc/source/filter/xml/xmllabri.hxx
@@ -48,15 +48,10 @@ private:
public:
ScXMLLabelRangeContext(
ScXMLImport& rImport,
- const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList
);
virtual ~ScXMLLabelRangeContext() 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;
virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
};
diff --git a/sc/source/filter/xml/xmlmappingi.cxx b/sc/source/filter/xml/xmlmappingi.cxx
index 9560a6e98979..1c0a518afb97 100644
--- a/sc/source/filter/xml/xmlmappingi.cxx
+++ b/sc/source/filter/xml/xmlmappingi.cxx
@@ -41,12 +41,14 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLMappingsContext::c
const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
{
SvXMLImportContext *pContext = nullptr;
+ sax_fastparser::FastAttributeList *pAttribList =
+ sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
switch( nElement )
{
case XML_ELEMENT( CALC_EXT, XML_DATA_MAPPING ):
{
- pContext = new ScXMLMappingContext( GetScImport(), xAttrList );
+ pContext = new ScXMLMappingContext( GetScImport(), pAttribList );
}
break;
}
@@ -58,7 +60,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLMappingsContext::c
}
ScXMLMappingContext::ScXMLMappingContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList) :
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
ScXMLImportContext( rImport )
{
OUString aProvider;
@@ -66,14 +68,11 @@ ScXMLMappingContext::ScXMLMappingContext( ScXMLImport& rImport,
OUString aURL;
// OUString aFrequency;
OUString aDBName;
- 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( XLINK, XML_HREF ):
{
@@ -122,14 +121,4 @@ ScXMLMappingContext::~ScXMLMappingContext()
{
}
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLMappingContext::createFastChildContext(
- sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
-{
- return new SvXMLImportContext( GetImport() );
-}
-
-void SAL_CALL ScXMLMappingContext::endFastElement( sal_Int32 /*nElement*/ )
-{
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlmappingi.hxx b/sc/source/filter/xml/xmlmappingi.hxx
index deba994608f3..41129c8a1c0d 100644
--- a/sc/source/filter/xml/xmlmappingi.hxx
+++ b/sc/source/filter/xml/xmlmappingi.hxx
@@ -35,14 +35,9 @@ class ScXMLMappingContext : public ScXMLImportContext
public:
ScXMLMappingContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList);
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
virtual ~ScXMLMappingContext() 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;
-
- virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
};
diff --git a/sc/source/filter/xml/xmlnexpi.cxx b/sc/source/filter/xml/xmlnexpi.cxx
index b59dfc313138..15e6919e45bc 100644
--- a/sc/source/filter/xml/xmlnexpi.cxx
+++ b/sc/source/filter/xml/xmlnexpi.cxx
@@ -64,16 +64,18 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLNamedExpressionsCo
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_NAMED_RANGE ):
pContext = new ScXMLNamedRangeContext(
- GetScImport(), xAttrList, mpInserter.get() );
+ GetScImport(), pAttribList, mpInserter.get() );
break;
case XML_ELEMENT( TABLE, XML_NAMED_EXPRESSION ):
pContext = new ScXMLNamedExpressionContext(
- GetScImport(), xAttrList, mpInserter.get() );
+ GetScImport(), pAttribList, mpInserter.get() );
break;
}
@@ -85,7 +87,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLNamedExpressionsCo
ScXMLNamedRangeContext::ScXMLNamedRangeContext(
ScXMLImport& rImport,
- const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLNamedExpressionsContext::Inserter* pInserter ) :
ScXMLImportContext( rImport ),
mpInserter(pInserter)
@@ -100,12 +102,9 @@ ScXMLNamedRangeContext::ScXMLNamedRangeContext(
GetScImport().GetDocument()->GetStorageGrammar(),
formula::FormulaGrammar::CONV_OOO);
- 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())
{
@@ -132,15 +131,9 @@ ScXMLNamedRangeContext::~ScXMLNamedRangeContext()
{
}
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLNamedRangeContext::createFastChildContext(
- sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
-{
- return new SvXMLImportContext( GetImport() );
-}
-
ScXMLNamedExpressionContext::ScXMLNamedExpressionContext(
ScXMLImport& rImport,
- const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLNamedExpressionsContext::Inserter* pInserter ) :
ScXMLImportContext( rImport ),
mpInserter(pInserter)
@@ -150,12 +143,9 @@ ScXMLNamedExpressionContext::ScXMLNamedExpressionContext(
ScMyNamedExpression* pNamedExpression(new ScMyNamedExpression);
- 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())
{
@@ -181,10 +171,4 @@ ScXMLNamedExpressionContext::~ScXMLNamedExpressionContext()
{
}
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLNamedExpressionContext::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/xmlnexpi.hxx b/sc/source/filter/xml/xmlnexpi.hxx
index 904f7daf1373..26c8a055fc08 100644
--- a/sc/source/filter/xml/xmlnexpi.hxx
+++ b/sc/source/filter/xml/xmlnexpi.hxx
@@ -88,14 +88,11 @@ public:
ScXMLNamedRangeContext(
ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLNamedExpressionsContext::Inserter* pInserter );
virtual ~ScXMLNamedRangeContext() 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;
-
private:
ScXMLNamedExpressionsContext::Inserter* mpInserter;
};
@@ -106,14 +103,11 @@ public:
ScXMLNamedExpressionContext(
ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLNamedExpressionsContext::Inserter* pInserter );
virtual ~ScXMLNamedExpressionContext() 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;
-
private:
ScXMLNamedExpressionsContext::Inserter* mpInserter;
};
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index b27c08baa782..b3b9c8705e2e 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -44,21 +44,18 @@ using namespace com::sun::star;
using namespace xmloff::token;
ScXMLTableRowContext::ScXMLTableRowContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList ) :
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
ScXMLImportContext( rImport ),
sVisibility(GetXMLToken(XML_VISIBLE)),
nRepeatedRows(1),
bHasCell(false)
{
OUString sCellStyleName;
- 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() )
+ switch (it.getToken())
{
case XML_ELEMENT( TABLE, XML_STYLE_NAME ):
{
@@ -103,6 +100,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
const uno::Reference< xml::sax::XFastAttributeList > & xAttrList )
{
SvXMLImportContext *pContext(nullptr);
+ sax_fastparser::FastAttributeList *pAttribList =
+ sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
switch( nElement )
{
@@ -111,7 +110,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
{
bHasCell = true;
pContext = new ScXMLTableRowCellContext( GetScImport(),
- xAttrList, false, static_cast<SCROW>(nRepeatedRows)
+ pAttribList, false, static_cast<SCROW>(nRepeatedRows)
//this
);
}
@@ -121,7 +120,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
{
bHasCell = true;
pContext = new ScXMLTableRowCellContext( GetScImport(),
- xAttrList, true, static_cast<SCROW>(nRepeatedRows)
+ pAttribList, true, static_cast<SCROW>(nRepeatedRows)
//this
);
}
@@ -206,7 +205,7 @@ void SAL_CALL ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/)
}
ScXMLTableRowsContext::ScXMLTableRowsContext( 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 ),
@@ -227,12 +226,10 @@ ScXMLTableRowsContext::ScXMLTableRowsContext( ScXMLImport& rImport,
{
nGroupStartRow = rImport.GetTables().GetCurrentRow();
++nGroupStartRow;
- 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() )
+ auto &aIter( rAttrList->find( XML_ELEMENT( TABLE, XML_DISPLAY ) ) );
+ if (aIter != rAttrList->end())
bGroupDisplay = IsXMLToken( aIter, XML_TRUE );
}
}
@@ -247,23 +244,25 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
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_ROW_GROUP ):
- pContext = new ScXMLTableRowsContext( GetScImport(), xAttrList,
+ pContext = new ScXMLTableRowsContext( GetScImport(), pAttribList,
false, true );
break;
case XML_ELEMENT( TABLE, XML_TABLE_HEADER_ROWS ):
- pContext = new ScXMLTableRowsContext( GetScImport(), xAttrList,
+ pContext = new ScXMLTableRowsContext( GetScImport(), pAttribList,
true, false );
break;
case XML_ELEMENT( TABLE, XML_TABLE_ROWS ):
- pContext = new ScXMLTableRowsContext( GetScImport(), xAttrList,
+ pContext = new ScXMLTableRowsContext( GetScImport(), pAttribList,
false, false );
break;
case XML_ELEMENT( TABLE, XML_TABLE_ROW ):
- pContext = new ScXMLTableRowContext( GetScImport(), xAttrList );
+ pContext = new ScXMLTableRowContext( GetScImport(), pAttribList );
break;
}
diff --git a/sc/source/filter/xml/xmlrowi.hxx b/sc/source/filter/xml/xmlrowi.hxx
index 0bcc6f595467..484f9ba606fd 100644
--- a/sc/source/filter/xml/xmlrowi.hxx
+++ b/sc/source/filter/xml/xmlrowi.hxx
@@ -36,7 +36,7 @@ class ScXMLTableRowContext : public ScXMLImportContext
public:
ScXMLTableRowContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList );
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
virtual ~ScXMLTableRowContext() override;
@@ -58,7 +58,7 @@ class ScXMLTableRowsContext : public ScXMLImportContext
public:
ScXMLTableRowsContext( 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 ~ScXMLTableRowsContext() override;
diff --git a/sc/source/filter/xml/xmlsceni.cxx b/sc/source/filter/xml/xmlsceni.cxx
index b82087a9842a..7e8155a7fd13 100644
--- a/sc/source/filter/xml/xmlsceni.cxx
+++ b/sc/source/filter/xml/xmlsceni.cxx
@@ -37,7 +37,7 @@ using namespace xmloff::token;
ScXMLTableScenarioContext::ScXMLTableScenarioContext(
ScXMLImport& rImport,
- const uno::Reference< xml::sax::XFastAttributeList >& xAttrList ):
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ):
ScXMLImportContext( rImport ),
aBorderColor( COL_BLACK ),
bDisplayBorder( true ),
@@ -49,12 +49,9 @@ ScXMLTableScenarioContext::ScXMLTableScenarioContext(
{
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())
{
@@ -100,12 +97,6 @@ ScXMLTableScenarioContext::~ScXMLTableScenarioContext()
GetScImport().UnlockSolarMutex();
}
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLTableScenarioContext::createFastChildContext(
- sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
-{
- return new SvXMLImportContext( GetImport() );
-}
-
void SAL_CALL ScXMLTableScenarioContext::endFastElement( sal_Int32 /*nElement*/ )
{
SCTAB nCurrTable( GetScImport().GetTables().GetCurrentSheet() );
diff --git a/sc/source/filter/xml/xmlsceni.hxx b/sc/source/filter/xml/xmlsceni.hxx
index a59f0ccde252..7edc2dd98c06 100644
--- a/sc/source/filter/xml/xmlsceni.hxx
+++ b/sc/source/filter/xml/xmlsceni.hxx
@@ -43,13 +43,10 @@ private:
public:
ScXMLTableScenarioContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList );
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
virtual ~ScXMLTableScenarioContext() 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;
-
virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
};
diff --git a/sc/source/filter/xml/xmlsorti.cxx b/sc/source/filter/xml/xmlsorti.cxx
index 5c4024fe15d5..8e2d0123572b 100644
--- a/sc/source/filter/xml/xmlsorti.cxx
+++ b/sc/source/filter/xml/xmlsorti.cxx
@@ -34,8 +34,7 @@ using namespace com::sun::star;
using namespace xmloff::token;
ScXMLSortContext::ScXMLSortContext( ScXMLImport& rImport,
- const css::uno::Reference<
- css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext) :
ScXMLImportContext( rImport ),
pDatabaseRangeContext(pTempDatabaseRangeContext),
@@ -46,12 +45,9 @@ ScXMLSortContext::ScXMLSortContext( ScXMLImport& rImport,
bIsCaseSensitive(false),
bEnabledUserList(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())
{
@@ -114,12 +110,14 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSortContext::creat
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_SORT_BY ):
{
- pContext = new ScXMLSortByContext( GetScImport(), nElement, xAttrList, this );
+ pContext = new ScXMLSortByContext( GetScImport(), nElement, pAttribList, this );
}
break;
}
@@ -202,19 +200,16 @@ void ScXMLSortContext::AddSortField(const OUString& sFieldNumber, const OUString
ScXMLSortByContext::ScXMLSortByContext( ScXMLImport& rImport,
sal_Int32 /*nElement*/,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLSortContext* pTempSortContext) :
ScXMLImportContext( rImport ),
pSortContext(pTempSortContext),
sDataType(GetXMLToken(XML_AUTOMATIC)),
sOrder(GetXMLToken(XML_ASCENDING))
{
- 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/xmlsorti.hxx b/sc/source/filter/xml/xmlsorti.hxx
index 41f60b1e4651..e53d861caeb1 100644
--- a/sc/source/filter/xml/xmlsorti.hxx
+++ b/sc/source/filter/xml/xmlsorti.hxx
@@ -47,7 +47,7 @@ class ScXMLSortContext : public ScXMLImportContext
public:
ScXMLSortContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
virtual ~ScXMLSortContext() override;
@@ -71,7 +71,7 @@ class ScXMLSortByContext : public ScXMLImportContext
public:
ScXMLSortByContext( ScXMLImport& rImport, sal_Int32 nElement,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList,
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLSortContext* pTempSortContext);
virtual ~ScXMLSortByContext() override;
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index 969ff25cb0b2..a0cd76246fc7 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -131,7 +131,7 @@ ScXMLExternalTabData::ScXMLExternalTabData() :
}
ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList ) :
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
ScXMLImportContext( rImport ),
nStartOffset(-1),
bStartFormPage(false),
@@ -144,14 +144,11 @@ ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport,
OUString sName;
OUString sStyleName;
- 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() )
+ switch (it.getToken())
{
case XML_ELEMENT( TABLE, XML_NAME ):
sName = it.toString();
@@ -257,6 +254,9 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
ScXMLTableContext::createFastChildContext( sal_Int32 nElement,
const uno::Reference< xml::sax::XFastAttributeList > & xAttrList )
{
+ sax_fastparser::FastAttributeList *pAttribList =
+ sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+
if (pExternalRefInfo.get())
{
// We only care about the table-row and table-source elements for
@@ -271,10 +271,10 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
GetScImport(), *pExternalRefInfo);
case XML_ELEMENT( TABLE, XML_TABLE_ROW ):
return new ScXMLExternalRefRowContext(
- GetScImport(), xAttrList, *pExternalRefInfo);
+ GetScImport(), pAttribList, *pExternalRefInfo);
case XML_ELEMENT( TABLE, XML_TABLE_SOURCE ):
return new ScXMLExternalRefTabSourceContext(
- GetScImport(), xAttrList, *pExternalRefInfo);
+ GetScImport(), pAttribList, *pExternalRefInfo);
default:
;
}
@@ -294,45 +294,45 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
}
break;
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;
case XML_ELEMENT( TABLE, XML_TABLE_PROTECTION ):
case XML_ELEMENT( LO_EXT, XML_TABLE_PROTECTION ):
case XML_ELEMENT( OFFICE_EXT, XML_TABLE_PROTECTION ):
- pContext = new ScXMLTableProtectionContext( GetScImport(), xAttrList );
+ pContext = new ScXMLTableProtectionContext( GetScImport(), pAttribList );
break;
case XML_ELEMENT( TABLE, XML_TABLE_ROW_GROUP ):
- pContext = new ScXMLTableRowsContext( GetScImport(), xAttrList,
+ pContext = new ScXMLTableRowsContext( GetScImport(), pAttribList,
false, true );
break;
case XML_ELEMENT( TABLE, XML_TABLE_HEADER_ROWS ):
- pContext = new ScXMLTableRowsContext( GetScImport(), xAttrList,
+ pContext = new ScXMLTableRowsContext( GetScImport(), pAttribList,
true, false );
break;
case XML_ELEMENT( TABLE, XML_TABLE_ROWS ):
- pContext = new ScXMLTableRowsContext( GetScImport(), xAttrList,
+ pContext = new ScXMLTableRowsContext( GetScImport(), pAttribList,
false, false );
break;
case XML_ELEMENT( TABLE, XML_TABLE_ROW ):
- pContext = new ScXMLTableRowContext( GetScImport(),xAttrList );
+ pContext = new ScXMLTableRowContext( GetScImport(), pAttribList );
break;
case XML_ELEMENT( TABLE, XML_TABLE_SOURCE ):
- pContext = new ScXMLTableSourceContext( GetScImport(), xAttrList);
+ pContext = new ScXMLTableSourceContext( GetScImport(), pAttribList);
break;
case XML_ELEMENT( TABLE, XML_SCENARIO ):
- pContext = new ScXMLTableScenarioContext( GetScImport(), xAttrList);
+ pContext = new ScXMLTableScenarioContext( GetScImport(), pAttribList);
break;
case XML_ELEMENT( TABLE, XML_SHAPES ):
pContext = new ScXMLTableShapesContext( GetScImport() );
@@ -430,7 +430,7 @@ void SAL_CALL ScXMLTableContext::endFastElement(sal_Int32 /*nElement*/)
ScXMLTableProtectionContext::ScXMLTableProtectionContext(
ScXMLImport& rImport,
- const Reference< xml::sax::XFastAttributeList>& xAttrList ) :
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) :
ScXMLImportContext( rImport )
{
bool bSelectProtectedCells = false;
@@ -440,16 +440,12 @@ ScXMLTableProtectionContext::ScXMLTableProtectionContext(
bool bDeleteColumns = false;
bool bDeleteRows = false;
- 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)
-
{
case XML_ELEMENT( TABLE, XML_SELECT_PROTECTED_CELLS ):
case XML_ELEMENT( OFFICE_EXT, XML_SELECT_PROTECTED_CELLS ):
diff --git a/sc/source/filter/xml/xmltabi.hxx b/sc/source/filter/xml/xmltabi.hxx
index ba8822145aad..f880a6ad18c8 100644
--- a/sc/source/filter/xml/xmltabi.hxx
+++ b/sc/source/filter/xml/xmltabi.hxx
@@ -49,7 +49,7 @@ class ScXMLTableContext : public ScXMLImportContext
public:
ScXMLTableContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList );
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
virtual ~ScXMLTableContext() override;
@@ -68,7 +68,7 @@ class ScXMLTableProtectionContext : public ScXMLImportContext
{
public:
ScXMLTableProtectionContext( ScXMLImport& rImport,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList );
+ const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
virtual ~ScXMLTableProtectionContext() override;