summaryrefslogtreecommitdiff
path: root/include/sax
diff options
context:
space:
mode:
authorMohammed Abdul Azeem <azeemmysore@gmail.com>2017-07-09 17:02:06 +0530
committerMichael Meeks <michael.meeks@collabora.com>2017-07-11 12:22:36 +0200
commitb401896a56149aa2871b65a330a6f601a9830ccd (patch)
tree8a8d31fdca5d47794442fab4c8c28be592b5e178 /include/sax
parent4f41e8810d67bd3d82e1ff40b23a9131921674a2 (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 'include/sax')
-rw-r--r--include/sax/fastattribs.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx
index c813fcf6944d..4147ac978f44 100644
--- a/include/sax/fastattribs.hxx
+++ b/include/sax/fastattribs.hxx
@@ -102,6 +102,13 @@ public:
virtual css::uno::Sequence< css::xml::Attribute > SAL_CALL getUnknownAttributes( ) override;
virtual css::uno::Sequence< css::xml::FastAttribute > SAL_CALL getFastAttributes() override;
+ 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;