diff options
Diffstat (limited to 'dbaccess/source/ui/browser')
-rw-r--r-- | dbaccess/source/ui/browser/dbloader.cxx | 9 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 10 |
2 files changed, 4 insertions, 15 deletions
diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx index 7f90c9260900..3b0b795a71e6 100644 --- a/dbaccess/source/ui/browser/dbloader.cxx +++ b/dbaccess/source/ui/browser/dbloader.cxx @@ -42,6 +42,7 @@ #include <comphelper/namedvaluecollection.hxx> #include <comphelper/processfactory.hxx> #include <cppuhelper/implbase2.hxx> +#include <cppuhelper/supportsservice.hxx> #include <toolkit/awt/vclxwindow.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <tools/diagnose_ex.h> @@ -126,13 +127,7 @@ OUString SAL_CALL DBContentLoader::getImplementationName() throw( ) // XServiceInfo sal_Bool SAL_CALL DBContentLoader::supportsService(const OUString& ServiceName) throw( ) { - Sequence< OUString > aSNL = getSupportedServiceNames(); - const OUString * pBegin = aSNL.getConstArray(); - const OUString * pEnd = pBegin + aSNL.getLength(); - for( ; pBegin != pEnd; ++pBegin) - if( *pBegin == ServiceName ) - return sal_True; - return sal_False; + return cppu::supportsService(this, ServiceName); } // XServiceInfo diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 8a604022f7aa..5ea4421708f2 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -33,6 +33,7 @@ #include <framework/titlehelper.hxx> #include <comphelper/sequence.hxx> #include <comphelper/extract.hxx> +#include <cppuhelper/supportsservice.hxx> #include <com/sun/star/sdbc/XDataSource.hpp> #include <com/sun/star/sdb/DatabaseContext.hpp> #include <com/sun/star/sdb/SQLContext.hpp> @@ -960,14 +961,7 @@ bool OGenericUnoController::isUserDefinedFeature( const OUString& _rFeatureURL ) sal_Bool SAL_CALL OGenericUnoController::supportsService(const OUString& ServiceName) throw(RuntimeException) { - Sequence< OUString > aSupported(getSupportedServiceNames()); - - const OUString* pArray = aSupported.getConstArray(); - const OUString* pArrayEnd = aSupported.getConstArray() + aSupported.getLength(); - - for ( ;( pArray != pArrayEnd ) && !pArray->equals( ServiceName ); ++pArray ) - ; - return pArray != pArrayEnd; + return cppu::supportsService(this, ServiceName); } void OGenericUnoController::startConnectionListening(const Reference< XConnection >& _rxConnection) |