diff options
Diffstat (limited to 'lingucomponent/source/languageguessing/guesslang.cxx')
-rw-r--r-- | lingucomponent/source/languageguessing/guesslang.cxx | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx index e6406d213277..a65ec51de4ab 100644 --- a/lingucomponent/source/languageguessing/guesslang.cxx +++ b/lingucomponent/source/languageguessing/guesslang.cxx @@ -26,6 +26,7 @@ #include <cppuhelper/factory.hxx> #include <cppuhelper/implementationentry.hxx> #include <cppuhelper/implbase2.hxx> +#include <cppuhelper/supportsservice.hxx> #include <simpleguesser.hxx> #include <guess.hxx> @@ -346,7 +347,6 @@ void SAL_CALL LangGuess_Impl::enableLanguages( } } -//************************************************************************* OUString SAL_CALL LangGuess_Impl::getImplementationName( ) throw(RuntimeException) { @@ -354,20 +354,12 @@ OUString SAL_CALL LangGuess_Impl::getImplementationName( ) return OUString( IMPLNAME ); } -//************************************************************************* sal_Bool SAL_CALL LangGuess_Impl::supportsService( const OUString& ServiceName ) throw(RuntimeException) { - osl::MutexGuard aGuard( GetLangGuessMutex() ); - Sequence< OUString > aSNL = getSupportedServiceNames(); - const OUString * pArray = aSNL.getArray(); - for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) - if( pArray[i] == ServiceName ) - return sal_True; - return sal_False; + return cppu::supportsService(this, ServiceName); } -//************************************************************************* Sequence<OUString> SAL_CALL LangGuess_Impl::getSupportedServiceNames( ) throw(RuntimeException) { @@ -375,16 +367,12 @@ Sequence<OUString> SAL_CALL LangGuess_Impl::getSupportedServiceNames( ) return getSupportedServiceNames_Static(); } -//************************************************************************* Sequence<OUString> SAL_CALL LangGuess_Impl::getSupportedServiceNames_Static( ) { OUString aName( SERVICENAME ); return Sequence< OUString >( &aName, 1 ); } -//************************************************************************* - - /** * Function to create a new component instance; is needed by factory helper implementation. * @param xMgr service manager to if the components needs other component instances |