fdo#54938: Kill ServiceInfoHelper::supportsService and use cppu's instead.

Change-Id: I1c2d95e4c3fb6242dcb4cdb88cf9733471a3412b
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Marcos Paulo de Souza 2013-10-22 23:49:31 -02:00 committed by Stephan Bergmann
parent 3e53bb6b67
commit 8f6d2eef50
21 changed files with 43 additions and 122 deletions

View File

@ -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()

View File

@ -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: */

View File

@ -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)

View File

@ -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()

View File

@ -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)

View File

@ -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() {}

View File

@ -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 )

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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;

View File

@ -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)

View File

@ -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 )

View File

@ -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 )