Browse Source

[bug-66433] Boolean functions should blank cells. Thanks to Patrick Böker

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906836 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_5_2_4
PJ Fanning 1 year ago
parent
commit
60872927bd

+ 2
- 1
poi/src/main/java/org/apache/poi/ss/formula/functions/BooleanFunction.java View File

@@ -18,6 +18,7 @@
package org.apache.poi.ss.formula.functions;

import org.apache.poi.ss.formula.TwoDEval;
import org.apache.poi.ss.formula.eval.BlankEval;
import org.apache.poi.ss.formula.eval.BoolEval;
import org.apache.poi.ss.formula.eval.ErrorEval;
import org.apache.poi.ss.formula.eval.EvaluationException;
@@ -91,7 +92,7 @@ public abstract class BooleanFunction implements Function,ArrayFunction {
continue;
}

if (arg == MissingArgEval.instance) {
if (arg == MissingArgEval.instance || arg == BlankEval.instance) {
tempVe = false; // missing parameters are treated as FALSE
} else {
tempVe = OperandResolver.coerceValueToBoolean(arg, false);

BIN
test-data/spreadsheet/BooleanFunctionsTestCaseData.xls View File


BIN
test-data/spreadsheet/LookupFunctionsTestCaseData.xls View File


Loading…
Cancel
Save