From cb0000d742063d4a25f979dd975ba9a0cbdd75de Mon Sep 17 00:00:00 2001 From: Sahil Gautam Date: Thu, 29 Jan 2026 07:35:24 +0530 Subject: [PATCH] tdf#151144 move OpenCL checkbox under 'CPU Threading Settings' Change-Id: I1ef81a5de901f58d09eef95053cba83627b4b264 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198330 Reviewed-by: Heiko Tietze Tested-by: Jenkins --- sc/source/ui/inc/tpcalc.hxx | 3 +- sc/source/ui/optdlg/tpcalc.cxx | 7 ++- sc/uiconfig/scalc/ui/optcalculatepage.ui | 67 ++++++++---------------- 3 files changed, 25 insertions(+), 52 deletions(-) diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx index a0cca03e85d8..4073bf26ed37 100644 --- a/sc/source/ui/inc/tpcalc.hxx +++ b/sc/source/ui/inc/tpcalc.hxx @@ -66,9 +66,8 @@ private: #if HAVE_FEATURE_OPENCL OpenCLConfig maConfig; - std::unique_ptr m_xAllowOpenCL; #endif - std::unique_ptr m_xOpenCLFrame; + std::unique_ptr m_xAllowOpenCL; std::unique_ptr m_xBtnCase; std::unique_ptr m_xBtnCaseImg; diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx index 4afc205477f4..80f5c674363b 100644 --- a/sc/source/ui/optdlg/tpcalc.cxx +++ b/sc/source/ui/optdlg/tpcalc.cxx @@ -58,9 +58,8 @@ ScTpCalcOptions::ScTpCalcOptions(weld::Container* pPage, weld::DialogController* , m_xDateImg(m_xBuilder->weld_widget(u"lockdate"_ustr)) #if HAVE_FEATURE_OPENCL , maConfig(OpenCLConfig::get()) - , m_xAllowOpenCL(m_xBuilder->weld_check_button(u"allowopencl"_ustr)) #endif - , m_xOpenCLFrame(m_xBuilder->weld_frame(u"OptOpenCLPage"_ustr)) + , m_xAllowOpenCL(m_xBuilder->weld_check_button(u"allowopencl"_ustr)) , m_xBtnCase(m_xBuilder->weld_check_button(u"case"_ustr)) , m_xBtnCaseImg(m_xBuilder->weld_widget(u"lockcase"_ustr)) , m_xBtnCalc(m_xBuilder->weld_check_button(u"calc"_ustr)) @@ -110,7 +109,7 @@ void ScTpCalcOptions::InitOpenCL() m_xAllowOpenCL->set_sensitive(!officecfg::Office::Common::Misc::UseOpenCL::isReadOnly() && openclwrapper::GPUEnv::isOpenCLEnabled()); #endif - m_xOpenCLFrame->set_visible(HAVE_FEATURE_OPENCL); + m_xAllowOpenCL->set_visible(HAVE_FEATURE_OPENCL); } std::unique_ptr ScTpCalcOptions::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet ) @@ -279,7 +278,7 @@ OUString ScTpCalcOptions::GetAllStrings() OUStringBuffer sAllStrings; OUString labels[] = { u"label5"_ustr, u"label1"_ustr, u"precft"_ustr, u"label2"_ustr, u"stepsft"_ustr, u"minchangeft"_ustr, - u"label4"_ustr, u"label3"_ustr, u"openclframe"_ustr }; + u"label4"_ustr, u"label3"_ustr }; for (const auto& label : labels) { diff --git a/sc/uiconfig/scalc/ui/optcalculatepage.ui b/sc/uiconfig/scalc/ui/optcalculatepage.ui index ed29cd18e7ee..dcf3650de8dd 100644 --- a/sc/uiconfig/scalc/ui/optcalculatepage.ui +++ b/sc/uiconfig/scalc/ui/optcalculatepage.ui @@ -30,7 +30,7 @@ 0 none - + True False @@ -68,6 +68,25 @@ 0 + + + Allow use of OpenCL + True + True + False + True + + + 1 + 1 + + + + + + + + @@ -747,51 +766,7 @@ - - True - False - 0 - none - - - True - False - start - start - 12 - 6 - vertical - - - Allow use of OpenCL - True - True - False - True - - - False - True - 0 - - - - - - - True - False - OpenCL Options - - - - - - - - 1 - 1 - +