summaryrefslogtreecommitdiff
path: root/vcl/source/components
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-10-21 19:04:05 -0200
committerStephan Bergmann <sbergman@redhat.com>2013-10-22 10:28:10 +0000
commitee5661ecd3bbeae38b04cd3f582a320a231d11bd (patch)
tree381d9afa0c831145551ade40b6d68f22919baaf6 /vcl/source/components
parentc82a36f9c7d89fa434d3dff896c290964326f5bf (diff)
fdo#54938: Adapt supportsService implementations..
to cppu::supportsService Change-Id: I0b03d3910f094f2183bf9859db9d5bcaf35d1f14 Reviewed-on: https://gerrit.libreoffice.org/6370 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source/components')
-rw-r--r--vcl/source/components/dtranscomp.cxx12
-rw-r--r--vcl/source/components/fontident.cxx10
2 files changed, 4 insertions, 18 deletions
diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx
index 650fce07f7fc..cb4b6b2c7e3f 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -42,13 +42,12 @@
#include "cppuhelper/compbase1.hxx"
#include "cppuhelper/compbase2.hxx"
#include "cppuhelper/implbase1.hxx"
+#include <cppuhelper/supportsservice.hxx>
using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
-// -----------------------------------------------------------------------
-
namespace vcl
{
// generic implementation to satisfy SalInstance
@@ -148,14 +147,7 @@ Sequence< OUString > GenericClipboard::getSupportedServiceNames() throw( Runtime
sal_Bool GenericClipboard::supportsService( const OUString& ServiceName ) throw( RuntimeException )
{
- Sequence< OUString > aServices( getSupportedServiceNames() );
- sal_Int32 nServices = aServices.getLength();
- for( sal_Int32 i = 0; i < nServices; i++ )
- {
- if( aServices[i] == ServiceName )
- return sal_True;
- }
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
Reference< ::com::sun::star::datatransfer::XTransferable > GenericClipboard::getContents() throw( RuntimeException )
diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx
index 87be8e0995df..9e5a138856ec 100644
--- a/vcl/source/components/fontident.cxx
+++ b/vcl/source/components/fontident.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -172,7 +173,6 @@ Reference< XInterface > SAL_CALL FontIdentificator_createInstance( const Referen
return static_cast< ::cppu::OWeakObject * >( new FontIdentificator );
}
-
// XServiceInfo
OUString SAL_CALL FontIdentificator::getImplementationName() throw (RuntimeException)
{
@@ -181,13 +181,7 @@ OUString SAL_CALL FontIdentificator::getImplementationName() throw (RuntimeExcep
sal_Bool SAL_CALL FontIdentificator::supportsService( const OUString& i_rServiceName ) throw (RuntimeException)
{
- Sequence< OUString > aSN( FontIdentificator_getSupportedServiceNames() );
- for( sal_Int32 nService = 0; nService < aSN.getLength(); nService++ )
- {
- if( aSN[nService] == i_rServiceName )
- return sal_True;
- }
- return sal_False;
+ return cppu::supportsService(this, i_rServiceName);
}
Sequence< OUString > SAL_CALL FontIdentificator::getSupportedServiceNames() throw (RuntimeException)