summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/bibliography/bibload.cxx8
-rw-r--r--extensions/source/config/ldap/ldapuserprofilebe.cxx11
-rw-r--r--extensions/source/logging/consolehandler.cxx10
-rw-r--r--extensions/source/logging/csvformatter.cxx10
-rw-r--r--extensions/source/logging/filehandler.cxx11
-rw-r--r--extensions/source/logging/plaintextformatter.cxx11
-rw-r--r--extensions/source/propctrlr/inspectormodelbase.cxx12
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx9
-rw-r--r--extensions/source/update/check/updatecheckconfig.cxx11
-rw-r--r--extensions/source/update/check/updatecheckjob.cxx11
-rw-r--r--extensions/source/update/feed/updatefeed.cxx11
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx10
12 files changed, 24 insertions, 101 deletions
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index adb0046e962f..560b085d43e8 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -20,6 +20,7 @@
#include <osl/mutex.hxx>
#include <tools/diagnose_ex.h>
#include <cppuhelper/weak.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <svl/itemprop.hxx>
#include <uno/environment.h>
#include <svl/urihelper.hxx>
@@ -169,12 +170,7 @@ OUString BibliographyLoader::getImplementationName() throw( )
// XServiceInfo
sal_Bool BibliographyLoader::supportsService(const OUString& ServiceName) throw( )
{
- 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);
}
// XServiceInfo
diff --git a/extensions/source/config/ldap/ldapuserprofilebe.cxx b/extensions/source/config/ldap/ldapuserprofilebe.cxx
index 6985b07e65a2..fd595f347b70 100644
--- a/extensions/source/config/ldap/ldapuserprofilebe.cxx
+++ b/extensions/source/config/ldap/ldapuserprofilebe.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/Optional.hpp>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include <osl/security.hxx>
//==============================================================================
@@ -229,21 +230,13 @@ uno::Sequence<OUString> SAL_CALL LdapUserProfileBe::getLdapUserProfileBeServiceN
aServices[0] = OUString("com.sun.star.configuration.backend.LdapUserProfileBe") ;
return aServices ;
}
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL LdapUserProfileBe::supportsService(const OUString& aServiceName)
throw (uno::RuntimeException)
{
- uno::Sequence< OUString > const svc = getLdapUserProfileBeServiceNames();
-
- for(sal_Int32 i = 0; i < svc.getLength(); ++i )
- if(svc[i] == aServiceName)
- return true;
- return false;
+ return cppu::supportsService(this, aServiceName);
}
-//------------------------------------------------------------------------------
-
uno::Sequence<OUString>
SAL_CALL LdapUserProfileBe::getSupportedServiceNames(void)
throw (uno::RuntimeException)
diff --git a/extensions/source/logging/consolehandler.cxx b/extensions/source/logging/consolehandler.cxx
index 9c162ee3f23b..95a9a51e4bd3 100644
--- a/extensions/source/logging/consolehandler.cxx
+++ b/extensions/source/logging/consolehandler.cxx
@@ -32,6 +32,7 @@
#include <cppuhelper/compbase3.hxx>
#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <stdio.h>
@@ -276,14 +277,7 @@ namespace logging
//--------------------------------------------------------------------
::sal_Bool SAL_CALL ConsoleHandler::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- const Sequence< OUString > aServiceNames( getSupportedServiceNames() );
- for ( const OUString* pServiceNames = aServiceNames.getConstArray();
- pServiceNames != aServiceNames.getConstArray() + aServiceNames.getLength();
- ++pServiceNames
- )
- if ( _rServiceName == *pServiceNames )
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, _rServiceName);
}
//--------------------------------------------------------------------
diff --git a/extensions/source/logging/csvformatter.cxx b/extensions/source/logging/csvformatter.cxx
index c65624f49217..8acd74b655eb 100644
--- a/extensions/source/logging/csvformatter.cxx
+++ b/extensions/source/logging/csvformatter.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <rtl/ustrbuf.hxx>
@@ -313,14 +314,7 @@ namespace logging
::sal_Bool SAL_CALL CsvFormatter::supportsService( const OUString& service_name ) throw(RuntimeException)
{
- const Sequence< OUString > aServiceNames( getSupportedServiceNames() );
- for ( const OUString* pServiceNames = aServiceNames.getConstArray();
- pServiceNames != aServiceNames.getConstArray() + aServiceNames.getLength();
- ++pServiceNames
- )
- if ( service_name == *pServiceNames )
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, service_name);
}
OUString SAL_CALL CsvFormatter::getImplementationName() throw(RuntimeException)
diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx
index 93a4e71a007b..15f4e3592178 100644
--- a/extensions/source/logging/filehandler.cxx
+++ b/extensions/source/logging/filehandler.cxx
@@ -34,6 +34,7 @@
#include <cppuhelper/compbase3.hxx>
#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <osl/thread.h>
#include <osl/file.hxx>
@@ -376,17 +377,9 @@ namespace logging
return getImplementationName_static();
}
- //--------------------------------------------------------------------
::sal_Bool SAL_CALL FileHandler::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- const Sequence< OUString > aServiceNames( getSupportedServiceNames() );
- for ( const OUString* pServiceNames = aServiceNames.getConstArray();
- pServiceNames != aServiceNames.getConstArray() + aServiceNames.getLength();
- ++pServiceNames
- )
- if ( _rServiceName == *pServiceNames )
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, _rServiceName);
}
//--------------------------------------------------------------------
diff --git a/extensions/source/logging/plaintextformatter.cxx b/extensions/source/logging/plaintextformatter.cxx
index 35b01a6970fd..bf9bff1d26f3 100644
--- a/extensions/source/logging/plaintextformatter.cxx
+++ b/extensions/source/logging/plaintextformatter.cxx
@@ -27,6 +27,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <rtl/ustrbuf.hxx>
@@ -150,17 +151,9 @@ namespace logging
return OUString();
}
- //--------------------------------------------------------------------
::sal_Bool SAL_CALL PlainTextFormatter::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- const Sequence< OUString > aServiceNames( getSupportedServiceNames() );
- for ( const OUString* pServiceNames = aServiceNames.getConstArray();
- pServiceNames != aServiceNames.getConstArray() + aServiceNames.getLength();
- ++pServiceNames
- )
- if ( _rServiceName == *pServiceNames )
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, _rServiceName);
}
//--------------------------------------------------------------------
diff --git a/extensions/source/propctrlr/inspectormodelbase.cxx b/extensions/source/propctrlr/inspectormodelbase.cxx
index 5c6f21ebd316..3d5f2b57d309 100644
--- a/extensions/source/propctrlr/inspectormodelbase.cxx
+++ b/extensions/source/propctrlr/inspectormodelbase.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <comphelper/propertycontainerhelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
//........................................................................
namespace pcr
@@ -233,18 +234,9 @@ namespace pcr
setFastPropertyValue( MODEL_PROPERTY_ID_IS_READ_ONLY, makeAny( _IsReadOnly ) );
}
- //--------------------------------------------------------------------
::sal_Bool SAL_CALL ImplInspectorModel::supportsService( const OUString& ServiceName ) throw (RuntimeException)
{
- StlSyntaxSequence< OUString > aSupported( getSupportedServiceNames() );
- for ( StlSyntaxSequence< OUString >::const_iterator check = aSupported.begin();
- check != aSupported.end();
- ++check
- )
- if ( check->equals( ServiceName ) )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
//--------------------------------------------------------------------
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index eeab02ce297a..460ed2a060f5 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -46,6 +46,7 @@
#include <osl/mutex.hxx>
#include <cppuhelper/component_context.hxx>
#include <cppuhelper/exc_hlp.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <algorithm>
#include <functional>
@@ -562,15 +563,9 @@ namespace pcr
return getImplementationName_static();
}
- //------------------------------------------------------------------------
sal_Bool SAL_CALL OPropertyBrowserController::supportsService( const OUString& ServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pArray = aSupported.getConstArray();
- for (sal_Int32 i = 0; i < aSupported.getLength(); ++i, ++pArray)
- if (pArray->equals(ServiceName))
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
//------------------------------------------------------------------------
diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx
index 79a23ca647de..d739bdc6ec5c 100644
--- a/extensions/source/update/check/updatecheckconfig.cxx
+++ b/extensions/source/update/check/updatecheckconfig.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include <osl/security.hxx>
#include <osl/time.h>
#include <osl/file.hxx>
@@ -754,19 +755,11 @@ UpdateCheckConfig::getImplementationName() throw (uno::RuntimeException)
return getImplName();
}
-//------------------------------------------------------------------------------
-
sal_Bool SAL_CALL
UpdateCheckConfig::supportsService(OUString const & serviceName)
throw (uno::RuntimeException)
{
- uno::Sequence< OUString > aServiceNameList = getServiceNames();
-
- for( sal_Int32 n=0; n < aServiceNameList.getLength(); n++ )
- if( aServiceNameList[n].equals(serviceName) )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, serviceName);
}
//------------------------------------------------------------------------------
diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx
index b9cf884d8850..273450531c13 100644
--- a/extensions/source/update/check/updatecheckjob.cxx
+++ b/extensions/source/update/check/updatecheckjob.cxx
@@ -27,6 +27,7 @@
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implementationentry.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include "com/sun/star/frame/Desktop.hpp"
#include "com/sun/star/frame/XTerminateListener.hpp"
@@ -284,18 +285,10 @@ UpdateCheckJob::getSupportedServiceNames() throw (uno::RuntimeException)
return getServiceNames();
}
-//------------------------------------------------------------------------------
-
sal_Bool SAL_CALL
UpdateCheckJob::supportsService( OUString const & serviceName ) throw (uno::RuntimeException)
{
- uno::Sequence< OUString > aServiceNameList = getServiceNames();
-
- for( sal_Int32 n=0; n < aServiceNameList.getLength(); n++ )
- if( aServiceNameList[n].equals(serviceName) )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, serviceName);
}
//------------------------------------------------------------------------------
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index 555edb6093a6..e18afa18d362 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -22,6 +22,7 @@
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implementationentry.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
@@ -758,18 +759,10 @@ UpdateInformationProvider::getSupportedServiceNames() throw (uno::RuntimeExcepti
return getServiceNames();
}
-//------------------------------------------------------------------------------
-
sal_Bool SAL_CALL
UpdateInformationProvider::supportsService( OUString const & serviceName ) throw (uno::RuntimeException)
{
- uno::Sequence< OUString > aServiceNameList = getServiceNames();
-
- for( sal_Int32 n=0; n < aServiceNameList.getLength(); n++ )
- if( aServiceNameList[n].equals(serviceName) )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, serviceName);
}
} // anonymous namespace
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 7f1ec03e428f..9b167cbf7a8e 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -22,6 +22,7 @@
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implementationentry.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/document/XEventListener.hpp>
@@ -264,17 +265,10 @@ UpdateCheckUI::getSupportedServiceNames() throw (uno::RuntimeException)
return ::getServiceNames();
}
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL
UpdateCheckUI::supportsService( OUString const & serviceName ) throw (uno::RuntimeException)
{
- uno::Sequence< OUString > aServiceNameList = ::getServiceNames();
-
- for( sal_Int32 n=0; n < aServiceNameList.getLength(); n++ )
- if( aServiceNameList[n].equals(serviceName) )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, serviceName);
}
//------------------------------------------------------------------------------