diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-09-13 14:29:24 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-09-19 17:03:18 +0200 |
commit | 543749c7f1012fcdc5948f17d5a9626d253487a4 (patch) | |
tree | be84b7edad9322d405a0d52432339a228b4c6eb7 /sc/source/ui/optdlg/calcoptionsdlg.cxx | |
parent | 7437095966aaea20625d85b6119fa0469ef19232 (diff) |
disable the opencl device selection while auto selection is enabled
Change-Id: Ie2f10e9e863bfcb6a34380049bd63e480aab76d2
Diffstat (limited to 'sc/source/ui/optdlg/calcoptionsdlg.cxx')
-rw-r--r-- | sc/source/ui/optdlg/calcoptionsdlg.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 8167736001d2..f13c578dd696 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -124,6 +124,8 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(Window* pParent, const ScCalcConfig& rC mpOpenclInfoList->SetHighlightRange(); mpOpenclInfoList->GetParent()->Hide(); + mpBtnAutomaticSelectionTrue->SetToggleHdl(LINK(this, ScCalcOptionsDialog, BtnAutomaticSelectHdl)); + maCaptionStringRefSyntax = get<Window>("ref_syntax_caption")->GetText(); maDescStringRefSyntax = get<Window>("ref_syntax_desc")->GetText(); maUseFormulaSyntax = get<Window>("use_formula_syntax")->GetText(); @@ -306,6 +308,8 @@ void ScCalcOptionsDialog::SelectionChanged() mpOpenclInfoList->GetParent()->Enable(); else mpOpenclInfoList->GetParent()->Disable(); + + OpenclAutomaticSelectionChanged(); } if ( bValue ) @@ -346,6 +350,15 @@ void ScCalcOptionsDialog::ListOptionValueChanged() } } +void ScCalcOptionsDialog::OpenclAutomaticSelectionChanged() +{ + bool bValue = mpBtnAutomaticSelectionTrue->IsChecked(); + if(bValue) + mpOpenclInfoList->Disable(); + else + mpOpenclInfoList->Enable(); +} + void ScCalcOptionsDialog::RadioValueChanged() { sal_uInt16 nSelected = mpLbSettings->GetSelectEntryPos(); @@ -403,5 +416,11 @@ IMPL_LINK_NOARG(ScCalcOptionsDialog, BtnToggleHdl) return 0; } +IMPL_LINK_NOARG(ScCalcOptionsDialog, BtnAutomaticSelectHdl) +{ + OpenclAutomaticSelectionChanged(); + return 0; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |