From da5449da0c056a3a0da239eff2e2b8b66cfd6224 Mon Sep 17 00:00:00 2001 From: Marcos Paulo de Souza Date: Thu, 24 Oct 2013 14:55:08 -0200 Subject: fdo#54938: More uses of cppu::supportsService Change-Id: Id6bed78d92eba52283a17ab3ca66e751c225e48d Reviewed-on: https://gerrit.libreoffice.org/6423 Tested-by: LibreOffice gerrit bot Reviewed-by: Stephan Bergmann Tested-by: Stephan Bergmann --- sccomp/source/solver/solver.cxx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'sccomp') diff --git a/sccomp/source/solver/solver.cxx b/sccomp/source/solver/solver.cxx index a9dac3c4a63b..a7809f3dee1d 100644 --- a/sccomp/source/solver/solver.cxx +++ b/sccomp/source/solver/solver.cxx @@ -68,6 +68,7 @@ #include #include #include +#include #include #include @@ -320,8 +321,6 @@ uno::Sequence SAL_CALL SolverComponent::getSolution() throw(uno::Runtime return maSolution; } -// ------------------------------------------------------------------------- - void SAL_CALL SolverComponent::solve() throw(uno::RuntimeException) { uno::Reference xModel( mxDoc, uno::UNO_QUERY ); @@ -568,8 +567,6 @@ void SAL_CALL SolverComponent::solve() throw(uno::RuntimeException) delete_lp( lp ); } -// ------------------------------------------------------------------------- - // XServiceInfo uno::Sequence< OUString > SolverComponent_getSupportedServiceNames() @@ -591,10 +588,7 @@ OUString SAL_CALL SolverComponent::getImplementationName() throw(uno::RuntimeExc sal_Bool SAL_CALL SolverComponent::supportsService( const OUString& rServiceName ) throw(uno::RuntimeException) { - const uno::Sequence< OUString > aServices = SolverComponent_getSupportedServiceNames(); - const OUString* pArray = aServices.getConstArray(); - const OUString* pArrayEnd = pArray + aServices.getLength(); - return ::std::find( pArray, pArrayEnd, rServiceName ) != pArrayEnd; + return cppu::supportsService(this, rServiceName); } uno::Sequence SAL_CALL SolverComponent::getSupportedServiceNames() throw(uno::RuntimeException) @@ -608,8 +602,6 @@ uno::Reference SolverComponent_createInstance( const uno::Refer return (cppu::OWeakObject*) new SolverComponent( rSMgr ); } -// ------------------------------------------------------------------------- - extern "C" { SAL_DLLPUBLIC_EXPORT void* SAL_CALL solver_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) -- cgit