Move the Calc solvers from sccomp into the sc module
Relocate the whole solver component out of the standalone sccomp module and into sc. This moves the SolverComponent base class, the CoinMP and Swarm solvers, the differential evolution and particle swarm headers, the UNO service registration, the scc string resource, and the two unit tests. The now-empty sccomp module is removed. The solvers are Calc specific. Moving them inside sc is the first step toward letting them work directly with ScDocument, and eventually clone a document or its sheets so trial calculations can run in parallel. That direct access is only possible from inside sc, so the relocation has to come first. This is a pure relocation with no behaviour change. The translation domain stays "scc" and its polocation still points at "sccomp", so the existing translations keep loading unchanged. Re-homing the scc translation domain into sc is left as a follow-up. Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> Change-Id: I5b972daae4c51f04ca394fc9a92f89ac0c4dd599 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3832 Tested-by: Jenkins CPCI <releng@collaboraoffice.com> Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com> (cherry picked from commit 7f1bea8723761f97c053f2e7e46aab7081b1bb21) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208080 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
committed by
Xisco Fauli
parent
26b8e7da32
commit
9a09794354
@@ -134,7 +134,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
|
||||
$(if $(ENABLE_WASM_STRIP_CALC),, \
|
||||
sc \
|
||||
scaddins \
|
||||
sccomp \
|
||||
) \
|
||||
$(call gb_Helper_optional,DESKTOP,scp2) \
|
||||
scripting \
|
||||
|
||||
@@ -316,7 +316,6 @@ class Parser:
|
||||
"sax" : 1,
|
||||
"sc" : 1,
|
||||
"scaddins" : 1,
|
||||
"sccomp" : 1,
|
||||
"scripting" : 1,
|
||||
"sd" : 1,
|
||||
"sdext" : 1,
|
||||
|
||||
@@ -334,7 +334,6 @@ bool includeProject(std::string_view rProject) {
|
||||
"reportdesign",
|
||||
"sc",
|
||||
"scaddins",
|
||||
"sccomp",
|
||||
"scp2",
|
||||
"sd",
|
||||
"sdext",
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# -*- 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_CppunitTest_CppunitTest,sc_solver))
|
||||
|
||||
$(eval $(call gb_CppunitTest_add_exception_objects,sc_solver,\
|
||||
sc/qa/unit/solver \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_add_defs,sc_solver,\
|
||||
$(if $(ENABLE_COINMP), -DENABLE_COINMP) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_libraries,sc_solver,\
|
||||
cppu \
|
||||
sal \
|
||||
test \
|
||||
unotest \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_set_include,sc_solver,\
|
||||
-I$(SRCDIR)/sc/inc \
|
||||
$$(INCLUDE) \
|
||||
))
|
||||
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_sdk_api,sc_solver))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_ure,sc_solver))
|
||||
$(eval $(call gb_CppunitTest_use_vcl,sc_solver))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_rdb,sc_solver,services))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_configuration,sc_solver))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
+11
-11
@@ -7,17 +7,17 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
|
||||
$(eval $(call gb_CppunitTest_CppunitTest,sccomp_swarmsolvertest))
|
||||
$(eval $(call gb_CppunitTest_CppunitTest,sc_swarmsolvertest))
|
||||
|
||||
$(eval $(call gb_CppunitTest_add_exception_objects,sccomp_swarmsolvertest,\
|
||||
sccomp/qa/unit/SwarmSolverTest \
|
||||
$(eval $(call gb_CppunitTest_add_exception_objects,sc_swarmsolvertest,\
|
||||
sc/qa/unit/SwarmSolverTest \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_externals,sccomp_swarmsolvertest,\
|
||||
$(eval $(call gb_CppunitTest_use_externals,sc_swarmsolvertest,\
|
||||
libxml2 \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_libraries,sccomp_swarmsolvertest,\
|
||||
$(eval $(call gb_CppunitTest_use_libraries,sc_swarmsolvertest,\
|
||||
basegfx \
|
||||
comphelper \
|
||||
cppu \
|
||||
@@ -55,18 +55,18 @@ $(eval $(call gb_CppunitTest_use_libraries,sccomp_swarmsolvertest,\
|
||||
$(gb_UWINAPI) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_set_include,sccomp_swarmsolvertest,\
|
||||
$(eval $(call gb_CppunitTest_set_include,sc_swarmsolvertest,\
|
||||
-I$(SRCDIR)/sc/inc \
|
||||
$$(INCLUDE) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_sdk_api,sccomp_swarmsolvertest))
|
||||
$(eval $(call gb_CppunitTest_use_sdk_api,sc_swarmsolvertest))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_ure,sccomp_swarmsolvertest))
|
||||
$(eval $(call gb_CppunitTest_use_vcl,sccomp_swarmsolvertest))
|
||||
$(eval $(call gb_CppunitTest_use_ure,sc_swarmsolvertest))
|
||||
$(eval $(call gb_CppunitTest_use_vcl,sc_swarmsolvertest))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_rdb,sccomp_swarmsolvertest,services))
|
||||
$(eval $(call gb_CppunitTest_use_rdb,sc_swarmsolvertest,services))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_configuration,sccomp_swarmsolvertest))
|
||||
$(eval $(call gb_CppunitTest_use_configuration,sc_swarmsolvertest))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
$(eval $(call gb_Library_Library,solver))
|
||||
|
||||
$(eval $(call gb_Library_set_componentfile,solver,sccomp/source/solver/solver,services))
|
||||
$(eval $(call gb_Library_set_componentfile,solver,sc/source/solver/solver,services))
|
||||
|
||||
$(eval $(call gb_Library_add_componentimpls,solver, \
|
||||
$(if $(ENABLE_COINMP),coinmp) \
|
||||
@@ -29,7 +29,7 @@ $(eval $(call gb_Library_use_sdk_api,solver))
|
||||
|
||||
$(eval $(call gb_Library_set_include,solver,\
|
||||
$$(INCLUDE) \
|
||||
-I$(SRCDIR)/sccomp/inc \
|
||||
-I$(SRCDIR)/sc/source/solver \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_use_libraries,solver,\
|
||||
@@ -46,9 +46,9 @@ $(eval $(call gb_Library_use_externals,solver,\
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_add_exception_objects,solver,\
|
||||
sccomp/source/solver/SwarmSolver \
|
||||
sccomp/source/solver/SolverComponent \
|
||||
$(if $(ENABLE_COINMP), sccomp/source/solver/CoinMPSolver) \
|
||||
sc/source/solver/SwarmSolver \
|
||||
sc/source/solver/SolverComponent \
|
||||
$(if $(ENABLE_COINMP), sc/source/solver/CoinMPSolver) \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
@@ -20,6 +20,7 @@ $(eval $(call gb_Module_add_targets,sc,\
|
||||
Library_scd \
|
||||
Library_scfilt \
|
||||
Library_scui \
|
||||
Library_solver \
|
||||
$(call gb_Helper_optional,OPENCL,Package_opencl) \
|
||||
Package_res_xml \
|
||||
UIConfig_scalc \
|
||||
@@ -27,6 +28,12 @@ $(eval $(call gb_Module_add_targets,sc,\
|
||||
|
||||
$(eval $(call gb_Module_add_l10n_targets,sc,\
|
||||
AllLangMoTarget_sc \
|
||||
AllLangMoTarget_scc \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Module_add_check_targets,sc,\
|
||||
CppunitTest_sc_solver \
|
||||
$(if $(and $(filter INTEL,$(CPUNAME)),$(filter -fsanitize=%,$(gb_CXX))),,$(if $(filter SCRIPTING,$(BUILD_TYPE)),CppunitTest_sc_swarmsolvertest)) \
|
||||
))
|
||||
|
||||
ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
|
||||
|
||||
@@ -30,7 +30,7 @@ class SwarmSolverTest : public UnoApiTest
|
||||
|
||||
public:
|
||||
SwarmSolverTest()
|
||||
: UnoApiTest(u"sccomp/qa/unit/data"_ustr)
|
||||
: UnoApiTest(u"sc/qa/unit/data/solver"_ustr)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <CoinError.hpp>
|
||||
|
||||
#include "SolverComponent.hxx"
|
||||
#include <strings.hrc>
|
||||
#include "strings.hrc"
|
||||
|
||||
#include <com/sun/star/frame/XModel.hpp>
|
||||
#include <com/sun/star/table/CellAddress.hpp>
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "SolverComponent.hxx"
|
||||
#include <strings.hrc>
|
||||
#include "strings.hrc"
|
||||
|
||||
#include <com/sun/star/container/XIndexAccess.hpp>
|
||||
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "DifferentialEvolution.hxx"
|
||||
#include "ParticelSwarmOptimization.hxx"
|
||||
|
||||
#include <strings.hrc>
|
||||
#include "strings.hrc"
|
||||
|
||||
namespace com::sun::star::uno
|
||||
{
|
||||
@@ -1,42 +0,0 @@
|
||||
# -*- 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_CppunitTest_CppunitTest,sccomp_solver))
|
||||
|
||||
$(eval $(call gb_CppunitTest_add_exception_objects,sccomp_solver,\
|
||||
sccomp/qa/unit/solver \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_add_defs,sccomp_solver,\
|
||||
$(if $(ENABLE_COINMP), -DENABLE_COINMP) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_libraries,sccomp_solver,\
|
||||
cppu \
|
||||
sal \
|
||||
test \
|
||||
unotest \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_set_include,sccomp_solver,\
|
||||
-I$(SRCDIR)/sc/inc \
|
||||
$$(INCLUDE) \
|
||||
))
|
||||
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_sdk_api,sccomp_solver))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_ure,sccomp_solver))
|
||||
$(eval $(call gb_CppunitTest_use_vcl,sccomp_solver))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_rdb,sccomp_solver,services))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_configuration,sccomp_solver))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
assumeFilename: sccomp/source/solver/SolverComponent.cxx
|
||||
excludelist:
|
||||
sccomp/source/solver/SolverComponent.hxx:
|
||||
# Base class needs full type
|
||||
- com/sun/star/sheet/XSolver.hpp
|
||||
- com/sun/star/sheet/XSolverDescription.hpp
|
||||
- com/sun/star/lang/XServiceInfo.hpp
|
||||
sccomp/source/solver/SolverComponent.cxx:
|
||||
# Actually used
|
||||
- com/sun/star/sheet/XSpreadsheetDocument.hpp
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
||||
|
||||
module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
include $(module_directory)/../solenv/gbuild/partial_build.mk
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
@@ -1,35 +0,0 @@
|
||||
# -*- 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/.
|
||||
#
|
||||
# This file incorporates work covered by the following license notice:
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed
|
||||
# with this work for additional information regarding copyright
|
||||
# ownership. The ASF licenses this file to you under the Apache
|
||||
# License, Version 2.0 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
#
|
||||
|
||||
$(eval $(call gb_Module_Module,sccomp))
|
||||
|
||||
$(eval $(call gb_Module_add_targets,sccomp,\
|
||||
Library_solver \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Module_add_l10n_targets,sccomp,\
|
||||
AllLangMoTarget_scc \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Module_add_check_targets,sccomp,\
|
||||
CppunitTest_sccomp_solver \
|
||||
$(if $(and $(filter INTEL,$(CPUNAME)),$(filter -fsanitize=%,$(gb_CXX))),,$(if $(filter SCRIPTING,$(BUILD_TYPE)),CppunitTest_sccomp_swarmsolvertest)) \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
@@ -1,3 +0,0 @@
|
||||
# Linear Solver for LibreOffice Calc
|
||||
|
||||
The (linear) solver for LibreOffice Calc.
|
||||
@@ -7697,6 +7697,7 @@ sc/qa/unit/mark_test.cxx
|
||||
sc/qa/unit/opencl-test-1.cxx
|
||||
sc/qa/unit/opencl-test-2.cxx
|
||||
sc/qa/unit/screenshots/screenshots.cxx
|
||||
sc/qa/unit/solver.cxx
|
||||
sc/qa/unit/tiledrendering/tiledrendering.cxx
|
||||
sc/qa/unit/ucalc.cxx
|
||||
sc/qa/unit/ucalc_condformat.cxx
|
||||
@@ -8326,6 +8327,9 @@ sc/source/filter/xml/xmlsubti.hxx
|
||||
sc/source/filter/xml/xmltabi.cxx
|
||||
sc/source/filter/xml/xmltabi.hxx
|
||||
sc/source/filter/xml/xmlwrap.cxx
|
||||
sc/source/solver/CoinMPSolver.cxx
|
||||
sc/source/solver/SolverComponent.cxx
|
||||
sc/source/solver/SolverComponent.hxx
|
||||
sc/source/ui/Accessibility/AccessibilityHints.cxx
|
||||
sc/source/ui/Accessibility/AccessibleCell.cxx
|
||||
sc/source/ui/Accessibility/AccessibleCellBase.cxx
|
||||
@@ -9032,11 +9036,6 @@ scaddins/source/pricing/black_scholes.cxx
|
||||
scaddins/source/pricing/black_scholes.hxx
|
||||
scaddins/source/pricing/pricing.cxx
|
||||
scaddins/source/pricing/pricing.hxx
|
||||
sccomp/qa/unit/solver.cxx
|
||||
sccomp/source/solver/CoinMPSolver.cxx
|
||||
sccomp/source/solver/LpsolveSolver.cxx
|
||||
sccomp/source/solver/SolverComponent.cxx
|
||||
sccomp/source/solver/SolverComponent.hxx
|
||||
scripting/source/basprov/baslibnode.cxx
|
||||
scripting/source/basprov/baslibnode.hxx
|
||||
scripting/source/basprov/basmethnode.cxx
|
||||
|
||||
@@ -124,7 +124,7 @@ class CheckGbuildToJsonModules(unittest.TestCase):
|
||||
shutil.rmtree(self.tempwork)
|
||||
|
||||
def test_gbuildtojson(self):
|
||||
modules = ['android', 'animations', 'apple_remote', 'avmedia', 'basctl', 'basegfx', 'basic', 'bean', 'canvas', 'chart2', 'codemaker', 'comphelper', 'cppcanvas', 'cui', 'dbaccess', 'desktop', 'docmodel', 'drawinglayer', 'editeng', 'embeddedobj', 'embedserv', 'eventattacher', 'extras', 'filter', 'forms', 'formula', 'fpicker', 'framework', 'hwpfilter', 'i18nlangtag', 'i18nutil', 'idl', 'instsetoo_native', 'io', 'ios', 'jvmaccess', 'jvmfwk', 'l10ntools', 'librelogo', 'libreofficekit', 'linguistic', 'lotuswordpro', 'nlpsolver', 'o3tl', 'offapi', 'officecfg', 'oovbaapi', 'oox', 'opencl', 'package', 'postprocess', 'pyuno', 'registry', 'remotebridges', 'reportbuilder', 'reportdesign', 'ridljar', 'salhelper', 'sax', 'sc', 'sccomp', 'scp2', 'scripting', 'sd', 'sdext', 'setup_native', 'sfx2', 'slideshow', 'smoketest', 'soltools', 'sot', 'starmath', 'store', 'svgio', 'emfio', 'svl', 'svtools', 'svx', 'sw', 'swext', 'sysui', 'test', 'testtools', 'toolkit', 'ucb', 'ucbhelper', 'udkapi', 'uitest', 'UnoControls', 'unodevtools', 'unoidl', 'unoil', 'unotest', 'unotools', 'unoxml', 'ure', 'uui', 'vbahelper', 'vcl', 'winaccessibility', 'wizards', 'writerperfect', 'xmlhelp', 'xmloff', 'xmlreader', 'xmlscript', 'xmlsecurity']
|
||||
modules = ['android', 'animations', 'apple_remote', 'avmedia', 'basctl', 'basegfx', 'basic', 'bean', 'canvas', 'chart2', 'codemaker', 'comphelper', 'cppcanvas', 'cui', 'dbaccess', 'desktop', 'docmodel', 'drawinglayer', 'editeng', 'embeddedobj', 'embedserv', 'eventattacher', 'extras', 'filter', 'forms', 'formula', 'fpicker', 'framework', 'hwpfilter', 'i18nlangtag', 'i18nutil', 'idl', 'instsetoo_native', 'io', 'ios', 'jvmaccess', 'jvmfwk', 'l10ntools', 'librelogo', 'libreofficekit', 'linguistic', 'lotuswordpro', 'nlpsolver', 'o3tl', 'offapi', 'officecfg', 'oovbaapi', 'oox', 'opencl', 'package', 'postprocess', 'pyuno', 'registry', 'remotebridges', 'reportbuilder', 'reportdesign', 'ridljar', 'salhelper', 'sax', 'sc', 'scp2', 'scripting', 'sd', 'sdext', 'setup_native', 'sfx2', 'slideshow', 'smoketest', 'soltools', 'sot', 'starmath', 'store', 'svgio', 'emfio', 'svl', 'svtools', 'svx', 'sw', 'swext', 'sysui', 'test', 'testtools', 'toolkit', 'ucb', 'ucbhelper', 'udkapi', 'uitest', 'UnoControls', 'unodevtools', 'unoidl', 'unoil', 'unotest', 'unotools', 'unoxml', 'ure', 'uui', 'vbahelper', 'vcl', 'winaccessibility', 'wizards', 'writerperfect', 'xmlhelp', 'xmloff', 'xmlreader', 'xmlscript', 'xmlsecurity']
|
||||
if os.environ['OS'] == 'WNT':
|
||||
# for now, use a limited subset for testing on windows as it is so annoyingly slow on this
|
||||
modules = ['chart2', 'cui', 'dbaccess', 'framework', 'oox', 'sfx2', 'svl', 'svtools', 'svx', 'toolkit', 'vcl', 'xmloff']
|
||||
|
||||
Reference in New Issue
Block a user