summaryrefslogtreecommitdiff
path: root/sccomp
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-03-31 19:18:41 +0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-04-01 11:04:33 +0200
commitde7cdbc5840fd7d958d486901e405890eff224b9 (patch)
tree17de32fdc1bc69138c44ca22c81d3115871c8f2a /sccomp
parent8dc394d5c573e5583760c7cc56c5c19062d3f062 (diff)
Install coinmp and lpsolve linear solvers in parallel.
Change-Id: If07d94a2f646c8377b76fdf645e85f9491e4f061
Diffstat (limited to 'sccomp')
-rw-r--r--sccomp/Library_coinmpsolver.mk34
-rw-r--r--sccomp/Module_sccomp.mk9
-rw-r--r--sccomp/source/solver/coinmpsolver.component15
-rw-r--r--sccomp/source/solver/solver.cxx6
-rw-r--r--sccomp/source/solver/solver.hrc1
-rw-r--r--sccomp/source/solver/solver.src5
6 files changed, 61 insertions, 9 deletions
diff --git a/sccomp/Library_coinmpsolver.mk b/sccomp/Library_coinmpsolver.mk
new file mode 100644
index 000000000000..849ce0f5e04c
--- /dev/null
+++ b/sccomp/Library_coinmpsolver.mk
@@ -0,0 +1,34 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+$(eval $(call gb_Library_Library,coinmpsolver))
+
+$(eval $(call gb_Library_set_componentfile,coinmpsolver,sccomp/source/solver/coinmpsolver))
+
+$(eval $(call gb_Library_use_sdk_api,coinmpsolver))
+
+$(eval $(call gb_Library_use_libraries,coinmpsolver,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ tl \
+ i18nlangtag \
+ $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_Library_use_externals,coinmpsolver,\
+ boost_headers \
+ coinmp \
+))
+
+$(eval $(call gb_Library_add_exception_objects,coinmpsolver,\
+ sccomp/source/solver/solver \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sccomp/Module_sccomp.mk b/sccomp/Module_sccomp.mk
index dd56f872ecac..08df52bad603 100644
--- a/sccomp/Module_sccomp.mk
+++ b/sccomp/Module_sccomp.mk
@@ -19,16 +19,13 @@
$(eval $(call gb_Module_Module,sccomp))
-ifeq ($(ENABLE_LPSOLVE),TRUE)
-
$(eval $(call gb_Module_add_targets,sccomp,\
- Library_solver \
+ $(if $(ENABLE_COINMP), Library_coinmpsolver) \
+ $(if $(ENABLE_LPSOLVE), Library_solver) \
))
$(eval $(call gb_Module_add_l10n_targets,sccomp,\
- AllLangResTarget_solver \
+ $(if $(ENABLE_COINMP)$(ENABLE_LPSOLVE), AllLangResTarget_solver) \
))
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/sccomp/source/solver/coinmpsolver.component b/sccomp/source/solver/coinmpsolver.component
new file mode 100644
index 000000000000..0feb3d0b4f13
--- /dev/null
+++ b/sccomp/source/solver/coinmpsolver.component
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ -->
+
+<component loader="com.sun.star.loader.SharedLibrary" prefix="coinmp"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.Calc.CoinMPSolver">
+ <service name="com.sun.star.sheet.Solver"/>
+ </implementation>
+</component>
diff --git a/sccomp/source/solver/solver.cxx b/sccomp/source/solver/solver.cxx
index 128e8773be9a..5ea871e2c4b2 100644
--- a/sccomp/source/solver/solver.cxx
+++ b/sccomp/source/solver/solver.cxx
@@ -177,7 +177,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL SolverComponent::getPropertySet
OUString SAL_CALL SolverComponent::getComponentDescription() throw (uno::RuntimeException, std::exception)
{
- return lcl_GetResourceString( RID_SOLVER_COMPONENT );
+ return lcl_GetResourceString( RID_COINMP_SOLVER_COMPONENT );
}
OUString SAL_CALL SolverComponent::getStatusDescription() throw (uno::RuntimeException, std::exception)
@@ -589,7 +589,7 @@ uno::Sequence< OUString > SolverComponent_getSupportedServiceNames()
OUString SolverComponent_getImplementationName()
{
- return OUString::createFromAscii( "com.sun.star.comp.Calc.Solver" );
+ return OUString::createFromAscii( "com.sun.star.comp.Calc.CoinMPSolver" );
}
OUString SAL_CALL SolverComponent::getImplementationName() throw(uno::RuntimeException, std::exception)
@@ -615,7 +615,7 @@ uno::Reference<uno::XInterface> SolverComponent_createInstance( const uno::Refer
extern "C"
{
- SAL_DLLPUBLIC_EXPORT void* SAL_CALL solver_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
+ SAL_DLLPUBLIC_EXPORT void* SAL_CALL coinmp_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
OUString aImplName( OUString::createFromAscii( pImplName ) );
void* pRet = 0;
diff --git a/sccomp/source/solver/solver.hrc b/sccomp/source/solver/solver.hrc
index bf017afd1ed0..888739831ea9 100644
--- a/sccomp/source/solver/solver.hrc
+++ b/sccomp/source/solver/solver.hrc
@@ -32,6 +32,7 @@
#define RID_ERROR_INFEASIBLE (SOLVER_RESOURCE_START + 8)
#define RID_ERROR_UNBOUNDED (SOLVER_RESOURCE_START + 9)
#define RID_ERROR_TIMEOUT (SOLVER_RESOURCE_START + 10)
+#define RID_COINMP_SOLVER_COMPONENT (SOLVER_RESOURCE_START + 11)
#endif
diff --git a/sccomp/source/solver/solver.src b/sccomp/source/solver/solver.src
index 52a9b9ecf116..05044003ff45 100644
--- a/sccomp/source/solver/solver.src
+++ b/sccomp/source/solver/solver.src
@@ -24,6 +24,11 @@ String RID_SOLVER_COMPONENT
Text [ en-US ] = "%PRODUCTNAME Linear Solver";
};
+String RID_COINMP_SOLVER_COMPONENT
+{
+ Text [ en-US ] = "%PRODUCTNAME CoinMP Linear Solver";
+};
+
String RID_PROPERTY_NONNEGATIVE
{
Text [ en-US ] = "Assume variables as non-negative";