summaryrefslogtreecommitdiff
path: root/sc/source/ui/optdlg/calcoptionsdlg.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-20 14:55:37 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-20 14:58:32 +0200
commit92c5e9b2812571329a758d54b15273f5fc68f95c (patch)
treea95d39d956e59b8cd2e9b11c8d72107c0c1349a2 /sc/source/ui/optdlg/calcoptionsdlg.cxx
parenta55f740045d6d30e1ef5522889d2dc359ca5784a (diff)
Use regexps in the OpenCL blacklist/whitelist
Drop version number bounds, use regexps instead. Not entirely ideal, but as vendors are free to put arbitrary stuff into the driver version string (part of which might be numbers, part free text, part significant, part just informative), just comparing against lower and upper bounds with strverscmp() was not ideal either. Change-Id: Ic4ef4d8e15f79f1c96e6e03f6c01e62ae92dc2fc
Diffstat (limited to 'sc/source/ui/optdlg/calcoptionsdlg.cxx')
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.cxx25
1 files changed, 7 insertions, 18 deletions
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index 046fd7f16151..acf931861ffa 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -160,8 +160,7 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
get(mpOSVersion, "osversion");
get(mpPlatformVendor, "platformvendor");
get(mpDevice, "opencldevice");
- get(mpDriverVersionMin, "opencldriverversionmin");
- get(mpDriverVersionMax, "opencldriverversionmax");
+ get(mpDriverVersion, "opencldriverversion");
get(mpListNewButton, "listbox-new");
get(mpListDeleteButton, "listbox-delete");
get(mpTestButton, "test");
@@ -178,8 +177,7 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
mpOSVersion->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpPlatformVendor->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpDevice->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
- mpDriverVersionMin->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
- mpDriverVersionMax->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
+ mpDriverVersion->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpOpenCLWhiteAndBlackListBox->set_height_request(4* mpOpenCLWhiteAndBlackListBox->GetTextHeight());
mpOpenCLWhiteAndBlackListBox->SetStyle(mpOpenCLWhiteAndBlackListBox->GetStyle() | WB_CLIPCHILDREN | WB_FORCE_MAKEVISIBLE);
@@ -332,10 +330,7 @@ OUString format(const ScCalcConfig::OpenCLImplMatcher& rImpl)
rImpl.maOSVersion + " " +
rImpl.maPlatformVendor + " " +
rImpl.maDevice + " " +
- (rImpl.maDriverVersionMax != "" ?
- OUString("[") + rImpl.maDriverVersionMin + "," + rImpl.maDriverVersionMax + "]" :
- rImpl.maDriverVersionMin)
- );
+ rImpl.maDriverVersion);
}
void fillListBox(ListBox* pListBox, const ScCalcConfig::OpenCLImplMatcherSet& rSet)
@@ -809,13 +804,9 @@ void ScCalcOptionsDialog::EditFieldValueChanged(Control *pCtrl)
{
newImpl.maDevice = sVal;
}
- else if (&rEdit == mpDriverVersionMin)
+ else if (&rEdit == mpDriverVersion)
{
- newImpl.maDriverVersionMin = sVal;
- }
- else if (&rEdit == mpDriverVersionMax)
- {
- newImpl.maDriverVersionMax = sVal;
+ newImpl.maDriverVersion = sVal;
}
else
assert(false && "rEdit does not match any of the Edit fields");
@@ -924,8 +915,7 @@ IMPL_LINK(ScCalcOptionsDialog, OpenCLWhiteAndBlackListSelHdl, Control*, )
mpOSVersion->SetText(impl.maOSVersion);
mpPlatformVendor->SetText(impl.maPlatformVendor);
mpDevice->SetText(impl.maDevice);
- mpDriverVersionMin->SetText(impl.maDriverVersionMin);
- mpDriverVersionMax->SetText(impl.maDriverVersionMax);
+ mpDriverVersion->SetText(impl.maDriverVersion);
return 0;
}
@@ -939,8 +929,7 @@ IMPL_LINK( ScCalcOptionsDialog, ListNewClickHdl, PushButton*, )
mpOSVersion->SetText("");
mpPlatformVendor->SetText("");
mpDevice->SetText("");
- mpDriverVersionMin->SetText("");
- mpDriverVersionMax->SetText("");
+ mpDriverVersion->SetText("");
rSet.insert(aEmpty);
#if HAVE_FEATURE_OPENCL