summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-18 17:33:46 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-18 17:35:15 +0200
commitb0edae7879175dde107518ece3683a077039882f (patch)
tree05d8d449702891aa73fb61c4838653bfd31cce1a /sc/source
parenta177c4c77236617fcdb34c89ea2746614a232051 (diff)
Add a 'Test' button to test the machine's OpenCL implementation
Does not yet do anything, but will essentially run a "unit test" of the OpenCL functionality required by the default subset of opcodes. Change-Id: I230f6232c90562ea56057347fb0dc088f98c215d
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.cxx11
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.hxx2
2 files changed, 13 insertions, 0 deletions
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index 4aafd8c95095..3c71c662ad50 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -153,6 +153,7 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
get(mpDriverVersionMax, "opencldriverversionmax");
get(mpListNewButton, "listbox-new");
get(mpListDeleteButton, "listbox-delete");
+ get(mpTestButton, "test");
get(mpOpenclInfoList, "opencl_list");
get(mpBtnAutomaticSelectionTrue, "automatic_select_true");
get(mpBtnAutomaticSelectionFalse, "automatic_select_false");
@@ -228,6 +229,8 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
mpListNewButton->SetClickHdl(LINK(this, ScCalcOptionsDialog, ListNewClickHdl));
mpListDeleteButton->SetClickHdl(LINK(this, ScCalcOptionsDialog, ListDeleteClickHdl));
+ mpTestButton->SetClickHdl(LINK(this, ScCalcOptionsDialog, TestClickHdl));
+
aLink = LINK(this, ScCalcOptionsDialog, BtnToggleHdl);
mpBtnTrue->SetToggleHdl(aLink); // Set handler only to the 'True' button.
@@ -951,4 +954,12 @@ IMPL_LINK( ScCalcOptionsDialog, ListDeleteClickHdl, PushButton*, )
return 0;
}
+IMPL_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton*, )
+{
+ // Automatically test the current implementation of OpenCL. If it
+ // seems good, whitelist it. If it seems bad, blacklist it.
+
+ return 0;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx
index 32e7f42cfd9f..e1a1370daeff 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.hxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx
@@ -43,6 +43,7 @@ public:
DECL_LINK( OpenCLWhiteAndBlackListSelHdl, Control* );
DECL_LINK( ListNewClickHdl, PushButton* );
DECL_LINK( ListDeleteClickHdl, PushButton* );
+ DECL_LINK( TestClickHdl, PushButton* );
const ScCalcConfig& GetConfig() const { return maConfig;}
@@ -86,6 +87,7 @@ private:
Edit* mpDriverVersionMax;
PushButton* mpListNewButton;
PushButton* mpListDeleteButton;
+ PushButton* mpTestButton;
FixedText* mpFtAnnotation;
FixedText* mpFtFrequency;