sc/source/core/inc/cellkeytranslator.hxx  |    1 -
 sc/source/core/tool/cellkeytranslator.cxx |   21 +++++++--------------
 2 files changed, 7 insertions(+), 15 deletions(-)

New commits:
commit 604edde1946d4e0ced67ad9a7514253a6fe7fa40
Author:     Arnaud VERSINI <[email protected]>
AuthorDate: Mon Sep 5 19:10:36 2022 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Tue Sep 6 18:06:34 2022 +0200

    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 <[email protected]>

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

Reply via email to