diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/calcconfig.hxx | 16 | ||||
-rw-r--r-- | sc/source/core/tool/calcconfig.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/tool/formulaopt.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/optdlg/calcoptionsdlg.cxx | 22 | ||||
-rw-r--r-- | sc/source/ui/optdlg/calcoptionsdlg.hxx | 3 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/formulacalculationoptions.ui | 40 |
6 files changed, 65 insertions, 28 deletions
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 338f565e5aa9..7925158df3e5 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) @@ -794,9 +799,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"); @@ -905,7 +914,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 290d47053c10..2942f68f1c01 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.hxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx @@ -80,7 +80,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> |