summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx13
-rw-r--r--dtrans/source/cnttype/mcnttfactory.cxx12
-rw-r--r--dtrans/source/generic/clipboardmanager.cxx11
-rw-r--r--dtrans/source/generic/generic_clipboard.cxx11
-rw-r--r--dtrans/source/win32/clipb/WinClipboard.cxx12
-rw-r--r--dtrans/source/win32/ftransl/ftransl.cxx12
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx10
-rw-r--r--editeng/source/accessibility/AccessibleImageBullet.cxx10
-rw-r--r--embeddedobj/source/commonembedding/xfactory.cxx11
-rw-r--r--embeddedobj/source/general/xcreator.cxx11
-rw-r--r--embeddedobj/source/msole/xdialogcreator.cxx9
-rw-r--r--embeddedobj/source/msole/xolefactory.cxx10
-rw-r--r--embeddedobj/test/MainThreadExecutor/xexecutor.cxx10
-rw-r--r--embeddedobj/test/mtexecutor/bitmapcreator.cxx10
-rw-r--r--embeddedobj/test/mtexecutor/mainthreadexecutor.cxx10
-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
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx12
-rw-r--r--fpicker/source/office/OfficeFolderPicker.cxx12
-rw-r--r--fpicker/source/win32/filepicker/FilePicker.cxx12
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePicker.cxx12
-rw-r--r--fpicker/source/win32/folderpicker/FolderPicker.cxx12
-rw-r--r--linguistic/source/convdic.cxx9
-rw-r--r--linguistic/source/dlistimp.cxx11
-rw-r--r--linguistic/source/gciterator.cxx8
-rw-r--r--linguistic/source/hhconvdic.cxx7
-rw-r--r--linguistic/source/lngopt.cxx10
-rw-r--r--linguistic/source/lngsvcmgr.cxx10
-rw-r--r--linguistic/workben/sspellimp.cxx11
-rw-r--r--unoxml/source/dom/documentbuilder.cxx8
-rw-r--r--unoxml/source/dom/saxbuilder.cxx10
-rw-r--r--unoxml/source/events/testlistener.cxx8
-rw-r--r--unoxml/source/rdf/CBlankNode.cxx8
-rw-r--r--unoxml/source/rdf/CLiteral.cxx8
-rw-r--r--unoxml/source/rdf/CURI.cxx8
-rw-r--r--unoxml/source/rdf/librdf_repository.cxx9
-rw-r--r--unoxml/source/xpath/xpathapi.cxx10
-rw-r--r--uui/source/interactionhandler.cxx8
-rw-r--r--uui/source/passwordcontainer.cxx10
-rw-r--r--uui/source/requeststringresolver.cxx8
-rw-r--r--xmloff/source/core/unoatrcn.cxx12
51 files changed, 102 insertions, 418 deletions
diff --git a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
index 5568f8beb710..128d0ff98d1d 100644
--- a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
+++ b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
@@ -20,6 +20,7 @@
#include <com/sun/star/graphic/XPrimitive2DRenderer.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/xml/sax/XParser.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
#include <comphelper/processfactory.hxx>
@@ -193,17 +194,7 @@ namespace drawinglayer
sal_Bool SAL_CALL XPrimitive2DRenderer::supportsService(const OUString& rServiceName) throw(uno::RuntimeException)
{
- const uno::Sequence< OUString > aServices(XPrimitive2DRenderer_getSupportedServiceNames());
-
- for(sal_Int32 nService(0); nService < aServices.getLength(); nService++)
- {
- if(rServiceName == aServices[nService])
- {
- return sal_True;
- }
- }
-
- return sal_False;
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL XPrimitive2DRenderer::getSupportedServiceNames() throw(uno::RuntimeException)
diff --git a/dtrans/source/cnttype/mcnttfactory.cxx b/dtrans/source/cnttype/mcnttfactory.cxx
index ec43fcdbc5d6..8aa26febb320 100644
--- a/dtrans/source/cnttype/mcnttfactory.cxx
+++ b/dtrans/source/cnttype/mcnttfactory.cxx
@@ -18,6 +18,7 @@
*/
#include <osl/diagnose.h>
+#include <cppuhelper/supportsservice.hxx>
#include "mcnttfactory.hxx"
#include "mcnttype.hxx"
@@ -77,20 +78,11 @@ OUString SAL_CALL CMimeContentTypeFactory::getImplementationName( )
return OUString( MIMECONTENTTYPEFACTORY_IMPL_NAME );
}
-// -------------------------------------------------
// XServiceInfo
-// -------------------------------------------------
-
sal_Bool SAL_CALL CMimeContentTypeFactory::supportsService( const OUString& ServiceName )
throw( RuntimeException )
{
- Sequence < OUString > SupportedServicesNames = MimeContentTypeFactory_getSupportedServiceNames();
-
- for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
- if ( SupportedServicesNames[n] == ServiceName )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
// -------------------------------------------------
diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx
index d4f6f9dbdb7d..6d130615d61a 100644
--- a/dtrans/source/generic/clipboardmanager.cxx
+++ b/dtrans/source/generic/clipboardmanager.cxx
@@ -19,6 +19,7 @@
#include <clipboardmanager.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
+#include <cppuhelper/supportsservice.hxx>
using namespace com::sun::star::container;
using namespace com::sun::star::datatransfer;
@@ -53,18 +54,10 @@ OUString SAL_CALL ClipboardManager::getImplementationName( )
return OUString(CLIPBOARDMANAGER_IMPLEMENTATION_NAME);
}
-// ------------------------------------------------------------------------
-
sal_Bool SAL_CALL ClipboardManager::supportsService( const OUString& ServiceName )
throw(RuntimeException)
{
- Sequence < OUString > SupportedServicesNames = ClipboardManager_getSupportedServiceNames();
-
- for ( sal_Int32 n = 0, nmax = SupportedServicesNames.getLength(); n < nmax; n++ )
- if ( SupportedServicesNames[n] == ServiceName )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
// ------------------------------------------------------------------------
diff --git a/dtrans/source/generic/generic_clipboard.cxx b/dtrans/source/generic/generic_clipboard.cxx
index 04e813542087..d582ccad159c 100644
--- a/dtrans/source/generic/generic_clipboard.cxx
+++ b/dtrans/source/generic/generic_clipboard.cxx
@@ -20,6 +20,7 @@
#include <generic_clipboard.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/datatransfer/clipboard/RenderingCapabilities.hpp>
+#include <cppuhelper/supportsservice.hxx>
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::datatransfer::clipboard;
@@ -66,18 +67,10 @@ OUString SAL_CALL GenericClipboard::getImplementationName( )
return OUString(GENERIC_CLIPBOARD_IMPLEMENTATION_NAME);
}
-// ------------------------------------------------------------------------
-
sal_Bool SAL_CALL GenericClipboard::supportsService( const OUString& ServiceName )
throw(RuntimeException)
{
- Sequence < OUString > SupportedServicesNames = GenericClipboard_getSupportedServiceNames();
-
- for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
- if ( SupportedServicesNames[n] == ServiceName )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
// ------------------------------------------------------------------------
diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx
index ef7d410aa039..66f54441055b 100644
--- a/dtrans/source/win32/clipb/WinClipboard.cxx
+++ b/dtrans/source/win32/clipb/WinClipboard.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/datatransfer/clipboard/ClipboardEvent.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include "WinClipbImpl.hxx"
//------------------------------------------------------------------------
@@ -277,20 +278,11 @@ OUString SAL_CALL CWinClipboard::getImplementationName( )
return OUString( WINCLIPBOARD_IMPL_NAME );
}
-// -------------------------------------------------
// XServiceInfo
-// -------------------------------------------------
-
sal_Bool SAL_CALL CWinClipboard::supportsService( const OUString& ServiceName )
throw(RuntimeException)
{
- Sequence < OUString > SupportedServicesNames = WinClipboard_getSupportedServiceNames();
-
- for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
- if ( SupportedServicesNames[n] == ServiceName )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
// -------------------------------------------------
diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx
index b808fe89c9b0..41b903ab9742 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/datatransfer/XMimeContentType.hpp>
#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include "../misc/ImplHelper.hxx"
#if defined _MSC_VER
@@ -214,20 +215,11 @@ OUString SAL_CALL CDataFormatTranslator::getImplementationName( )
return OUString( IMPL_NAME );
}
-// -------------------------------------------------
// XServiceInfo
-// -------------------------------------------------
-
sal_Bool SAL_CALL CDataFormatTranslator::supportsService( const OUString& ServiceName )
throw( RuntimeException )
{
- Sequence < OUString > SupportedServicesNames = DataFormatTranslator_getSupportedServiceNames();
-
- for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
- if ( SupportedServicesNames[n] == ServiceName )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
// -------------------------------------------------
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 8a5688215076..191a19339101 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -42,6 +42,7 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <comphelper/accessibleeventnotifier.hxx>
#include <comphelper/sequenceashashmap.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
@@ -2197,14 +2198,7 @@ namespace accessibility
{
DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
- // Iterate over all supported service names and return true if on of them
- // matches the given name.
- uno::Sequence< OUString> aSupportedServices (
- getSupportedServiceNames ());
- for (int i=0; i<aSupportedServices.getLength(); i++)
- if (sServiceName == aSupportedServices[i])
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, sServiceName);
}
uno::Sequence< OUString> SAL_CALL AccessibleEditableTextPara::getSupportedServiceNames (void) throw (uno::RuntimeException)
diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx
index 3e9c2e23ed27..51b464446bc0 100644
--- a/editeng/source/accessibility/AccessibleImageBullet.cxx
+++ b/editeng/source/accessibility/AccessibleImageBullet.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <comphelper/accessibleeventnotifier.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <editeng/unolingu.hxx>
#include "editeng/AccessibleEditableTextPara.hxx"
@@ -380,14 +381,7 @@ namespace accessibility
{
DBG_CHKTHIS( AccessibleImageBullet, NULL );
- // Iterate over all supported service names and return true if on of them
- // matches the given name.
- uno::Sequence< OUString > aSupportedServices (
- getSupportedServiceNames ());
- for (int i=0; i<aSupportedServices.getLength(); i++)
- if (sServiceName == aSupportedServices[i])
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, sServiceName);
}
uno::Sequence< OUString > SAL_CALL AccessibleImageBullet::getSupportedServiceNames (void) throw (uno::RuntimeException)
diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx
index 58567275318e..5a964bcaedb8 100644
--- a/embeddedobj/source/commonembedding/xfactory.cxx
+++ b/embeddedobj/source/commonembedding/xfactory.cxx
@@ -25,7 +25,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <comphelper/processfactory.hxx>
-
+#include <cppuhelper/supportsservice.hxx>
#include "xfactory.hxx"
#include "commonembobj.hxx"
@@ -454,17 +454,10 @@ OUString SAL_CALL OOoEmbeddedObjectFactory::getImplementationName()
return impl_staticGetImplementationName();
}
-//-------------------------------------------------------------------------
sal_Bool SAL_CALL OOoEmbeddedObjectFactory::supportsService( const OUString& ServiceName )
throw ( uno::RuntimeException )
{
- uno::Sequence< OUString > aSeq = impl_staticGetSupportedServiceNames();
-
- for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
- if ( ServiceName == aSeq[nInd] )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
//-------------------------------------------------------------------------
diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx
index d3bb4ccbeb11..64d2e03ee395 100644
--- a/embeddedobj/source/general/xcreator.cxx
+++ b/embeddedobj/source/general/xcreator.cxx
@@ -30,7 +30,7 @@
#include <com/sun/star/lang/XComponent.hpp>
#include <comphelper/processfactory.hxx>
-
+#include <cppuhelper/supportsservice.hxx>
#include <xcreator.hxx>
#include <dummyobject.hxx>
@@ -445,17 +445,10 @@ OUString SAL_CALL UNOEmbeddedObjectCreator::getImplementationName()
return impl_staticGetImplementationName();
}
-//-------------------------------------------------------------------------
sal_Bool SAL_CALL UNOEmbeddedObjectCreator::supportsService( const OUString& ServiceName )
throw ( uno::RuntimeException )
{
- uno::Sequence< OUString > aSeq = impl_staticGetSupportedServiceNames();
-
- for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
- if ( ServiceName == aSeq[nInd] )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
//-------------------------------------------------------------------------
diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx
index 72d950836a6e..dce9eba9971d 100644
--- a/embeddedobj/source/msole/xdialogcreator.cxx
+++ b/embeddedobj/source/msole/xdialogcreator.cxx
@@ -33,6 +33,7 @@
#include "platform.h"
#include <comphelper/mimeconfighelper.hxx>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include "xdialogcreator.hxx"
#include "oleembobj.hxx"
@@ -343,13 +344,7 @@ OUString SAL_CALL MSOLEDialogObjectCreator::getImplementationName()
sal_Bool SAL_CALL MSOLEDialogObjectCreator::supportsService( const OUString& ServiceName )
throw ( uno::RuntimeException )
{
- uno::Sequence< OUString > aSeq = impl_staticGetSupportedServiceNames();
-
- for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
- if ( ServiceName == aSeq[nInd] )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
//-------------------------------------------------------------------------
diff --git a/embeddedobj/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx
index 11e7a7f6fe3f..65bf507c9078 100644
--- a/embeddedobj/source/msole/xolefactory.cxx
+++ b/embeddedobj/source/msole/xolefactory.cxx
@@ -27,6 +27,7 @@
#include "xolefactory.hxx"
#include "oleembobj.hxx"
+#include <cppuhelper/supportsservice.hxx>
using namespace ::com::sun::star;
@@ -307,17 +308,10 @@ OUString SAL_CALL OleEmbeddedObjectFactory::getImplementationName()
return impl_staticGetImplementationName();
}
-//-------------------------------------------------------------------------
sal_Bool SAL_CALL OleEmbeddedObjectFactory::supportsService( const OUString& ServiceName )
throw ( uno::RuntimeException )
{
- uno::Sequence< OUString > aSeq = impl_staticGetSupportedServiceNames();
-
- for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
- if ( ServiceName == aSeq[nInd] )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
//-------------------------------------------------------------------------
diff --git a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx b/embeddedobj/test/MainThreadExecutor/xexecutor.cxx
index 2634e7a336ff..1fdbb1092ac8 100644
--- a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx
+++ b/embeddedobj/test/MainThreadExecutor/xexecutor.cxx
@@ -20,6 +20,7 @@
#include "xexecutor.hxx"
#include <vcl/svapp.hxx>
#include <osl/thread.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace ::com::sun::star;
@@ -109,17 +110,10 @@ OUString SAL_CALL UNOMainThreadExecutor::getImplementationName()
return impl_staticGetImplementationName();
}
-//-------------------------------------------------------------------------
sal_Bool SAL_CALL UNOMainThreadExecutor::supportsService( const OUString& ServiceName )
throw ( uno::RuntimeException )
{
- uno::Sequence< OUString > aSeq = impl_staticGetSupportedServiceNames();
-
- for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
- if ( ServiceName == aSeq[nInd] )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
//-------------------------------------------------------------------------
diff --git a/embeddedobj/test/mtexecutor/bitmapcreator.cxx b/embeddedobj/test/mtexecutor/bitmapcreator.cxx
index 7f0907835681..3c81ccaa41c7 100644
--- a/embeddedobj/test/mtexecutor/bitmapcreator.cxx
+++ b/embeddedobj/test/mtexecutor/bitmapcreator.cxx
@@ -19,6 +19,7 @@
#include "bitmapcreator.hxx"
+#include <cppuhelper/supportsservice.hxx>
#include <vcl/bitmapex.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/stream.hxx>
@@ -90,17 +91,10 @@ OUString SAL_CALL VCLBitmapCreator::getImplementationName()
return impl_staticGetImplementationName();
}
-//-------------------------------------------------------------------------
sal_Bool SAL_CALL VCLBitmapCreator::supportsService( const OUString& ServiceName )
throw ( uno::RuntimeException )
{
- uno::Sequence< OUString > aSeq = impl_staticGetSupportedServiceNames();
-
- for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
- if ( ServiceName == aSeq[nInd] )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
//-------------------------------------------------------------------------
diff --git a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx b/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx
index 788c0e819fd1..1a0b70f6fa64 100644
--- a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx
+++ b/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx
@@ -19,6 +19,7 @@
#include "mainthreadexecutor.hxx"
+#include <cppuhelper/supportsservice.hxx>
#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
@@ -91,17 +92,10 @@ OUString SAL_CALL MainThreadExecutor::getImplementationName()
return impl_staticGetImplementationName();
}
-//-------------------------------------------------------------------------
sal_Bool SAL_CALL MainThreadExecutor::supportsService( const OUString& ServiceName )
throw ( uno::RuntimeException )
{
- uno::Sequence< OUString > aSeq = impl_staticGetSupportedServiceNames();
-
- for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
- if ( ServiceName == aSeq[nInd] )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
//-------------------------------------------------------------------------
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);
}
//------------------------------------------------------------------------------
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 13c7dbb7b234..3ec8b9fc655f 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -38,6 +38,7 @@
#include <unotools/ucbhelper.hxx>
#include <unotools/pathoptions.hxx>
#include <comphelper/sequence.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include "osl/mutex.hxx"
#include "vcl/svapp.hxx"
@@ -1117,16 +1118,7 @@ OUString SAL_CALL SvtFilePicker::getImplementationName() throw( RuntimeException
/* XServiceInfo */
sal_Bool SAL_CALL SvtFilePicker::supportsService( const OUString& sServiceName ) throw( RuntimeException )
{
- Sequence< OUString > seqServiceNames = getSupportedServiceNames();
- const OUString* pArray = seqServiceNames.getConstArray();
- for ( sal_Int32 i = 0; i < seqServiceNames.getLength(); i++ )
- {
- if ( sServiceName == pArray[i] )
- {
- return sal_True ;
- }
- }
- return sal_False ;
+ return cppu::supportsService(this, sServiceName);
}
/* XServiceInfo */
diff --git a/fpicker/source/office/OfficeFolderPicker.cxx b/fpicker/source/office/OfficeFolderPicker.cxx
index 1cf1d052f938..8a00b202fb65 100644
--- a/fpicker/source/office/OfficeFolderPicker.cxx
+++ b/fpicker/source/office/OfficeFolderPicker.cxx
@@ -27,6 +27,7 @@
#include <com/sun/star/container/XSet.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <cppuhelper/factory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <unotools/pathoptions.hxx>
@@ -161,16 +162,7 @@ OUString SAL_CALL SvtFolderPicker::getImplementationName() throw( RuntimeExcepti
/* XServiceInfo */
sal_Bool SAL_CALL SvtFolderPicker::supportsService( const OUString& sServiceName ) throw( RuntimeException )
{
- Sequence< OUString > seqServiceNames = getSupportedServiceNames();
- const OUString* pArray = seqServiceNames.getConstArray();
- for ( sal_Int32 i = 0; i < seqServiceNames.getLength(); i++ )
- {
- if ( sServiceName == pArray[i] )
- {
- return sal_True ;
- }
- }
- return sal_False ;
+ return cppu::supportsService(this, sServiceName);
}
/* XServiceInfo */
diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx
index 5831103a9a2e..18a185844dc5 100644
--- a/fpicker/source/win32/filepicker/FilePicker.cxx
+++ b/fpicker/source/win32/filepicker/FilePicker.cxx
@@ -20,6 +20,7 @@
#include <tchar.h>
#include <com/sun/star/lang/DisposedException.hpp>
#include <cppuhelper/interfacecontainer.h>
+#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h>
#include "FilePicker.hxx"
@@ -713,20 +714,11 @@ OUString SAL_CALL CFilePicker::getImplementationName()
return OUString(RTL_CONSTASCII_USTRINGPARAM(FILE_PICKER_IMPL_NAME));
}
-// -------------------------------------------------
// XServiceInfo
-// -------------------------------------------------
-
sal_Bool SAL_CALL CFilePicker::supportsService(const OUString& ServiceName)
throw(uno::RuntimeException )
{
- uno::Sequence <OUString> SupportedServicesNames = FilePicker_getSupportedServiceNames();
-
- for (sal_Int32 n = SupportedServicesNames.getLength(); n--;)
- if (SupportedServicesNames[n] == ServiceName)
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
// -------------------------------------------------
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index f5f343f3845f..76f0658c345c 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <cppuhelper/interfacecontainer.h>
+#include <cppuhelper/supportsservice.hxx>
#include <comphelper/processfactory.hxx>
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
@@ -610,20 +611,11 @@ OUString SAL_CALL VistaFilePicker::getImplementationName()
return OUString("com.sun.star.comp.fpicker.VistaFileDialog");
}
-// -------------------------------------------------
// XServiceInfo
-// -------------------------------------------------
-
sal_Bool SAL_CALL VistaFilePicker::supportsService(const OUString& sServiceName)
throw(css::uno::RuntimeException )
{
- css::uno::Sequence< OUString > lSupportedServicesNames = VistaFilePicker_getSupportedServiceNames();
-
- for (sal_Int32 n = lSupportedServicesNames.getLength(); n--;)
- if (lSupportedServicesNames[n] == sServiceName)
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, sServiceName);
}
// -------------------------------------------------
diff --git a/fpicker/source/win32/folderpicker/FolderPicker.cxx b/fpicker/source/win32/folderpicker/FolderPicker.cxx
index 2ea545867b24..bdf4d2294acb 100644
--- a/fpicker/source/win32/folderpicker/FolderPicker.cxx
+++ b/fpicker/source/win32/folderpicker/FolderPicker.cxx
@@ -21,6 +21,7 @@
#include "FolderPicker.hxx"
#include <com/sun/star/lang/DisposedException.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include "WinFOPImpl.hxx"
//------------------------------------------------------------------------
@@ -149,20 +150,11 @@ OUString SAL_CALL CFolderPicker::getImplementationName( )
return OUString(RTL_CONSTASCII_USTRINGPARAM( FOLDERPICKER_IMPL_NAME ));
}
-// -------------------------------------------------
// XServiceInfo
-// -------------------------------------------------
-
sal_Bool SAL_CALL CFolderPicker::supportsService( const OUString& ServiceName )
throw( RuntimeException )
{
- Sequence < OUString > SupportedServicesNames = FolderPicker_getSupportedServiceNames();
-
- for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
- if ( SupportedServicesNames[n] == ServiceName )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
// -------------------------------------------------
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index 66c657eb6db3..fb00d9db2eac 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -27,6 +27,7 @@
#include <tools/urlobj.hxx>
#include <ucbhelper/content.hxx>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -655,18 +656,12 @@ OUString SAL_CALL ConvDic::getImplementationName( )
return getImplementationName_Static();
}
-
sal_Bool SAL_CALL ConvDic::supportsService( const OUString& rServiceName )
throw (RuntimeException)
{
- MutexGuard aGuard( GetLinguMutex() );
- sal_Bool bRes = sal_False;
- if ( rServiceName == SN_CONV_DICTIONARY )
- bRes = sal_True;
- return bRes;
+ return cppu::supportsService(this, rServiceName);
}
-
uno::Sequence< OUString > SAL_CALL ConvDic::getSupportedServiceNames( )
throw (RuntimeException)
{
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 45db2012f9ee..2267e20d6c3b 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -26,6 +26,7 @@
#include <unotools/pathoptions.hxx>
#include <unotools/useroptions.hxx>
#include <cppuhelper/factory.hxx> // helper for factories
+#include <cppuhelper/supportsservice.hxx>
#include <unotools/localfilehelper.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -739,17 +740,9 @@ OUString SAL_CALL DicList::getImplementationName( ) throw(RuntimeException)
sal_Bool SAL_CALL DicList::supportsService( const OUString& ServiceName )
throw(RuntimeException)
{
- osl::MutexGuard aGuard( GetLinguMutex() );
-
- uno::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);
}
-
uno::Sequence< OUString > SAL_CALL DicList::getSupportedServiceNames( )
throw(RuntimeException)
{
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index efde32c9b067..5f2c51f658b5 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -52,6 +52,7 @@
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/factory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/extract.hxx>
@@ -1048,12 +1049,7 @@ sal_Bool SAL_CALL GrammarCheckingIterator::supportsService(
const OUString & rServiceName )
throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aSNL = getSupportedServiceNames();
- const OUString * pArray = aSNL.getConstArray();
- for( sal_Int32 i = 0; i < aSNL.getLength(); ++i )
- if( pArray[i] == rServiceName )
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, rServiceName);
}
diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx
index a34644216cb1..090f0e96493a 100644
--- a/linguistic/source/hhconvdic.cxx
+++ b/linguistic/source/hhconvdic.cxx
@@ -25,6 +25,7 @@
#include <ucbhelper/content.hxx>
#include <cppuhelper/factory.hxx> // helper for factories
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/linguistic2/XConversionDictionary.hpp>
#include <com/sun/star/linguistic2/ConversionDictionaryType.hpp>
#include <com/sun/star/lang/Locale.hpp>
@@ -121,11 +122,7 @@ OUString SAL_CALL HHConvDic::getImplementationName( )
sal_Bool SAL_CALL HHConvDic::supportsService( const OUString& rServiceName )
throw (RuntimeException)
{
- MutexGuard aGuard( GetLinguMutex() );
- sal_Bool bRes = sal_False;
- if ( rServiceName == SN_CONV_DICTIONARY || rServiceName == SN_HH_CONV_DICTIONARY )
- bRes = sal_True;
- return bRes;
+ return cppu::supportsService(this, rServiceName);
}
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 75babc93dfce..9b6be98fdce4 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -29,6 +29,7 @@
#include <cppuhelper/implbase1.hxx> // helper for implementations
#include <cppuhelper/factory.hxx> // helper for factories
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/registry/XSimpleRegistry.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
@@ -433,14 +434,7 @@ OUString SAL_CALL LinguProps::getImplementationName()
sal_Bool SAL_CALL LinguProps::supportsService( const OUString& ServiceName )
throw(RuntimeException)
{
- MutexGuard aGuard( GetLinguMutex() );
-
- uno::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/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index a8aeeede7766..51dc1708dff8 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -34,6 +34,7 @@
#include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
#include <cppuhelper/factory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <comphelper/extract.hxx>
#include <boost/checked_delete.hpp>
@@ -2053,14 +2054,7 @@ sal_Bool SAL_CALL
LngSvcMgr::supportsService( const OUString& ServiceName )
throw(uno::RuntimeException)
{
- osl::MutexGuard aGuard( GetLinguMutex() );
-
- uno::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);
}
diff --git a/linguistic/workben/sspellimp.cxx b/linguistic/workben/sspellimp.cxx
index 775c2fab20de..e4e7dd945c93 100644
--- a/linguistic/workben/sspellimp.cxx
+++ b/linguistic/workben/sspellimp.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <comphelper/string.hxx>
#include <cppuhelper/factory.hxx> // helper for factories
+#include <cppuhelper/supportsservice.hxx>
#include <tools/debug.hxx>
#include <osl/mutex.hxx>
@@ -415,17 +416,9 @@ OUString SAL_CALL SpellChecker::getImplementationName()
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)
{
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index e3a7bac1d544..6cd4798a2608 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -33,6 +33,7 @@
#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/xml/sax/SAXParseException.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
@@ -132,12 +133,7 @@ namespace DOM
sal_Bool SAL_CALL CDocumentBuilder::supportsService(const OUString& aServiceName)
throw (RuntimeException)
{
- Sequence< OUString > supported = CDocumentBuilder::_getSupportedServiceNames();
- for (sal_Int32 i=0; i<supported.getLength(); i++)
- {
- if (supported[i] == aServiceName) return sal_True;
- }
- return sal_False;
+ return cppu::supportsService(this, aServiceName);
}
Reference< XDOMImplementation > SAL_CALL CDocumentBuilder::getDOMImplementation()
diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx
index 75edd9a6c450..8e1c69c2d22e 100644
--- a/unoxml/source/dom/saxbuilder.cxx
+++ b/unoxml/source/dom/saxbuilder.cxx
@@ -24,7 +24,7 @@
#include <com/sun/star/xml/dom/DocumentBuilder.hpp>
#include <comphelper/processfactory.hxx>
-
+#include <cppuhelper/supportsservice.hxx>
namespace DOM
{
@@ -73,15 +73,9 @@ namespace DOM
sal_Bool SAL_CALL CSAXDocumentBuilder::supportsService(const OUString& aServiceName)
throw (RuntimeException)
{
- Sequence< OUString > supported = CSAXDocumentBuilder::_getSupportedServiceNames();
- for (sal_Int32 i=0; i<supported.getLength(); i++)
- {
- if (supported[i] == aServiceName) return sal_True;
- }
- return sal_False;
+ return cppu::supportsService(this, aServiceName);
}
-
SAXDocumentBuilderState SAL_CALL CSAXDocumentBuilder::getState()
throw (RuntimeException)
{
diff --git a/unoxml/source/events/testlistener.cxx b/unoxml/source/events/testlistener.cxx
index f99d53febf37..9c9dad01a75a 100644
--- a/unoxml/source/events/testlistener.cxx
+++ b/unoxml/source/events/testlistener.cxx
@@ -19,6 +19,7 @@
#include <stdio.h>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include "testlistener.hxx"
@@ -74,12 +75,7 @@ namespace DOM { namespace events
sal_Bool SAL_CALL CTestListener::supportsService(const OUString& aServiceName)
throw (RuntimeException)
{
- Sequence< OUString > supported = CTestListener::_getSupportedServiceNames();
- for (sal_Int32 i=0; i<supported.getLength(); i++)
- {
- if (supported[i] == aServiceName) return sal_True;
- }
- return sal_False;
+ return cppu::supportsService(this, aServiceName);
}
// --- XInitialize
diff --git a/unoxml/source/rdf/CBlankNode.cxx b/unoxml/source/rdf/CBlankNode.cxx
index f4540cfd1d0f..8b469299765c 100644
--- a/unoxml/source/rdf/CBlankNode.cxx
+++ b/unoxml/source/rdf/CBlankNode.cxx
@@ -20,6 +20,7 @@
#include "CNodes.hxx"
#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/rdf/XBlankNode.hpp>
@@ -72,12 +73,7 @@ OUString SAL_CALL CBlankNode::getImplementationName() throw (css::uno::RuntimeEx
::sal_Bool SAL_CALL CBlankNode::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException)
{
- css::uno::Sequence< OUString > serviceNames = comp_CBlankNode::_getSupportedServiceNames();
- for (::sal_Int32 i = 0; i < serviceNames.getLength(); ++i) {
- if (serviceNames[i] == serviceName)
- return sal_True;
- }
- return sal_False;
+ return cppu::supportsService(this, serviceName);
}
css::uno::Sequence< OUString > SAL_CALL CBlankNode::getSupportedServiceNames() throw (css::uno::RuntimeException)
diff --git a/unoxml/source/rdf/CLiteral.cxx b/unoxml/source/rdf/CLiteral.cxx
index 14c3fca88d95..e19d4cfaab42 100644
--- a/unoxml/source/rdf/CLiteral.cxx
+++ b/unoxml/source/rdf/CLiteral.cxx
@@ -20,6 +20,7 @@
#include "CNodes.hxx"
#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/rdf/XLiteral.hpp>
@@ -81,12 +82,7 @@ OUString SAL_CALL CLiteral::getImplementationName() throw (css::uno::RuntimeExce
::sal_Bool SAL_CALL CLiteral::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException)
{
- css::uno::Sequence< OUString > serviceNames = comp_CLiteral::_getSupportedServiceNames();
- for (::sal_Int32 i = 0; i < serviceNames.getLength(); ++i) {
- if (serviceNames[i] == serviceName)
- return sal_True;
- }
- return sal_False;
+ return cppu::supportsService(this, serviceName);
}
css::uno::Sequence< OUString > SAL_CALL CLiteral::getSupportedServiceNames() throw (css::uno::RuntimeException)
diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx
index 63ff77ed0c7a..474135e77d47 100644
--- a/unoxml/source/rdf/CURI.cxx
+++ b/unoxml/source/rdf/CURI.cxx
@@ -20,6 +20,7 @@
#include "CNodes.hxx"
#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/rdf/XURI.hpp>
@@ -81,12 +82,7 @@ OUString SAL_CALL CURI::getImplementationName() throw (css::uno::RuntimeExceptio
::sal_Bool SAL_CALL CURI::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException)
{
- css::uno::Sequence< OUString > serviceNames = comp_CURI::_getSupportedServiceNames();
- for (::sal_Int32 i = 0; i < serviceNames.getLength(); ++i) {
- if (serviceNames[i] == serviceName)
- return sal_True;
- }
- return sal_False;
+ return cppu::supportsService(this, serviceName);
}
css::uno::Sequence< OUString > SAL_CALL CURI::getSupportedServiceNames() throw (css::uno::RuntimeException)
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index 120c0cad26a3..e25514f3ca05 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -54,6 +54,7 @@
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <comphelper/stlunosequence.hxx>
#include <comphelper/sequenceasvector.hxx>
@@ -820,13 +821,7 @@ throw (uno::RuntimeException)
::sal_Bool SAL_CALL librdf_Repository::supportsService(
OUString const & serviceName) throw (uno::RuntimeException)
{
- uno::Sequence< OUString > serviceNames
- = comp_librdf_Repository::_getSupportedServiceNames();
- for (::sal_Int32 i = 0; i < serviceNames.getLength(); ++i) {
- if (serviceNames[i] == serviceName)
- return sal_True;
- }
- return sal_False;
+ return cppu::supportsService(this, serviceName);
}
uno::Sequence< OUString > SAL_CALL
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index 690dcfc32ff5..69960a048452 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -35,6 +35,7 @@
#include "../dom/node.hxx"
#include "../dom/document.hxx"
+#include <cppuhelper/supportsservice.hxx>
using ::com::sun::star::lang::XMultiServiceFactory;
@@ -89,16 +90,9 @@ namespace XPath
sal_Bool SAL_CALL CXPathAPI::supportsService(const OUString& aServiceName)
throw (RuntimeException)
{
- Sequence< OUString > supported = CXPathAPI::_getSupportedServiceNames();
- for (sal_Int32 i=0; i<supported.getLength(); i++)
- {
- if (supported[i] == aServiceName) return sal_True;
- }
- return sal_False;
+ return cppu::supportsService(this, aServiceName);
}
- // -------------------------------------------------------------------
-
void SAL_CALL CXPathAPI::registerNS(
const OUString& aPrefix,
const OUString& aURI)
diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx
index de0a13ca61dc..207b9688b678 100644
--- a/uui/source/interactionhandler.cxx
+++ b/uui/source/interactionhandler.cxx
@@ -21,6 +21,7 @@
#include "interactionhandler.hxx"
#include "comphelper/namedvaluecollection.hxx"
#include "comphelper/processfactory.hxx"
+#include <cppuhelper/supportsservice.hxx>
#include "com/sun/star/awt/XWindow.hpp"
using namespace com::sun::star;
@@ -48,12 +49,7 @@ sal_Bool SAL_CALL
UUIInteractionHandler::supportsService(OUString const & rServiceName)
throw (uno::RuntimeException)
{
- 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);
}
uno::Sequence< OUString > SAL_CALL
diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx
index 1ee48589f9b9..a0bca1197259 100644
--- a/uui/source/passwordcontainer.cxx
+++ b/uui/source/passwordcontainer.cxx
@@ -19,6 +19,7 @@
#include "comphelper/processfactory.hxx"
#include "cppuhelper/factory.hxx"
+#include <cppuhelper/supportsservice.hxx>
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/task/NoMasterException.hpp"
@@ -308,14 +309,7 @@ PasswordContainerInteractionHandler::supportsService(
const OUString& ServiceName )
throw ( uno::RuntimeException )
{
- uno::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);
}
//=========================================================================
diff --git a/uui/source/requeststringresolver.cxx b/uui/source/requeststringresolver.cxx
index 918b1ff2cfbf..28698a1106ed 100644
--- a/uui/source/requeststringresolver.cxx
+++ b/uui/source/requeststringresolver.cxx
@@ -20,6 +20,7 @@
#include "requeststringresolver.hxx"
#include "iahndl.hxx"
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace com::sun;
@@ -48,12 +49,7 @@ UUIInteractionRequestStringResolver::supportsService(
OUString const & rServiceName)
throw (star::uno::RuntimeException)
{
- star::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);
}
star::uno::Sequence< OUString > SAL_CALL
diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx
index d5a3f34b129a..57ecb5781053 100644
--- a/xmloff/source/core/unoatrcn.cxx
+++ b/xmloff/source/core/unoatrcn.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/xml/AttributeData.hpp>
#include <rtl/ustrbuf.hxx>
#include <comphelper/servicehelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <limits.h>
#include <xmloff/xmlcnimp.hxx>
@@ -263,16 +264,7 @@ uno::Sequence< OUString > SvUnoAttributeContainer::getSupportedServiceNames(void
sal_Bool SvUnoAttributeContainer::supportsService(const OUString& ServiceName)
throw( uno::RuntimeException )
{
- const uno::Sequence < OUString > aServiceNames( getSupportedServiceNames() );
- const OUString* pNames = aServiceNames.getConstArray();
- sal_Int32 nCount = aServiceNames.getLength();
- while( nCount-- )
- {
- if( *pNames++ == ServiceName )
- return sal_True;
- }
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */