diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-11-13 15:24:40 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-11-13 15:24:52 +0200 |
commit | 8003afa1f35821e6f8ca8b917b9d446219b6a1ae (patch) | |
tree | d44aaa0cbd3f3b657318afaf275abe55a4d0fdcf /sc | |
parent | d7b8a41282800e9e7d2b44deae372dd23435e444 (diff) |
Blacklist has precedence over whitelist, so order them like that
Change-Id: I0cf00abd582aaaaa4be4d385a6ef4f199c7aa0bc
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/calcconfig.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/calcconfig.cxx | 11 | ||||
-rw-r--r-- | sc/source/core/tool/formulaopt.cxx | 28 | ||||
-rw-r--r-- | sc/source/ui/optdlg/calcoptionsdlg.cxx | 14 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/formulacalculationoptions.ui | 16 |
5 files changed, 36 insertions, 35 deletions
diff --git a/sc/inc/calcconfig.hxx b/sc/inc/calcconfig.hxx index d46fa844d23a..40a33b6bcd7b 100644 --- a/sc/inc/calcconfig.hxx +++ b/sc/inc/calcconfig.hxx @@ -114,8 +114,8 @@ struct SC_DLLPUBLIC ScCalcConfig typedef std::set<OpenCLImplMatcher> OpenCLImplMatcherSet; - OpenCLImplMatcherSet maOpenCLWhiteList; OpenCLImplMatcherSet maOpenCLBlackList; + OpenCLImplMatcherSet maOpenCLWhiteList; ScCalcConfig(); diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index 0d9b769c5ce7..8825ac3567d9 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -45,10 +45,10 @@ void ScCalcConfig::setOpenCLConfigToDefault() maOpenCLSubsetOpCodes.insert(ocAverage); maOpenCLSubsetOpCodes.insert(ocSumIfs); - maOpenCLWhiteList.insert(OpenCLImplMatcher("Linux", "*", "Advanced Micro Devices, Inc.", "*", "1445.5 (sse2,avx)", "")); - 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")); + + maOpenCLWhiteList.insert(OpenCLImplMatcher("Linux", "*", "Advanced Micro Devices, Inc.", "*", "1445.5 (sse2,avx)", "")); } void ScCalcConfig::reset() @@ -76,8 +76,9 @@ bool ScCalcConfig::operator== (const ScCalcConfig& r) const maOpenCLDevice == r.maOpenCLDevice && mnOpenCLMinimumFormulaGroupSize == r.mnOpenCLMinimumFormulaGroupSize && maOpenCLSubsetOpCodes == r.maOpenCLSubsetOpCodes && + maOpenCLBlackList == r.maOpenCLBlackList && maOpenCLWhiteList == r.maOpenCLWhiteList && - maOpenCLBlackList == r.maOpenCLBlackList; + true; } bool ScCalcConfig::operator!= (const ScCalcConfig& r) const @@ -123,8 +124,8 @@ std::ostream& operator<<(std::ostream& rStream, const ScCalcConfig& rConfig) "OpenCLDevice='" << rConfig.maOpenCLDevice << "'," "OpenCLMinimumFormulaGroupSize=" << rConfig.mnOpenCLMinimumFormulaGroupSize << "," "OpenCLSubsetOpCodes={" << ScOpCodeSetToSymbolicString(rConfig.maOpenCLSubsetOpCodes) << "}," - "OpenCLWhiteList=" << rConfig.maOpenCLWhiteList << "," - "OpenCLBlackList=" << rConfig.maOpenCLBlackList << + "OpenCLBlackList=" << rConfig.maOpenCLBlackList << "," + "OpenCLWhiteList=" << rConfig.maOpenCLWhiteList << "}"; return rStream; } diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx index ae79e7519a76..75af8ff355ae 100644 --- a/sc/source/core/tool/formulaopt.cxx +++ b/sc/source/core/tool/formulaopt.cxx @@ -205,8 +205,8 @@ SfxPoolItem* ScTpFormulaItem::Clone( SfxItemPool * ) const #define SCFORMULAOPT_OPENCL_SUBSET_ONLY 13 #define SCFORMULAOPT_OPENCL_MIN_SIZE 14 #define SCFORMULAOPT_OPENCL_SUBSET_OPS 15 -#define SCFORMULAOPT_OPENCL_WHITELIST 16 -#define SCFORMULAOPT_OPENCL_BLACKLIST 17 +#define SCFORMULAOPT_OPENCL_BLACKLIST 16 +#define SCFORMULAOPT_OPENCL_WHITELIST 17 #define SCFORMULAOPT_COUNT 18 Sequence<OUString> ScFormulaCfg::GetPropertyNames() @@ -229,8 +229,8 @@ Sequence<OUString> ScFormulaCfg::GetPropertyNames() "Calculation/OpenCLSubsetOnly", // SCFORMULAOPT_OPENCL_SUBSET_ONLY "Calculation/OpenCLMinimumDataSize", // SCFORMULAOPT_OPENCL_MIN_SIZE "Calculation/OpenCLSubsetOpCodes", // SCFORMULAOPT_OPENCL_SUBSET_OPS - "Calculation/OpenCLWhiteList", // SCFORMULAOPT_OPENCL_WHITELIST "Calculation/OpenCLBlackList", // SCFORMULAOPT_OPENCL_BLACKLIST + "Calculation/OpenCLWhiteList", // SCFORMULAOPT_OPENCL_WHITELIST }; Sequence<OUString> aNames(SCFORMULAOPT_COUNT); OUString* pNames = aNames.getArray(); @@ -260,8 +260,8 @@ ScFormulaCfg::PropsToIds ScFormulaCfg::GetPropNamesToId() SCFORMULAOPT_OPENCL_SUBSET_ONLY, SCFORMULAOPT_OPENCL_MIN_SIZE, SCFORMULAOPT_OPENCL_SUBSET_OPS, - SCFORMULAOPT_OPENCL_WHITELIST, SCFORMULAOPT_OPENCL_BLACKLIST, + SCFORMULAOPT_OPENCL_WHITELIST, }; OSL_ENSURE( SAL_N_ELEMENTS(aVals) == aPropNames.getLength(), "Properties and ids are out of Sync"); PropsToIds aPropIdMap; @@ -589,18 +589,18 @@ void ScFormulaCfg::UpdateFromProperties( const Sequence<OUString>& aNames ) GetCalcConfig().maOpenCLSubsetOpCodes = ScStringToOpCodeSet(sVal); } break; - case SCFORMULAOPT_OPENCL_WHITELIST: + case SCFORMULAOPT_OPENCL_BLACKLIST: { - css::uno::Sequence<OUString> sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLWhiteList); + css::uno::Sequence<OUString> sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLBlackList); pValues[nProp] >>= sVal; - GetCalcConfig().maOpenCLWhiteList = StringSequenceToSetOfOpenCLImplMatcher(sVal); + GetCalcConfig().maOpenCLBlackList = StringSequenceToSetOfOpenCLImplMatcher(sVal); } break; - case SCFORMULAOPT_OPENCL_BLACKLIST: + case SCFORMULAOPT_OPENCL_WHITELIST: { - css::uno::Sequence<OUString> sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLBlackList); + css::uno::Sequence<OUString> sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLWhiteList); pValues[nProp] >>= sVal; - GetCalcConfig().maOpenCLBlackList = StringSequenceToSetOfOpenCLImplMatcher(sVal); + GetCalcConfig().maOpenCLWhiteList = StringSequenceToSetOfOpenCLImplMatcher(sVal); } break; } @@ -756,15 +756,15 @@ void ScFormulaCfg::Commit() pValues[nProp] <<= sVal; } break; - case SCFORMULAOPT_OPENCL_WHITELIST: + case SCFORMULAOPT_OPENCL_BLACKLIST: { - css::uno::Sequence<OUString> sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLWhiteList); + css::uno::Sequence<OUString> sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLBlackList); pValues[nProp] <<= sVal; } break; - case SCFORMULAOPT_OPENCL_BLACKLIST: + case SCFORMULAOPT_OPENCL_WHITELIST: { - css::uno::Sequence<OUString> sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLBlackList); + css::uno::Sequence<OUString> sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLWhiteList); pValues[nProp] <<= sVal; } break; diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 7925158df3e5..5e003dfcb01e 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -30,8 +30,8 @@ typedef enum { CALC_OPTION_ENABLE_OPENCL_SUBSET, CALC_OPTION_OPENCL_MIN_SIZE, CALC_OPTION_OPENCL_SUBSET_OPS, - CALC_OPTION_OPENCL_WHITELIST, CALC_OPTION_OPENCL_BLACKLIST, + CALC_OPTION_OPENCL_WHITELIST, } CalcOptionOrder; class OptionString : public SvLBoxString @@ -207,12 +207,12 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi maCaptionOpenCLSubsetOpCodes = get<vcl::Window>("opencl_subset_opcodes")->GetText(); maDescOpenCLSubsetOpCodes = get<vcl::Window>("opencl_subset_opcodes_desc")->GetText(); - maCaptionOpenCLWhiteList = get<vcl::Window>("opencl_whitelist")->GetText(); - maDescOpenCLWhiteList = get<vcl::Window>("opencl_whitelist_desc")->GetText(); - maCaptionOpenCLBlackList = get<vcl::Window>("opencl_blacklist")->GetText(); maDescOpenCLBlackList = get<vcl::Window>("opencl_blacklist_desc")->GetText(); + maCaptionOpenCLWhiteList = get<vcl::Window>("opencl_whitelist")->GetText(); + maDescOpenCLWhiteList = get<vcl::Window>("opencl_whitelist_desc")->GetText(); + maSoftware = get<vcl::Window>("software")->GetText(); mpLbSettings->set_height_request(8 * mpLbSettings->GetTextHeight()); @@ -378,8 +378,8 @@ void ScCalcOptionsDialog::FillOptionsList() pModel->Insert(createItem(maCaptionOpenCLSubsetEnabled,toString(maConfig.mbOpenCLSubsetOnly))); pModel->Insert(createItem(maCaptionOpenCLMinimumFormulaSize,toString(maConfig.mnOpenCLMinimumFormulaGroupSize))); pModel->Insert(createItem(maCaptionOpenCLSubsetOpCodes,ScOpCodeSetToSymbolicString(maConfig.maOpenCLSubsetOpCodes))); - pModel->Insert(createItem(maCaptionOpenCLWhiteList,"")); pModel->Insert(createItem(maCaptionOpenCLBlackList,"")); + pModel->Insert(createItem(maCaptionOpenCLWhiteList,"")); fillOpenCLList(); @@ -577,8 +577,8 @@ void ScCalcOptionsDialog::SelectionChanged() break; // string lists - case CALC_OPTION_OPENCL_WHITELIST: case CALC_OPTION_OPENCL_BLACKLIST: + case CALC_OPTION_OPENCL_WHITELIST: { mpLbOptionEdit->Hide(); mpBtnTrue->Hide(); @@ -654,8 +654,8 @@ void ScCalcOptionsDialog::ListOptionValueChanged() case CALC_OPTION_ENABLE_OPENCL_SUBSET: case CALC_OPTION_OPENCL_MIN_SIZE: case CALC_OPTION_OPENCL_SUBSET_OPS: - case CALC_OPTION_OPENCL_WHITELIST: case CALC_OPTION_OPENCL_BLACKLIST: + case CALC_OPTION_OPENCL_WHITELIST: break; } } diff --git a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui index 312f3be2c088..e829c28511d1 100644 --- a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui +++ b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui @@ -705,10 +705,10 @@ </packing> </child> <child> - <object class="GtkLabel" id="opencl_whitelist"> + <object class="GtkLabel" id="opencl_blacklist"> <property name="can_focus">False</property> <property name="no_show_all">True</property> - <property name="label" translatable="yes">List known-good OpenCL implementations</property> + <property name="label" translatable="yes">List of known-bad OpenCL implementations</property> </object> <packing> <property name="left_attach">0</property> @@ -718,10 +718,10 @@ </packing> </child> <child> - <object class="GtkLabel" id="opencl_whitelist_desc"> + <object class="GtkLabel" id="opencl_blacklist_desc"> <property name="can_focus">False</property> <property name="no_show_all">True</property> - <property name="label" translatable="yes">List of known-good OpenCL implementations.</property> + <property name="label" translatable="yes">List of known-bad OpenCL implementations.</property> <property name="wrap">True</property> <property name="max_width_chars">56</property> </object> @@ -733,10 +733,10 @@ </packing> </child> <child> - <object class="GtkLabel" id="opencl_blacklist"> + <object class="GtkLabel" id="opencl_whitelist"> <property name="can_focus">False</property> <property name="no_show_all">True</property> - <property name="label" translatable="yes">List of known-bad OpenCL implementations</property> + <property name="label" translatable="yes">List of known-good OpenCL implementations</property> </object> <packing> <property name="left_attach">0</property> @@ -746,10 +746,10 @@ </packing> </child> <child> - <object class="GtkLabel" id="opencl_blacklist_desc"> + <object class="GtkLabel" id="opencl_whitelist_desc"> <property name="can_focus">False</property> <property name="no_show_all">True</property> - <property name="label" translatable="yes">List of known-bad OpenCL implementations.</property> + <property name="label" translatable="yes">List of known-good OpenCL implementations.</property> <property name="wrap">True</property> <property name="max_width_chars">56</property> </object> |