LibreOffice Module sc (master)  1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScCellKeywordTranslator Class Reference

Translate cell function keywords. More...

#include <cellkeytranslator.hxx>

Collaboration diagram for ScCellKeywordTranslator:
[legend]

Public Member Functions

 ~ScCellKeywordTranslator ()
 

Static Public Member Functions

static void transKeyword (OUString &rName, const css::lang::Locale *pLocale, OpCode eOpCode)
 

Private Member Functions

 ScCellKeywordTranslator ()
 
void init ()
 
void addToMap (const OUString &rKey, const char *pName, const css::lang::Locale &rLocale, OpCode eOpCode)
 
void addToMap (const TransItem *pItems, const css::lang::Locale &rLocale)
 

Private Attributes

static::std::unique_ptr< ScCellKeywordTranslatorspInstance
 
ScCellKeywordHashMap maStringNameMap
 
::utl::TransliterationWrapper maTransWrapper
 

Detailed Description

Translate cell function keywords.

This class provides a convenient way to translate a string keyword used as a cell function argument. Since Calc's built-in cell functions don't localize string keywords, this class is used mainly to deal with an Excel document where string names may be localized.

To use, simply call the

ScCellKeywordTranslator::transKeyword(...)

function.

Note that when the locale and/or the opcode is specified, the function tries to find a string with matching locale and/or opcode. But when it fails to find one that satisfies the specified locale and/or opcode, it returns a translated string with non-matching locale and/or opcode if available.

Definition at line 62 of file cellkeytranslator.hxx.

Constructor & Destructor Documentation

ScCellKeywordTranslator::~ScCellKeywordTranslator ( )

Definition at line 182 of file cellkeytranslator.cxx.

ScCellKeywordTranslator::ScCellKeywordTranslator ( )
private

Definition at line 175 of file cellkeytranslator.cxx.

References getProcessComponentContext(), init(), and LOWERCASE_UPPERCASE.

Member Function Documentation

void ScCellKeywordTranslator::addToMap ( const OUString &  rKey,
const char *  pName,
const css::lang::Locale &  rLocale,
OpCode  eOpCode 
)
private
void ScCellKeywordTranslator::addToMap ( const TransItem pItems,
const css::lang::Locale &  rLocale 
)
private
void ScCellKeywordTranslator::init ( )
private

Definition at line 193 of file cellkeytranslator.cxx.

Referenced by ScCellKeywordTranslator().

void ScCellKeywordTranslator::transKeyword ( OUString &  rName,
const css::lang::Locale *  pLocale,
OpCode  eOpCode 
)
static

Member Data Documentation

ScCellKeywordHashMap ScCellKeywordTranslator::maStringNameMap
private

Definition at line 78 of file cellkeytranslator.hxx.

::utl::TransliterationWrapper ScCellKeywordTranslator::maTransWrapper
private

Definition at line 79 of file cellkeytranslator.hxx.

std::unique_ptr< ScCellKeywordTranslator > ScCellKeywordTranslator::spInstance
private

Definition at line 77 of file cellkeytranslator.hxx.

Referenced by transKeyword().


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