From b0edae7879175dde107518ece3683a077039882f Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 18 Nov 2014 17:33:46 +0200 Subject: 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 --- sc/source/ui/optdlg/calcoptionsdlg.cxx | 11 +++++++++++ sc/source/ui/optdlg/calcoptionsdlg.hxx | 2 ++ 2 files changed, 13 insertions(+) (limited to 'sc/source/ui') 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; -- cgit v1.2.3