summaryrefslogtreecommitdiffstats
path: root/include/sax
diff options
context:
space:
mode:
authorMohammed Abdul Azeem <azeemmysore@gmail.com>2017-08-09 21:36:12 +0530
committerMichael Meeks <michael.meeks@collabora.com>2017-08-12 16:03:40 +0200
commitdfac13b483ba38ce6f61cd0a1e5757c6a08ab296 (patch)
treed8bc427ccda762d54d0d42d31cdb9db646f569f1 /include/sax
parenttdf#107197: Replace relationship URI (diff)
downloadcore-dfac13b483ba38ce6f61cd0a1e5757c6a08ab296.tar.gz
core-dfac13b483ba38ce6f61cd0a1e5757c6a08ab296.zip
Avoiding unnecessary OUString allocation:
Using direct strcmp instead of mapping. This is one of the hotspots and will help improve performance. Change-Id: I97a452984d53a6746f477ffe4be2806d9e89eee4 Reviewed-on: https://gerrit.libreoffice.org/40928 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.hxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx
index 8b669fe26a17..0a7d8712fb17 100644
--- a/include/sax/fastattribs.hxx
+++ b/include/sax/fastattribs.hxx
@@ -162,7 +162,16 @@ public:
mrList.AttributeValueLength(mnIdx),
RTL_TEXTENCODING_UTF8);
}
-
+ const char* toCString() const
+ {
+ assert(mnIdx < mrList.maAttributeTokens.size());
+ return mrList.getFastAttributeValue(mnIdx);
+ }
+ sal_Int32 getLength() const
+ {
+ assert(mnIdx < mrList.maAttributeTokens.size());
+ return mrList.AttributeValueLength(mnIdx);
+ }
bool isString(const char *str) const
{
assert(mnIdx < mrList.maAttributeTokens.size());