summaryrefslogtreecommitdiffstats
path: root/include/sax
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2013-11-20 12:11:44 +0000
committerMichael Meeks <michael.meeks@collabora.com>2013-11-20 12:12:50 +0000
commit9491ca3f64bd44a6a8e63f7d2eae02164f792258 (patch)
tree5ed4973014c2fe04d5e67dd792ee2229c51928fa /include/sax
parentHighlight fade in SwCommentRuler (diff)
downloadcore-9491ca3f64bd44a6a8e63f7d2eae02164f792258.tar.gz
core-9491ca3f64bd44a6a8e63f7d2eae02164f792258.zip
fastparser: avoid excessive alloc/frees for int / bool / double parsing
Change-Id: I596bbc723558f04588d9e767d64732164524e57a
Diffstat (limited to 'include/sax')
-rw-r--r--include/sax/fastattribs.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx
index c7806039eed4..fd87a946ea5a 100644
--- a/include/sax/fastattribs.hxx
+++ b/include/sax/fastattribs.hxx
@@ -73,6 +73,10 @@ public:
void addUnknown( const OUString& rNamespaceURL, const OString& rName, const sal_Char* pValue );
void addUnknown( const OString& rName, const sal_Char* pValue );
+ // performance sensitive shortcuts to avoid allocation ...
+ bool getAsInteger( sal_Int32 nToken, sal_Int32 &rInt);
+ bool getAsDouble( sal_Int32 nToken, double &rDouble);
+
// XFastAttributeList
virtual ::sal_Bool SAL_CALL hasAttribute( ::sal_Int32 Token ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getValueToken( ::sal_Int32 Token ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);