summaryrefslogtreecommitdiffstats
path: root/include/sax
diff options
context:
space:
mode:
authorMohammed Abdul Azeem <azeemmysore@gmail.com>2017-08-06 16:40:55 +0530
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-08 07:18:08 +0200
commit855af7f3260705faf7c33be36efc1610354336f0 (patch)
tree3ac569bb96cddd1267778f07cddfd3e0771c0f98 /include/sax
parentMoving legacy contexts to FastContexts: (diff)
downloadcore-855af7f3260705faf7c33be36efc1610354336f0.tar.gz
core-855af7f3260705faf7c33be36efc1610354336f0.zip
Avoiding unnecessary memory allocation:
Added a method to directly convert fast attribute values to double. Change-Id: Ia0c415530d6d7c7f767a2e0c88983429bc966210 Reviewed-on: https://gerrit.libreoffice.org/40846 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'include/sax')
-rw-r--r--include/sax/fastattribs.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx
index 9c1db656e36c..8b669fe26a17 100644
--- a/include/sax/fastattribs.hxx
+++ b/include/sax/fastattribs.hxx
@@ -150,6 +150,11 @@ public:
assert(mnIdx < mrList.maAttributeTokens.size());
return rtl_str_toInt32(mrList.getFastAttributeValue(mnIdx), 10);
}
+ double toDouble() const
+ {
+ assert(mnIdx < mrList.maAttributeTokens.size());
+ return rtl_str_toDouble(mrList.getFastAttributeValue(mnIdx));
+ }
OUString toString() const
{
assert(mnIdx < mrList.maAttributeTokens.size());