protected org.apache.poi.hssf.record.formula.eval.ValueEval | singleOperandEvaluate(Eval eval, int srcRow, short srcCol)Returns an instanceof StringValueEval or ErrorEval or BlankEval
ValueEval retval;
if (eval instanceof AreaEval) {
AreaEval ae = (AreaEval) eval;
if (ae.contains(srcRow, srcCol)) { // circular ref!
retval = ErrorEval.CIRCULAR_REF_ERROR;
}
else if (ae.isRow()) {
if (ae.containsColumn(srcCol)) {
ValueEval ve = ae.getValueAt(ae.getFirstRow(), srcCol);
retval = internalResolveEval(eval);
}
else {
retval = ErrorEval.NAME_INVALID;
}
}
else if (ae.isColumn()) {
if (ae.containsRow(srcRow)) {
ValueEval ve = ae.getValueAt(srcRow, ae.getFirstColumn());
retval = internalResolveEval(eval);
}
else {
retval = ErrorEval.NAME_INVALID;
}
}
else {
retval = ErrorEval.NAME_INVALID;
}
}
else {
retval = internalResolveEval(eval);
}
return retval;
|