From 21a9bc8716a88fa2472c525b2e6f84fe1213a8f8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 16 Nov 2015 09:40:28 +0200 Subject: no need to take a mutex when only dealing with stack-local data Change-Id: Ie45e626aad55a8174a53b769a98601bf54dedf65 Reviewed-on: https://gerrit.libreoffice.org/19979 Tested-by: Jenkins Reviewed-by: Noel Grandin --- lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx | 6 ------ lingucomponent/source/languageguessing/guesslang.cxx | 2 -- lingucomponent/source/spellcheck/macosxspell/macspellimp.mm | 6 ------ lingucomponent/source/spellcheck/spell/sspellimp.cxx | 6 ------ lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 4 ---- 5 files changed, 24 deletions(-) (limited to 'lingucomponent') diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx index 9a6ea3e0d57d..7b433a9fcd1a 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx @@ -851,8 +851,6 @@ void SAL_CALL Hyphenator::removeEventListener( const Reference< XEventListener > OUString SAL_CALL Hyphenator::getImplementationName() throw(RuntimeException, std::exception) { - MutexGuard aGuard( GetLinguMutex() ); - return getImplementationName_Static(); } @@ -865,16 +863,12 @@ sal_Bool SAL_CALL Hyphenator::supportsService( const OUString& ServiceName ) Sequence< OUString > SAL_CALL Hyphenator::getSupportedServiceNames() throw(RuntimeException, std::exception) { - MutexGuard aGuard( GetLinguMutex() ); - return getSupportedServiceNames_Static(); } Sequence< OUString > Hyphenator::getSupportedServiceNames_Static() throw() { - MutexGuard aGuard( GetLinguMutex() ); - Sequence< OUString > aSNS { SN_HYPHENATOR }; return aSNS; } diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx index 8ac3e8da7e34..0cc0054e4b49 100644 --- a/lingucomponent/source/languageguessing/guesslang.cxx +++ b/lingucomponent/source/languageguessing/guesslang.cxx @@ -325,7 +325,6 @@ void SAL_CALL LangGuess_Impl::enableLanguages( OUString SAL_CALL LangGuess_Impl::getImplementationName( ) throw(RuntimeException, std::exception) { - osl::MutexGuard aGuard( GetLangGuessMutex() ); return OUString( IMPLNAME ); } @@ -338,7 +337,6 @@ sal_Bool SAL_CALL LangGuess_Impl::supportsService( const OUString& ServiceName ) Sequence SAL_CALL LangGuess_Impl::getSupportedServiceNames( ) throw(RuntimeException, std::exception) { - osl::MutexGuard aGuard( GetLangGuessMutex() ); return getSupportedServiceNames_Static(); } diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm index 9334d6b3854d..29b6b7414295 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm @@ -524,8 +524,6 @@ void SAL_CALL OUString SAL_CALL MacSpellChecker::getImplementationName() throw(RuntimeException) { - MutexGuard aGuard( GetLinguMutex() ); - return getImplementationName_Static(); } @@ -538,16 +536,12 @@ sal_Bool SAL_CALL MacSpellChecker::supportsService( const OUString& ServiceName Sequence< OUString > SAL_CALL MacSpellChecker::getSupportedServiceNames() throw(RuntimeException) { - MutexGuard aGuard( GetLinguMutex() ); - return getSupportedServiceNames_Static(); } Sequence< OUString > MacSpellChecker::getSupportedServiceNames_Static() throw() { - MutexGuard aGuard( GetLinguMutex() ); - Sequence< OUString > aSNS { SN_SPELLCHECKER }; return aSNS; } diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 48d2b4a23e76..928b1914c46b 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -613,8 +613,6 @@ void SAL_CALL SpellChecker::removeEventListener( const Reference< XEventListener OUString SAL_CALL SpellChecker::getImplementationName() throw(RuntimeException, std::exception) { - MutexGuard aGuard( GetLinguMutex() ); - return getImplementationName_Static(); } @@ -627,16 +625,12 @@ sal_Bool SAL_CALL SpellChecker::supportsService( const OUString& ServiceName ) Sequence< OUString > SAL_CALL SpellChecker::getSupportedServiceNames() throw(RuntimeException, std::exception) { - MutexGuard aGuard( GetLinguMutex() ); - return getSupportedServiceNames_Static(); } Sequence< OUString > SpellChecker::getSupportedServiceNames_Static() throw() { - MutexGuard aGuard( GetLinguMutex() ); - Sequence< OUString > aSNS { SN_SPELLCHECKER }; return aSNS; } diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index f1841c2f5330..357e8d932c48 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -623,7 +623,6 @@ void SAL_CALL Thesaurus::removeEventListener( const Reference< XEventListener >& OUString SAL_CALL Thesaurus::getImplementationName() throw(RuntimeException, std::exception) { - MutexGuard aGuard( GetLinguMutex() ); return getImplementationName_Static(); } @@ -636,15 +635,12 @@ sal_Bool SAL_CALL Thesaurus::supportsService( const OUString& ServiceName ) Sequence< OUString > SAL_CALL Thesaurus::getSupportedServiceNames() throw(RuntimeException, std::exception) { - MutexGuard aGuard( GetLinguMutex() ); return getSupportedServiceNames_Static(); } Sequence< OUString > Thesaurus::getSupportedServiceNames_Static() throw() { - MutexGuard aGuard( GetLinguMutex() ); - Sequence< OUString > aSNS { SN_THESAURUS }; return aSNS; } -- cgit