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:

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 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



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 64 of file cellkeytranslator.hxx.

Constructor & Destructor Documentation

◆ ~ScCellKeywordTranslator()

ScCellKeywordTranslator::~ScCellKeywordTranslator ( )

Definition at line 198 of file cellkeytranslator.cxx.

◆ ScCellKeywordTranslator()

ScCellKeywordTranslator::ScCellKeywordTranslator ( )

Definition at line 181 of file cellkeytranslator.cxx.

References getProcessComponentContext(), and LOWERCASE_UPPERCASE.

Member Function Documentation

◆ addToMap() [1/2]

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

◆ addToMap() [2/2]

void ScCellKeywordTranslator::addToMap ( const TransItem pItems,
const css::lang::Locale &  rLocale 

◆ transKeyword()

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

Member Data Documentation

◆ maStringNameMap

ScCellKeywordHashMap ScCellKeywordTranslator::maStringNameMap

Definition at line 78 of file cellkeytranslator.hxx.

◆ maTransWrapper

::utl::TransliterationWrapper ScCellKeywordTranslator::maTransWrapper

Definition at line 79 of file cellkeytranslator.hxx.

◆ spInstance

std::unique_ptr< ScCellKeywordTranslator > ScCellKeywordTranslator::spInstance

Definition at line 77 of file cellkeytranslator.hxx.

Referenced by transKeyword().

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