Fix to dynamic autofilter expression in writer, preventing writing
blanks="1"
This commit is contained in:
parent
83afa87bf3
commit
bb0d413a67
|
@ -451,12 +451,16 @@ var_dump($ruleValue);
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER :
|
case PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER :
|
||||||
|
$ruleValues = array();
|
||||||
|
|
||||||
$columnFilterTests[$columnID] = array(
|
$columnFilterTests[$columnID] = array(
|
||||||
'method' => '_filterTypeDynamicFilters',
|
'method' => '_filterTypeDynamicFilters',
|
||||||
'arguments' => $ruleValues
|
'arguments' => $ruleValues
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER :
|
case PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER :
|
||||||
|
$ruleValues = array();
|
||||||
|
|
||||||
$columnFilterTests[$columnID] = array(
|
$columnFilterTests[$columnID] = array(
|
||||||
'method' => '_filterTypeTopTenFilters',
|
'method' => '_filterTypeTopTenFilters',
|
||||||
'arguments' => $ruleValues
|
'arguments' => $ruleValues
|
||||||
|
|
|
@ -765,7 +765,8 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($rules as $rule) {
|
foreach ($rules as $rule) {
|
||||||
if (($rule->getOperator() === PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL) &&
|
if (($column->getFilterType() === PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER) &&
|
||||||
|
($rule->getOperator() === PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL) &&
|
||||||
($rule->getValue() === '')) {
|
($rule->getValue() === '')) {
|
||||||
// Filter rule for Blanks
|
// Filter rule for Blanks
|
||||||
$objWriter->writeAttribute('blank', 1);
|
$objWriter->writeAttribute('blank', 1);
|
||||||
|
|
Loading…
Reference in New Issue