summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-10-03 20:45:04 +0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-10-23 14:30:29 +0200
commit143bbb20a3f4d757e2493fc078deea7dbaa1e14f (patch)
treece78beac6e9d23c8cf2a5602302ceb969e5a9409 /include
parentd958e6d04983eb395b13b0d72aae5af550f9db9f (diff)
inline TokenMap::getUtf8TokenName
Change-Id: Icd9c6ebc9feb3e7aba28b01729b582a8f49c832a
Diffstat (limited to 'include')
-rw-r--r--include/oox/token/tokenmap.hxx9
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(