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 /writerfilter/source/ooxml/OOXMLFactory.cxx | |
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 'writerfilter/source/ooxml/OOXMLFactory.cxx')
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFactory.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx index 58d9b3d4aeb5..12f6237ea996 100644 --- a/writerfilter/source/ooxml/OOXMLFactory.cxx +++ b/writerfilter/source/ooxml/OOXMLFactory.cxx @@ -44,9 +44,8 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, if (pFactory.get() == nullptr) return; - assert( dynamic_cast< sax_fastparser::FastAttributeList *>( Attribs.get() ) != nullptr ); - sax_fastparser::FastAttributeList *pAttribs; - pAttribs = static_cast< sax_fastparser::FastAttributeList *>( Attribs.get() ); + sax_fastparser::FastAttributeList *pAttribs = + sax_fastparser::FastAttributeList::castToFastAttributeList( Attribs ); const AttributeInfo *pAttr = pFactory->getAttributeInfoArray(nDefine); if (!pAttr) |