cui/Library_cui.mk | 2 cui/UIConfig_cui.mk | 2 cui/inc/treeopt.hrc | 1 cui/qa/unit/data/cui-dialogs-test_3.txt | 1 cui/source/options/optopencl.cxx | 107 -------------------------------- cui/source/options/optopencl.hxx | 44 ------------- cui/source/options/treeopt.cxx | 6 - cui/source/options/treeopthelper.cxx | 1 cui/uiconfig/ui/optopenclpage.ui | 99 ----------------------------- include/sfx2/pageids.hxx | 2 solenv/clang-format/excludelist | 2 solenv/sanitizers/ui/cui.suppr | 2 12 files changed, 269 deletions(-)
New commits: commit 6af18367f0f710d2b01b2a96d25073521f66dc2b Author: Sahil Gautam <[email protected]> AuthorDate: Wed Sep 24 12:53:59 2025 +0530 Commit: Sahil Gautam <[email protected]> CommitDate: Sat Oct 11 14:38:49 2025 +0200 tdf#151144 remove opencl tab page Change-Id: I3b50fff0c32becbd9b5b79d02c6921129adae009 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191422 Tested-by: Jenkins Reviewed-by: Sahil Gautam <[email protected]> diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index 835d185dbfd2..a20ca726d8f0 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -199,8 +199,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optjava \ cui/source/options/optjsearch \ cui/source/options/optlingu \ - $(call gb_Helper_optional,OPENCL, \ - cui/source/options/optopencl) \ cui/source/options/optpath \ cui/source/options/optsave \ cui/source/options/optupdt \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index e73243accb44..5d1db7a5ad79 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -151,8 +151,6 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optlingupage \ cui/uiconfig/ui/optnewdictionarydialog \ cui/uiconfig/ui/optonlineupdatepage \ - $(call gb_Helper_optional,OPENCL, \ - cui/uiconfig/ui/optopenclpage) \ cui/uiconfig/ui/optpathspage \ cui/uiconfig/ui/optproxypage \ cui/uiconfig/ui/optsavepage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index 55c4e52a5563..0edd9c3aa06d 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -44,7 +44,6 @@ const std::pair<TranslateId, sal_uInt16> SID_GENERAL_OPTIONS_RES[] = { NC_("SID_GENERAL_OPTIONS_RES", "Advanced"), RID_SVXPAGE_OPTIONS_JAVA }, { NC_("SID_GENERAL_OPTIONS_RES", "Basic IDE"), RID_SVXPAGE_BASICIDE_OPTIONS }, { NC_("SID_GENERAL_OPTIONS_RES", "Online Update"), RID_SVXPAGE_ONLINEUPDATE }, - { NC_("SID_GENERAL_OPTIONS_RES", "OpenCL"), RID_SVXPAGE_OPENCL } }; const std::pair<TranslateId, sal_uInt16> SID_LANGUAGE_OPTIONS_RES[] = diff --git a/cui/qa/unit/data/cui-dialogs-test_3.txt b/cui/qa/unit/data/cui-dialogs-test_3.txt index 6fd7fb0ff21d..0f9ff0df5797 100644 --- a/cui/qa/unit/data/cui-dialogs-test_3.txt +++ b/cui/qa/unit/data/cui-dialogs-test_3.txt @@ -32,7 +32,6 @@ cui/ui/optlanguagespage.ui cui/ui/optlingupage.ui cui/ui/optnewdictionarydialog.ui cui/ui/optonlineupdatepage.ui -cui/ui/optopenclpage.ui cui/ui/optpathspage.ui cui/ui/optproxypage.ui cui/ui/optsavepage.ui diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx deleted file mode 100644 index abc4784e4d7e..000000000000 --- a/cui/source/options/optopencl.cxx +++ /dev/null @@ -1,107 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#include <vcl/svapp.hxx> -#include <vcl/weld.hxx> -#include <opencl/openclconfig.hxx> -#include <opencl/openclwrapper.hxx> -#include <officecfg/Office/Common.hxx> -#include <svtools/restartdialog.hxx> - -#include "optopencl.hxx" - -SvxOpenCLTabPage::SvxOpenCLTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, u"cui/ui/optopenclpage.ui"_ustr, u"OptOpenCLPage"_ustr, &rSet) - , maConfig(OpenCLConfig::get()) - , mxUseOpenCL(m_xBuilder->weld_check_button(u"useopencl"_ustr)) - , mxUseOpenImg(m_xBuilder->weld_widget(u"lockuseopencl"_ustr)) - , mxOclUsed(m_xBuilder->weld_label(u"openclused"_ustr)) - , mxOclNotUsed(m_xBuilder->weld_label(u"openclnotused"_ustr)) -{ - mxUseOpenCL->set_active(maConfig.mbUseOpenCL); - mxUseOpenCL->set_sensitive(!officecfg::Office::Common::Misc::UseOpenCL::isReadOnly()); - mxUseOpenImg->set_visible(officecfg::Office::Common::Misc::UseOpenCL::isReadOnly()); - - bool bCLUsed = openclwrapper::GPUEnv::isOpenCLEnabled(); - mxOclUsed->set_visible(bCLUsed); - mxOclNotUsed->set_visible(!bCLUsed); -} - -SvxOpenCLTabPage::~SvxOpenCLTabPage() -{ -} - -std::unique_ptr<SfxTabPage> SvxOpenCLTabPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet) -{ - return std::make_unique<SvxOpenCLTabPage>(pPage, pController, *rAttrSet); -} - -OUString SvxOpenCLTabPage::GetAllStrings() -{ - OUString sAllStrings; - OUString labels[] = { u"label1"_ustr, u"openclnotused"_ustr, u"openclused"_ustr }; - - for (const auto& label : labels) - { - if (const auto pString = m_xBuilder->weld_label(label)) - sAllStrings += pString->get_label() + " "; - } - - sAllStrings += mxUseOpenCL->get_label() + " "; - - return sAllStrings.replaceAll("_", ""); -} - -bool SvxOpenCLTabPage::FillItemSet( SfxItemSet* ) -{ - bool bModified = false; - std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); - - if (mxUseOpenCL->get_state_changed_from_saved()) - maConfig.mbUseOpenCL = mxUseOpenCL->get_active(); - - if (maConfig != OpenCLConfig::get()) - { - maConfig.set(); - bModified = true; - } - - if (bModified) - { - batch->commit(); - SolarMutexGuard aGuard; - if (svtools::executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, - svtools::RESTART_REASON_OPENCL)) - GetDialogController()->response(RET_OK); - } - - return bModified; -} - -void SvxOpenCLTabPage::Reset( const SfxItemSet* ) -{ - maConfig = OpenCLConfig::get(); - - mxUseOpenCL->set_active(maConfig.mbUseOpenCL); - mxUseOpenImg->set_visible(officecfg::Office::Common::Misc::UseOpenCL::isReadOnly()); - mxUseOpenCL->save_state(); -} - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx deleted file mode 100644 index e6414245da8f..000000000000 --- a/cui/source/options/optopencl.hxx +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ -#pragma once - -#include <opencl/openclconfig.hxx> -#include <sfx2/tabdlg.hxx> - -class SvxOpenCLTabPage : public SfxTabPage -{ -private: - OpenCLConfig maConfig; - - std::unique_ptr<weld::CheckButton> mxUseOpenCL; - std::unique_ptr<weld::Widget> mxUseOpenImg; - std::unique_ptr<weld::Label> mxOclUsed; - std::unique_ptr<weld::Label> mxOclNotUsed; - -public: - SvxOpenCLTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); - static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet ); - virtual ~SvxOpenCLTabPage() override; - virtual OUString GetAllStrings() override; - - virtual bool FillItemSet( SfxItemSet* rSet ) override; - virtual void Reset( const SfxItemSet* rSet ) override; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 2635f2247c20..7873134ba4d8 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -53,9 +53,6 @@ #include "optjava.hxx" #include "optjsearch.hxx" #include <optlingu.hxx> -#if HAVE_FEATURE_OPENCL -#include "optopencl.hxx" -#endif #include <optpath.hxx> #include "optsave.hxx" #include "optupdt.hxx" @@ -272,9 +269,6 @@ static std::unique_ptr<SfxTabPage> CreateGeneralTabPage(sal_uInt16 nId, weld::Co case RID_SVXPAGE_LANGTOOL_OPTIONS: fnCreate = &OptLanguageToolTabPage::Create ; break; case RID_SVXPAGE_DEEPL_OPTIONS: fnCreate = &OptDeeplTabPage::Create ; break; case RID_SVXPAGE_OPTIONS_JAVA: fnCreate = &SvxJavaOptionsPage::Create ; break; -#if HAVE_FEATURE_OPENCL - case RID_SVXPAGE_OPENCL: fnCreate = &SvxOpenCLTabPage::Create ; break; -#endif case RID_SVXPAGE_ONLINEUPDATE: fnCreate = &SvxOnlineUpdateTabPage::Create; break; case RID_OPTPAGE_CHART_DEFCOLORS: fnCreate = &SvxDefaultColorOptPage::Create; break; #if HAVE_FEATURE_SCRIPTING diff --git a/cui/source/options/treeopthelper.cxx b/cui/source/options/treeopthelper.cxx index a8dd2102f505..96510cc291b4 100644 --- a/cui/source/options/treeopthelper.cxx +++ b/cui/source/options/treeopthelper.cxx @@ -56,7 +56,6 @@ static PageIdToFileNameMap_Impl FileMap_Impl[] = { { RID_SVXPAGE_OPTIONS_JAVA, u""_ustr }, // Java { RID_SVXPAGE_BASICIDE_OPTIONS, u""_ustr }, // BasicIDEOptions { RID_SVXPAGE_ONLINEUPDATE, u""_ustr }, // OnlineUpdate - { RID_SVXPAGE_OPENCL, u""_ustr }, // OpenCL // LanguageSettings, SID_LANGUAGE_OPTIONS { OFA_TP_LANGUAGES, u""_ustr }, // Languages diff --git a/cui/uiconfig/ui/optopenclpage.ui b/cui/uiconfig/ui/optopenclpage.ui deleted file mode 100644 index 8014e3711e1c..000000000000 --- a/cui/uiconfig/ui/optopenclpage.ui +++ /dev/null @@ -1,99 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.38.2 --> -<interface domain="cui"> - <requires lib="gtk+" version="3.20"/> - <object class="GtkFrame" id="OptOpenCLPage"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="hexpand">True</property> - <property name="border-width">6</property> - <property name="label-xalign">0</property> - <property name="shadow-type">none</property> - <child> - <object class="GtkBox" id="denylistbox"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="margin-start">12</property> - <property name="margin-top">6</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="orientation">vertical</property> - <property name="spacing">12</property> - <child> - <!-- n-columns=2 n-rows=1 --> - <object class="GtkGrid"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="hexpand">True</property> - <property name="column-spacing">6</property> - <child> - <object class="GtkCheckButton" id="useopencl"> - <property name="label" translatable="yes" context="optopenclpage|useopencl">Allow use of OpenCL</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="use-underline">True</property> - <property name="draw-indicator">True</property> - </object> - <packing> - <property name="left-attach">1</property> - <property name="top-attach">0</property> - </packing> - </child> - <child> - <object class="GtkImage" id="lockuseopencl"> - <property name="can-focus">False</property> - <property name="no-show-all">True</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="icon-name">res/lock.png</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">0</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="openclnotused"> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="optopenclpage|openclnotused">OpenCL is not used.</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="openclused"> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="optopenclpage|openclused">OpenCL is available for use.</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="optopenclpage|label1">OpenCL Options</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - </child> - </object> - <object class="GtkSizeGroup" id="sizegroup1"/> -</interface> diff --git a/include/sfx2/pageids.hxx b/include/sfx2/pageids.hxx index c9b9feb9476e..97b9df8d868a 100644 --- a/include/sfx2/pageids.hxx +++ b/include/sfx2/pageids.hxx @@ -64,8 +64,6 @@ #define RID_SVXPAGE_JSEARCH_OPTIONS (RID_SVX_START + 840) #define RID_SVX_FONT_SUBSTITUTION (RID_SVX_START + 18) -#define RID_SVXPAGE_OPENCL (RID_SVX_START + 254) - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 462074016189..e476eaffc055 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -2355,8 +2355,6 @@ cui/source/options/optjava.hxx cui/source/options/optjsearch.cxx cui/source/options/optjsearch.hxx cui/source/options/optlingu.cxx -cui/source/options/optopencl.cxx -cui/source/options/optopencl.hxx cui/source/options/optpath.cxx cui/source/options/optsave.cxx cui/source/options/optsave.hxx diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr index 26a2e434363a..5e3e204ac174 100644 --- a/solenv/sanitizers/ui/cui.suppr +++ b/solenv/sanitizers/ui/cui.suppr @@ -108,8 +108,6 @@ cui/uiconfig/ui/optonlineupdatepage.ui://GtkLabel[@id='useragent_label'] orphan- cui/uiconfig/ui/optonlineupdatepage.ui://GtkLabel[@id='useragent_changed'] orphan-label cui/uiconfig/ui/optonlineupdatepage.ui://GtkLabel[@id='useragent'] orphan-label cui/uiconfig/ui/optonlineupdatepage.ui://GtkLabel[@id='neverchecked'] orphan-label -cui/uiconfig/ui/optopenclpage.ui://GtkLabel[@id='openclused'] orphan-label -cui/uiconfig/ui/optopenclpage.ui://GtkLabel[@id='openclnotused'] orphan-label cui/uiconfig/ui/optproxypage.ui://GtkLabel[@id='noproxydesc'] orphan-label cui/uiconfig/ui/optsavepage.ui://GtkLabel[@id='autosave_mins'] orphan-label cui/uiconfig/ui/optsavepage.ui://GtkLabel[@id='odfwarning_label'] orphan-label
