summaryrefslogtreecommitdiff
path: root/shell/source/win32
diff options
context:
space:
mode:
Diffstat (limited to 'shell/source/win32')
-rw-r--r--shell/source/win32/SysShExec.cxx18
-rw-r--r--shell/source/win32/simplemail/smplmailsuppl.cxx9
2 files changed, 4 insertions, 23 deletions
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index b08160764b95..1a39e9ab472b 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -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 )
{
diff --git a/shell/source/win32/simplemail/smplmailsuppl.cxx b/shell/source/win32/simplemail/smplmailsuppl.cxx
index 610699459822..6f530db8d989 100644
--- a/shell/source/win32/simplemail/smplmailsuppl.cxx
+++ b/shell/source/win32/simplemail/smplmailsuppl.cxx
@@ -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()