LibreOffice Module sc (master)
1
|
Translate cell function keywords. More...
#include <cellkeytranslator.hxx>
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< ScCellKeywordTranslator > | spInstance |
ScCellKeywordHashMap | maStringNameMap |
::utl::TransliterationWrapper | maTransWrapper |
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 65 of file cellkeytranslator.hxx.
ScCellKeywordTranslator::~ScCellKeywordTranslator | ( | ) |
Definition at line 181 of file cellkeytranslator.cxx.
|
private |
Definition at line 174 of file cellkeytranslator.cxx.
References getProcessComponentContext(), init(), and LOWERCASE_UPPERCASE.
|
private |
|
private |
|
private |
Definition at line 192 of file cellkeytranslator.cxx.
Referenced by ScCellKeywordTranslator().
|
static |
Definition at line 162 of file cellkeytranslator.cxx.
References LanguageTag::getLanguageType(), lclMatchKeyword(), LanguageTag::makeFallback(), spInstance, and ScGlobal::xSysLocale.
Referenced by ScInterpreter::ScCell(), ScInterpreter::ScCellExternal(), and ScInterpreter::ScInfo().
|
private |
Definition at line 80 of file cellkeytranslator.hxx.
|
private |
Definition at line 81 of file cellkeytranslator.hxx.
|
private |
Definition at line 79 of file cellkeytranslator.hxx.
Referenced by transKeyword().