diff options
author | Mohammed Abdul Azeem <azeemmysore@gmail.com> | 2017-07-09 17:02:06 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2017-07-11 12:22:36 +0200 |
commit | b401896a56149aa2871b65a330a6f601a9830ccd (patch) | |
tree | 8a8d31fdca5d47794442fab4c8c28be592b5e178 /sc/source | |
parent | 4f41e8810d67bd3d82e1ff40b23a9131921674a2 (diff) |
Helper function to cast to FastAttributeList:
Refactoring codes that cast XFastAttributeList reference
to FastAttributeList pointer using the helper function.
Change-Id: Iecf4b815d6556b0992d638b633260fbd459c0dc4
Reviewed-on: https://gerrit.libreoffice.org/39723
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.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLConsolidationContext.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLTrackedChangesContext.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/datastreamimport.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlbodyi.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmldrani.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexternaltabi.cxx | 9 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlrowi.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/xmltabi.cxx | 2 |
10 files changed, 16 insertions, 13 deletions
diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx index e885d737de33..1347c299ff29 100644 --- a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx +++ b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx @@ -51,7 +51,7 @@ ScXMLCalculationSettingsContext::ScXMLCalculationSettingsContext( ScXMLImport& r if( xAttrList.is() ) { sax_fastparser::FastAttributeList *pAttribList = - static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); for( auto &aIter : *pAttribList ) { diff --git a/sc/source/filter/xml/XMLConsolidationContext.cxx b/sc/source/filter/xml/XMLConsolidationContext.cxx index 092f561cec99..30b863395e81 100644 --- a/sc/source/filter/xml/XMLConsolidationContext.cxx +++ b/sc/source/filter/xml/XMLConsolidationContext.cxx @@ -42,7 +42,7 @@ ScXMLConsolidationContext::ScXMLConsolidationContext( if( xAttrList.is() ) { sax_fastparser::FastAttributeList *pAttribList = - static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); for( auto &aIter : *pAttribList ) { diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx index e680128eb643..22fc26b133eb 100644 --- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx +++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx @@ -395,7 +395,7 @@ ScXMLTrackedChangesContext::ScXMLTrackedChangesContext( ScXMLImport& rImport, if( xAttrList.is() ) { sax_fastparser::FastAttributeList *pAttribList = - static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); auto aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_PROTECTION_KEY ) ) ); if( aIter != pAttribList->end() ) diff --git a/sc/source/filter/xml/datastreamimport.cxx b/sc/source/filter/xml/datastreamimport.cxx index 4b61ae9398e5..156ee52e02bd 100644 --- a/sc/source/filter/xml/datastreamimport.cxx +++ b/sc/source/filter/xml/datastreamimport.cxx @@ -30,7 +30,7 @@ ScXMLDataStreamContext::ScXMLDataStreamContext( if( xAttrList.is() ) { sax_fastparser::FastAttributeList *pAttribList = - static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); for( auto &aIter : *pAttribList ) { diff --git a/sc/source/filter/xml/xmlbodyi.cxx b/sc/source/filter/xml/xmlbodyi.cxx index b8ad60262c87..ec36351fa27d 100644 --- a/sc/source/filter/xml/xmlbodyi.cxx +++ b/sc/source/filter/xml/xmlbodyi.cxx @@ -93,7 +93,7 @@ ScXMLBodyContext::ScXMLBodyContext( ScXMLImport& rImport, return; sax_fastparser::FastAttributeList *pAttribList = - static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); for( auto &it : *pAttribList ) { diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 36e174804372..8989827d4c2d 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -160,7 +160,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, if( xAttrList.is() ) { sax_fastparser::FastAttributeList *pAttribList = - static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); for( auto &it : *pAttribList ) { diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx index 2e3dbb2147e7..fd9e6f6d74f6 100644 --- a/sc/source/filter/xml/xmldrani.cxx +++ b/sc/source/filter/xml/xmldrani.cxx @@ -120,7 +120,7 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport, if( xAttrList.is() ) { sax_fastparser::FastAttributeList *pAttribList = - static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); for( auto &aIter : *pAttribList ) { diff --git a/sc/source/filter/xml/xmlexternaltabi.cxx b/sc/source/filter/xml/xmlexternaltabi.cxx index 9ce7d4e57121..1b0f1775eb0a 100644 --- a/sc/source/filter/xml/xmlexternaltabi.cxx +++ b/sc/source/filter/xml/xmlexternaltabi.cxx @@ -52,7 +52,8 @@ ScXMLExternalRefTabSourceContext::ScXMLExternalRefTabSourceContext( if( xAttrList.is() ) { - sax_fastparser::FastAttributeList *pAttribList = static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + sax_fastparser::FastAttributeList *pAttribList = + sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); for( auto &it : *pAttribList ) { @@ -167,7 +168,8 @@ ScXMLExternalRefRowContext::ScXMLExternalRefRowContext( const SvXMLTokenMap& rAttrTokenMap = mrScImport.GetTableRowAttrTokenMap(); if ( xAttrList.is() ) { - sax_fastparser::FastAttributeList *pAttribList = static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + sax_fastparser::FastAttributeList *pAttribList = + sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); for( auto &it : *pAttribList ) { @@ -246,7 +248,8 @@ ScXMLExternalRefCellContext::ScXMLExternalRefCellContext( const SvXMLTokenMap& rTokenMap = rImport.GetTableRowCellAttrTokenMap(); if( xAttrList.is() ) { - sax_fastparser::FastAttributeList *pAttribList = static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + sax_fastparser::FastAttributeList *pAttribList = + sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); for( auto &it : *pAttribList ) { diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx index 41c6defe29fd..b27c08baa782 100644 --- a/sc/source/filter/xml/xmlrowi.cxx +++ b/sc/source/filter/xml/xmlrowi.cxx @@ -54,7 +54,7 @@ ScXMLTableRowContext::ScXMLTableRowContext( ScXMLImport& rImport, if ( xAttrList.is() ) { sax_fastparser::FastAttributeList *pAttribList = - static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); for( auto &it : *pAttribList ) { @@ -230,7 +230,7 @@ ScXMLTableRowsContext::ScXMLTableRowsContext( ScXMLImport& rImport, if ( xAttrList.is() ) { sax_fastparser::FastAttributeList *pAttribList = - static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); auto &aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_DISPLAY ) ) ); if( aIter != pAttribList->end() ) bGroupDisplay = IsXMLToken( aIter, XML_TRUE ); diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx index c1bef215d008..0bad32e4004d 100644 --- a/sc/source/filter/xml/xmltabi.cxx +++ b/sc/source/filter/xml/xmltabi.cxx @@ -147,7 +147,7 @@ ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport, if ( xAttrList.is() ) { sax_fastparser::FastAttributeList *pAttribList = - static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); for( auto &it : *pAttribList ) { |