diff options
author | Mohammed Abdul Azeem <azeemmysore@gmail.com> | 2017-08-06 16:40:55 +0530 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-08-08 07:18:08 +0200 |
commit | 855af7f3260705faf7c33be36efc1610354336f0 (patch) | |
tree | 3ac569bb96cddd1267778f07cddfd3e0771c0f98 /include/sax | |
parent | 5b25fec2159e1e5207141bc4268170aec3ac6c7d (diff) |
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.hxx | 5 |
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()); |