LibreOffice Module oox (master) 1
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
oox::TokenMap Class Reference

#include <tokenmap.hxx>

Public Member Functions

 TokenMap ()
 
 ~TokenMap ()
 
css::uno::Sequence< sal_Int8 > const & getUtf8TokenName (sal_Int32 nToken) const
 Returns the UTF8 name of the passed token identifier as byte sequence. More...
 
sal_Int32 getTokenFromUtf8 (const css::uno::Sequence< sal_Int8 > &rUtf8Name) const
 Returns the token identifier for the passed UTF8 token name. More...
 
sal_Int32 getTokenFromUTF8 (const char *pToken, sal_Int32 nLength) const
 Returns the token identifier for a UTF8 string passed in pToken. More...
 

Static Public Member Functions

static sal_Int32 getTokenFromUnicode (std::u16string_view rUnicodeName)
 Returns the token identifier for the passed Unicode token name. More...
 

Static Private Member Functions

static sal_Int32 getTokenPerfectHash (const char *pToken, sal_Int32 nLength)
 

Private Attributes

std::vector< css::uno::Sequence< sal_Int8 > > maTokenNames
 
sal_Int32 mnAlphaTokens [26]
 

Static Private Attributes

static const css::uno::Sequence< sal_Int8EMPTY_BYTE_SEQ
 

Detailed Description

Definition at line 38 of file tokenmap.hxx.

Constructor & Destructor Documentation

◆ TokenMap()

oox::TokenMap::TokenMap ( )
explicit

Definition at line 47 of file tokenmap.cxx.

References maTokenNames, mnAlphaTokens, and XML_TOKEN_INVALID.

◆ ~TokenMap()

oox::TokenMap::~TokenMap ( )

Definition at line 73 of file tokenmap.cxx.

Member Function Documentation

◆ getTokenFromUnicode()

sal_Int32 oox::TokenMap::getTokenFromUnicode ( std::u16string_view  rUnicodeName)
static

Returns the token identifier for the passed Unicode token name.

Definition at line 77 of file tokenmap.cxx.

References OUStringToOString(), and XML_TOKEN_INVALID.

Referenced by oox::AttributeConversion::decodeToken(), and oox::drawingml::CustomShapeProperties::initializePresetDataMap().

◆ getTokenFromUTF8()

sal_Int32 oox::TokenMap::getTokenFromUTF8 ( const char *  pToken,
sal_Int32  nLength 
) const
inline

Returns the token identifier for a UTF8 string passed in pToken.

Definition at line 67 of file tokenmap.hxx.

References getTokenPerfectHash(), mnAlphaTokens, and nLength.

Referenced by oox::core::FastTokenHandler::getTokenDirect(), and getTokenFromUtf8().

◆ getTokenFromUtf8()

sal_Int32 oox::TokenMap::getTokenFromUtf8 ( const css::uno::Sequence< sal_Int8 > &  rUtf8Name) const
inline

Returns the token identifier for the passed UTF8 token name.

Definition at line 58 of file tokenmap.hxx.

References getTokenFromUTF8().

◆ getTokenPerfectHash()

sal_Int32 oox::TokenMap::getTokenPerfectHash ( const char *  pToken,
sal_Int32  nLength 
)
staticprivate

Definition at line 84 of file tokenmap.cxx.

References nLength, and XML_TOKEN_INVALID.

Referenced by getTokenFromUTF8().

◆ getUtf8TokenName()

css::uno::Sequence< sal_Int8 > const & oox::TokenMap::getUtf8TokenName ( sal_Int32  nToken) const
inline

Returns the UTF8 name of the passed token identifier as byte sequence.

Definition at line 49 of file tokenmap.hxx.

References EMPTY_BYTE_SEQ, maTokenNames, nToken, and SAL_WARN_IF.

Referenced by oox::drawingml::CustomShapeProperties::getShapePresetTypeName(), oox::core::FastTokenHandler::getUTF8Identifier(), and oox::drawingml::table::TableCell::pushToXCell().

Member Data Documentation

◆ EMPTY_BYTE_SEQ

const css::uno::Sequence< sal_Int8 > oox::TokenMap::EMPTY_BYTE_SEQ
staticprivate

Definition at line 81 of file tokenmap.hxx.

Referenced by getUtf8TokenName().

◆ maTokenNames

std::vector< css::uno::Sequence< sal_Int8 > > oox::TokenMap::maTokenNames
private

Definition at line 84 of file tokenmap.hxx.

Referenced by getUtf8TokenName(), and TokenMap().

◆ mnAlphaTokens

sal_Int32 oox::TokenMap::mnAlphaTokens[26]
private

Definition at line 85 of file tokenmap.hxx.

Referenced by getTokenFromUTF8(), and TokenMap().


The documentation for this class was generated from the following files: