[Libreoffice-commits] core.git: dbaccess/source include/sax linguistic/source oox/source reportdesign/source sc/source starmath/source svx/source sw/source unoxml/source writerfilter/source xmloff/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 28 11:26:03 UTC 2020
dbaccess/source/filter/xml/xmlColumn.cxx | 4
dbaccess/source/filter/xml/xmlComponent.cxx | 4
dbaccess/source/filter/xml/xmlConnectionResource.cxx | 4
dbaccess/source/filter/xml/xmlDataSource.cxx | 4
dbaccess/source/filter/xml/xmlDataSourceInfo.cxx | 4
dbaccess/source/filter/xml/xmlDataSourceSetting.cxx | 4
dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx | 4
dbaccess/source/filter/xml/xmlHierarchyCollection.cxx | 4
dbaccess/source/filter/xml/xmlLogin.cxx | 4
dbaccess/source/filter/xml/xmlQuery.cxx | 4
dbaccess/source/filter/xml/xmlServerDatabase.cxx | 4
dbaccess/source/filter/xml/xmlTable.cxx | 8 -
include/sax/fastattribs.hxx | 15 +-
linguistic/source/convdicxml.cxx | 34 +----
oox/source/helper/attributelist.cxx | 2
reportdesign/source/filter/xml/xmlCell.cxx | 4
reportdesign/source/filter/xml/xmlColumn.cxx | 4
reportdesign/source/filter/xml/xmlComponent.cxx | 4
reportdesign/source/filter/xml/xmlCondPrtExpr.cxx | 4
reportdesign/source/filter/xml/xmlControlProperty.cxx | 4
reportdesign/source/filter/xml/xmlFormatCondition.cxx | 4
reportdesign/source/filter/xml/xmlFormattedField.cxx | 4
reportdesign/source/filter/xml/xmlFunction.cxx | 4
reportdesign/source/filter/xml/xmlGroup.cxx | 4
reportdesign/source/filter/xml/xmlImage.cxx | 4
reportdesign/source/filter/xml/xmlMasterFields.cxx | 4
reportdesign/source/filter/xml/xmlReport.cxx | 4
reportdesign/source/filter/xml/xmlReportElement.cxx | 4
reportdesign/source/filter/xml/xmlSection.cxx | 4
reportdesign/source/filter/xml/xmlTable.cxx | 4
sc/source/filter/xml/XMLCalculationSettingsContext.cxx | 2
sc/source/filter/xml/XMLDDELinksContext.cxx | 6
sc/source/filter/xml/XMLDetectiveContext.cxx | 2
sc/source/filter/xml/XMLTrackedChangesContext.cxx | 28 +---
sc/source/filter/xml/celltextparacontext.cxx | 76 ++++-------
sc/source/filter/xml/xmlbodyi.cxx | 2
sc/source/filter/xml/xmlcelli.cxx | 2
sc/source/filter/xml/xmlcoli.cxx | 2
sc/source/filter/xml/xmlcondformat.cxx | 10 -
sc/source/filter/xml/xmlconti.cxx | 4
sc/source/filter/xml/xmlcvali.cxx | 4
sc/source/filter/xml/xmldpimp.cxx | 18 +-
sc/source/filter/xml/xmldrani.cxx | 14 +-
sc/source/filter/xml/xmlexternaltabi.cxx | 4
sc/source/filter/xml/xmlfilti.cxx | 14 +-
sc/source/filter/xml/xmlimprt.cxx | 2
sc/source/filter/xml/xmllabri.cxx | 2
sc/source/filter/xml/xmlmappingi.cxx | 2
sc/source/filter/xml/xmlnexpi.cxx | 2
sc/source/filter/xml/xmlrowi.cxx | 4
sc/source/filter/xml/xmlsorti.cxx | 2
sc/source/filter/xml/xmltabi.cxx | 2
sc/source/filter/xml/xmltransformationi.cxx | 103 ++++------------
starmath/source/mathmlimport.cxx | 40 ++----
svx/source/xml/xmlxtimp.cxx | 4
sw/source/core/swg/SwXMLSectionList.cxx | 5
sw/source/uibase/config/StoredChapterNumbering.cxx | 5
unoxml/source/dom/saxbuilder.cxx | 5
writerfilter/source/ooxml/OOXMLFactory.cxx | 24 +--
xmloff/source/core/DocumentSettingsContext.cxx | 12 -
xmloff/source/core/xmlictxt.cxx | 5
xmloff/source/core/xmlimp.cxx | 8 -
xmloff/source/draw/animationimport.cxx | 8 -
xmloff/source/draw/animimp.cxx | 8 -
xmloff/source/draw/ximpbody.cxx | 4
xmloff/source/draw/ximpnote.cxx | 4
xmloff/source/draw/ximppage.cxx | 8 -
xmloff/source/draw/ximpshow.cxx | 8 -
xmloff/source/draw/ximpstyl.cxx | 4
xmloff/source/meta/xmlversion.cxx | 8 -
xmloff/source/script/XMLEventsImportContext.cxx | 4
xmloff/source/text/XMLSectionSourceDDEImportContext.cxx | 5
xmloff/source/text/txtparai.cxx | 4
73 files changed, 224 insertions(+), 419 deletions(-)
New commits:
commit 1705fbe9daac56ee9bea8d8fd7c7f57e2bec49b5
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Apr 28 12:29:17 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Apr 28 13:25:27 2020 +0200
move the castToFastAttributeList function
to the slightly higher namespace, to make it easy and more readable to
use directly in a for-loop-range expression.
And make it return a reference rather than a pointer, since it is never
allowed to be nullptr.
Change-Id: I15d0b32493ef65cfc601b247c272b318f1eadfd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93049
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/dbaccess/source/filter/xml/xmlColumn.cxx b/dbaccess/source/filter/xml/xmlColumn.cxx
index fdd343555cdf..334c4fbfcbe4 100644
--- a/dbaccess/source/filter/xml/xmlColumn.cxx
+++ b/dbaccess/source/filter/xml/xmlColumn.cxx
@@ -46,9 +46,7 @@ OXMLColumn::OXMLColumn( ODBFilter& rImport
,m_bHidden(false)
{
OUString sType;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/dbaccess/source/filter/xml/xmlComponent.cxx b/dbaccess/source/filter/xml/xmlComponent.cxx
index f2be6482acde..863a98f1673b 100644
--- a/dbaccess/source/filter/xml/xmlComponent.cxx
+++ b/dbaccess/source/filter/xml/xmlComponent.cxx
@@ -44,9 +44,7 @@ OXMLComponent::OXMLComponent( ODBFilter& rImport
OUString sHREF;
bool bAsTemplate(false);
static const OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE);
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/dbaccess/source/filter/xml/xmlConnectionResource.cxx b/dbaccess/source/filter/xml/xmlConnectionResource.cxx
index 768ca19840fc..b2c37fc3584a 100644
--- a/dbaccess/source/filter/xml/xmlConnectionResource.cxx
+++ b/dbaccess/source/filter/xml/xmlConnectionResource.cxx
@@ -40,9 +40,7 @@ OXMLConnectionResource::OXMLConnectionResource( ODBFilter& rImport,
if (!xDataSource.is())
return;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
aProperty.Name.clear();
diff --git a/dbaccess/source/filter/xml/xmlDataSource.cxx b/dbaccess/source/filter/xml/xmlDataSource.cxx
index 66f1ab44f979..53095dfe0e2f 100644
--- a/dbaccess/source/filter/xml/xmlDataSource.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSource.cxx
@@ -52,9 +52,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
static const OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE);
if (xDataSource.is())
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
index 502d0cd4f34b..82ab36eb2c75 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
@@ -37,9 +37,7 @@ OXMLDataSourceInfo::OXMLDataSourceInfo( ODBFilter& rImport
PropertyValue aProperty;
bool bAutoEnabled = false;
bool bFoundField = false,bFoundThousand = false, bFoundCharset = false;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
index 3432c33bbba7..3b7e6d512dc9 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
@@ -45,9 +45,7 @@ OXMLDataSourceSetting::OXMLDataSourceSetting( ODBFilter& rImport
m_aPropType = cppu::UnoType<void>::get();
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
index 5d7207a98486..8070790e4e8c 100644
--- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
@@ -42,9 +42,7 @@ OXMLFileBasedDatabase::OXMLFileBasedDatabase( ODBFilter& rImport,
OUString sLocation,sMediaType,sFileTypeExtension;
if (xDataSource.is())
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
index 79035c07bdac..d542a1ad7807 100644
--- a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
+++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
@@ -46,9 +46,7 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport
,m_sComponentServiceName(_sComponentServiceName)
{
OUString sName;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/dbaccess/source/filter/xml/xmlLogin.cxx b/dbaccess/source/filter/xml/xmlLogin.cxx
index c94f0a07162d..c74d98be7ddd 100644
--- a/dbaccess/source/filter/xml/xmlLogin.cxx
+++ b/dbaccess/source/filter/xml/xmlLogin.cxx
@@ -41,9 +41,7 @@ OXMLLogin::OXMLLogin( ODBFilter& rImport,
if (!xDataSource.is())
return;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx
index cd52e183c08b..7ab4940da9d2 100644
--- a/dbaccess/source/filter/xml/xmlQuery.cxx
+++ b/dbaccess/source/filter/xml/xmlQuery.cxx
@@ -41,9 +41,7 @@ OXMLQuery::OXMLQuery( ODBFilter& rImport
OXMLTable( rImport, _xAttrList,_xParentContainer, "com.sun.star.sdb.CommandDefinition" )
,m_bEscapeProcessing(true)
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.cxx b/dbaccess/source/filter/xml/xmlServerDatabase.cxx
index ad5d51c21aa3..87ff119b5a79 100644
--- a/dbaccess/source/filter/xml/xmlServerDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlServerDatabase.cxx
@@ -40,9 +40,7 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport,
OUString sType,sHostName,sPortNumber,sDatabaseName;
if (xDataSource.is())
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx
index 18c7f25dbaf3..9477f13faf54 100644
--- a/dbaccess/source/filter/xml/xmlTable.cxx
+++ b/dbaccess/source/filter/xml/xmlTable.cxx
@@ -49,9 +49,7 @@ OXMLTable::OXMLTable( ODBFilter& _rImport
,m_bApplyFilter(false)
,m_bApplyOrder(false)
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
@@ -200,9 +198,7 @@ void OXMLTable::fillAttributes(const uno::Reference< XFastAttributeList > & _xAt
,OUString& _rsTableCatalog
)
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx
index 60090f88f2f5..1c89afeb04cb 100644
--- a/include/sax/fastattribs.hxx
+++ b/include/sax/fastattribs.hxx
@@ -70,6 +70,7 @@ class SAX_DLLPUBLIC FastTokenHandlerBase :
const char *pStr, size_t nLength );
};
+
class SAX_DLLPUBLIC FastAttributeList final : public cppu::WeakImplHelper< css::xml::sax::XFastAttributeList >
{
public:
@@ -118,13 +119,6 @@ public:
return -1;
}
- static FastAttributeList* castToFastAttributeList(
- const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
- {
- assert( dynamic_cast <FastAttributeList *> ( xAttrList.get() ) != nullptr );
- return static_cast <FastAttributeList *> ( xAttrList.get() );
- }
-
/// Use for fast iteration and conversion of attributes
class FastAttributeIter {
const FastAttributeList &mrList;
@@ -210,6 +204,13 @@ private:
FastTokenHandlerBase * mpTokenHandler;
};
+inline FastAttributeList& castToFastAttributeList(
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
+{
+ assert( dynamic_cast <FastAttributeList *> ( xAttrList.get() ) != nullptr );
+ return *static_cast <FastAttributeList *> ( xAttrList.get() );
+}
+
}
#endif
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index 99e9959957ff..a581e86ce36a 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -181,24 +181,18 @@ css::uno::Reference<XFastContextHandler> ConvDicXMLImportContext::createFastChil
void ConvDicXMLDictionaryContext_Impl::startFastElement( sal_Int32 /*nElement*/,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& rxAttrList )
{
- if ( rxAttrList.is() )
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( rxAttrList ))
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( rxAttrList );
-
- for (auto &aIter : *pAttribList)
+ switch (aIter.getToken())
{
- switch (aIter.getToken())
- {
- case XML_NAMESPACE_TCD | XML_LANG:
- nLanguage = LanguageTag::convertToLanguageType( aIter.toString() );
- break;
- case XML_NAMESPACE_TCD | XML_CONVERSION_TYPE:
- nConversionType = GetConversionTypeFromText( aIter.toString() );
- break;
- default:
- ;
- }
+ case XML_NAMESPACE_TCD | XML_LANG:
+ nLanguage = LanguageTag::convertToLanguageType( aIter.toString() );
+ break;
+ case XML_NAMESPACE_TCD | XML_CONVERSION_TYPE:
+ nConversionType = GetConversionTypeFromText( aIter.toString() );
+ break;
+ default:
+ ;
}
}
GetConvDicImport().SetLanguage( nLanguage );
@@ -228,13 +222,7 @@ void ConvDicXMLEntryTextContext_Impl::startFastElement(
sal_Int32 /*Element*/,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& rxAttrList )
{
- if ( !rxAttrList.is() )
- return;
-
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( rxAttrList );
-
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( rxAttrList ))
{
switch (aIter.getToken())
{
diff --git a/oox/source/helper/attributelist.cxx b/oox/source/helper/attributelist.cxx
index feb0e37a15af..725ebde132fd 100644
--- a/oox/source/helper/attributelist.cxx
+++ b/oox/source/helper/attributelist.cxx
@@ -139,7 +139,7 @@ sax_fastparser::FastAttributeList *AttributeList::getAttribList() const
{
if( mpAttribList == nullptr )
{
- mpAttribList = sax_fastparser::FastAttributeList::castToFastAttributeList( mxAttribs );
+ mpAttribList = &sax_fastparser::castToFastAttributeList( mxAttribs );
}
return mpAttribList;
}
diff --git a/reportdesign/source/filter/xml/xmlCell.cxx b/reportdesign/source/filter/xml/xmlCell.cxx
index d61de6a70318..98fda0bf9490 100644
--- a/reportdesign/source/filter/xml/xmlCell.cxx
+++ b/reportdesign/source/filter/xml/xmlCell.cxx
@@ -61,9 +61,7 @@ OXMLCell::OXMLCell( ORptFilter& rImport
if ( !m_pCell )
m_pCell = this;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlColumn.cxx b/reportdesign/source/filter/xml/xmlColumn.cxx
index 753dfbe1b35c..a9fbb05a417b 100644
--- a/reportdesign/source/filter/xml/xmlColumn.cxx
+++ b/reportdesign/source/filter/xml/xmlColumn.cxx
@@ -53,9 +53,7 @@ OXMLRowColumn::OXMLRowColumn( ORptFilter& rImport
SvXMLImportContext( rImport )
,m_pContainer(_pContainer)
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlComponent.cxx b/reportdesign/source/filter/xml/xmlComponent.cxx
index bc97551de846..4822a9cc5228 100644
--- a/reportdesign/source/filter/xml/xmlComponent.cxx
+++ b/reportdesign/source/filter/xml/xmlComponent.cxx
@@ -48,9 +48,7 @@ OXMLComponent::OXMLComponent( ORptFilter& _rImport
{
OSL_ENSURE(m_xComponent.is(),"Component is NULL!");
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
index e4f4fb9a39b4..7c3b7967652e 100644
--- a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
+++ b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
@@ -44,9 +44,7 @@ OXMLCondPrtExpr::OXMLCondPrtExpr( ORptFilter& _rImport
OSL_ENSURE(m_xComponent.is(),"Component is NULL!");
try
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx
index 3fa9d751c379..f84120f124ee 100644
--- a/reportdesign/source/filter/xml/xmlControlProperty.cxx
+++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx
@@ -63,9 +63,7 @@ OXMLControlProperty::OXMLControlProperty( ORptFilter& rImport
OSL_ENSURE(m_xControl.is(),"Control is NULL!");
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlFormatCondition.cxx b/reportdesign/source/filter/xml/xmlFormatCondition.cxx
index 15532e27e718..e802c9c5c902 100644
--- a/reportdesign/source/filter/xml/xmlFormatCondition.cxx
+++ b/reportdesign/source/filter/xml/xmlFormatCondition.cxx
@@ -51,9 +51,7 @@ OXMLFormatCondition::OXMLFormatCondition( ORptFilter& rImport,
static const OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE);
try
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlFormattedField.cxx b/reportdesign/source/filter/xml/xmlFormattedField.cxx
index 348f9858c4cc..483dbfb53768 100644
--- a/reportdesign/source/filter/xml/xmlFormattedField.cxx
+++ b/reportdesign/source/filter/xml/xmlFormattedField.cxx
@@ -47,9 +47,7 @@ OXMLFormattedField::OXMLFormattedField( ORptFilter& rImport
try
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlFunction.cxx b/reportdesign/source/filter/xml/xmlFunction.cxx
index e933e603d2ac..96455cb2c1dd 100644
--- a/reportdesign/source/filter/xml/xmlFunction.cxx
+++ b/reportdesign/source/filter/xml/xmlFunction.cxx
@@ -49,9 +49,7 @@ OXMLFunction::OXMLFunction( ORptFilter& _rImport
m_xFunction = m_xFunctions->createFunction();
static const OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE);
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx b/reportdesign/source/filter/xml/xmlGroup.cxx
index 35582b3d6907..89487dbadfaa 100644
--- a/reportdesign/source/filter/xml/xmlGroup.cxx
+++ b/reportdesign/source/filter/xml/xmlGroup.cxx
@@ -60,9 +60,7 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport
m_xGroup->setSortAscending(false);// the default value has to be set
static const OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE);
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlImage.cxx b/reportdesign/source/filter/xml/xmlImage.cxx
index a88091570873..b315d5d4dcbb 100644
--- a/reportdesign/source/filter/xml/xmlImage.cxx
+++ b/reportdesign/source/filter/xml/xmlImage.cxx
@@ -52,9 +52,7 @@ OXMLImage::OXMLImage( ORptFilter& rImport,
try
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlMasterFields.cxx b/reportdesign/source/filter/xml/xmlMasterFields.cxx
index 11d73c1f9155..bfa88e4ee7d1 100644
--- a/reportdesign/source/filter/xml/xmlMasterFields.cxx
+++ b/reportdesign/source/filter/xml/xmlMasterFields.cxx
@@ -41,9 +41,7 @@ OXMLMasterFields::OXMLMasterFields( ORptFilter& rImport,
,m_pReport(_pReport)
{
OUString sMasterField,sDetailField;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlReport.cxx b/reportdesign/source/filter/xml/xmlReport.cxx
index 485dcf218989..eff07eca1803 100644
--- a/reportdesign/source/filter/xml/xmlReport.cxx
+++ b/reportdesign/source/filter/xml/xmlReport.cxx
@@ -53,9 +53,7 @@ OXMLReport::OXMLReport( ORptFilter& rImport,
static const OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE);
try
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlReportElement.cxx b/reportdesign/source/filter/xml/xmlReportElement.cxx
index 9e6fdf902ae2..a6c22902852a 100644
--- a/reportdesign/source/filter/xml/xmlReportElement.cxx
+++ b/reportdesign/source/filter/xml/xmlReportElement.cxx
@@ -48,9 +48,7 @@ OXMLReportElement::OXMLReportElement( ORptFilter& rImport,
static const OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE);
try
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlSection.cxx b/reportdesign/source/filter/xml/xmlSection.cxx
index 129ea3751141..49a38f51cfc8 100644
--- a/reportdesign/source/filter/xml/xmlSection.cxx
+++ b/reportdesign/source/filter/xml/xmlSection.cxx
@@ -64,9 +64,7 @@ OXMLSection::OXMLSection( ORptFilter& rImport,
static const OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE);
try
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/reportdesign/source/filter/xml/xmlTable.cxx b/reportdesign/source/filter/xml/xmlTable.cxx
index f7f376cdaf81..460f4b4e8282 100644
--- a/reportdesign/source/filter/xml/xmlTable.cxx
+++ b/reportdesign/source/filter/xml/xmlTable.cxx
@@ -75,9 +75,7 @@ OXMLTable::OXMLTable( ORptFilter& rImport
static const OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE);
try
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( _xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
index 0e65e541afcd..9917eaaa0ba1 100644
--- a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
+++ b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
@@ -98,7 +98,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLCalculationSetting
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
if (nElement == XML_ELEMENT( TABLE, XML_NULL_DATE ))
pContext = new ScXMLNullDateContext(GetScImport(), pAttribList, this);
diff --git a/sc/source/filter/xml/XMLDDELinksContext.cxx b/sc/source/filter/xml/XMLDDELinksContext.cxx
index a99b5a2f883f..592197e5d39d 100644
--- a/sc/source/filter/xml/XMLDDELinksContext.cxx
+++ b/sc/source/filter/xml/XMLDDELinksContext.cxx
@@ -77,7 +77,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDDELinkContext::cr
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -233,7 +233,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDDETableContext::c
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -294,7 +294,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDDERowContext::cre
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
if (nElement == XML_ELEMENT( TABLE, XML_TABLE_CELL ))
pContext = new ScXMLDDECellContext(GetScImport(), pAttribList, pDDELink);
diff --git a/sc/source/filter/xml/XMLDetectiveContext.cxx b/sc/source/filter/xml/XMLDetectiveContext.cxx
index 9912aaa22663..3d62ce7076c9 100644
--- a/sc/source/filter/xml/XMLDetectiveContext.cxx
+++ b/sc/source/filter/xml/XMLDetectiveContext.cxx
@@ -73,7 +73,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDetectiveContext::
{
SvXMLImportContext* pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index 2da03d2f92e7..5f8a1368d120 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -371,7 +371,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLTrackedChangesCont
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -538,7 +538,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLCellContentDeletio
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -593,7 +593,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDependingsContext:
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
// #i80033# read both old (dependence) and new (dependency) elements
if (nElement == XML_ELEMENT( TABLE, XML_DEPENDENCE ) ||
@@ -633,7 +633,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDeletionsContext::
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -927,7 +927,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLPreviousContext::c
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
if ( nElement == XML_ELEMENT( TABLE, XML_CHANGE_TRACK_TABLE_CELL ) )
pContext = new ScXMLChangeCellContext(GetScImport(), pAttribList,
@@ -984,7 +984,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLContentChangeConte
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -1077,7 +1077,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLInsertionContext::
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -1107,9 +1107,7 @@ ScXMLInsertionCutOffContext::ScXMLInsertionCutOffContext( ScXMLImport& rImport,
{
sal_uInt32 nID(0);
sal_Int32 nPosition(0);
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
const OUString sValue = aIter.toString();
@@ -1137,9 +1135,7 @@ ScXMLMovementCutOffContext::ScXMLMovementCutOffContext( ScXMLImport& rImport,
sal_Int32 nStartPosition(0);
sal_Int32 nEndPosition(0);
bool bPosition(false);
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
const OUString sValue = aIter.toString();
@@ -1251,7 +1247,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDeletionContext::c
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -1320,7 +1316,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLMovementContext::c
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -1393,7 +1389,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLRejectionContext::
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
diff --git a/sc/source/filter/xml/celltextparacontext.cxx b/sc/source/filter/xml/celltextparacontext.cxx
index e8f6886057ab..0947890d226c 100644
--- a/sc/source/filter/xml/celltextparacontext.cxx
+++ b/sc/source/filter/xml/celltextparacontext.cxx
@@ -103,21 +103,15 @@ ScXMLCellTextSpanContext::ScXMLCellTextSpanContext(
void SAL_CALL ScXMLCellTextSpanContext::startFastElement( sal_Int32 /*nElement*/,
const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
{
- if ( xAttrList.is() )
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
- for (auto &aIter : *pAttribList)
+ switch (aIter.getToken())
{
- switch (aIter.getToken())
- {
- case XML_ELEMENT( TEXT, XML_STYLE_NAME ):
- maStyleName = aIter.toString();
- break;
- default:
- ;
- }
+ case XML_ELEMENT( TEXT, XML_STYLE_NAME ):
+ maStyleName = aIter.toString();
+ break;
+ default:
+ ;
}
}
}
@@ -255,27 +249,21 @@ void ScXMLCellFieldURLContext::SetStyleName(const OUString& rStyleName)
void SAL_CALL ScXMLCellFieldURLContext::startFastElement( sal_Int32 /*nElement*/,
const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
{
- if ( xAttrList.is() )
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
- for (auto &aIter : *pAttribList)
+ switch (aIter.getToken())
{
- switch (aIter.getToken())
- {
- case XML_ELEMENT( XLINK, XML_HREF ):
- maURL = aIter.toString();
- break;
- case XML_ELEMENT( XLINK, XML_TYPE ):
- // Ignored for now.
- break;
- case XML_ELEMENT( OFFICE, XML_TARGET_FRAME_NAME ):
- maTargetFrame = aIter.toString();
- break;
- default:
- ;
- }
+ case XML_ELEMENT( XLINK, XML_HREF ):
+ maURL = aIter.toString();
+ break;
+ case XML_ELEMENT( XLINK, XML_TYPE ):
+ // Ignored for now.
+ break;
+ case XML_ELEMENT( OFFICE, XML_TARGET_FRAME_NAME ):
+ maTargetFrame = aIter.toString();
+ break;
+ default:
+ ;
}
}
}
@@ -306,23 +294,17 @@ void ScXMLCellFieldSContext::SetStyleName(const OUString& rStyleName)
void SAL_CALL ScXMLCellFieldSContext::startFastElement( sal_Int32 /*nElement*/,
const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
{
- if ( xAttrList.is() )
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
- for (auto &aIter : *pAttribList)
+ switch (aIter.getToken())
{
- switch (aIter.getToken())
- {
- case XML_ELEMENT( TEXT, XML_C ):
- mnCount = aIter.toInt32();
- if (mnCount <= 0)
- mnCount = 1; // worth a warning?
- break;
- default:
- ;
- }
+ case XML_ELEMENT( TEXT, XML_C ):
+ mnCount = aIter.toInt32();
+ if (mnCount <= 0)
+ mnCount = 1; // worth a warning?
+ break;
+ default:
+ ;
}
}
}
diff --git a/sc/source/filter/xml/xmlbodyi.cxx b/sc/source/filter/xml/xmlbodyi.cxx
index da459b48a19a..0dd1c421d23d 100644
--- a/sc/source/filter/xml/xmlbodyi.cxx
+++ b/sc/source/filter/xml/xmlbodyi.cxx
@@ -132,7 +132,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch( nElement )
{
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index a35bd047893f..b53fe46c7146 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -688,7 +688,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLTableRowCellContex
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
// bool bTextP(false);
switch (nElement)
diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx
index 8e372b2ae7f3..d1e581553488 100644
--- a/sc/source/filter/xml/xmlcoli.cxx
+++ b/sc/source/filter/xml/xmlcoli.cxx
@@ -177,7 +177,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLTableColsContext::
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx
index bd056a8a77c3..b178927caec8 100644
--- a/sc/source/filter/xml/xmlcondformat.cxx
+++ b/sc/source/filter/xml/xmlcondformat.cxx
@@ -39,7 +39,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL ScXMLConditio
{
SvXMLImportContext* pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -110,7 +110,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL ScXMLConditio
{
SvXMLImportContext* pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -381,7 +381,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL ScXMLColorSca
{
SvXMLImportContext* pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -515,7 +515,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL ScXMLDataBarF
{
SvXMLImportContext* pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -607,7 +607,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL ScXMLIconSetF
{
SvXMLImportContext* pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
diff --git a/sc/source/filter/xml/xmlconti.cxx b/sc/source/filter/xml/xmlconti.cxx
index 41507f589f3e..b88760829bff 100644
--- a/sc/source/filter/xml/xmlconti.cxx
+++ b/sc/source/filter/xml/xmlconti.cxx
@@ -80,9 +80,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > ScXMLContentContext::c
if (nElement == XML_ELEMENT(TEXT, XML_S))
{
sal_Int32 nRepeat(0);
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
if (aIter.getToken() == XML_ELEMENT(TEXT, XML_C))
nRepeat = aIter.toInt32();
diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx
index c96572c26715..658f8007d0e7 100644
--- a/sc/source/filter/xml/xmlcvali.cxx
+++ b/sc/source/filter/xml/xmlcvali.cxx
@@ -151,7 +151,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLContentValidations
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -219,7 +219,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLContentValidationC
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index a9bc45030681..8b9bcd98325e 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -65,7 +65,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotTablesCon
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -194,7 +194,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotTableCont
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -766,7 +766,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSourceCellRangeCon
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -860,7 +860,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotFieldCont
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -1053,7 +1053,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotLevelCont
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -1214,7 +1214,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotSubTotals
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -1287,7 +1287,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotMembersCo
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -1460,7 +1460,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotGroupsCon
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
if (nElement == XML_ELEMENT( TABLE, XML_DATA_PILOT_GROUP ))
{
@@ -1493,7 +1493,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotGroupCont
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
if (nElement == XML_ELEMENT( TABLE, XML_DATA_PILOT_MEMBER ) ||
nElement == XML_ELEMENT( TABLE, XML_DATA_PILOT_GROUP_MEMBER ))
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index 181050c98458..7e7a61d50f6a 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -64,7 +64,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDatabaseRangesCont
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch( nElement )
{
@@ -196,7 +196,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDatabaseRangeConte
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -474,7 +474,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSourceSQLContext::
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
if ( nElement == XML_ELEMENT( FORM, XML_CONNECTION_RESOURCE ) && sDBName.isEmpty() )
{
@@ -524,7 +524,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSourceTableContext
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
if ( nElement == XML_ELEMENT( FORM, XML_CONNECTION_RESOURCE ) && sDBName.isEmpty() )
{
@@ -573,7 +573,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSourceQueryContext
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
if ( nElement == XML_ELEMENT( FORM, XML_CONNECTION_RESOURCE ) && sDBName.isEmpty() )
{
@@ -644,7 +644,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSubTotalRulesConte
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -751,7 +751,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSubTotalRuleContex
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
diff --git a/sc/source/filter/xml/xmlexternaltabi.cxx b/sc/source/filter/xml/xmlexternaltabi.cxx
index c8748eb7cf0e..79249b78ad66 100644
--- a/sc/source/filter/xml/xmlexternaltabi.cxx
+++ b/sc/source/filter/xml/xmlexternaltabi.cxx
@@ -127,7 +127,7 @@ Reference< XFastContextHandler > SAL_CALL ScXMLExternalRefRowsContext::createFas
const SvXMLTokenMap& rTokenMap = GetScImport().GetTableRowsElemTokenMap();
sal_uInt16 nToken = rTokenMap.Get( nElement );
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nToken)
{
@@ -182,7 +182,7 @@ 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 );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
if (nToken == XML_TOK_TABLE_ROW_CELL || nToken == XML_TOK_TABLE_ROW_COVERED_CELL)
return new ScXMLExternalRefCellContext(mrScImport, pAttribList, mrExternalRefInfo);
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index de47d97910f8..49013cfc4c6c 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -98,7 +98,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLFilterContext::cre
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -202,7 +202,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLAndContext::create
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -246,7 +246,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLOrContext::createF
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -330,7 +330,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLConditionContext::
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -518,7 +518,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDPFilterContext::c
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -577,7 +577,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDPAndContext::crea
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
@@ -618,7 +618,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDPOrContext::creat
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 05e0100e0147..02310a524091 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -336,7 +336,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
const uno::Reference< xml::sax::XFastAttributeList > & xAttrList )
{
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
return GetScImport().CreateBodyContext( pAttribList );
}
diff --git a/sc/source/filter/xml/xmllabri.cxx b/sc/source/filter/xml/xmllabri.cxx
index ef3f2fb84f4a..c7b28e8750a0 100644
--- a/sc/source/filter/xml/xmllabri.cxx
+++ b/sc/source/filter/xml/xmllabri.cxx
@@ -42,7 +42,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLLabelRangesContext
{
SvXMLImportContext* pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
diff --git a/sc/source/filter/xml/xmlmappingi.cxx b/sc/source/filter/xml/xmlmappingi.cxx
index 7e4618e25d6a..701e5221e60c 100644
--- a/sc/source/filter/xml/xmlmappingi.cxx
+++ b/sc/source/filter/xml/xmlmappingi.cxx
@@ -38,7 +38,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLMappingsContext::c
{
SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch( nElement )
{
diff --git a/sc/source/filter/xml/xmlnexpi.cxx b/sc/source/filter/xml/xmlnexpi.cxx
index 84b5482cff21..d4a37757aa06 100644
--- a/sc/source/filter/xml/xmlnexpi.cxx
+++ b/sc/source/filter/xml/xmlnexpi.cxx
@@ -61,7 +61,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLNamedExpressionsCo
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index b5edafe287d9..e23b3467428d 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -101,7 +101,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch( nElement )
{
@@ -258,7 +258,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch( nElement )
{
diff --git a/sc/source/filter/xml/xmlsorti.cxx b/sc/source/filter/xml/xmlsorti.cxx
index 066b6ab0e113..0991c275eaea 100644
--- a/sc/source/filter/xml/xmlsorti.cxx
+++ b/sc/source/filter/xml/xmlsorti.cxx
@@ -110,7 +110,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLSortContext::creat
{
SvXMLImportContext *pContext(nullptr);
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement)
{
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index 0bab6377d4ee..fe7e0ad392e1 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -244,7 +244,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
const uno::Reference< xml::sax::XFastAttributeList > & xAttrList )
{
sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
+ &sax_fastparser::castToFastAttributeList( xAttrList );
if (pExternalRefInfo)
{
diff --git a/sc/source/filter/xml/xmltransformationi.cxx b/sc/source/filter/xml/xmltransformationi.cxx
index 435d73915023..c872767a7fb0 100644
--- a/sc/source/filter/xml/xmltransformationi.cxx
+++ b/sc/source/filter/xml/xmltransformationi.cxx
@@ -32,7 +32,7 @@ uno::Reference<xml::sax::XFastContextHandler>
{
SvXMLImportContext* pContext = nullptr;
sax_fastparser::FastAttributeList* pAttribList
- = sax_fastparser::FastAttributeList::castToFastAttributeList(xAttrList);
+ = &sax_fastparser::castToFastAttributeList(xAttrList);
switch (nElement)
{
@@ -103,7 +103,7 @@ uno::Reference<xml::sax::XFastContextHandler>
sal_Int32 nElement, const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
{
sax_fastparser::FastAttributeList* pAttribList
- = sax_fastparser::FastAttributeList::castToFastAttributeList(xAttrList);
+ = &sax_fastparser::castToFastAttributeList(xAttrList);
const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList = pAttribList;
@@ -208,25 +208,19 @@ uno::Reference<xml::sax::XFastContextHandler>
SAL_CALL ScXMLColumnMergeContext::createFastChildContext(
sal_Int32 nElement, const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
{
- sax_fastparser::FastAttributeList* pAttribList
- = sax_fastparser::FastAttributeList::castToFastAttributeList(xAttrList);
- const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList = pAttribList;
switch (nElement)
{
case XML_ELEMENT(CALC_EXT, XML_COLUMN):
{
- if (rAttrList.is())
+ for (auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList))
{
- for (auto& aIter : *rAttrList)
+ switch (aIter.getToken())
{
- switch (aIter.getToken())
+ case XML_ELEMENT(CALC_EXT, XML_COLUMN):
{
- case XML_ELEMENT(CALC_EXT, XML_COLUMN):
- {
- maColumns.insert(aIter.toInt32());
- }
- break;
+ maColumns.insert(aIter.toInt32());
}
+ break;
}
}
}
@@ -302,27 +296,19 @@ uno::Reference<xml::sax::XFastContextHandler>
SAL_CALL ScXMLColumnTextContext::createFastChildContext(
sal_Int32 nElement, const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
{
- sax_fastparser::FastAttributeList* pAttribList
- = sax_fastparser::FastAttributeList::castToFastAttributeList(xAttrList);
-
- const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList = pAttribList;
-
switch (nElement)
{
case XML_ELEMENT(CALC_EXT, XML_COLUMN):
{
- if (rAttrList.is())
+ for (auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList))
{
- for (auto& aIter : *rAttrList)
+ switch (aIter.getToken())
{
- switch (aIter.getToken())
+ case XML_ELEMENT(CALC_EXT, XML_COLUMN):
{
- case XML_ELEMENT(CALC_EXT, XML_COLUMN):
- {
- maColumns.insert(aIter.toInt32());
- }
- break;
+ maColumns.insert(aIter.toInt32());
}
+ break;
}
}
}
@@ -381,26 +367,19 @@ uno::Reference<xml::sax::XFastContextHandler>
SAL_CALL ScXMLColumnAggregateContext::createFastChildContext(
sal_Int32 nElement, const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
{
- sax_fastparser::FastAttributeList* pAttribList
- = sax_fastparser::FastAttributeList::castToFastAttributeList(xAttrList);
- const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList = pAttribList;
-
switch (nElement)
{
case XML_ELEMENT(CALC_EXT, XML_COLUMN):
{
- if (rAttrList.is())
+ for (auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList))
{
- for (auto& aIter : *rAttrList)
+ switch (aIter.getToken())
{
- switch (aIter.getToken())
+ case XML_ELEMENT(CALC_EXT, XML_COLUMN):
{
- case XML_ELEMENT(CALC_EXT, XML_COLUMN):
- {
- maColumns.insert(aIter.toInt32());
- }
- break;
+ maColumns.insert(aIter.toInt32());
}
+ break;
}
}
}
@@ -482,26 +461,19 @@ uno::Reference<xml::sax::XFastContextHandler>
SAL_CALL ScXMLColumnNumberContext::createFastChildContext(
sal_Int32 nElement, const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
{
- sax_fastparser::FastAttributeList* pAttribList
- = sax_fastparser::FastAttributeList::castToFastAttributeList(xAttrList);
- const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList = pAttribList;
-
switch (nElement)
{
case XML_ELEMENT(CALC_EXT, XML_COLUMN):
{
- if (rAttrList.is())
+ for (auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList))
{
- for (auto& aIter : *rAttrList)
+ switch (aIter.getToken())
{
- switch (aIter.getToken())
+ case XML_ELEMENT(CALC_EXT, XML_COLUMN):
{
- case XML_ELEMENT(CALC_EXT, XML_COLUMN):
- {
- maColumns.insert(aIter.toInt32());
- }
- break;
+ maColumns.insert(aIter.toInt32());
}
+ break;
}
}
}
@@ -545,25 +517,19 @@ uno::Reference<xml::sax::XFastContextHandler>
SAL_CALL ScXMLColumnRemoveNullContext::createFastChildContext(
sal_Int32 nElement, const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
{
- sax_fastparser::FastAttributeList* pAttribList
- = sax_fastparser::FastAttributeList::castToFastAttributeList(xAttrList);
- const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList = pAttribList;
switch (nElement)
{
case XML_ELEMENT(CALC_EXT, XML_COLUMN):
{
- if (rAttrList.is())
+ for (auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList))
{
- for (auto& aIter : *rAttrList)
+ switch (aIter.getToken())
{
- switch (aIter.getToken())
+ case XML_ELEMENT(CALC_EXT, XML_COLUMN):
{
- case XML_ELEMENT(CALC_EXT, XML_COLUMN):
- {
- maColumns.insert(aIter.toInt32());
- }
- break;
+ maColumns.insert(aIter.toInt32());
}
+ break;
}
}
}
@@ -647,24 +613,17 @@ ScXMLDateTimeContext::~ScXMLDateTimeContext()
uno::Reference<xml::sax::XFastContextHandler> SAL_CALL ScXMLDateTimeContext::createFastChildContext(
sal_Int32 nElement, const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
{
- sax_fastparser::FastAttributeList* pAttribList
- = sax_fastparser::FastAttributeList::castToFastAttributeList(xAttrList);
- const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList = pAttribList;
-
switch (nElement)
{
case XML_ELEMENT(CALC_EXT, XML_COLUMN):
{
- if (rAttrList.is())
+ for (auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList))
{
- for (auto& aIter : *rAttrList)
+ switch (aIter.getToken())
{
- switch (aIter.getToken())
+ case XML_ELEMENT(CALC_EXT, XML_COLUMN):
{
- case XML_ELEMENT(CALC_EXT, XML_COLUMN):
- {
- maColumns.insert(aIter.toInt32());
- }
+ maColumns.insert(aIter.toInt32());
break;
}
}
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index ae0f4300d158..a4ef90a47504 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -599,9 +599,7 @@ void SmXMLContext_Helper::RetrieveAttrs(const uno::Reference<
xml::sax::XFastAttributeList > & xAttrList )
{
bool bMvFound = false;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
// sometimes they have namespace, sometimes not?
@@ -767,9 +765,7 @@ public:
void SmXMLTokenAttrHelper::RetrieveAttrs(const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
switch(aIter.getToken())
@@ -1077,9 +1073,7 @@ public:
void SmXMLFencedContext_Impl::startFastElement(sal_Int32 /*nElement*/, const uno::Reference<
xml::sax::XFastAttributeList > & xAttrList )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
switch(aIter.getToken())
@@ -1227,9 +1221,7 @@ public:
void SmXMLAnnotationContext_Impl::startFastElement(sal_Int32 /*nElement*/, const uno::Reference<
xml::sax::XFastAttributeList > & xAttrList )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
// sometimes they have namespace, sometimes not?
@@ -1443,9 +1435,7 @@ void SmXMLOperatorContext_Impl::startFastElement(sal_Int32 /*nElement*/, const u
{
maTokenAttrHelper.RetrieveAttrs(xAttrList);
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
switch(aIter.getToken())
@@ -1510,9 +1500,7 @@ void SmXMLSpaceContext_Impl::startFastElement(sal_Int32 /*nElement*/,
MathMLAttributeLengthValue aLV;
sal_Int32 nWide = 0, nNarrow = 0;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
switch (aIter.getToken())
@@ -1671,9 +1659,9 @@ public:
void SmXMLUnderContext_Impl::startFastElement(sal_Int32 /*nElement*/, const uno::Reference<
xml::sax::XFastAttributeList > & xAttrList )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- nAttrCount = pAttribList->getFastAttributeTokens().size();
+ sax_fastparser::FastAttributeList& rAttribList =
+ sax_fastparser::castToFastAttributeList( xAttrList );
+ nAttrCount = rAttribList.getFastAttributeTokens().size();
}
void SmXMLUnderContext_Impl::HandleAccent()
@@ -1735,9 +1723,9 @@ public:
void SmXMLOverContext_Impl::startFastElement(sal_Int32 /*nElement*/, const uno::Reference<
xml::sax::XFastAttributeList > & xAttrList )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- nAttrCount = pAttribList->getFastAttributeTokens().size();
+ sax_fastparser::FastAttributeList& rAttribList =
+ sax_fastparser::castToFastAttributeList( xAttrList );
+ nAttrCount = rAttribList.getFastAttributeTokens().size();
}
@@ -2559,9 +2547,7 @@ void SmXMLMultiScriptsContext_Impl::endFastElement(sal_Int32 )
void SmXMLActionContext_Impl::startFastElement(sal_Int32 /*nElement*/, const uno::Reference<xml::sax::XFastAttributeList> & xAttrList)
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
switch(aIter.getToken())
diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx
index c66675513223..ea32ca9c380c 100644
--- a/svx/source/xml/xmlxtimp.cxx
+++ b/svx/source/xml/xmlxtimp.cxx
@@ -105,10 +105,8 @@ css::uno::Reference< css::xml::sax::XFastContextHandler >
if( NAMESPACE_TOKEN(XML_NAMESPACE_DRAW) == nNamespace ||
NAMESPACE_TOKEN(XML_NAMESPACE_DRAW_OOO) == nNamespace )
{
- sax_fastparser::FastAttributeList *pFastAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( rAttrList );
SvXMLAttributeList *pAttrList = new SvXMLAttributeList;
- for (auto& aIter : *pFastAttribList)
+ for (auto& aIter : sax_fastparser::castToFastAttributeList( rAttrList ))
pAttrList->AddAttribute(
SvXMLImport::getNamespacePrefixFromToken(aIter.getToken(), nullptr) + ":" +
GetXMLToken(static_cast<XMLTokenEnum>(aIter.getToken() & TOKEN_MASK)),
diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx
index d0df14d7e90d..13282cf12aac 100644
--- a/sw/source/core/swg/SwXMLSectionList.cxx
+++ b/sw/source/core/swg/SwXMLSectionList.cxx
@@ -121,11 +121,8 @@ css::uno::Reference<css::xml::sax::XFastContextHandler> SvXMLSectionListContext:
Element == XML_ELEMENT(TEXT_OOO, XML_SECTION ) ||
Element == XML_ELEMENT(TEXT_OOO, XML_BOOKMARK) )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
OUString sName;
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
if (aIter.getToken() == XML_ELEMENT(TEXT, XML_NAME) ||
aIter.getToken() == XML_ELEMENT(TEXT_OOO, XML_NAME))
sName = aIter.toString();
diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx
index 3f86ea101b75..8b57e2047a47 100644
--- a/sw/source/uibase/config/StoredChapterNumbering.cxx
+++ b/sw/source/uibase/config/StoredChapterNumbering.cxx
@@ -277,10 +277,7 @@ public:
OUString displayName;
XmlStyleFamily nFamily(XmlStyleFamily::DATA_STYLE);
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
if (aIter.getToken() == (XML_NAMESPACE_STYLE | XML_FAMILY))
{
if (IsXMLToken(aIter.toString(), XML_TEXT))
diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx
index 688ec9c215cc..6eda29124ba7 100644
--- a/unoxml/source/dom/saxbuilder.cxx
+++ b/unoxml/source/dom/saxbuilder.cxx
@@ -258,10 +258,7 @@ namespace DOM
void CSAXDocumentBuilder::setElementFastAttributes(const Reference< XElement >& aElement, const Reference< XFastAttributeList >& xAttribs)
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttribs );
-
- for (auto &it : *pAttribList)
+ for (auto &it : sax_fastparser::castToFastAttributeList( xAttribs ))
{
sal_Int32 nAttrToken = it.getToken();
const OUString& aAttrPrefix(SvXMLImport::getNamespacePrefixFromToken(nAttrToken, nullptr));
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 6b2f1261f4f9..6bc7a10e8df1 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -39,8 +39,8 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
if (pFactory.get() == nullptr)
return;
- sax_fastparser::FastAttributeList *pAttribs =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttribs );
+ sax_fastparser::FastAttributeList& rAttribs =
+ sax_fastparser::castToFastAttributeList( xAttribs );
const AttributeInfo *pAttr = pFactory->getAttributeInfoArray(nDefine);
if (!pAttr)
@@ -49,7 +49,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
for (; pAttr->m_nToken != -1; ++pAttr)
{
sal_Int32 nToken = pAttr->m_nToken;
- sal_Int32 nAttrIndex = pAttribs->getAttributeIndex(nToken);
+ sal_Int32 nAttrIndex = rAttribs.getAttributeIndex(nToken);
if (nAttrIndex == -1)
continue;
@@ -59,7 +59,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
{
case ResourceType::Boolean:
{
- const char *pValue = pAttribs->getAsCharByIndex(nAttrIndex);
+ const char *pValue = rAttribs.getAsCharByIndex(nAttrIndex);
OOXMLValue::Pointer_t xValue(OOXMLBooleanValue::Create(pValue));
pHandler->newProperty(nId, xValue);
pFactory->attributeAction(pHandler, nToken, xValue);
@@ -67,7 +67,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
break;
case ResourceType::String:
{
- OUString aValue(pAttribs->getValueByIndex(nAttrIndex));
+ OUString aValue(rAttribs.getValueByIndex(nAttrIndex));
OOXMLValue::Pointer_t xValue(new OOXMLStringValue(aValue));
pHandler->newProperty(nId, xValue);
pFactory->attributeAction(pHandler, nToken, xValue);
@@ -75,7 +75,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
break;
case ResourceType::Integer:
{
- sal_Int32 nValue = pAttribs->getAsIntegerByIndex(nAttrIndex);
+ sal_Int32 nValue = rAttribs.getAsIntegerByIndex(nAttrIndex);
OOXMLValue::Pointer_t xValue = OOXMLIntegerValue::Create(nValue);
pHandler->newProperty(nId, xValue);
pFactory->attributeAction(pHandler, nToken, xValue);
@@ -83,7 +83,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
break;
case ResourceType::Hex:
{
- const char *pValue = pAttribs->getAsCharByIndex(nAttrIndex);
+ const char *pValue = rAttribs.getAsCharByIndex(nAttrIndex);
OOXMLValue::Pointer_t xValue(new OOXMLHexValue(pValue));
pHandler->newProperty(nId, xValue);
pFactory->attributeAction(pHandler, nToken, xValue);
@@ -91,7 +91,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
break;
case ResourceType::HexColor:
{
- const char *pValue = pAttribs->getAsCharByIndex(nAttrIndex);
+ const char *pValue = rAttribs.getAsCharByIndex(nAttrIndex);
OOXMLValue::Pointer_t xValue(new OOXMLHexColorValue(pValue));
pHandler->newProperty(nId, xValue);
pFactory->attributeAction(pHandler, nToken, xValue);
@@ -100,7 +100,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
case ResourceType::TwipsMeasure_asSigned:
case ResourceType::TwipsMeasure_asZero:
{
- const char *pValue = pAttribs->getAsCharByIndex(nAttrIndex);
+ const char *pValue = rAttribs.getAsCharByIndex(nAttrIndex);
OOXMLValue::Pointer_t xValue(new OOXMLTwipsMeasureValue(pValue));
if ( xValue->getInt() < 0 )
{
@@ -113,7 +113,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
break;
case ResourceType::HpsMeasure:
{
- const char *pValue = pAttribs->getAsCharByIndex(nAttrIndex);
+ const char *pValue = rAttribs.getAsCharByIndex(nAttrIndex);
OOXMLValue::Pointer_t xValue(new OOXMLHpsMeasureValue(pValue));
pHandler->newProperty(nId, xValue);
pFactory->attributeAction(pHandler, nToken, xValue);
@@ -121,7 +121,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
break;
case ResourceType::MeasurementOrPercent:
{
- const char *pValue = pAttribs->getAsCharByIndex(nAttrIndex);
+ const char *pValue = rAttribs.getAsCharByIndex(nAttrIndex);
OOXMLValue::Pointer_t xValue(new OOXMLMeasurementOrPercentValue(pValue));
pHandler->newProperty(nId, xValue);
pFactory->attributeAction(pHandler, nToken, xValue);
@@ -130,7 +130,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
case ResourceType::List:
{
sal_uInt32 nValue;
- if (pFactory->getListValue(pAttr->m_nRef, pAttribs->getValueByIndex(nAttrIndex), nValue))
+ if (pFactory->getListValue(pAttr->m_nRef, rAttribs.getValueByIndex(nAttrIndex), nValue))
{
OOXMLValue::Pointer_t xValue = OOXMLIntegerValue::Create(nValue);
pHandler->newProperty(nId, xValue);
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index d0e6937f767d..0a114ab0d87d 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -217,9 +217,7 @@ static SvXMLImportContext *CreateSettingsContext(SvXMLImport& rImport, sal_Int32
SvXMLImportContext *pContext = nullptr;
rProp.Name.clear();
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
if (aIter.getToken() == XML_ELEMENT(CONFIG, XML_NAME))
rProp.Name = aIter.toString();
@@ -255,9 +253,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLDocumentSettingsCo
SvXMLImportContext *pContext = nullptr;
OUString sName;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
if (aIter.getToken() == XML_ELEMENT(CONFIG, XML_NAME))
sName = aIter.toString();
@@ -400,9 +396,7 @@ XMLConfigItemContext::XMLConfigItemContext(SvXMLImport& rImport,
mrItemName(rTempItemName),
mpBaseContext(pTempBaseContext)
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
if (aIter.getToken() == XML_ELEMENT(CONFIG, XML_TYPE))
msType = aIter.toString();
diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx
index c80158d02c96..e24ee7bcc041 100644
--- a/xmloff/source/core/xmlictxt.cxx
+++ b/xmloff/source/core/xmlictxt.cxx
@@ -88,10 +88,7 @@ void SAL_CALL SvXMLImportContext::startUnknownElement(const OUString & /*rNamesp
if ( Attribs.is() )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( Attribs );
-
- for( auto &it : *pAttribList )
+ for( auto &it : sax_fastparser::castToFastAttributeList( Attribs ) )
{
sal_Int32 nToken = it.getToken();
const OUString& rAttrNamespacePrefix = SvXMLImport::getNamespacePrefixFromToken(nToken, &GetImport().GetNamespaceMap());
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 8cee683d86e5..cc515c645a23 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -838,10 +838,10 @@ void SAL_CALL SvXMLImport::startFastElement (sal_Int32 Element,
{
if ( Attribs.is() )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( Attribs );
- auto aIter( pAttribList->find( XML_ELEMENT( OFFICE, XML_VERSION ) ) );
- if( aIter != pAttribList->end() )
+ sax_fastparser::FastAttributeList& rAttribList =
+ sax_fastparser::castToFastAttributeList( Attribs );
+ auto aIter( rAttribList.find( XML_ELEMENT( OFFICE, XML_VERSION ) ) );
+ if( aIter != rAttribList.end() )
{
mpImpl->aODFVersion = aIter.toString();
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index 5ef266dce6af..cfbfee630261 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -472,9 +472,7 @@ AnimationNodeContext::AnimationNodeContext(
pServiceName = "com.sun.star.animations.Command"; break;
case XML_PAR:
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
if( (aIter.getToken() & TOKEN_MASK) == XML_PRESET_ID)
{
@@ -561,9 +559,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax:
OUString sXmlId;
sal_Int16 nEnum;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString rValue = aIter.toString();
switch( aIter.getToken() )
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index 3e7a2eeed8c4..3ec2abca723f 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -395,9 +395,7 @@ XMLAnimationsSoundContext::XMLAnimationsSoundContext( SvXMLImport& rImport, sal_
if( !pParent || nElement != XML_ELEMENT(PRESENTATION, XML_SOUND) )
return;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
switch( aIter.getToken() )
@@ -452,9 +450,7 @@ XMLAnimationsEffectContext::XMLAnimationsEffectContext( SvXMLImport& rImport,
return;
}
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
switch( aIter.getToken() )
diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx
index 7f73a203124f..3f9e740221ed 100644
--- a/xmloff/source/draw/ximpbody.cxx
+++ b/xmloff/source/draw/ximpbody.cxx
@@ -48,9 +48,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
bool bHaveXmlId( false );
OUString sXmlId, sStyleName, sContextName, sMasterPageName, sHREF;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
switch(aIter.getToken())
diff --git a/xmloff/source/draw/ximpnote.cxx b/xmloff/source/draw/ximpnote.cxx
index 8c2aba66fdd5..5f06a6132f31 100644
--- a/xmloff/source/draw/ximpnote.cxx
+++ b/xmloff/source/draw/ximpnote.cxx
@@ -30,9 +30,7 @@ SdXMLNotesContext::SdXMLNotesContext( SdXMLImport& rImport,
{
OUString sStyleName, sPageMasterName;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
switch(aIter.getToken())
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 0d86c861964e..23a89e943f2d 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -92,9 +92,7 @@ DrawAnnotationContext::DrawAnnotationContext( SvXMLImport& rImport, const Refere
RealPoint2D aPosition;
RealSize2D aSize;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
@@ -247,9 +245,7 @@ SdXMLGenericPageContext::SdXMLGenericPageContext(
, mxShapes( rShapes )
, mxAnnotationAccess( rShapes, UNO_QUERY )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
if( aIter.getToken() == XML_ELEMENT(DRAW, XML_NAV_ORDER) )
{
diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx
index 26c98a8a7b4c..29da608f20fc 100644
--- a/xmloff/source/draw/ximpshow.cxx
+++ b/xmloff/source/draw/ximpshow.cxx
@@ -89,9 +89,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, const Reference< XFa
bIsMouseVisible = false;
// read attributes
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
@@ -206,9 +204,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLShowsContext::cre
OUString aPages;
// read attributes
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 4666e897e816..e43639752d70 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -725,9 +725,7 @@ SdXMLMasterPageContext::SdXMLMasterPageContext(
const bool bHandoutMaster = (nElement & TOKEN_MASK) == XML_HANDOUT_MASTER;
OUString sStyleName, sPageMasterName;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
const OUString sValue = aIter.toString();
switch(aIter.getToken())
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index b1c7f001da4f..df81f7d836c1 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -151,12 +151,12 @@ XMLVersionContext::XMLVersionContext( XMLVersionListImport& rImport,
const Reference< XFastAttributeList > & xAttrList )
: SvXMLImportContext( rImport )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- if ( pAttribList->getFastAttributeTokens().empty() )
+ sax_fastparser::FastAttributeList& rAttribList =
+ sax_fastparser::castToFastAttributeList( xAttrList );
+ if ( rAttribList.getFastAttributeTokens().empty() )
return;
util::RevisionTag aInfo;
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : rAttribList)
{
switch( aIter.getToken() )
{
diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx
index cb7679cc3b63..5960b5215e91 100644
--- a/xmloff/source/script/XMLEventsImportContext.cxx
+++ b/xmloff/source/script/XMLEventsImportContext.cxx
@@ -165,9 +165,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLEventsImportContext
// a) search for script:language and script:event-name attribute
OUString sLanguage;
OUString sEventName;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
OUString sValue = aIter.toString();
diff --git a/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx b/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx
index 34a5dedc4ac0..88348476cf2a 100644
--- a/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx
+++ b/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx
@@ -61,10 +61,7 @@ void XMLSectionSourceDDEImportContext::startFastElement(sal_Int32 /*nElement*/,
OUString sItem;
bool bAutomaticUpdate = false;
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
-
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
switch (aIter.getToken())
{
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 2de0e5d66a1b..5e05107684cc 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -155,9 +155,7 @@ XMLCharContext::XMLCharContext(
{
if( bCount )
{
- sax_fastparser::FastAttributeList *pAttribList =
- sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- for (auto &aIter : *pAttribList)
+ for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
if( aIter.getToken() == XML_ELEMENT(TEXT, XML_C) )
{
More information about the Libreoffice-commits
mailing list