summaryrefslogtreecommitdiff
path: root/UnoControls
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-14 19:27:00 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-14 19:32:30 +0200
commit2171077c0c3c43a61546ab2c0ae68ba63c5112f7 (patch)
tree09461b7faec131f25b223b4bcbb2bf5b2a701763 /UnoControls
parent3ed834ae87eca0f6c486666699112a95edb74abb (diff)
Introduce cppu::supportsService helper, adapt some call-sites
...more to follow (easy hack?) Change-Id: Icb02626495701a3905c124c7368b98c3258e91b2
Diffstat (limited to 'UnoControls')
-rw-r--r--UnoControls/source/base/basecontrol.cxx12
1 files changed, 2 insertions, 10 deletions
diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx
index f8e63f27457e..068317b9075b 100644
--- a/UnoControls/source/base/basecontrol.cxx
+++ b/UnoControls/source/base/basecontrol.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/DeviceInfo.hpp>
#include <com/sun/star/awt/WindowAttribute.hpp>
#include <com/sun/star/awt/PosSize.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
//____________________________________________________________________________________________________________
@@ -246,16 +247,7 @@ OUString SAL_CALL BaseControl::getImplementationName() throw( RuntimeException )
sal_Bool SAL_CALL BaseControl::supportsService( const OUString& sServiceName ) throw( RuntimeException )
{
- Sequence< OUString > seqServiceNames = getSupportedServiceNames();
- const OUString* pArray = seqServiceNames.getConstArray();
- for ( sal_Int32 nCounter=0; nCounter<seqServiceNames.getLength(); nCounter++ )
- {
- if ( pArray[nCounter] == sServiceName )
- {
- return sal_True ;
- }
- }
- return sal_False ;
+ return cppu::supportsService(this, sServiceName);
}
//____________________________________________________________________________________________________________