diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-11-30 09:44:19 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-12-01 16:40:44 +0100 |
commit | bd8a89f208c71e51921d5f090179b99b45cc0a5f (patch) | |
tree | 76884fe22a5167ae48cd8a94b7e7d75b08ddcaa7 /cui/source/options | |
parent | 9ae2d9ff4be259ad60bbb10a7488e38ca4eefc11 (diff) |
sc interpreter: Don't hide S/W Interpreter behind an environment variable.
Instead provide a user setting that can be enabled so that the S/W Interpreter
is used on a subset of the operations. The operations for which it is used
are controlled by a whitelist in ScCalcConfig::setOpenCLConfigToDefault().
Change-Id: I7d3f3a864fcb1231e5484ec23961f14fca1466c5
Diffstat (limited to 'cui/source/options')
-rw-r--r-- | cui/source/options/optopencl.cxx | 19 | ||||
-rw-r--r-- | cui/source/options/optopencl.hxx | 1 |
2 files changed, 19 insertions, 1 deletions
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx index 71cd281480dc..db1470e290c7 100644 --- a/cui/source/options/optopencl.cxx +++ b/cui/source/options/optopencl.cxx @@ -35,7 +35,8 @@ #include <com/sun/star/util/XChangesBatch.hpp> #include <com/sun/star/setup/UpdateCheckConfig.hpp> -#include "cuires.hrc" +#include <cuires.hrc> +#include <dialmgr.hxx> #include "optopencl.hxx" #include <svtools/treelistentry.hxx> @@ -43,6 +44,7 @@ SvxOpenCLTabPage::SvxOpenCLTabPage(vcl::Window* pParent, const SfxItemSet& rSet) SfxTabPage(pParent, "OptOpenCLPage", "cui/ui/optopenclpage.ui", &rSet), maConfig(OpenCLConfig::get()) { + get(mpUseSwInterpreter, "useswinterpreter"); get(mpUseOpenCL, "useopencl"); get(mpBlackListTable, "blacklist"); get(mpBlackListFrame,"blacklistframe"); @@ -60,6 +62,8 @@ SvxOpenCLTabPage::SvxOpenCLTabPage(vcl::Window* pParent, const SfxItemSet& rSet) get(mpVendor,"vendor"); get(mpDrvVersion,"driverversion"); + mpUseSwInterpreter->Check(officecfg::Office::Common::Misc::UseSwInterpreter::get()); + mpUseOpenCL->Check(maConfig.mbUseOpenCL); mpUseOpenCL->SetClickHdl(LINK(this, SvxOpenCLTabPage, EnableOpenCLHdl)); @@ -116,6 +120,7 @@ void SvxOpenCLTabPage::dispose() mpBlackList.disposeAndClear(); mpWhiteList.disposeAndClear(); + mpUseSwInterpreter.clear(); mpUseOpenCL.clear(); mpBlackListFrame.clear(); mpBlackListTable.clear(); @@ -146,6 +151,15 @@ bool SvxOpenCLTabPage::FillItemSet( SfxItemSet* ) bool bModified = false; std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); + if (mpUseSwInterpreter->IsValueChangedFromSaved()) + { + officecfg::Office::Common::Misc::UseSwInterpreter::set(mpUseSwInterpreter->IsChecked(), batch); + bModified = true; + + ScopedVclPtrInstance<MessageDialog> aWarnBox(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO); + aWarnBox->Execute(); + } + if (mpUseOpenCL->IsValueChangedFromSaved()) maConfig.mbUseOpenCL = mpUseOpenCL->IsChecked(); @@ -195,6 +209,9 @@ void SvxOpenCLTabPage::Reset( const SfxItemSet* ) { maConfig = OpenCLConfig::get(); + mpUseSwInterpreter->Check(officecfg::Office::Common::Misc::UseSwInterpreter::get()); + mpUseSwInterpreter->SaveValue(); + mpUseOpenCL->Check(maConfig.mbUseOpenCL); mpUseOpenCL->SaveValue(); diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx index fe91fe1f440f..10dc30b5ce2b 100644 --- a/cui/source/options/optopencl.hxx +++ b/cui/source/options/optopencl.hxx @@ -31,6 +31,7 @@ class SvxOpenCLTabPage : public SfxTabPage private: OpenCLConfig maConfig; + VclPtr<CheckBox> mpUseSwInterpreter; VclPtr<CheckBox> mpUseOpenCL; VclPtr<VclFrame> mpBlackListFrame; |