diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-10-22 23:49:31 -0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-23 11:05:43 +0200 |
commit | 8f6d2eef50e1fabac30233c23a800da2c1c8ebc9 (patch) | |
tree | 28a9920e2f1fe36aab244ea848d0262c587d8969 | |
parent | 3e53bb6b67ca229a6a57b3d8847404b2feed8103 (diff) |
fdo#54938: Kill ServiceInfoHelper::supportsService and use cppu's instead.
Change-Id: I1c2d95e4c3fb6242dcb4cdb88cf9733471a3412b
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | chart2/source/controller/accessibility/AccessibleBase.cxx | 3 | ||||
-rw-r--r-- | comphelper/source/misc/serviceinfohelper.cxx | 16 | ||||
-rw-r--r-- | editeng/source/uno/unofield.cxx | 4 | ||||
-rw-r--r-- | editeng/source/uno/unotext.cxx | 5 | ||||
-rw-r--r-- | editeng/source/uno/unotext2.cxx | 5 | ||||
-rw-r--r-- | include/comphelper/serviceinfohelper.hxx | 2 | ||||
-rw-r--r-- | sd/source/core/stlfamily.cxx | 14 | ||||
-rw-r--r-- | sd/source/core/stlsheet.cxx | 15 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshow.cxx | 15 | ||||
-rw-r--r-- | sd/source/ui/unoidl/SdUnoDrawView.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/SdUnoOutlineView.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/unoidl/SdUnoSlideView.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unocpres.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unolayer.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopback.cxx | 4 | ||||
-rw-r--r-- | svx/source/table/tabledesign.cxx | 32 | ||||
-rw-r--r-- | svx/source/unodraw/unomod.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unopage.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoshcol.cxx | 9 |
21 files changed, 43 insertions, 122 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index 9550bea9ea48..714662032ed2 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -37,6 +37,7 @@ #include <vcl/svapp.hxx> #include <rtl/uuid.h> #include <cppuhelper/queryinterface.hxx> +#include <cppuhelper/supportsservice.hxx> #include <svl/itemset.hxx> #include <editeng/unofdesc.hxx> #include <editeng/outliner.hxx> @@ -898,7 +899,7 @@ OUString SAL_CALL AccessibleBase::getImplementationName() sal_Bool SAL_CALL AccessibleBase::supportsService( const OUString& ServiceName ) throw (RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } uno::Sequence< OUString > SAL_CALL AccessibleBase::getSupportedServiceNames() diff --git a/comphelper/source/misc/serviceinfohelper.cxx b/comphelper/source/misc/serviceinfohelper.cxx index 896a9296ac5e..7395aa676dea 100644 --- a/comphelper/source/misc/serviceinfohelper.cxx +++ b/comphelper/source/misc/serviceinfohelper.cxx @@ -32,21 +32,6 @@ OUString SAL_CALL ServiceInfoHelper::getImplementationName() throw( ::com::sun:: return OUString(); } -/** the base implementation iterates over the service names from <code>getSupportedServiceNames</code> */ -sal_Bool SAL_CALL ServiceInfoHelper::supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException) -{ - return supportsService( ServiceName, getSupportedServiceNames() ); -} - -sal_Bool SAL_CALL ServiceInfoHelper::supportsService( const OUString& ServiceName, const ::com::sun::star::uno::Sequence< OUString >& SupportedServices ) throw() -{ - const OUString * pArray = SupportedServices.getConstArray(); - for( sal_Int32 i = 0; i < SupportedServices.getLength(); i++ ) - if( pArray[i] == ServiceName ) - return sal_True; - return sal_False; -} - /** the base implementation has no supported services */ ::com::sun::star::uno::Sequence< OUString > ServiceInfoHelper::getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ) { @@ -72,5 +57,4 @@ void ServiceInfoHelper::addToSequence( ::com::sun::star::uno::Sequence< OUString } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index f68419d7a7c2..13699a6d7d13 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -29,8 +29,8 @@ #include <editeng/measfld.hxx> #include <editeng/unofield.hxx> #include <editeng/unotext.hxx> -#include <comphelper/serviceinfohelper.hxx> #include <comphelper/servicehelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include "editeng/unonames.hxx" @@ -868,7 +868,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames() sal_Bool SAL_CALL SvxUnoTextField::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException ) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } uno::Reference< uno::XInterface > SAL_CALL SvxUnoTextCreateTextField( const OUString& ServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index eb906110d4c1..fc58fffcae07 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -43,8 +43,9 @@ #include <editeng/editeng.hxx> #include <editeng/outliner.hxx> #include <editeng/unoipset.hxx> -#include <comphelper/serviceinfohelper.hxx> #include <comphelper/servicehelper.hxx> +#include <comphelper/serviceinfohelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include "editeng/unonames.hxx" @@ -1481,7 +1482,7 @@ void SvxUnoTextRangeBase::GotoEnd(sal_Bool Expand) throw() sal_Bool SAL_CALL SvxUnoTextRangeBase::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } uno::Sequence< OUString > SAL_CALL SvxUnoTextRangeBase::getSupportedServiceNames() diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index b82883fb5ed1..6a44ae92652f 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -25,8 +25,9 @@ #include <editeng/flditem.hxx> #include <editeng/unofield.hxx> #include <editeng/unotext.hxx> -#include <comphelper/serviceinfohelper.hxx> #include <comphelper/servicehelper.hxx> +#include <comphelper/serviceinfohelper.hxx> +#include <cppuhelper/supportsservice.hxx> using namespace ::rtl; using namespace ::cppu; @@ -682,7 +683,7 @@ OUString SAL_CALL SvxUnoTextCursor::getImplementationName() throw(uno::RuntimeEx sal_Bool SAL_CALL SvxUnoTextCursor::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } uno::Sequence< OUString > SAL_CALL SvxUnoTextCursor::getSupportedServiceNames() throw(uno::RuntimeException) diff --git a/include/comphelper/serviceinfohelper.hxx b/include/comphelper/serviceinfohelper.hxx index 25169d1043a0..b1468b9eab27 100644 --- a/include/comphelper/serviceinfohelper.hxx +++ b/include/comphelper/serviceinfohelper.hxx @@ -36,12 +36,10 @@ class COMPHELPER_DLLPUBLIC ServiceInfoHelper : public ::com::sun::star::lang::XS public: // XServiceInfo virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); // helper static void addToSequence( ::com::sun::star::uno::Sequence< OUString >& rSeq, sal_uInt16 nServices, /* sal_Char* */... ) throw(); - static sal_Bool SAL_CALL supportsService( const OUString& ServiceName, const ::com::sun::star::uno::Sequence< OUString >& SupportedServices ) throw(); protected: ~ServiceInfoHelper() {} diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx index fe265b7562a4..179acbb1aad1 100644 --- a/sd/source/core/stlfamily.cxx +++ b/sd/source/core/stlfamily.cxx @@ -20,7 +20,7 @@ #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/IllegalAccessException.hpp> -#include <comphelper/serviceinfohelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include <osl/mutex.hxx> #include <vcl/svapp.hxx> @@ -171,24 +171,17 @@ SdStyleSheet* SdStyleFamily::GetSheetByName( const OUString& rName ) throw(NoSuc throw NoSuchElementException(); } -// ---------------------------------------------------------- // XServiceInfo -// ---------------------------------------------------------- - OUString SAL_CALL SdStyleFamily::getImplementationName() throw(RuntimeException) { return OUString( "SdStyleFamily" ); } -// ---------------------------------------------------------- - sal_Bool SAL_CALL SdStyleFamily::supportsService( const OUString& ServiceName ) throw(RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } -// ---------------------------------------------------------- - Sequence< OUString > SAL_CALL SdStyleFamily::getSupportedServiceNames() throw(RuntimeException) { OUString aServiceName( "com.sun.star.style.StyleFamily" ); @@ -196,10 +189,7 @@ Sequence< OUString > SAL_CALL SdStyleFamily::getSupportedServiceNames() throw(Ru return aSeq; } -// ---------------------------------------------------------- // XNamed -// ---------------------------------------------------------- - OUString SAL_CALL SdStyleFamily::getName() throw (RuntimeException) { if( mnFamily == SD_STYLE_FAMILY_MASTERPAGE ) diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 06ff9796a683..2fba24b44a49 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -24,7 +24,7 @@ #include <osl/mutex.hxx> #include <vcl/svapp.hxx> -#include <comphelper/serviceinfohelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include <boost/bind.hpp> #include <editeng/outliner.hxx> @@ -873,25 +873,17 @@ void SdStyleSheet::notifyModifyListener() } } - -// -------------------------------------------------------------------- // XServiceInfo -// -------------------------------------------------------------------- - OUString SAL_CALL SdStyleSheet::getImplementationName() throw(RuntimeException) { return OUString( "SdStyleSheet" ); } -// -------------------------------------------------------------------- - sal_Bool SAL_CALL SdStyleSheet::supportsService( const OUString& ServiceName ) throw(RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } -// -------------------------------------------------------------------- - Sequence< OUString > SAL_CALL SdStyleSheet::getSupportedServiceNames() throw(RuntimeException) { Sequence< OUString > aNameSequence( 10 ); @@ -911,10 +903,7 @@ Sequence< OUString > SAL_CALL SdStyleSheet::getSupportedServiceNames() throw(Run return aNameSequence; } -// -------------------------------------------------------------------- // XNamed -// -------------------------------------------------------------------- - OUString SAL_CALL SdStyleSheet::getName() throw(RuntimeException) { SolarMutexGuard aGuard; diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 2d50fc3ebf4f..7c305e85032f 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/util/URL.hpp> #include <cppuhelper/bootstrap.hxx> +#include <cppuhelper/supportsservice.hxx> #include <comphelper/processfactory.hxx> #include <osl/mutex.hxx> @@ -260,24 +261,17 @@ void SlideShow::CreateController( ViewShell* pViewSh, ::sd::View* pView, ::Wind } -// -------------------------------------------------------------------- // XServiceInfo -// -------------------------------------------------------------------- - OUString SAL_CALL SlideShow::getImplementationName( ) throw(RuntimeException) { return OUString( "com.sun.star.comp.sd.SlideShow" ); } -// -------------------------------------------------------------------- - sal_Bool SAL_CALL SlideShow::supportsService( const OUString& ServiceName ) throw(RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames( ) ); + return cppu::supportsService( this, ServiceName ); } -// -------------------------------------------------------------------- - Sequence< OUString > SAL_CALL SlideShow::getSupportedServiceNames( ) throw(RuntimeException) { OUString aService( "com.sun.star.presentation.Presentation" ); @@ -285,10 +279,7 @@ Sequence< OUString > SAL_CALL SlideShow::getSupportedServiceNames( ) throw(Runt return aSeq; } -// -------------------------------------------------------------------- // XPropertySet -// -------------------------------------------------------------------- - Reference< XPropertySetInfo > SAL_CALL SlideShow::getPropertySetInfo() throw(RuntimeException) { SolarMutexGuard aGuard; @@ -296,8 +287,6 @@ Reference< XPropertySetInfo > SAL_CALL SlideShow::getPropertySetInfo() throw(Run return xInfo; } -// -------------------------------------------------------------------- - void SAL_CALL SlideShow::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { SolarMutexGuard aGuard; diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx index ec0a54c17b7c..4e4e8ac2536a 100644 --- a/sd/source/ui/unoidl/SdUnoDrawView.cxx +++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx @@ -31,7 +31,7 @@ #include "pres.hxx" #include <cppuhelper/proptypehlp.hxx> -#include <comphelper/serviceinfohelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> #include <svx/svdpagv.hxx> @@ -613,7 +613,7 @@ OUString SAL_CALL SdUnoDrawView::getImplementationName( ) throw (RuntimeExcepti sal_Bool SAL_CALL SdUnoDrawView::supportsService( const OUString& ServiceName ) throw (RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } Sequence< OUString > SAL_CALL SdUnoDrawView::getSupportedServiceNames( ) throw (RuntimeException) diff --git a/sd/source/ui/unoidl/SdUnoOutlineView.cxx b/sd/source/ui/unoidl/SdUnoOutlineView.cxx index 282b080be86b..32b1606eb6b0 100644 --- a/sd/source/ui/unoidl/SdUnoOutlineView.cxx +++ b/sd/source/ui/unoidl/SdUnoOutlineView.cxx @@ -18,8 +18,6 @@ */ -#include <comphelper/serviceinfohelper.hxx> - #include "SdUnoOutlineView.hxx" #include "DrawController.hxx" @@ -28,6 +26,7 @@ #include "unopage.hxx" #include <cppuhelper/proptypehlp.hxx> +#include <cppuhelper/supportsservice.hxx> #include <svx/unopage.hxx> #include <osl/mutex.hxx> #include <vcl/svapp.hxx> @@ -195,7 +194,6 @@ Any SAL_CALL SdUnoOutlineView::getFastPropertyValue ( return aValue; } - // XServiceInfo OUString SAL_CALL SdUnoOutlineView::getImplementationName( ) throw (RuntimeException) { @@ -204,7 +202,7 @@ OUString SAL_CALL SdUnoOutlineView::getImplementationName( ) throw (RuntimeExce sal_Bool SAL_CALL SdUnoOutlineView::supportsService( const OUString& ServiceName ) throw (RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } Sequence< OUString > SAL_CALL SdUnoOutlineView::getSupportedServiceNames( ) throw (RuntimeException) diff --git a/sd/source/ui/unoidl/SdUnoSlideView.cxx b/sd/source/ui/unoidl/SdUnoSlideView.cxx index f1eb8e4688ad..e8c6c075ca88 100644 --- a/sd/source/ui/unoidl/SdUnoSlideView.cxx +++ b/sd/source/ui/unoidl/SdUnoSlideView.cxx @@ -18,7 +18,7 @@ */ -#include <comphelper/serviceinfohelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include "DrawController.hxx" #include "SdUnoSlideView.hxx" @@ -217,7 +217,7 @@ OUString SAL_CALL SdUnoSlideView::getImplementationName( ) throw (RuntimeExcept sal_Bool SAL_CALL SdUnoSlideView::supportsService( const OUString& ServiceName ) throw (RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } Sequence< OUString > SAL_CALL SdUnoSlideView::getSupportedServiceNames( ) throw (RuntimeException) diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx index ce3e77ab67e2..2cae9282d3ed 100644 --- a/sd/source/ui/unoidl/unocpres.cxx +++ b/sd/source/ui/unoidl/unocpres.cxx @@ -24,7 +24,7 @@ #include <vcl/svapp.hxx> #include <svx/svdpage.hxx> #include <comphelper/extract.hxx> -#include <comphelper/serviceinfohelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include "unohelp.hxx" #include "unomodel.hxx" @@ -73,7 +73,7 @@ OUString SAL_CALL SdXCustomPresentation::getImplementationName() sal_Bool SAL_CALL SdXCustomPresentation::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } uno::Sequence< OUString > SAL_CALL SdXCustomPresentation::getSupportedServiceNames() @@ -302,7 +302,7 @@ OUString SAL_CALL SdXCustomPresentationAccess::getImplementationName() sal_Bool SAL_CALL SdXCustomPresentationAccess::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } uno::Sequence< OUString > SAL_CALL SdXCustomPresentationAccess::getSupportedServiceNames() diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx index 41e38543e5da..557b54abaeb5 100644 --- a/sd/source/ui/unoidl/unolayer.cxx +++ b/sd/source/ui/unoidl/unolayer.cxx @@ -25,7 +25,7 @@ #include <svx/svdpagv.hxx> #include <svx/unoshape.hxx> #include <svx/svdobj.hxx> -#include <comphelper/serviceinfohelper.hxx> +#include <cppuhelper/supportsservice.hxx> // folgende fuer InsertSdPage() #include <svx/svdlayer.hxx> @@ -163,7 +163,7 @@ OUString SAL_CALL SdLayer::getImplementationName() sal_Bool SAL_CALL SdLayer::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } uno::Sequence< OUString > SAL_CALL SdLayer::getSupportedServiceNames() @@ -498,7 +498,7 @@ OUString SAL_CALL SdLayerManager::getImplementationName() sal_Bool SAL_CALL SdLayerManager::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } uno::Sequence< OUString > SAL_CALL SdLayerManager::getSupportedServiceNames() diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 22cb2bf6432d..a03775260e37 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -32,7 +32,7 @@ #include <osl/mutex.hxx> #include <comphelper/sequence.hxx> #include <comphelper/servicehelper.hxx> -#include <comphelper/serviceinfohelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include <editeng/unofield.hxx> #include <unomodel.hxx> @@ -3011,7 +3011,7 @@ OUString SAL_CALL SdDocLinkTargets::getImplementationName() sal_Bool SAL_CALL SdDocLinkTargets::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } uno::Sequence< OUString > SAL_CALL SdDocLinkTargets::getSupportedServiceNames() diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 2c934f096c5b..185daab2a77d 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/presentation/EffectNodeType.hpp> #include <comphelper/processfactory.hxx> #include <comphelper/servicehelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include <rtl/ustrbuf.hxx> #include <vcl/bitmapex.hxx> #include <vcl/metaact.hxx> @@ -2011,7 +2012,7 @@ OUString SAL_CALL SdPageLinkTargets::getImplementationName() sal_Bool SAL_CALL SdPageLinkTargets::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } Sequence< OUString > SAL_CALL SdPageLinkTargets::getSupportedServiceNames() diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index 5ee16950eeb7..2b5dcbd803c8 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -23,12 +23,12 @@ #include <svl/itemset.hxx> #include <svx/svdpool.hxx> #include <comphelper/extract.hxx> +#include <cppuhelper/supportsservice.hxx> #include <svx/xflbstit.hxx> #include <svx/xflbmtit.hxx> #include <svx/svdobj.hxx> #include <svx/unoprov.hxx> #include <svx/unoshape.hxx> -#include <comphelper/serviceinfohelper.hxx> #include "unopback.hxx" #include "unohelp.hxx" @@ -188,7 +188,7 @@ OUString SAL_CALL SdUnoPageBackground::getImplementationName() sal_Bool SAL_CALL SdUnoPageBackground::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return cppu::supportsService( this, ServiceName ); } uno::Sequence< OUString > SAL_CALL SdUnoPageBackground::getSupportedServiceNames() 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 <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/util/XModifyBroadcaster.hpp> #include <com/sun/star/util/XModifyListener.hpp> -#include <comphelper/serviceinfohelper.hxx> #include <osl/mutex.hxx> #include <vcl/svapp.hxx> @@ -36,6 +35,7 @@ #include <cppuhelper/compbase6.hxx> #include <cppuhelper/implbase7.hxx> #include <cppuhelper/interfacecontainer.h> +#include <cppuhelper/supportsservice.hxx> #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 <svtools/unoevent.hxx> #include <comphelper/sequence.hxx> #include <comphelper/servicehelper.hxx> -#include <comphelper/serviceinfohelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/implbase2.hxx> #include <svx/unofill.hxx> @@ -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 <osl/mutex.hxx> #include <sfx2/dispatch.hxx> #include <comphelper/classids.hxx> -#include <comphelper/serviceinfohelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include <sfx2/objsh.hxx> #include <svx/svdpool.hxx> @@ -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 <svx/unoprov.hxx> -#include <comphelper/serviceinfohelper.hxx> +#include <cppuhelper/supportsservice.hxx> 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 ) |