diff options
author | Mohammed Abdul Azeem <azeemmysore@gmail.com> | 2017-02-09 20:33:15 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2017-02-10 11:34:03 +0000 |
commit | 32c0ab80aa0dbe105be15c5feee4e3bd7cc5ee25 (patch) | |
tree | c4c75dbc58abc60c368a7113b10a16e5d00b8334 /xmloff/source/core/xmltoken.cxx | |
parent | fc81a580dd2c4e322a28c4f042530668f8516c60 (diff) |
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 'xmloff/source/core/xmltoken.cxx')
-rw-r--r-- | xmloff/source/core/xmltoken.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 9aefba0451cc..813c864ca264 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3328,6 +3328,17 @@ namespace xmloff { namespace token { const XMLTokenEntry* pToken = &aTokenList[(sal_uInt16)eToken]; return rString.equalsAsciiL( pToken->pChar, pToken->nLength ); } + + bool IsXMLToken( + const char* pCString, + enum XMLTokenEnum eToken ) + { + assert(XML_TOKEN_INVALID < eToken); + assert(eToken < XML_TOKEN_END); + + const XMLTokenEntry* pToken = &aTokenList[(sal_uInt16)eToken]; + return !strcmp( pCString, pToken->pChar ); + } } } |