sc/inc/table.hxx | 4 +++- sc/qa/unit/helper/qahelper.cxx | 10 +++++++++- sc/qa/unit/parallelism.cxx | 3 +++ sc/qa/unit/ucalc_parallelism.cxx | 3 +++ sc/source/core/data/table1.cxx | 7 ++++++- 5 files changed, 24 insertions(+), 3 deletions(-)
New commits: commit aa842cdc484082657103f3ce0e9ab6d77e1bd4db Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Mar 3 15:16:57 2025 +0200 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Nov 29 15:15:50 2025 +0100 Fix build with --disable-opencl Change-Id: Ib97d303ce7d03df237d78175f0c32ed466fdfa2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183039 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194811 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 10ede9876731..da1286bb8cb1 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <config_feature_opencl.h> + #include "qahelper.hxx" #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <comphelper/propertysequence.hxx> @@ -687,6 +689,8 @@ void ScModelTestBase::miscRowHeightsTest( TestParam const * aTestValues, unsigne } } +#if HAVE_FEATURE_OPENCL + void ScModelTestBase::enableOpenCL() { /** @@ -701,7 +705,9 @@ void ScModelTestBase::disableOpenCL() sc::FormulaGroupInterpreter::disableOpenCL_UnitTestsOnly(); } -void ScModelTestBase::initTestEnv(std::u16string_view fileName) +#endif + +void ScModelTestBase::initTestEnv([[maybe_unused]] std::u16string_view fileName) { // Some documents contain macros, disable them, otherwise // the "Error, BASIC runtime error." dialog is prompted @@ -714,6 +720,7 @@ void ScModelTestBase::initTestEnv(std::u16string_view fileName) aMacroValue.State = beans::PropertyState_DIRECT_VALUE; args.push_back(aMacroValue); +#if HAVE_FEATURE_OPENCL disableOpenCL(); CPPUNIT_ASSERT(!ScCalcConfig::isOpenCLEnabled()); @@ -734,6 +741,7 @@ void ScModelTestBase::initTestEnv(std::u16string_view fileName) // Check there are 2 documents uno::Reference<frame::XFrames> xFrames = mxDesktop->getFrames(); CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xFrames->getCount()); +#endif // HAVE_FEATURE_OPENCL } ScRange ScUcalcTestBase::insertRangeData( diff --git a/sc/qa/unit/parallelism.cxx b/sc/qa/unit/parallelism.cxx index 205f8bca32a8..903c97be4fd2 100644 --- a/sc/qa/unit/parallelism.cxx +++ b/sc/qa/unit/parallelism.cxx @@ -8,6 +8,7 @@ */ #include <sal/config.h> +#include <config_feature_opencl.h> #include "helper/qahelper.hxx" @@ -58,7 +59,9 @@ void ScParallelismTest::setUp() { ScModelTestBase::setUp(); +#if HAVE_FEATURE_OPENCL sc::FormulaGroupInterpreter::disableOpenCL_UnitTestsOnly(); +#endif m_bThreadingFlagCfg = getThreadingFlag(); if (!m_bThreadingFlagCfg) diff --git a/sc/qa/unit/ucalc_parallelism.cxx b/sc/qa/unit/ucalc_parallelism.cxx index 2393c33b6d08..62a7657f4db8 100644 --- a/sc/qa/unit/ucalc_parallelism.cxx +++ b/sc/qa/unit/ucalc_parallelism.cxx @@ -8,6 +8,7 @@ */ #include <sal/config.h> +#include <config_feature_opencl.h> #include "helper/qahelper.hxx" @@ -55,7 +56,9 @@ void ScParallelismTest::setUp() { ScUcalcTestBase::setUp(); +#if HAVE_FEATURE_OPENCL sc::FormulaGroupInterpreter::disableOpenCL_UnitTestsOnly(); +#endif m_bThreadingFlagCfg = getThreadingFlag(); if (!m_bThreadingFlagCfg) commit d8844ef1f07b56426f5b2328ce991efffd0766e1 Author: Caolán McNamara <[email protected]> AuthorDate: Sat Nov 29 12:18:30 2025 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Nov 29 15:15:41 2025 +0100 cid#1399234 Uncaught exception and cid#1399216 Uncaught exception Change-Id: Id0e2d04359608e0e92a94f4882b74fd779aa030a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194818 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 476a98ce9a1b..a74e774bb525 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -290,7 +290,7 @@ friend class sc::FormulaGroupAreaListener; public: ScTable( ScDocument& rDoc, SCTAB nNewTab, const OUString& rNewName, bool bColInfo = true, bool bRowInfo = true ); - ~ScTable() COVERITY_NOEXCEPT_FALSE; + ~ScTable(); ScTable(const ScTable&) = delete; ScTable& operator=(const ScTable&) = delete; @@ -1213,6 +1213,8 @@ public: private: + void ImplDestroy(); + void FillFormulaVertical( const ScFormulaCell& rSrcCell, SCCOLROW& rInner, SCCOL nCol, SCROW nRow1, SCROW nRow2, diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 066b452ff074..e453bc4b40d0 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -318,7 +318,7 @@ ScTable::ScTable( ScDocument& rDoc, SCTAB nNewTab, const OUString& rNewName, aCol[k].Init( k, nTab, rDocument, true ); } -ScTable::~ScTable() COVERITY_NOEXCEPT_FALSE +void ScTable::ImplDestroy() { if (!rDocument.IsInDtorClear()) { @@ -347,6 +347,11 @@ ScTable::~ScTable() COVERITY_NOEXCEPT_FALSE DestroySortCollator(); } +ScTable::~ScTable() +{ + suppress_fun_call_w_exception(ImplDestroy()); +} + sal_Int64 ScTable::GetHashCode() const { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
