comphelper/qa/string/test_string.cxx | 4 + officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 2 sc/source/core/tool/calcconfig.cxx | 1 sc/source/ui/optdlg/calcoptionsdlg.cxx | 39 ++++++++++++++- sc/source/ui/optdlg/calcoptionsdlg.hxx | 3 - sc/uiconfig/scalc/ui/formulacalculationoptions.ui | 15 ----- 6 files changed, 46 insertions(+), 18 deletions(-)
New commits: commit 5c4a9b1e2adf62a5805c02b20bfbcd62b3533e6d Author: Tor Lillqvist <t...@collabora.com> Date: Fri Nov 14 18:23:25 2014 +0200 Handle the 'New' and 'Delete' buttons Change-Id: I1d5d6d70e9ac8d95b1189346fdab29ded39745bf diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 6492b1a..4aafd8c 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -225,6 +225,9 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi aLink = LINK(this, ScCalcOptionsDialog, OpenCLWhiteAndBlackListSelHdl); mpOpenCLWhiteAndBlackListBox->SetSelectHdl(aLink); + mpListNewButton->SetClickHdl(LINK(this, ScCalcOptionsDialog, ListNewClickHdl)); + mpListDeleteButton->SetClickHdl(LINK(this, ScCalcOptionsDialog, ListDeleteClickHdl)); + aLink = LINK(this, ScCalcOptionsDialog, BtnToggleHdl); mpBtnTrue->SetToggleHdl(aLink); // Set handler only to the 'True' button. @@ -913,4 +916,39 @@ IMPL_LINK(ScCalcOptionsDialog, OpenCLWhiteAndBlackListSelHdl, Control*, ) return 0; } +IMPL_LINK( ScCalcOptionsDialog, ListNewClickHdl, PushButton*, ) +{ + ScCalcConfig::OpenCLImplMatcher aEmpty; + ScCalcConfig::OpenCLImplMatcherSet& rSet(CurrentWhiteOrBlackList()); + + mpOS->SetText(""); + mpOSVersion->SetText(""); + mpPlatformVendor->SetText(""); + mpDevice->SetText(""); + mpDriverVersionMin->SetText(""); + mpDriverVersionMax->SetText(""); + + rSet.insert(aEmpty); +#if HAVE_FEATURE_OPENCL + fillListBox(mpOpenCLWhiteAndBlackListBox, rSet); + mpOpenCLWhiteAndBlackListBox->SelectEntry(format(aEmpty)); +#endif + return 0; +} + +IMPL_LINK( ScCalcOptionsDialog, ListDeleteClickHdl, PushButton*, ) +{ + if (mpOpenCLWhiteAndBlackListBox->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND) + return 0; + + ScCalcConfig::OpenCLImplMatcherSet& rSet(CurrentWhiteOrBlackList()); + const ScCalcConfig::OpenCLImplMatcher& rImpl(CurrentWhiteOrBlackListEntry()); + +#if HAVE_FEATURE_OPENCL + rSet.erase(rImpl); + fillListBox(mpOpenCLWhiteAndBlackListBox, rSet); +#endif + return 0; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx index 25d397d..32e7f42 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.hxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx @@ -41,6 +41,8 @@ public: DECL_LINK( NumModifiedHdl, void * ); DECL_LINK( EditModifiedHdl, Control * ); DECL_LINK( OpenCLWhiteAndBlackListSelHdl, Control* ); + DECL_LINK( ListNewClickHdl, PushButton* ); + DECL_LINK( ListDeleteClickHdl, PushButton* ); const ScCalcConfig& GetConfig() const { return maConfig;} commit f9da47eb6a9affb7bb42eafe6637b8059a3b0015 Author: Tor Lillqvist <t...@collabora.com> Date: Fri Nov 14 15:05:49 2014 +0200 Use right mnemonic_widget id Change-Id: Ia5be89f17d8e63ad67a8d1dc811927dcdebbc0a9 diff --git a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui index bb0f02e..0a806b0 100644 --- a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui +++ b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui @@ -261,7 +261,7 @@ <property name="can_focus">False</property> <property name="xalign">0</property> <property name="label" translatable="yes">OpenCL Platform Vendor</property> - <property name="mnemonic_widget">openclvendor:border</property> + <property name="mnemonic_widget">platformvendor:border</property> </object> <packing> <property name="left_attach">0</property> commit f378711cf1da924a92fd48bc11207a89f0d98e04 Author: Tor Lillqvist <t...@collabora.com> Date: Fri Nov 14 14:11:25 2014 +0200 I don't know what I planned the 'Edit' button to do, drop it Change-Id: I9944023d4cfd897acce8fd71296034ca32d8d136 diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index f7a1397..6492b1a 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -151,7 +151,6 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi get(mpDevice, "opencldevice"); get(mpDriverVersionMin, "opencldriverversionmin"); get(mpDriverVersionMax, "opencldriverversionmax"); - get(mpListEditButton, "listbox-edit"); get(mpListNewButton, "listbox-new"); get(mpListDeleteButton, "listbox-delete"); get(mpOpenclInfoList, "opencl_list"); diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx index 2942f68..25d397d 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.hxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx @@ -82,7 +82,6 @@ private: Edit* mpDevice; 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 e829c28..bb0f02e 100644 --- a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui +++ b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui @@ -361,19 +361,6 @@ <property name="spacing">6</property> <property name="layout_style">start</property> <child> - <object class="GtkButton" id="listbox-edit"> - <property name="label" translatable="yes">Edi_t...</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> <object class="GtkButton" id="listbox-new"> <property name="label" translatable="yes">_New...</property> <property name="visible">True</property> commit 7fe64b94612f57e0fa718d9a1a265997f1902b4a Author: Tor Lillqvist <t...@collabora.com> Date: Fri Nov 14 13:02:57 2014 +0200 Remove the dummy entry just used for testing Change-Id: Ia2bc319fada2e21115629d29bca51f483a599c16 diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 8a74759..6f2dc7c 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1394,7 +1394,7 @@ <info> <desc>Combinations of (OS, OS version, OpenCL platform vendor, OpenCL device name, OpenCL driver version) that are known to be bad. Each entry is a string consisting of six parts separated by slashes. In case a slash, percent or semicolon occurs inside a part, it is replaced by a percent followed by the corresponding number as two hex digits. Any part might contain a single asterisk as a wildcard, matching any value, but there is no more generic regexp support. Has higher priority than OpenCLWhiteList.</desc> </info> - <value oor:separator=";">Windows/*/Intel(R) Corporation/*/9.17.10.2884/;SuperOS/*/Big Corp, Inc./Whizz\Grafix/4.2%2Fbeta%3B3/4.4</value> + <value oor:separator=";">Windows/*/Intel(R) Corporation/*/9.17.10.2884/</value> </prop> <prop oor:name="OpenCLWhiteList" oor:type="oor:string-list" oor:nillable="false"> <!-- UIHints: Tools - Options Spreadsheet Formula --> diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index 8825ac3..0ff048b 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -46,7 +46,6 @@ void ScCalcConfig::setOpenCLConfigToDefault() 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", "4.4")); maOpenCLWhiteList.insert(OpenCLImplMatcher("Linux", "*", "Advanced Micro Devices, Inc.", "*", "1445.5 (sse2,avx)", "")); } commit bbb675d4f522321a9a65eaa710785b3551582fd9 Author: Tor Lillqvist <t...@collabora.com> Date: Fri Nov 14 12:45:47 2014 +0200 Some more compareVersionStrings() tests Change-Id: I5b9dc45352afd63dae4c3952d9647e6e3ec98ef4 diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx index 6100a77..d1831ce 100644 --- a/comphelper/qa/string/test_string.cxx +++ b/comphelper/qa/string/test_string.cxx @@ -443,6 +443,10 @@ void TestString::testCompareVersionStrings() TEST("1.001", "1.1", -1); TEST("1.001", "1.010", -1); TEST("1.2.a", "1.2.b", -1); + TEST("1.2.3 (foo,bar)", "1.2.9", -1); + TEST("1.2.3 (foo,bar)", "1.2.4 (foo,bar)", -1); + TEST("1.2.3 (foo,bar)", "1.2.3 (foo)", 1); // Neither ordering makes any more sense than the other here, as long as they compare unequal + TEST("1.2.3 (foo,bar)", "1.2.2 (foo,bar)", 1); #undef TEST } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits