sc/source/ui/optdlg/calcoptionsdlg.cxx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
New commits: commit 180ad590fbf08968599cc833349c322d4bd4803b Author: Tor Lillqvist <t...@collabora.com> Date: Fri Nov 7 17:35:52 2014 +0200 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 diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 8140eef..051cd98 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)); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits