summaryrefslogtreecommitdiff
path: root/dtrans
diff options
context:
space:
mode:
Diffstat (limited to 'dtrans')
-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
5 files changed, 10 insertions, 48 deletions
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);
}
// -------------------------------------------------