summaryrefslogtreecommitdiff
path: root/include/xmloff
diff options
context:
space:
mode:
Diffstat (limited to 'include/xmloff')
-rw-r--r--include/xmloff/fasttokenhandler.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/xmloff/fasttokenhandler.hxx b/include/xmloff/fasttokenhandler.hxx
index ca20d687ad7f..760360711535 100644
--- a/include/xmloff/fasttokenhandler.hxx
+++ b/include/xmloff/fasttokenhandler.hxx
@@ -27,12 +27,12 @@ public:
~TokenMap();
/** Returns the UTF-8 name of the passed token identifier as byte sequence. */
- css::uno::Sequence< sal_Int8 > getUtf8TokenName( sal_Int32 nToken ) const
+ css::uno::Sequence< sal_Int8 > const & getUtf8TokenName( sal_Int32 nToken ) const
{
SAL_WARN_IF(nToken < 0 || nToken >= XML_TOKEN_COUNT, "xmloff", "Wrong nToken parameter");
if( 0 <= nToken && nToken < XML_TOKEN_COUNT )
return maTokenNames[ nToken ];
- return css::uno::Sequence< sal_Int8 >();
+ return EMPTY_BYTE_SEQ;
}
/** Returns the token identifier for the passed UTF-8 token name. */
@@ -52,6 +52,8 @@ private:
static sal_Int32 getTokenPerfectHash( const char *pToken, sal_Int32 nLength );
std::vector< css::uno::Sequence< sal_Int8 > > maTokenNames;
+
+ static const css::uno::Sequence< sal_Int8 > EMPTY_BYTE_SEQ;
};
struct StaticTokenMap : public rtl::Static< TokenMap, StaticTokenMap > {};