diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-10-03 20:45:04 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-10-23 14:30:29 +0200 |
commit | 143bbb20a3f4d757e2493fc078deea7dbaa1e14f (patch) | |
tree | ce78beac6e9d23c8cf2a5602302ceb969e5a9409 /include/oox/token | |
parent | d958e6d04983eb395b13b0d72aae5af550f9db9f (diff) |
inline TokenMap::getUtf8TokenName
Change-Id: Icd9c6ebc9feb3e7aba28b01729b582a8f49c832a
Diffstat (limited to 'include/oox/token')
-rw-r--r-- | include/oox/token/tokenmap.hxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/oox/token/tokenmap.hxx b/include/oox/token/tokenmap.hxx index 6298773df921..50984e753527 100644 --- a/include/oox/token/tokenmap.hxx +++ b/include/oox/token/tokenmap.hxx @@ -21,6 +21,7 @@ #define INCLUDED_OOX_TOKEN_TOKENMAP_HXX #include <vector> +#include <oox/token/tokens.hxx> #include <rtl/instance.hxx> #include <rtl/ustring.hxx> #include <com/sun/star/uno/Sequence.hxx> @@ -40,7 +41,13 @@ public: /** Returns the UTF8 name of the passed token identifier as byte sequence. */ ::com::sun::star::uno::Sequence< sal_Int8 > - getUtf8TokenName( sal_Int32 nToken ) const; + getUtf8TokenName( sal_Int32 nToken ) const + { + SAL_WARN_IF(nToken < 0 || nToken >= XML_TOKEN_COUNT, "oox", "Wrong nToken parameter"); + if (0 <= nToken && nToken < XML_TOKEN_COUNT) + return maTokenNames[ nToken ]; + return css::uno::Sequence< sal_Int8 >(); + } /** Returns the token identifier for the passed UTF8 token name. */ sal_Int32 getTokenFromUtf8( |