diff options
author | Arnaud VERSINI <arnaud.versini@libreoffice.org> | 2022-09-05 19:10:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-06 18:06:34 +0200 |
commit | 604edde1946d4e0ced67ad9a7514253a6fe7fa40 (patch) | |
tree | ce892f3e90ac3ece65500dcb5ce5f5a0baa89944 /sc | |
parent | 17e27b4a19f22b912460f090b754d11f9a32fb7f (diff) |
sc : remove useless lock and init in cellkeytranslator
Change-Id: Ibad2dfb721e4df390ddaf955a8b7fcdf676773e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139447
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/inc/cellkeytranslator.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/tool/cellkeytranslator.cxx | 21 |
2 files changed, 7 insertions, 15 deletions
diff --git a/sc/source/core/inc/cellkeytranslator.hxx b/sc/source/core/inc/cellkeytranslator.hxx index 1e42d1cf1182..953e0c99ed59 100644 --- a/sc/source/core/inc/cellkeytranslator.hxx +++ b/sc/source/core/inc/cellkeytranslator.hxx @@ -70,7 +70,6 @@ public: private: 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); diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx index 1192e3c04f83..8e2218f9313a 100644 --- a/sc/source/core/tool/cellkeytranslator.cxx +++ b/sc/source/core/tool/cellkeytranslator.cxx @@ -171,17 +171,6 @@ void ScCellKeywordTranslator::transKeyword(OUString& rName, const lang::Locale* lclMatchKeyword(rName, spInstance->maStringNameMap, eOpCode, pLocale); } -ScCellKeywordTranslator::ScCellKeywordTranslator() : - maTransWrapper( ::comphelper::getProcessComponentContext(), - TransliterationFlags::LOWERCASE_UPPERCASE ) -{ - init(); -} - -ScCellKeywordTranslator::~ScCellKeywordTranslator() -{ -} - struct TransItem { const sal_Unicode* from; @@ -189,10 +178,10 @@ struct TransItem OpCode func; }; -void ScCellKeywordTranslator::init() +ScCellKeywordTranslator::ScCellKeywordTranslator() : + maTransWrapper( ::comphelper::getProcessComponentContext(), + TransliterationFlags::LOWERCASE_UPPERCASE ) { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - // The file below has been autogenerated by sc/workben/celltrans/parse.py. // To add new locale keywords, edit sc/workben/celltrans/keywords_utf16.txt // and re-run the parse.py script. @@ -206,6 +195,10 @@ void ScCellKeywordTranslator::init() #include "cellkeywords.inl" } +ScCellKeywordTranslator::~ScCellKeywordTranslator() +{ +} + void ScCellKeywordTranslator::addToMap(const OUString& rKey, const char* pName, const lang::Locale& rLocale, OpCode eOpCode) { ScCellKeyword aKeyItem( pName, eOpCode, rLocale ); |