summaryrefslogtreecommitdiffstats
path: root/include/sax
diff options
context:
space:
mode:
authorMohammed Abdul Azeem <azeemmysore@gmail.com>2017-02-09 20:33:15 +0530
committerMichael Meeks <michael.meeks@collabora.com>2017-02-10 11:34:03 +0000
commit32c0ab80aa0dbe105be15c5feee4e3bd7cc5ee25 (patch)
treec4c75dbc58abc60c368a7113b10a16e5d00b8334 /include/sax
parentcoverity#736181 Out-of-bounds read (diff)
downloadcore-32c0ab80aa0dbe105be15c5feee4e3bd7cc5ee25.tar.gz
core-32c0ab80aa0dbe105be15c5feee4e3bd7cc5ee25.zip
Further modifications to FastAttributeIter:
attempt to further reduce unnecessary allocation and freeing of OUString. Change-Id: I85169cfcd2311a5e6a96dc0292ce0686d1b0e43d Reviewed-on: https://gerrit.libreoffice.org/34092 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include/sax')
-rw-r--r--include/sax/fastattribs.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx
index 112e67801262..958899015372 100644
--- a/include/sax/fastattribs.hxx
+++ b/include/sax/fastattribs.hxx
@@ -145,6 +145,12 @@ public:
mrList.AttributeValueLength(mnIdx),
RTL_TEXTENCODING_UTF8);
}
+
+ const char* toCString()
+ {
+ assert(mnIdx < mrList.maAttributeTokens.size());
+ return mrList.getFastAttributeValue(mnIdx);
+ }
bool isString(const char *str)
{
assert(mnIdx < mrList.maAttributeTokens.size());