diff options
Diffstat (limited to 'toolkit/source/controls/unocontrol.cxx')
-rw-r--r-- | toolkit/source/controls/unocontrol.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index 5d6700e1d6dc..3830c24285fd 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/resource/XStringResourceResolver.hpp> #include <toolkit/controls/unocontrol.hxx> #include <toolkit/helper/vclunohelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/typeprovider.hxx> #include <rtl/uuid.h> #include <osl/mutex.hxx> @@ -1433,16 +1434,7 @@ OUString UnoControl::getImplementationName( ) throw(RuntimeException) sal_Bool UnoControl::supportsService( const OUString& rServiceName ) throw(RuntimeException) { - ::osl::MutexGuard aGuard( GetMutex() ); - - Sequence< OUString > aSNL = getSupportedServiceNames(); - const OUString* pArray = aSNL.getConstArray(); - const OUString* pArrayEnd = aSNL.getConstArray() + aSNL.getLength(); - for (; pArray != pArrayEnd; ++pArray ) - if( *pArray == rServiceName ) - break; - - return pArray != pArrayEnd; + return cppu::supportsService(this, rServiceName); } Sequence< OUString > UnoControl::getSupportedServiceNames( ) throw(RuntimeException) |