summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-11 18:52:55 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-11 19:01:21 +0200
commit3bbaca82029419eb2cc34065b718d41c3083e826 (patch)
tree0adfeaf2084767d24db4536f0545af6cc3ccf795
parentAdd a function to compare version number strings (diff)
downloadcore-3bbaca82029419eb2cc34065b718d41c3083e826.tar.gz
core-3bbaca82029419eb2cc34065b718d41c3083e826.zip
Split driver version specification into a range
Change-Id: I1f26b47054e70e54ce81d3ec4cbc5ff58c1aeea3
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Calc.xcs2
-rw-r--r--sc/inc/calcconfig.hxx16
-rw-r--r--sc/source/core/tool/calcconfig.cxx6
-rw-r--r--sc/source/core/tool/formulaopt.cxx6
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.cxx22
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.hxx3
-rw-r--r--sc/uiconfig/scalc/ui/formulacalculationoptions.ui40
7 files changed, 66 insertions, 29 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index d3c20cf3706e..57bb66c61951 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1401,7 +1401,7 @@
<info>
<desc>Like OpenCLWhiteList, but for combinations known to be bad.</desc>
</info>
- <value oor:separator=";">Windows/*/Intel(R) Corporation/*/9.17.10.2884;SuperOS/*/Big Corp, Inc./Whizz\Grafix/4.2%2Fbeta%3B3</value>
+ <value oor:separator=";">Windows/*/Intel(R) Corporation/*/9.17.10.2884/;SuperOS/*/Big Corp, Inc./Whizz\Grafix/4.2%2Fbeta%3B3/4.4</value>
</prop>
</group>
<group oor:name="Syntax">
diff --git a/sc/inc/calcconfig.hxx b/sc/inc/calcconfig.hxx
index 9768af86f48f..d46fa844d23a 100644
--- a/sc/inc/calcconfig.hxx
+++ b/sc/inc/calcconfig.hxx
@@ -47,7 +47,8 @@ struct SC_DLLPUBLIC ScCalcConfig
OUString maOSVersion;
OUString maPlatformVendor;
OUString maDevice;
- OUString maDriverVersion;
+ OUString maDriverVersionMin;
+ OUString maDriverVersionMax;
OpenCLImplMatcher()
{
@@ -57,12 +58,14 @@ struct SC_DLLPUBLIC ScCalcConfig
const OUString& rOSVersion,
const OUString& rPlatformVendor,
const OUString& rDevice,
- const OUString& rDriverVersion)
+ const OUString& rDriverVersionMin,
+ const OUString& rDriverVersionMax)
: maOS(rOS),
maOSVersion(rOSVersion),
maPlatformVendor(rPlatformVendor),
maDevice(rDevice),
- maDriverVersion(rDriverVersion)
+ maDriverVersionMin(rDriverVersionMin),
+ maDriverVersionMax(rDriverVersionMax)
{
}
@@ -72,7 +75,8 @@ struct SC_DLLPUBLIC ScCalcConfig
maOSVersion == r.maOSVersion &&
maPlatformVendor == r.maPlatformVendor &&
maDevice == r.maDevice &&
- maDriverVersion == r.maDriverVersion;
+ maDriverVersionMin == r.maDriverVersionMin &&
+ maDriverVersionMax == r.maDriverVersionMax;
}
bool operator!=(const OpenCLImplMatcher& r) const
{
@@ -88,7 +92,9 @@ struct SC_DLLPUBLIC ScCalcConfig
(maPlatformVendor == r.maPlatformVendor &&
(maDevice < r.maDevice ||
(maDevice == r.maDevice &&
- (maDriverVersion < r.maDriverVersion)))))))));
+ (maDriverVersionMin < r.maDriverVersionMin ||
+ (maDriverVersionMin == r.maDriverVersionMin &&
+ maDriverVersionMax < r.maDriverVersionMax))))))))));
}
};
diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx
index a3197a8fa353..36d1fa52d7d0 100644
--- a/sc/source/core/tool/calcconfig.cxx
+++ b/sc/source/core/tool/calcconfig.cxx
@@ -44,8 +44,8 @@ void ScCalcConfig::setOpenCLConfigToDefault()
maOpenCLSubsetOpCodes.insert(ocSum);
maOpenCLSubsetOpCodes.insert(ocAverage);
maOpenCLSubsetOpCodes.insert(ocSumIfs);
- maOpenCLBlackList.insert(OpenCLImplMatcher("Windows", "*", "Intel(R) Corporation", "*", "9.17.10.2884"));
- maOpenCLBlackList.insert(OpenCLImplMatcher("SuperOS", "*", "Big Corp, Inc.", "Whizz\\Grafix", "4.2/beta;3"));
+ maOpenCLBlackList.insert(OpenCLImplMatcher("Windows", "*", "Intel(R) Corporation", "*", "9.17.10.2884", ""));
+ maOpenCLBlackList.insert(OpenCLImplMatcher("SuperOS", "*", "Big Corp, Inc.", "Whizz\\Grafix", "4.2/beta;3", "4.4"));
}
void ScCalcConfig::reset()
@@ -89,7 +89,7 @@ std::ostream& operator<<(std::ostream& rStream, const ScCalcConfig::OpenCLImplMa
"OSVersion=" << rImpl.maOSVersion << ","
"PlatformVendor=" << rImpl.maPlatformVendor << ","
"Device=" << rImpl.maDevice << ","
- "DriverVersion=" << rImpl.maDriverVersion <<
+ "DriverVersion=[" << rImpl.maDriverVersionMin << "," << rImpl.maDriverVersionMax << "]"
"}";
return rStream;
diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx
index f2cd325e22d7..ae79e7519a76 100644
--- a/sc/source/core/tool/formulaopt.cxx
+++ b/sc/source/core/tool/formulaopt.cxx
@@ -292,7 +292,8 @@ css::uno::Sequence<OUString> SetOfOpenCLImplMatcherToStringSequence(std::set<ScC
(*i).maOSVersion.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
(*i).maPlatformVendor.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
(*i).maDevice.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
- (*i).maDriverVersion.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B");
+ (*i).maDriverVersionMin.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
+ (*i).maDriverVersionMax.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B");
}
return result;
@@ -335,7 +336,8 @@ std::set<ScCalcConfig::OpenCLImplMatcher> StringSequenceToSetOfOpenCLImplMatcher
m.maOSVersion = getToken(*i, index);
m.maPlatformVendor = getToken(*i, index);
m.maDevice = getToken(*i, index);
- m.maDriverVersion = getToken(*i, index);
+ m.maDriverVersionMin = getToken(*i, index);
+ m.maDriverVersionMax = getToken(*i, index);
result.insert(m);
}
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index ac55d1a6da6c..59cec3669679 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -149,7 +149,8 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
get(mpOSVersion, "osversion");
get(mpPlatformVendor, "platformvendor");
get(mpDevice, "opencldevice");
- get(mpDriverVersion, "opencldriverversion");
+ get(mpDriverVersionMin, "opencldriverversionmin");
+ get(mpDriverVersionMax, "opencldriverversionmax");
get(mpListEditButton, "listbox-edit");
get(mpListNewButton, "listbox-new");
get(mpListDeleteButton, "listbox-delete");
@@ -166,7 +167,8 @@ 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));
- mpDriverVersion->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
+ mpDriverVersionMin->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
+ mpDriverVersionMax->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpOpenCLWhiteAndBlackListBox->set_height_request(4* mpOpenCLWhiteAndBlackListBox->GetTextHeight());
mpOpenCLWhiteAndBlackListBox->SetStyle(mpOpenCLWhiteAndBlackListBox->GetStyle() | WB_CLIPCHILDREN | WB_FORCE_MAKEVISIBLE);
@@ -314,7 +316,10 @@ OUString format(const ScCalcConfig::OpenCLImplMatcher& rImpl)
rImpl.maOSVersion + " " +
rImpl.maPlatformVendor + " " +
rImpl.maDevice + " " +
- rImpl.maDriverVersion);
+ (rImpl.maDriverVersionMax != "" ?
+ OUString("[") + rImpl.maDriverVersionMin + "," + rImpl.maDriverVersionMax + "]" :
+ rImpl.maDriverVersionMin)
+ );
}
void fillListBox(ListBox* pListBox, const ScCalcConfig::OpenCLImplMatcherSet& rSet)
@@ -792,9 +797,13 @@ void ScCalcOptionsDialog::EditFieldValueChanged(Control *pCtrl)
{
newImpl.maDevice = sVal;
}
- else if (pEdit == mpDriverVersion)
+ else if (pEdit == mpDriverVersionMin)
{
- newImpl.maDriverVersion = sVal;
+ newImpl.maDriverVersionMin = sVal;
+ }
+ else if (pEdit == mpDriverVersionMax)
+ {
+ newImpl.maDriverVersionMax = sVal;
}
else
assert(false && "pEdit does not match any of the Edit fields");
@@ -906,7 +915,8 @@ IMPL_LINK(ScCalcOptionsDialog, OpenCLWhiteAndBlackListSelHdl, Control*, )
mpOSVersion->SetText(impl.maOSVersion);
mpPlatformVendor->SetText(impl.maPlatformVendor);
mpDevice->SetText(impl.maDevice);
- mpDriverVersion->SetText(impl.maDriverVersion);
+ mpDriverVersionMin->SetText(impl.maDriverVersionMin);
+ mpDriverVersionMax->SetText(impl.maDriverVersionMax);
return 0;
}
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx
index 2269ab1af4fe..85a47fb071c9 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.hxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx
@@ -81,7 +81,8 @@ private:
Edit* mpOSVersion;
Edit* mpPlatformVendor;
Edit* mpDevice;
- Edit* mpDriverVersion;
+ Edit* mpDriverVersionMin;
+ Edit* mpDriverVersionMax;
PushButton* mpListEditButton;
PushButton* mpListNewButton;
PushButton* mpListDeleteButton;
diff --git a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui
index 513106c6ae23..312f3be2c088 100644
--- a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui
+++ b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui
@@ -214,8 +214,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">_OS</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes">OS</property>
<property name="mnemonic_widget">os:border</property>
</object>
<packing>
@@ -238,8 +237,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">OS _Version</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes">OS Version</property>
<property name="mnemonic_widget">osversion:border</property>
</object>
<packing>
@@ -263,7 +261,6 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">OpenCL Platform Vendor</property>
- <property name="use_underline">True</property>
<property name="mnemonic_widget">openclvendor:border</property>
</object>
<packing>
@@ -287,7 +284,6 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">OpenCL Device</property>
- <property name="use_underline">True</property>
<property name="mnemonic_widget">opencldevice:border</property>
</object>
<packing>
@@ -306,13 +302,12 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="opencldriverversionlabel">
+ <object class="GtkLabel" id="opencldriverversionminlabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">OpenCL Driver Version</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">opencldriverversion:border</property>
+ <property name="label" translatable="yes">OpenCL Driver Version Lower Bound</property>
+ <property name="mnemonic_widget">opencldriverversionmin:border</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -320,7 +315,7 @@
</packing>
</child>
<child>
- <object class="GtkEntry" id="opencldriverversion:border">
+ <object class="GtkEntry" id="opencldriverversionmin:border">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
@@ -329,6 +324,29 @@
<property name="top_attach">9</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="opencldriverversionmaxlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">OpenCL Driver Version Upper Bound</property>
+ <property name="mnemonic_widget">opencldriverversionmax:border</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">10</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="opencldriverversionmax:border">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">11</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="left_attach">1</property>