diff options
Diffstat (limited to 'oox/source/token/tokenmap.cxx')
-rw-r--r-- | oox/source/token/tokenmap.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/oox/source/token/tokenmap.cxx b/oox/source/token/tokenmap.cxx index 8e79ec2d7449..93da78313a69 100644 --- a/oox/source/token/tokenmap.cxx +++ b/oox/source/token/tokenmap.cxx @@ -110,6 +110,16 @@ OUString FastTokenHandler::getIdentifier( sal_Int32 nToken ) throw( RuntimeExcep return aTokens[nToken]; } +Sequence< sal_Int8 > FastTokenHandler::getUTF8Identifier( sal_Int32 nToken ) throw( RuntimeException ) +{ + MutexGuard aGuard( lclGetTokenMutex() ); + + if( nToken >= XML_TOKEN_COUNT ) + return Sequence< sal_Int8 >(); + + return Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8 *>(tokentowordlist[nToken]), strlen(tokentowordlist[nToken])); +} + sal_Int32 FastTokenHandler::getTokenFromUTF8( const Sequence< sal_Int8 >& rIdentifier ) throw( RuntimeException ) { MutexGuard aGuard( lclGetTokenMutex() ); |