summaryrefslogtreecommitdiff
path: root/sccomp
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2014-03-04 08:41:53 -0300
committerMarcos Paulo de Souza <marcos.souza.org@gmail.com>2014-03-04 07:30:02 -0600
commit4d6560f5066d143552cba861aaadc2f49b4357d4 (patch)
tree34c7cfba1a7cd2fce5f9bfde5d4d06910e1ac774 /sccomp
parent8f210c26c53cf5480819d983e57977d531422ff1 (diff)
fdo#54938: Convert some places to use cppu::supportsService
The last cases are non obvious, so it's pratically done Change-Id: Icae1da8e238f516eaed0f7fbdf96fff778eac547 Reviewed-on: https://gerrit.libreoffice.org/8445 Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Diffstat (limited to 'sccomp')
-rw-r--r--sccomp/source/solver/solver.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/sccomp/source/solver/solver.cxx b/sccomp/source/solver/solver.cxx
index be2153563a5e..128e8773be9a 100644
--- a/sccomp/source/solver/solver.cxx
+++ b/sccomp/source/solver/solver.cxx
@@ -35,6 +35,7 @@
#include <rtl/math.hxx>
#include <rtl/ustrbuf.hxx>
#include <cppuhelper/factory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <vector>
#include <unordered_map>
@@ -577,8 +578,6 @@ void SAL_CALL SolverComponent::solve() throw(uno::RuntimeException, std::excepti
CoinUnloadProblem( hProb );
}
-// -------------------------------------------------------------------------
-
// XServiceInfo
uno::Sequence< OUString > SolverComponent_getSupportedServiceNames()
@@ -600,10 +599,7 @@ OUString SAL_CALL SolverComponent::getImplementationName() throw(uno::RuntimeExc
sal_Bool SAL_CALL SolverComponent::supportsService( const OUString& rServiceName ) throw(uno::RuntimeException, std::exception)
{
- 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, std::exception)
@@ -617,8 +613,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*/ )