diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-11-07 17:35:52 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-11-07 18:44:28 +0200 |
commit | d156dd493c089ebe953348b3ae3668b233701fda (patch) | |
tree | e5af17f3f7bd58ba266f3dee8e16d30cf73c0283 /sc | |
parent | 0485355e05da36f4023b4c594ecb80b342608f5a (diff) |
Update the white or black list when editing an entry
Must be careful to re-select the logically same entry even after it actually
has been removed and the edited on inserted.
Change-Id: Id19f7845fadbc018affab7a6cb6b421ed9170297
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/optdlg/calcoptionsdlg.cxx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 8140eef4743d..051cd98c3d7e 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -308,19 +308,23 @@ void ScCalcOptionsDialog::fillOpenCLList() namespace { - void fillListBox(ListBox* pListBox, const ScCalcConfig::OpenCLImplSet& rSet) +OUString format(const ScCalcConfig::OpenCLImpl& rImpl) +{ + return (rImpl.maOS + " " + + rImpl.maOSVersion + " " + + rImpl.maPlatformVendor + " " + + rImpl.maDevice + " " + + rImpl.maDriverVersion); +} + +void fillListBox(ListBox* pListBox, const ScCalcConfig::OpenCLImplSet& rSet) { pListBox->SetUpdateMode(false); pListBox->Clear(); for (auto i = rSet.cbegin(); i != rSet.cend(); ++i) { - pListBox->InsertEntry((*i).maOS + " " + - (*i).maOSVersion + " " + - (*i).maPlatformVendor + " " + - (*i).maDevice + " " + - (*i).maDriverVersion, - LISTBOX_APPEND); + pListBox->InsertEntry(format(*i), LISTBOX_APPEND); } pListBox->SetUpdateMode(true); @@ -799,6 +803,9 @@ void ScCalcOptionsDialog::EditFieldValueChanged(Control *pCtrl) rSet.erase(impl); rSet.insert(newImpl); + + fillListBox(mpOpenCLWhiteAndBlackListBox, rSet); + mpOpenCLWhiteAndBlackListBox->SelectEntry(format(newImpl)); } } |