View | Details | Raw Unified | Return to bug 60130
Collapse All | Expand All

(-)a/src/java/org/apache/poi/ss/formula/functions/DGet.java (-3 / +16 lines)
Lines 17-23 Link Here
17
17
18
package org.apache.poi.ss.formula.functions;
18
package org.apache.poi.ss.formula.functions;
19
19
20
import org.apache.poi.ss.formula.eval.BlankEval;
20
import org.apache.poi.ss.formula.eval.ErrorEval;
21
import org.apache.poi.ss.formula.eval.ErrorEval;
22
import org.apache.poi.ss.formula.eval.EvaluationException;
23
import org.apache.poi.ss.formula.eval.OperandResolver;
21
import org.apache.poi.ss.formula.eval.ValueEval;
24
import org.apache.poi.ss.formula.eval.ValueEval;
22
25
23
/**
26
/**
Lines 46-53 public final class DGet implements IDStarAlgorithm { Link Here
46
    public ValueEval getResult() {
49
    public ValueEval getResult() {
47
        if(result == null) {
50
        if(result == null) {
48
            return ErrorEval.VALUE_INVALID;
51
            return ErrorEval.VALUE_INVALID;
49
        } else {
52
        } else if(result instanceof BlankEval) {
50
            return result;
53
            return ErrorEval.VALUE_INVALID;
51
        }
54
        } else
55
            try {
56
                if(OperandResolver.coerceValueToString(OperandResolver.getSingleValue(result, 0, 0)).equals("")) {
57
                    return ErrorEval.VALUE_INVALID;
58
                }
59
                else {
60
                    return result;
61
                }
62
            } catch (EvaluationException e) {
63
                return e.getErrorEval();
64
            }
52
    }
65
    }
53
}
66
}

Return to bug 60130