summaryrefslogtreecommitdiff
path: root/sfx2/source/appl
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r--sfx2/source/appl/appinit.cxx13
-rw-r--r--sfx2/source/appl/appuno.cxx13
-rw-r--r--sfx2/source/appl/xpackcreator.cxx13
3 files changed, 7 insertions, 32 deletions
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 51f2b23896b1..e0f40c92b559 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -42,6 +42,7 @@
#include <unotools/historyoptions.hxx>
#include <unotools/moduleoptions.hxx>
#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <vcl/edit.hxx>
@@ -128,17 +129,7 @@ OUString SAL_CALL SfxTerminateListener_Impl::getImplementationName() throw (Runt
::sal_Bool SAL_CALL SfxTerminateListener_Impl::supportsService( const OUString& sServiceName ) throw (RuntimeException)
{
- Sequence< OUString > lNames = getSupportedServiceNames();
- ::sal_Int32 c = lNames.getLength();
- ::sal_Int32 i = 0;
-
- for (i=0; i<c; ++i)
- {
- if (lNames[i].equals(sServiceName))
- return sal_True;
- }
-
- return sal_False;
+ return cppu::supportsService(this, sServiceName);
}
Sequence< OUString > SAL_CALL SfxTerminateListener_Impl::getSupportedServiceNames() throw (RuntimeException)
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index f8fa84a60016..7b466cac550d 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -111,6 +111,8 @@
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
#include <com/sun/star/ucb/XContent.hpp>
+#include <cppuhelper/supportsservice.hxx>
+
#include <boost/scoped_ptr.hpp>
#define PROTOCOLHANDLER_SERVICENAME "com.sun.star.frame.ProtocolHandler"
@@ -1992,16 +1994,7 @@ OUString SAL_CALL SfxAppDispatchProvider::getImplementationName() throw( css::un
/* XServiceInfo */
sal_Bool SAL_CALL SfxAppDispatchProvider::supportsService( const OUString& sServiceName ) throw( css::uno::RuntimeException )
{
- css::uno::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 */
diff --git a/sfx2/source/appl/xpackcreator.cxx b/sfx2/source/appl/xpackcreator.cxx
index c7fef6ec542c..0b7c70c49f3e 100644
--- a/sfx2/source/appl/xpackcreator.cxx
+++ b/sfx2/source/appl/xpackcreator.cxx
@@ -19,7 +19,7 @@
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
-
+#include <cppuhelper/supportsservice.hxx>
#include "xpackcreator.hxx"
@@ -164,27 +164,18 @@ void SAL_CALL OPackageStructureCreator::convertToPackage( const OUString& aFolde
throw io::IOException(); // TODO/LATER: can't proceed with creation
}
-//-------------------------------------------------------------------------
OUString SAL_CALL OPackageStructureCreator::getImplementationName()
throw ( uno::RuntimeException )
{
return impl_getStaticImplementationName();
}
-//-------------------------------------------------------------------------
sal_Bool SAL_CALL OPackageStructureCreator::supportsService( const OUString& ServiceName )
throw ( uno::RuntimeException )
{
- uno::Sequence< OUString > aSeq = impl_getStaticSupportedServiceNames();
-
- for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
- if ( ServiceName == aSeq[nInd] )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
-//-------------------------------------------------------------------------
uno::Sequence< OUString > SAL_CALL OPackageStructureCreator::getSupportedServiceNames()
throw ( uno::RuntimeException )
{