fdo#54938: Convert to use cppu::supportsService

Change-Id: I5b8e08bad3d83b6df23127377c0700fcd27ff084
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
José Guilherme Vanz 2013-10-28 00:53:45 -02:00 committed by Stephan Bergmann
parent 0432f847bb
commit 2bb5f4773c
5 changed files with 14 additions and 5 deletions

View File

@ -20,6 +20,8 @@
#include "gstframegrabber.hxx" #include "gstframegrabber.hxx"
#include "gstplayer.hxx" #include "gstplayer.hxx"
#include <cppuhelper/supportsservice.hxx>
#include <gst/gstbuffer.h> #include <gst/gstbuffer.h>
#include <gst/video/video.h> #include <gst/video/video.h>
#include <gst/video/gstvideosink.h> #include <gst/video/gstvideosink.h>
@ -210,7 +212,7 @@ OUString SAL_CALL FrameGrabber::getImplementationName( )
sal_Bool SAL_CALL FrameGrabber::supportsService( const OUString& ServiceName ) sal_Bool SAL_CALL FrameGrabber::supportsService( const OUString& ServiceName )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
return ServiceName == AVMEDIA_GST_FRAMEGRABBER_SERVICENAME; return cppu::supportsService(this, ServiceName);;
} }
uno::Sequence< OUString > SAL_CALL FrameGrabber::getSupportedServiceNames() uno::Sequence< OUString > SAL_CALL FrameGrabber::getSupportedServiceNames()

View File

@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <cppuhelper/supportsservice.hxx>
#include "gstmanager.hxx" #include "gstmanager.hxx"
#include "gstplayer.hxx" #include "gstplayer.hxx"
@ -82,7 +84,7 @@ OUString SAL_CALL Manager::getImplementationName( )
sal_Bool SAL_CALL Manager::supportsService( const OUString& ServiceName ) sal_Bool SAL_CALL Manager::supportsService( const OUString& ServiceName )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
return ServiceName == AVMEDIA_GST_MANAGER_SERVICENAME; return cppu::supportsService(this, ServiceName);
} }
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------

View File

@ -19,6 +19,8 @@
#include <math.h> #include <math.h>
#include <cppuhelper/supportsservice.hxx>
#include <rtl/string.hxx> #include <rtl/string.hxx>
#include <vcl/syschild.hxx> #include <vcl/syschild.hxx>
@ -711,7 +713,7 @@ OUString SAL_CALL Player::getImplementationName()
sal_Bool SAL_CALL Player::supportsService( const OUString& ServiceName ) sal_Bool SAL_CALL Player::supportsService( const OUString& ServiceName )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
return ServiceName == AVMEDIA_GST_PLAYER_SERVICENAME; return cppu::supportsService(this, ServiceName);
} }
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------

View File

@ -19,6 +19,8 @@
#include <com/sun/star/awt/SystemPointer.hpp> #include <com/sun/star/awt/SystemPointer.hpp>
#include <cppuhelper/supportsservice.hxx>
#include "gstwindow.hxx" #include "gstwindow.hxx"
#include "gstplayer.hxx" #include "gstplayer.hxx"
@ -228,7 +230,7 @@ OUString SAL_CALL Window::getImplementationName( )
sal_Bool SAL_CALL Window::supportsService( const OUString& ServiceName ) sal_Bool SAL_CALL Window::supportsService( const OUString& ServiceName )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
return ServiceName == AVMEDIA_GST_WINDOW_SERVICENAME; return cppu::supportsService(this, ServiceName);
} }
uno::Sequence< OUString > SAL_CALL Window::getSupportedServiceNames( ) uno::Sequence< OUString > SAL_CALL Window::getSupportedServiceNames( )

View File

@ -23,6 +23,7 @@
#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/uno3.hxx> #include <comphelper/uno3.hxx>
#include <comphelper/sequence.hxx> #include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx> #include <cppuhelper/typeprovider.hxx>
#include <com/sun/star/reflection/ProxyFactory.hpp> #include <com/sun/star/reflection/ProxyFactory.hpp>
#include <rtl/digest.h> #include <rtl/digest.h>
@ -133,7 +134,7 @@ OUString SAL_CALL OConnectionWrapper::getImplementationName( ) throw (::com::su
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
sal_Bool SAL_CALL OConnectionWrapper::supportsService( const OUString& _rServiceName ) throw(::com::sun::star::uno::RuntimeException) sal_Bool SAL_CALL OConnectionWrapper::supportsService( const OUString& _rServiceName ) throw(::com::sun::star::uno::RuntimeException)
{ {
return ::comphelper::findValue( getSupportedServiceNames(), _rServiceName, sal_True ).getLength() != 0; return cppu::supportsService(this, _rServiceName);
} }
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------