summaryrefslogtreecommitdiff
path: root/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lingucomponent/source/thesaurus/libnth/nthesimp.cxx')
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesimp.cxx16
1 files changed, 2 insertions, 14 deletions
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 132f03d23366..e549e45847af 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -20,6 +20,7 @@
#include <com/sun/star/uno/Reference.h>
#include <cppuhelper/factory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
@@ -645,11 +646,7 @@ void SAL_CALL Thesaurus::removeEventListener( const Reference< XEventListener >&
aEvtListeners.removeInterface( rxListener );
}
-
-///////////////////////////////////////////////////////////////////////////
// Service specific part
-//
-
OUString SAL_CALL Thesaurus::getImplementationName()
throw(RuntimeException)
{
@@ -661,17 +658,9 @@ OUString SAL_CALL Thesaurus::getImplementationName()
sal_Bool SAL_CALL Thesaurus::supportsService( const OUString& ServiceName )
throw(RuntimeException)
{
- MutexGuard aGuard( GetLinguMutex() );
-
- Sequence< OUString > aSNL = getSupportedServiceNames();
- const OUString * pArray = aSNL.getConstArray();
- 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 Thesaurus::getSupportedServiceNames()
throw(RuntimeException)
{
@@ -679,7 +668,6 @@ Sequence< OUString > SAL_CALL Thesaurus::getSupportedServiceNames()
return getSupportedServiceNames_Static();
}
-
Sequence< OUString > Thesaurus::getSupportedServiceNames_Static()
throw()
{