Package org.apache.poi.hssf.record.formula.eval

Examples of org.apache.poi.hssf.record.formula.eval.RefEval


  private static double getScalarValue(ValueEval arg) throws EvaluationException {

    ValueEval eval;
    if (arg instanceof RefEval) {
      RefEval re = (RefEval) arg;
      eval = re.getInnerValueEval();
    } else {
      eval = arg;
    }

    if (eval == null) {
View Full Code Here


        }
      }
      return;
    }
    if (arg instanceof RefEval) {
      RefEval re = (RefEval) arg;
      collectValue(re.getInnerValueEval(), temp, true);
      return;
    }
    collectValue(arg, temp, true);

  }
View Full Code Here

    if (eval instanceof AreaEval) {
      return (AreaEval) eval;
    }

    if(eval instanceof RefEval) {
      RefEval refEval = (RefEval) eval;
      // Make this cell ref look like a 1x1 area ref.

      // It doesn't matter if eval is a 2D or 3D ref, because that detail is never asked of AreaEval.
      return refEval.offset(0, 0, 0, 0);
    }
    throw EvaluationException.invalidValue();
  }
View Full Code Here

   * @return a <tt>NumberEval</tt>, <tt>StringEval</tt>, <tt>BoolEval</tt>,
   *  <tt>BlankEval</tt> or <tt>ErrorEval</tt>. Never <code>null</code>.
   */
  private static ValueEval dereferenceValue(ValueEval evaluationResult, int srcRowNum, int srcColNum) {
    if (evaluationResult instanceof RefEval) {
      RefEval rv = (RefEval) evaluationResult;
      return rv.getInnerValueEval();
    }
    if (evaluationResult instanceof AreaEval) {
      AreaEval ae = (AreaEval) evaluationResult;
      if (ae.isRow()) {
        if(ae.isColumn()) {
View Full Code Here

            if (evals[0] instanceof AreaEval) {
                AreaEval ae = (AreaEval) evals[0];
                rnum = ae.getFirstRow();
            }
            else if (evals[0] instanceof RefEval) {
                RefEval re = (RefEval) evals[0];
                rnum = re.getRow();
            }
            else { // anything else is not valid argument
                retval = ErrorEval.VALUE_INVALID;
            }
            break;
View Full Code Here

            if (evals[0] instanceof AreaEval) {
                AreaEval ae = (AreaEval) evals[0];
                cnum = ae.getFirstColumn();
            }
            else if (evals[0] instanceof RefEval) {
                RefEval re = (RefEval) evals[0];
                cnum = re.getColumn();
            }
            else { // anything else is not valid argument
                retval = ErrorEval.VALUE_INVALID;
            }
            break;
View Full Code Here

     */
    protected ValueEval xlateRefEval(RefEval reval) {
        ValueEval retval = reval.getInnerValueEval();

        if (retval instanceof RefEval) {
            RefEval re = (RefEval) retval;
            retval = xlateRefEval(re);
        }

        return retval;
    }
View Full Code Here

  private static double getScalarValue(Eval arg) throws EvaluationException {

    Eval eval;
    if (arg instanceof RefEval) {
      RefEval re = (RefEval) arg;
      eval = re.getInnerValueEval();
    } else {
      eval = arg;
    }

    if (eval == null) {
View Full Code Here

        }
      }
      return;
    }
    if (arg instanceof RefEval) {
      RefEval re = (RefEval) arg;
      collectValue(re.getInnerValueEval(), temp, true);
      return;
    }
    collectValue(arg, temp, true);

  }
View Full Code Here

            case 1:
                 break;
        }
        Eval arg = args[0];
        if (arg instanceof RefEval) {
            RefEval re = (RefEval) arg;
            arg = re.getInnerValueEval();
        }

        if (arg instanceof StringEval) {
            // Text values are returned unmodified
            return arg;
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.record.formula.eval.RefEval

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.