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

(-)a/src/java/org/apache/poi/ss/formula/functions/DStarRunner.java (-2 / +5 lines)
Lines 193-198 public final class DStarRunner implements Function3Arg { Link Here
193
        final int width = db.getWidth();
193
        final int width = db.getWidth();
194
        for(int column = 0; column < width; ++column) {
194
        for(int column = 0; column < width; ++column) {
195
            ValueEval columnNameValueEval = db.getValue(0, column);
195
            ValueEval columnNameValueEval = db.getValue(0, column);
196
            if(solveReference(columnNameValueEval) instanceof BlankEval) {
197
                continue;
198
            }
196
            String columnName = getStringFromValueEval(columnNameValueEval);
199
            String columnName = getStringFromValueEval(columnNameValueEval);
197
            if(name.equals(columnName)) {
200
            if(name.equals(columnName)) {
198
                resultColumn = column;
201
                resultColumn = column;
Lines 340-346 public final class DStarRunner implements Function3Arg { Link Here
340
        }
343
        }
341
        else if(condition instanceof NumericValueEval) {
344
        else if(condition instanceof NumericValueEval) {
342
            double conditionNumber = ((NumericValueEval)condition).getNumberValue();
345
            double conditionNumber = ((NumericValueEval)condition).getNumberValue();
343
            Double valueNumber = getNumerFromValueEval(value);
346
            Double valueNumber = getNumberFromValueEval(value);
344
            if(valueNumber == null) {
347
            if(valueNumber == null) {
345
                return false;
348
                return false;
346
            }
349
            }
Lines 405-411 public final class DStarRunner implements Function3Arg { Link Here
405
        return false; // Can not be reached.
408
        return false; // Can not be reached.
406
    }
409
    }
407
    
410
    
408
    private static Double getNumerFromValueEval(ValueEval value) {
411
    private static Double getNumberFromValueEval(ValueEval value) {
409
        if(value instanceof NumericValueEval) {
412
        if(value instanceof NumericValueEval) {
410
            return ((NumericValueEval)value).getNumberValue();
413
            return ((NumericValueEval)value).getNumberValue();
411
        }
414
        }

Return to bug 59881