From 8f6d2eef50e1fabac30233c23a800da2c1c8ebc9 Mon Sep 17 00:00:00 2001 From: Marcos Paulo de Souza Date: Tue, 22 Oct 2013 23:49:31 -0200 Subject: fdo#54938: Kill ServiceInfoHelper::supportsService and use cppu's instead. Change-Id: I1c2d95e4c3fb6242dcb4cdb88cf9733471a3412b Signed-off-by: Stephan Bergmann --- svx/source/table/tabledesign.cxx | 32 +++----------------------------- svx/source/unodraw/unomod.cxx | 4 ++-- svx/source/unodraw/unopage.cxx | 4 ++-- svx/source/unodraw/unoshcol.cxx | 9 ++------- 4 files changed, 9 insertions(+), 40 deletions(-) (limited to 'svx') diff --git a/svx/source/table/tabledesign.cxx b/svx/source/table/tabledesign.cxx index ac36a3414e77..904c0daef9d0 100644 --- a/svx/source/table/tabledesign.cxx +++ b/svx/source/table/tabledesign.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -36,6 +35,7 @@ #include #include #include +#include #include "svx/unoprov.hxx" #include "svx/sdr/table/tabledesign.hxx" @@ -209,24 +209,17 @@ const CellStyleNameMap& TableDesignStyle::getCellStyleNameMap() return aMap; } -// ---------------------------------------------------------- // XServiceInfo -// ---------------------------------------------------------- - OUString SAL_CALL TableDesignStyle::getImplementationName() throw(RuntimeException) { return OUString("TableDesignStyle"); } -// ---------------------------------------------------------- - sal_Bool SAL_CALL TableDesignStyle::supportsService( const OUString& ServiceName ) throw(RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } -// ---------------------------------------------------------- - Sequence< OUString > SAL_CALL TableDesignStyle::getSupportedServiceNames() throw(RuntimeException) { OUString aServiceName("com.sun.star.style.Style"); @@ -234,17 +227,12 @@ Sequence< OUString > SAL_CALL TableDesignStyle::getSupportedServiceNames() throw return aSeq; } -// ---------------------------------------------------------- // XStyle -// ---------------------------------------------------------- - sal_Bool SAL_CALL TableDesignStyle::isUserDefined() throw (RuntimeException) { return sal_False; } -// ---------------------------------------------------------- - sal_Bool SAL_CALL TableDesignStyle::isInUse() throw (RuntimeException) { ClearableMutexGuard aGuard( rBHelper.rMutex ); @@ -489,22 +477,16 @@ void SAL_CALL TableDesignStyle::disposing( const ::com::sun::star::lang::EventOb // ---------------------------------------------------------- // XServiceInfo -// ---------------------------------------------------------- - OUString SAL_CALL TableDesignFamily::getImplementationName() throw(RuntimeException) { return OUString("TableDesignFamily"); } -// ---------------------------------------------------------- - sal_Bool SAL_CALL TableDesignFamily::supportsService( const OUString& ServiceName ) throw(RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } -// ---------------------------------------------------------- - Sequence< OUString > SAL_CALL TableDesignFamily::getSupportedServiceNames() throw(RuntimeException) { OUString aServiceName("com.sun.star.style.StyleFamily"); @@ -512,25 +494,17 @@ Sequence< OUString > SAL_CALL TableDesignFamily::getSupportedServiceNames() thro return aSeq; } -// ---------------------------------------------------------- // XNamed -// ---------------------------------------------------------- - OUString SAL_CALL TableDesignFamily::getName() throw (RuntimeException) { return OUString( "table" ); } -// ---------------------------------------------------------- - void SAL_CALL TableDesignFamily::setName( const OUString& ) throw (RuntimeException) { } -// ---------------------------------------------------------- // XNameAccess -// ---------------------------------------------------------- - Any SAL_CALL TableDesignFamily::getByName( const OUString& rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException) { SolarMutexGuard aGuard; diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index 9c8c1e0171a8..6ee8b68b93bf 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include @@ -557,7 +557,7 @@ OUString SAL_CALL SvxUnoDrawingModel::getImplementationName() sal_Bool SAL_CALL SvxUnoDrawingModel::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } uno::Sequence< OUString > SAL_CALL SvxUnoDrawingModel::getSupportedServiceNames() throw(uno::RuntimeException) diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index bdd2658deb50..b0550a93cb14 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -816,7 +816,7 @@ OUString SAL_CALL SvxDrawPage::getImplementationName() throw( uno::RuntimeExcept sal_Bool SAL_CALL SvxDrawPage::supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } uno::Sequence< OUString > SAL_CALL SvxDrawPage::getSupportedServiceNames() throw( uno::RuntimeException ) diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx index 129d0759a57f..739ee752ee5b 100644 --- a/svx/source/unodraw/unoshcol.cxx +++ b/svx/source/unodraw/unoshcol.cxx @@ -21,7 +21,7 @@ #include "svx/unoshcol.hxx" #include -#include +#include using namespace ::cppu; using namespace ::com::sun::star; @@ -196,22 +196,17 @@ uno::Any SAL_CALL SvxShapeCollection::getByIndex( sal_Int32 Index ) } // XElementAccess - -//---------------------------------------------------------------------- uno::Type SAL_CALL SvxShapeCollection::getElementType() throw( uno::RuntimeException ) { return ::getCppuType(( const Reference< drawing::XShape >*)0); } -//---------------------------------------------------------------------- sal_Bool SAL_CALL SvxShapeCollection::hasElements() throw( uno::RuntimeException ) { return getCount() != 0; } -//---------------------------------------------------------------------- // XServiceInfo -//---------------------------------------------------------------------- OUString SAL_CALL SvxShapeCollection::getImplementationName() throw( uno::RuntimeException ) { @@ -226,7 +221,7 @@ OUString SvxShapeCollection::getImplementationName_Static() sal_Bool SAL_CALL SvxShapeCollection::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException ) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName); } uno::Sequence< OUString > SAL_CALL SvxShapeCollection::getSupportedServiceNames() throw( uno::RuntimeException ) -- cgit