diff options
author | Mohammed Abdul Azeem <azeemmysore@gmail.com> | 2017-07-09 22:37:00 +0530 |
---|---|---|
committer | Mohammed Abdul Azeem <azeemmysore@gmail.com> | 2017-07-10 20:05:09 +0200 |
commit | 5364990831a7d5773ddbc2f35842c7b3a8d5534a (patch) | |
tree | 6072d6dd0ded790d5658be55b1a619f4dcda6ee4 /xmloff | |
parent | 271882910107e177bc98af877f9c8b9f89c09795 (diff) |
Adding an overloaded IsXMLToken method:
Passing FastAttributeIter to the method makes the
code much cleaner and easy to read.
Change-Id: I227e9dc378dfba51168c29452667576a779dc215
Reviewed-on: https://gerrit.libreoffice.org/39730
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'xmloff')
-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 a7d242b366dd..c7f0dc673caf 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3345,6 +3345,17 @@ namespace xmloff { namespace token { const XMLTokenEntry* pToken = &aTokenList[(sal_uInt16)eToken]; return !strcmp( pCString, pToken->pChar ); } + + bool IsXMLToken( + const sax_fastparser::FastAttributeList::FastAttributeIter& aIter, + enum XMLTokenEnum eToken ) + { + assert(XML_TOKEN_INVALID < eToken); + assert(eToken < XML_TOKEN_END); + + const XMLTokenEntry* pToken = &aTokenList[(sal_uInt16)eToken]; + return aIter.isString( pToken->pChar ); + } } } |