summaryrefslogtreecommitdiff
path: root/dtrans/source/win32
diff options
context:
space:
mode:
Diffstat (limited to 'dtrans/source/win32')
-rw-r--r--dtrans/source/win32/clipb/WinClipboard.cxx12
-rw-r--r--dtrans/source/win32/ftransl/ftransl.cxx12
2 files changed, 4 insertions, 20 deletions
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);
}
// -------------------------------------------------