diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-10-24 14:55:08 -0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-25 08:07:04 +0000 |
commit | da5449da0c056a3a0da239eff2e2b8b66cfd6224 (patch) | |
tree | 6f6698e676726bd8a07f281a9707e448a711d983 /sccomp | |
parent | 01a13519e2a12e1e9b61bab1437d340e389e44bf (diff) |
fdo#54938: More uses of cppu::supportsService
Change-Id: Id6bed78d92eba52283a17ab3ca66e751c225e48d
Reviewed-on: https://gerrit.libreoffice.org/6423
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sccomp')
-rw-r--r-- | sccomp/source/solver/solver.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
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 <rtl/math.hxx> #include <rtl/ustrbuf.hxx> #include <cppuhelper/factory.hxx> +#include <cppuhelper/supportsservice.hxx> #include <vector> #include <boost/unordered_map.hpp> @@ -320,8 +321,6 @@ uno::Sequence<double> SAL_CALL SolverComponent::getSolution() throw(uno::Runtime return maSolution; } -// ------------------------------------------------------------------------- - void SAL_CALL SolverComponent::solve() throw(uno::RuntimeException) { uno::Reference<frame::XModel> 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<OUString> SAL_CALL SolverComponent::getSupportedServiceNames() throw(uno::RuntimeException) @@ -608,8 +602,6 @@ uno::Reference<uno::XInterface> 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*/ ) |