From 5364990831a7d5773ddbc2f35842c7b3a8d5534a Mon Sep 17 00:00:00 2001 From: Mohammed Abdul Azeem Date: Sun, 9 Jul 2017 22:37:00 +0530 Subject: 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 Reviewed-by: Michael Meeks --- xmloff/source/core/xmltoken.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'xmloff') 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 ); + } } } -- cgit