General: (umpirsky) Work Item GH-548 - Optimize vlookup() sort

This commit is contained in:
MarkBaker 2015-05-24 12:32:24 +01:00
parent 1ba2ae0cec
commit e4d29824a6
2 changed files with 3 additions and 2 deletions

View File

@ -674,10 +674,10 @@ class PHPExcel_Calculation_LookupRef
{ {
reset($a); reset($a);
$firstColumn = key($a); $firstColumn = key($a);
if (strtolower($a[$firstColumn]) == strtolower($b[$firstColumn])) { if (($aLower = strtolower($a[$firstColumn])) == ($bLower = strtolower($b[$firstColumn]))) {
return 0; return 0;
} }
return (strtolower($a[$firstColumn]) < strtolower($b[$firstColumn])) ? -1 : 1; return ($aLower < $bLower) ? -1 : 1;
} }

View File

@ -26,6 +26,7 @@
Planned for 1.8.2 Planned for 1.8.2
- Bugfix: (MBaker) - Fix to getCell() method when cell reference includes a worksheet reference - Bugfix: (MBaker) - Fix to getCell() method when cell reference includes a worksheet reference
- Bugfix: (ncrypthic) Work Item GH-570 - Ignore inlineStr type if formula element exists - Bugfix: (ncrypthic) Work Item GH-570 - Ignore inlineStr type if formula element exists
- General: (umpirsky) Work Item GH-548 - Optimize vlookup() sort
2015-04-30 (v1.8.1): 2015-04-30 (v1.8.1):