fdo#54938: More uses of cppu::supportsService
Change-Id: I90a7a07a43559b8d7e1d4b886b2624255200d46b Reviewed-on: https://gerrit.libreoffice.org/6406 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
a95ecd8b65
commit
704f95e525
@ -47,6 +47,7 @@
|
||||
#include <com/sun/star/lang/XUnoTunnel.hpp>
|
||||
#include <comphelper/servicehelper.hxx>
|
||||
#include <cppuhelper/interfacecontainer.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <cppuhelper/weakref.hxx>
|
||||
|
||||
#include <cppuhelper/implbase1.hxx>
|
||||
@ -781,23 +782,12 @@ OUString AnimationNode::getImplementationName() throw()
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// XServiceInfo
|
||||
sal_Bool AnimationNode::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
|
||||
Sequence< OUString > AnimationNode::getSupportedServiceNames(void) throw()
|
||||
{
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
#include <cppuhelper/typeprovider.hxx>
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
namespace avmedia{
|
||||
|
||||
@ -134,47 +135,19 @@ OUString SAL_CALL SoundHandler::getImplementationName() throw( css::uno::Runtime
|
||||
return impl_getStaticImplementationName();
|
||||
}
|
||||
|
||||
/*===========================================================================================================*/
|
||||
/* XServiceInfo */
|
||||
/*===========================================================================================================*/
|
||||
// XServiceInfo
|
||||
sal_Bool SAL_CALL SoundHandler::supportsService( const OUString& sServiceName ) throw( css::uno::RuntimeException )
|
||||
{
|
||||
/* Set default return value. */
|
||||
bool bReturn = sal_False ;
|
||||
/* Get names of all supported servicenames. */
|
||||
css::uno::Sequence < OUString > seqServiceNames = getSupportedServiceNames();
|
||||
const OUString* pArray = seqServiceNames.getConstArray();
|
||||
sal_Int32 nCounter = 0;
|
||||
sal_Int32 nLength = seqServiceNames.getLength();
|
||||
/* Search for right name in list. */
|
||||
while (
|
||||
( nCounter < nLength ) &&
|
||||
( bReturn == sal_False )
|
||||
)
|
||||
{
|
||||
/* Is name was found, say "YES, SERVICE IS SUPPORTED." and break loop. */
|
||||
if ( pArray[nCounter] == sServiceName )
|
||||
{
|
||||
bReturn = sal_True ;
|
||||
}
|
||||
/* Else step to next element in list. */
|
||||
++nCounter;
|
||||
}
|
||||
/* Return state of search. */
|
||||
return bReturn;
|
||||
return cppu::supportsService(this, sServiceName);
|
||||
}
|
||||
|
||||
/*===========================================================================================================*/
|
||||
/* XServiceInfo */
|
||||
/*===========================================================================================================*/
|
||||
// XServiceInfo
|
||||
css::uno::Sequence< OUString > SAL_CALL SoundHandler::getSupportedServiceNames() throw( css::uno::RuntimeException )
|
||||
{
|
||||
return impl_getStaticSupportedServiceNames();
|
||||
}
|
||||
|
||||
/*===========================================================================================================*/
|
||||
/* Helper for XServiceInfo */
|
||||
/*===========================================================================================================*/
|
||||
// Helper for XServiceInfo
|
||||
css::uno::Sequence< OUString > SoundHandler::impl_getStaticSupportedServiceNames()
|
||||
{
|
||||
css::uno::Sequence< OUString > seqServiceNames( 1 );
|
||||
@ -182,9 +155,7 @@ css::uno::Sequence< OUString > SoundHandler::impl_getStaticSupportedServiceNames
|
||||
return seqServiceNames;
|
||||
}
|
||||
|
||||
/*===========================================================================================================*/
|
||||
/* Helper for XServiceInfo */
|
||||
/*===========================================================================================================*/
|
||||
// Helper for XServiceInfo
|
||||
OUString SoundHandler::impl_getStaticImplementationName()
|
||||
{
|
||||
return IMPLEMENTATIONNAME_SOUNDHANDLER;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleRole.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <unotools/accessiblestatesethelper.hxx>
|
||||
#include <unotools/accessiblerelationsethelper.hxx>
|
||||
#include <toolkit/awt/vclxfont.hxx>
|
||||
@ -309,30 +310,17 @@ void AccessibleDialogControlShape::propertyChange( const beans::PropertyChangeEv
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// XServiceInfo
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
OUString AccessibleDialogControlShape::getImplementationName() throw (RuntimeException)
|
||||
{
|
||||
return OUString( "com.sun.star.comp.basctl.AccessibleShape" );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
sal_Bool AccessibleDialogControlShape::supportsService( const OUString& rServiceName ) throw (RuntimeException)
|
||||
{
|
||||
Sequence< OUString > aNames( getSupportedServiceNames() );
|
||||
const OUString* pNames = aNames.getConstArray();
|
||||
const OUString* pEnd = pNames + aNames.getLength();
|
||||
for ( ; pNames != pEnd && !pNames->equals( rServiceName ); ++pNames )
|
||||
;
|
||||
|
||||
return pNames != pEnd;
|
||||
return cppu::supportsService(this, rServiceName);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Sequence< OUString > AccessibleDialogControlShape::getSupportedServiceNames() throw (RuntimeException)
|
||||
{
|
||||
Sequence< OUString > aNames(1);
|
||||
@ -340,10 +328,7 @@ Sequence< OUString > AccessibleDialogControlShape::getSupportedServiceNames() th
|
||||
return aNames;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// XAccessible
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Reference< XAccessibleContext > AccessibleDialogControlShape::getAccessibleContext( ) throw (RuntimeException)
|
||||
{
|
||||
OExternalLockGuard aGuard( this );
|
||||
@ -351,10 +336,7 @@ Reference< XAccessibleContext > AccessibleDialogControlShape::getAccessibleConte
|
||||
return this;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// XAccessibleContext
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
sal_Int32 AccessibleDialogControlShape::getAccessibleChildCount() throw (RuntimeException)
|
||||
{
|
||||
OExternalLockGuard aGuard( this );
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleRole.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <unotools/accessiblestatesethelper.hxx>
|
||||
#include <unotools/accessiblerelationsethelper.hxx>
|
||||
#include <toolkit/awt/vclxfont.hxx>
|
||||
@ -605,30 +606,17 @@ void AccessibleDialogWindow::disposing()
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// XServiceInfo
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
OUString AccessibleDialogWindow::getImplementationName() throw (RuntimeException)
|
||||
{
|
||||
return OUString( "com.sun.star.comp.basctl.AccessibleWindow" );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
sal_Bool AccessibleDialogWindow::supportsService( const OUString& rServiceName ) throw (RuntimeException)
|
||||
{
|
||||
Sequence< OUString > aNames( getSupportedServiceNames() );
|
||||
const OUString* pNames = aNames.getConstArray();
|
||||
const OUString* pEnd = pNames + aNames.getLength();
|
||||
for ( ; pNames != pEnd && !pNames->equals( rServiceName ); ++pNames )
|
||||
;
|
||||
|
||||
return pNames != pEnd;
|
||||
return cppu::supportsService(this, rServiceName);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Sequence< OUString > AccessibleDialogWindow::getSupportedServiceNames() throw (RuntimeException)
|
||||
{
|
||||
Sequence< OUString > aNames(1);
|
||||
@ -636,10 +624,7 @@ Sequence< OUString > AccessibleDialogWindow::getSupportedServiceNames() throw (R
|
||||
return aNames;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// XAccessible
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Reference< XAccessibleContext > AccessibleDialogWindow::getAccessibleContext( ) throw (RuntimeException)
|
||||
{
|
||||
OExternalLockGuard aGuard( this );
|
||||
@ -647,10 +632,7 @@ Reference< XAccessibleContext > AccessibleDialogWindow::getAccessibleContext( )
|
||||
return this;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// XAccessibleContext
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
sal_Int32 AccessibleDialogWindow::getAccessibleChildCount() throw (RuntimeException)
|
||||
{
|
||||
OExternalLockGuard aGuard( this );
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "com/sun/star/uno/XInterface.hpp"
|
||||
#include "cppuhelper/factory.hxx"
|
||||
#include "cppuhelper/implementationentry.hxx"
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include "rtl/ref.hxx"
|
||||
#include "sal/types.h"
|
||||
|
||||
@ -93,13 +94,7 @@ OUString BridgeFactory::getImplementationName()
|
||||
sal_Bool BridgeFactory::supportsService(OUString const & ServiceName)
|
||||
throw (css::uno::RuntimeException)
|
||||
{
|
||||
css::uno::Sequence< OUString > s(getSupportedServiceNames());
|
||||
for (sal_Int32 i = 0; i != s.getLength(); ++i) {
|
||||
if (ServiceName == s[i]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
css::uno::Sequence< OUString > BridgeFactory::getSupportedServiceNames()
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "com/sun/star/uno/XInterface.hpp"
|
||||
#include "cppuhelper/factory.hxx"
|
||||
#include "cppuhelper/implbase3.hxx"
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include "cppuhelper/weak.hxx"
|
||||
#include "osl/conditn.hxx"
|
||||
#include "osl/interlck.h"
|
||||
@ -319,14 +320,7 @@ private:
|
||||
sal_Bool Service::supportsService(OUString const & serviceName)
|
||||
throw (css::uno::RuntimeException)
|
||||
{
|
||||
css::uno::Sequence< OUString > names(
|
||||
getSupportedServiceNames_static());
|
||||
for (sal_Int32 i = 0; i< names.getLength(); ++i) {
|
||||
if (names[i] == serviceName) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return cppu::supportsService(this, serviceName);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "com/sun/star/uno/XInterface.hpp"
|
||||
#include "cppuhelper/factory.hxx"
|
||||
#include "cppuhelper/implbase2.hxx"
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include "cppuhelper/weak.hxx"
|
||||
#include "rtl/string.h"
|
||||
#include "rtl/ustring.hxx"
|
||||
@ -94,12 +95,7 @@ private:
|
||||
sal_Bool Service::supportsService(OUString const & rServiceName)
|
||||
throw (css::uno::RuntimeException)
|
||||
{
|
||||
css::uno::Sequence< OUString > aNames(
|
||||
getSupportedServiceNames_static());
|
||||
for (sal_Int32 i = 0; i< aNames.getLength(); ++i)
|
||||
if (aNames[i] == rServiceName)
|
||||
return true;
|
||||
return false;
|
||||
return cppu::supportsService(this, rServiceName);
|
||||
}
|
||||
|
||||
void Service::connect(OUString const & rConnection,
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
|
||||
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <com/sun/star/registry/XRegistryKey.hpp>
|
||||
#include <i18nlangtag/languagetag.hxx>
|
||||
#include <tools/debug.hxx>
|
||||
@ -847,11 +848,7 @@ void SAL_CALL Hyphenator::removeEventListener( const Reference< XEventListener >
|
||||
aEvtListeners.removeInterface( rxListener );
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Service specific part
|
||||
//
|
||||
|
||||
OUString SAL_CALL Hyphenator::getImplementationName()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@ -860,21 +857,12 @@ OUString SAL_CALL Hyphenator::getImplementationName()
|
||||
return getImplementationName_Static();
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL Hyphenator::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 Hyphenator::getSupportedServiceNames()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@ -883,7 +871,6 @@ Sequence< OUString > SAL_CALL Hyphenator::getSupportedServiceNames()
|
||||
return getSupportedServiceNames_Static();
|
||||
}
|
||||
|
||||
|
||||
Sequence< OUString > Hyphenator::getSupportedServiceNames_Static()
|
||||
throw()
|
||||
{
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <cppuhelper/implementationentry.hxx>
|
||||
#include <cppuhelper/implbase2.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
#include <simpleguesser.hxx>
|
||||
#include <guess.hxx>
|
||||
@ -346,7 +347,6 @@ void SAL_CALL LangGuess_Impl::enableLanguages(
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
OUString SAL_CALL LangGuess_Impl::getImplementationName( )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@ -354,20 +354,12 @@ OUString SAL_CALL LangGuess_Impl::getImplementationName( )
|
||||
return OUString( IMPLNAME );
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
sal_Bool SAL_CALL LangGuess_Impl::supportsService( const OUString& ServiceName )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
osl::MutexGuard aGuard( GetLangGuessMutex() );
|
||||
Sequence< OUString > aSNL = getSupportedServiceNames();
|
||||
const OUString * pArray = aSNL.getArray();
|
||||
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 LangGuess_Impl::getSupportedServiceNames( )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@ -375,16 +367,12 @@ Sequence<OUString> SAL_CALL LangGuess_Impl::getSupportedServiceNames( )
|
||||
return getSupportedServiceNames_Static();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
Sequence<OUString> SAL_CALL LangGuess_Impl::getSupportedServiceNames_Static( )
|
||||
{
|
||||
OUString aName( SERVICENAME );
|
||||
return Sequence< OUString >( &aName, 1 );
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
|
||||
/**
|
||||
* Function to create a new component instance; is needed by factory helper implementation.
|
||||
* @param xMgr service manager to if the components needs other component instances
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <com/sun/star/linguistic2/SpellFailure.hpp>
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <com/sun/star/registry/XRegistryKey.hpp>
|
||||
#include <tools/debug.hxx>
|
||||
#include <osl/mutex.hxx>
|
||||
@ -520,11 +521,7 @@ void SAL_CALL
|
||||
aEvtListeners.removeInterface( rxListener );
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Service specific part
|
||||
//
|
||||
|
||||
OUString SAL_CALL MacSpellChecker::getImplementationName()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@ -533,21 +530,12 @@ OUString SAL_CALL MacSpellChecker::getImplementationName()
|
||||
return getImplementationName_Static();
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL MacSpellChecker::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 MacSpellChecker::getSupportedServiceNames()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@ -556,7 +544,6 @@ Sequence< OUString > SAL_CALL MacSpellChecker::getSupportedServiceNames()
|
||||
return getSupportedServiceNames_Static();
|
||||
}
|
||||
|
||||
|
||||
Sequence< OUString > MacSpellChecker::getSupportedServiceNames_Static()
|
||||
throw()
|
||||
{
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include <com/sun/star/linguistic2/SpellFailure.hpp>
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <com/sun/star/registry/XRegistryKey.hpp>
|
||||
#include <tools/debug.hxx>
|
||||
#include <osl/mutex.hxx>
|
||||
@ -630,10 +631,7 @@ void SAL_CALL SpellChecker::removeEventListener( const Reference< XEventListener
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Service specific part
|
||||
//
|
||||
|
||||
OUString SAL_CALL SpellChecker::getImplementationName()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@ -642,21 +640,12 @@ OUString SAL_CALL SpellChecker::getImplementationName()
|
||||
return getImplementationName_Static();
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL SpellChecker::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 SpellChecker::getSupportedServiceNames()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@ -665,7 +654,6 @@ Sequence< OUString > SAL_CALL SpellChecker::getSupportedServiceNames()
|
||||
return getSupportedServiceNames_Static();
|
||||
}
|
||||
|
||||
|
||||
Sequence< OUString > SpellChecker::getSupportedServiceNames_Static()
|
||||
throw()
|
||||
{
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "localebackend.hxx"
|
||||
#include <com/sun/star/beans/Optional.hpp>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <osl/time.h>
|
||||
|
||||
#include <stdio.h>
|
||||
@ -311,16 +312,12 @@ OUString SAL_CALL LocaleBackend::getBackendName(void) {
|
||||
return OUString("com.sun.star.comp.configuration.backend.LocaleBackend") ;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
OUString SAL_CALL LocaleBackend::getImplementationName(void)
|
||||
throw (uno::RuntimeException)
|
||||
{
|
||||
return getBackendName() ;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
uno::Sequence<OUString> SAL_CALL LocaleBackend::getBackendServiceNames(void)
|
||||
{
|
||||
uno::Sequence<OUString> aServiceNameList(1);
|
||||
@ -328,22 +325,12 @@ uno::Sequence<OUString> SAL_CALL LocaleBackend::getBackendServiceNames(void)
|
||||
return aServiceNameList ;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
sal_Bool SAL_CALL LocaleBackend::supportsService(const OUString& aServiceName)
|
||||
throw (uno::RuntimeException)
|
||||
{
|
||||
uno::Sequence< OUString > const svc = getBackendServiceNames();
|
||||
|
||||
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 LocaleBackend::getSupportedServiceNames(void)
|
||||
throw (uno::RuntimeException)
|
||||
{
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "macbackend.hxx"
|
||||
|
||||
#include "com/sun/star/beans/Optional.hpp"
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include "rtl/ustrbuf.hxx"
|
||||
#include "osl/file.h"
|
||||
|
||||
@ -447,8 +448,6 @@ rtl::OUString SAL_CALL MacOSXBackend::getImplementationName(void)
|
||||
return getBackendName();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
uno::Sequence<rtl::OUString> SAL_CALL MacOSXBackend::getBackendServiceNames(void)
|
||||
{
|
||||
uno::Sequence<rtl::OUString> aServiceNameList(1);
|
||||
@ -457,22 +456,12 @@ uno::Sequence<rtl::OUString> SAL_CALL MacOSXBackend::getBackendServiceNames(void
|
||||
return aServiceNameList;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
sal_Bool SAL_CALL MacOSXBackend::supportsService(const rtl::OUString& aServiceName)
|
||||
throw (uno::RuntimeException)
|
||||
{
|
||||
uno::Sequence< rtl::OUString > const svc = getBackendServiceNames();
|
||||
|
||||
for(sal_Int32 i = 0; i < svc.getLength(); ++i )
|
||||
if(svc[i] == aServiceName)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return cppu::supportsService(this, aServiceName);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
uno::Sequence<rtl::OUString> SAL_CALL MacOSXBackend::getSupportedServiceNames(void)
|
||||
throw (uno::RuntimeException)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include "rtl/ustrbuf.hxx"
|
||||
|
||||
#include "wininetbackend.hxx"
|
||||
@ -374,8 +374,6 @@ OUString SAL_CALL WinInetBackend::getImplementationName(void)
|
||||
return getBackendName() ;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
uno::Sequence<OUString> SAL_CALL WinInetBackend::getBackendServiceNames(void)
|
||||
{
|
||||
uno::Sequence<OUString> aServiceNameList(1);
|
||||
@ -384,22 +382,12 @@ uno::Sequence<OUString> SAL_CALL WinInetBackend::getBackendServiceNames(void)
|
||||
return aServiceNameList ;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
sal_Bool SAL_CALL WinInetBackend::supportsService(const OUString& aServiceName)
|
||||
throw (uno::RuntimeException)
|
||||
{
|
||||
uno::Sequence< OUString > const svc = getBackendServiceNames();
|
||||
|
||||
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 WinInetBackend::getSupportedServiceNames(void)
|
||||
throw (uno::RuntimeException)
|
||||
{
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||
#include <com/sun/star/beans/XPropertySet.hpp>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
@ -267,36 +268,21 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------
|
||||
// XServiceInfo
|
||||
// -------------------------------------------------
|
||||
|
||||
OUString SAL_CALL CmdMailSuppl::getImplementationName( )
|
||||
throw( RuntimeException )
|
||||
{
|
||||
return OUString(COMP_IMPL_NAME);
|
||||
}
|
||||
|
||||
// -------------------------------------------------
|
||||
// XServiceInfo
|
||||
// -------------------------------------------------
|
||||
|
||||
sal_Bool SAL_CALL CmdMailSuppl::supportsService( const OUString& ServiceName )
|
||||
throw( RuntimeException )
|
||||
{
|
||||
Sequence < OUString > SupportedServicesNames = Component_getSupportedServiceNames();
|
||||
|
||||
for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
|
||||
if ( SupportedServicesNames[n] == ServiceName )
|
||||
return sal_True;
|
||||
|
||||
return sal_False;
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
// -------------------------------------------------
|
||||
// XServiceInfo
|
||||
// -------------------------------------------------
|
||||
|
||||
Sequence< OUString > SAL_CALL CmdMailSuppl::getSupportedServiceNames( )
|
||||
throw( RuntimeException )
|
||||
{
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <com/sun/star/uri/XExternalUriReferenceTranslator.hpp>
|
||||
#include <com/sun/star/uri/ExternalUriReferenceTranslator.hpp>
|
||||
#include <com/sun/star/uri/UriReferenceFactory.hpp>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
#include "uno/current_context.hxx"
|
||||
|
||||
@ -265,37 +266,21 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------
|
||||
// XServiceInfo
|
||||
// -------------------------------------------------
|
||||
|
||||
OUString SAL_CALL ShellExec::getImplementationName( )
|
||||
throw( RuntimeException )
|
||||
{
|
||||
return OUString(SHELLEXEC_IMPL_NAME );
|
||||
}
|
||||
|
||||
// -------------------------------------------------
|
||||
// XServiceInfo
|
||||
// -------------------------------------------------
|
||||
|
||||
sal_Bool SAL_CALL ShellExec::supportsService( const OUString& ServiceName )
|
||||
throw( RuntimeException )
|
||||
{
|
||||
Sequence < OUString > SupportedServicesNames = ShellExec_getSupportedServiceNames();
|
||||
|
||||
for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
|
||||
if ( SupportedServicesNames[n] == ServiceName )
|
||||
return sal_True;
|
||||
|
||||
return sal_False;
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
// -------------------------------------------------
|
||||
// XServiceInfo
|
||||
// -------------------------------------------------
|
||||
|
||||
Sequence< OUString > SAL_CALL ShellExec::getSupportedServiceNames( )
|
||||
throw( RuntimeException )
|
||||
{
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
|
||||
#include <com/sun/star/uri/UriReferenceFactory.hpp>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#if defined _MSC_VER
|
||||
@ -341,36 +342,21 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------
|
||||
// XServiceInfo
|
||||
// -------------------------------------------------
|
||||
|
||||
OUString SAL_CALL CSysShExec::getImplementationName( )
|
||||
throw( RuntimeException )
|
||||
{
|
||||
return OUString(SYSSHEXEC_IMPL_NAME );
|
||||
}
|
||||
|
||||
// -------------------------------------------------
|
||||
// XServiceInfo
|
||||
// -------------------------------------------------
|
||||
|
||||
sal_Bool SAL_CALL CSysShExec::supportsService( const OUString& ServiceName )
|
||||
throw( RuntimeException )
|
||||
{
|
||||
Sequence < OUString > SupportedServicesNames = SysShExec_getSupportedServiceNames();
|
||||
|
||||
for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
|
||||
if ( SupportedServicesNames[n] == ServiceName )
|
||||
return sal_True;
|
||||
|
||||
return sal_False;
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
// -------------------------------------------------
|
||||
// XServiceInfo
|
||||
// -------------------------------------------------
|
||||
|
||||
Sequence< OUString > SAL_CALL CSysShExec::getSupportedServiceNames( )
|
||||
throw( RuntimeException )
|
||||
{
|
||||
|
@ -17,6 +17,7 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
#include "smplmailsuppl.hxx"
|
||||
#include "smplmailclient.hxx"
|
||||
@ -79,13 +80,7 @@ OUString SAL_CALL CSmplMailSuppl::getImplementationName()
|
||||
sal_Bool SAL_CALL CSmplMailSuppl::supportsService(const OUString& ServiceName)
|
||||
throw(RuntimeException)
|
||||
{
|
||||
Sequence <OUString> SupportedServicesNames = Component_getSupportedServiceNames();
|
||||
|
||||
for (sal_Int32 n = SupportedServicesNames.getLength(); n--;)
|
||||
if ( SupportedServicesNames[n] == ServiceName )
|
||||
return sal_True;
|
||||
|
||||
return sal_False;
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
Sequence<OUString> SAL_CALL CSmplMailSuppl::getSupportedServiceNames()
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <com/sun/star/awt/XWindow.hpp>
|
||||
#include <com/sun/star/lang/XUnoTunnel.hpp>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <com/sun/star/io/XInputStream.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
|
||||
@ -437,16 +438,7 @@ OUString SAL_CALL SmFilterDetect::getImplementationName() throw( RuntimeExceptio
|
||||
/* XServiceInfo */
|
||||
sal_Bool SAL_CALL SmFilterDetect::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);
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
|
Loading…
x
Reference in New Issue
Block a user