summaryrefslogtreecommitdiffstats
path: root/include
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
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')
-rw-r--r--include/sax/fastattribs.hxx6
-rw-r--r--include/xmloff/xmltoken.hxx4
2 files changed, 10 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());
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 989fa33f54c3..70b57d1b0f8d 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -3291,6 +3291,10 @@ namespace xmloff { namespace token {
XMLOFF_DLLPUBLIC bool IsXMLToken(
const OUString& rString,
enum XMLTokenEnum eToken );
+
+ XMLOFF_DLLPUBLIC bool IsXMLToken(
+ const char* pCString,
+ enum XMLTokenEnum eToken );
} }
#endif