60823: DGET function, correct behavior with multiple result entries but only one non-blank

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787658 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2017-03-19 20:29:55 +00:00
parent bfeeba5eb8
commit e78eb68b10
2 changed files with 11 additions and 3 deletions

View File

@ -36,10 +36,18 @@ public final class DGet implements IDStarAlgorithm {
{
result = eval;
}
else // There was a previous match, since there is only exactly one allowed, bail out.
else // There was a previous match. Only one non-blank result is allowed. #NUM! on multiple values.
{
result = ErrorEval.NUM_ERROR;
return false;
if(result instanceof BlankEval) {
result = eval;
}
else {
// We have a previous filled result.
if(!(eval instanceof BlankEval)) {
result = ErrorEval.NUM_ERROR;
return false;
}
}
}
return true;

Binary file not shown.