poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r805119 [1/2] - in /poi/trunk/src: java/org/apache/poi/hssf/record/formula/atp/ java/org/apache/poi/hssf/record/formula/eval/ java/org/apache/poi/hssf/record/formula/functions/ testcases/org/apache/poi/hssf/record/formula/functions/
Date Mon, 17 Aug 2009 20:04:46 GMT
Author: josh
Date: Mon Aug 17 20:04:45 2009
New Revision: 805119

URL: http://svn.apache.org/viewvc?rev=805119&view=rev
Log:
Replaced obsolete Eval with ValueEval in signature of Function.evaluate()

Removed:
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Islogical.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Isnontext.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Isnumber.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Istext.java
Modified:
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/atp/AnalysisToolPak.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/FunctionEval.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/BooleanFunction.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/CalendarFieldFunction.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Choose.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Column.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Columns.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Count.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Counta.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Countif.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Errortype.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/False.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Function.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Hlookup.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Hyperlink.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/If.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Index.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/IsError.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/IsNa.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Isblank.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Isref.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Lookup.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Match.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Mode.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/MultiOperandNumericFunction.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Na.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Not.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NotImplementedFunction.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Now.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NumericFunction.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Offset.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Pi.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Rand.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Row.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Rows.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Sumif.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Sumproduct.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/T.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/TextFunction.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Time.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Today.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/True.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Value.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Vlookup.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/XYNumericFunction.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestAverage.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestIndex.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestLen.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestMatch.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestMid.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestNper.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestPmt.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestRoundFuncs.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestSumproduct.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestTFunc.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestTrim.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestValue.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestXYNumericFunction.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/atp/AnalysisToolPak.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/atp/AnalysisToolPak.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/atp/AnalysisToolPak.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/atp/AnalysisToolPak.java Mon Aug 17 20:04:45 2009
@@ -20,7 +20,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
 import org.apache.poi.hssf.record.formula.functions.FreeRefFunction;
 import org.apache.poi.ss.formula.EvaluationWorkbook;

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/FunctionEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/FunctionEval.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/FunctionEval.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/FunctionEval.java Mon Aug 17 20:04:45 2009
@@ -20,7 +20,63 @@
 import org.apache.poi.hssf.record.formula.AbstractFunctionPtg;
 import org.apache.poi.hssf.record.formula.function.FunctionMetadata;
 import org.apache.poi.hssf.record.formula.function.FunctionMetadataRegistry;
-import org.apache.poi.hssf.record.formula.functions.*;
+import org.apache.poi.hssf.record.formula.functions.AggregateFunction;
+import org.apache.poi.hssf.record.formula.functions.And;
+import org.apache.poi.hssf.record.formula.functions.CalendarFieldFunction;
+import org.apache.poi.hssf.record.formula.functions.Choose;
+import org.apache.poi.hssf.record.formula.functions.Column;
+import org.apache.poi.hssf.record.formula.functions.Columns;
+import org.apache.poi.hssf.record.formula.functions.Count;
+import org.apache.poi.hssf.record.formula.functions.Counta;
+import org.apache.poi.hssf.record.formula.functions.Countif;
+import org.apache.poi.hssf.record.formula.functions.DateFunc;
+import org.apache.poi.hssf.record.formula.functions.Errortype;
+import org.apache.poi.hssf.record.formula.functions.Even;
+import org.apache.poi.hssf.record.formula.functions.False;
+import org.apache.poi.hssf.record.formula.functions.FinanceFunction;
+import org.apache.poi.hssf.record.formula.functions.Find;
+import org.apache.poi.hssf.record.formula.functions.FreeRefFunction;
+import org.apache.poi.hssf.record.formula.functions.Function;
+import org.apache.poi.hssf.record.formula.functions.Hlookup;
+import org.apache.poi.hssf.record.formula.functions.Hyperlink;
+import org.apache.poi.hssf.record.formula.functions.If;
+import org.apache.poi.hssf.record.formula.functions.Index;
+import org.apache.poi.hssf.record.formula.functions.Indirect;
+import org.apache.poi.hssf.record.formula.functions.IsError;
+import org.apache.poi.hssf.record.formula.functions.IsNa;
+import org.apache.poi.hssf.record.formula.functions.Isblank;
+import org.apache.poi.hssf.record.formula.functions.Isref;
+import org.apache.poi.hssf.record.formula.functions.LogicalFunction;
+import org.apache.poi.hssf.record.formula.functions.Lookup;
+import org.apache.poi.hssf.record.formula.functions.Match;
+import org.apache.poi.hssf.record.formula.functions.MinaMaxa;
+import org.apache.poi.hssf.record.formula.functions.Mode;
+import org.apache.poi.hssf.record.formula.functions.Na;
+import org.apache.poi.hssf.record.formula.functions.Not;
+import org.apache.poi.hssf.record.formula.functions.NotImplementedFunction;
+import org.apache.poi.hssf.record.formula.functions.Now;
+import org.apache.poi.hssf.record.formula.functions.NumericFunction;
+import org.apache.poi.hssf.record.formula.functions.Odd;
+import org.apache.poi.hssf.record.formula.functions.Offset;
+import org.apache.poi.hssf.record.formula.functions.Or;
+import org.apache.poi.hssf.record.formula.functions.Pi;
+import org.apache.poi.hssf.record.formula.functions.Rand;
+import org.apache.poi.hssf.record.formula.functions.Replace;
+import org.apache.poi.hssf.record.formula.functions.Row;
+import org.apache.poi.hssf.record.formula.functions.Rows;
+import org.apache.poi.hssf.record.formula.functions.Substitute;
+import org.apache.poi.hssf.record.formula.functions.Sumif;
+import org.apache.poi.hssf.record.formula.functions.Sumproduct;
+import org.apache.poi.hssf.record.formula.functions.Sumx2my2;
+import org.apache.poi.hssf.record.formula.functions.Sumx2py2;
+import org.apache.poi.hssf.record.formula.functions.Sumxmy2;
+import org.apache.poi.hssf.record.formula.functions.T;
+import org.apache.poi.hssf.record.formula.functions.TextFunction;
+import org.apache.poi.hssf.record.formula.functions.Time;
+import org.apache.poi.hssf.record.formula.functions.Today;
+import org.apache.poi.hssf.record.formula.functions.True;
+import org.apache.poi.hssf.record.formula.functions.Value;
+import org.apache.poi.hssf.record.formula.functions.Vlookup;
 import org.apache.poi.ss.formula.eval.NotImplementedException;
 
 /**
@@ -151,8 +207,8 @@
 
 		retval[124] = new Find();
 
-		retval[127] = new Istext();
-		retval[128] = new Isnumber();
+		retval[127] = LogicalFunction.IsText;
+		retval[128] = LogicalFunction.IsNumber;
 		retval[129] = new Isblank();
 		retval[130] = new T();
 
@@ -163,9 +219,9 @@
 		retval[183] = AggregateFunction.PRODUCT;
 		retval[184] = NumericFunction.FACT;
 
-		retval[190] = new Isnontext();
+		retval[190] = LogicalFunction.IsNonText;
 
-		retval[198] = new Islogical();
+		retval[198] = LogicalFunction.IsLogical;
 
 		retval[212] = NumericFunction.ROUNDUP;
 		retval[213] = NumericFunction.ROUNDDOWN;
@@ -248,7 +304,7 @@
 		if (f == null) {
 			throw new NotImplementedException("FuncIx=" + getFunctionIndex());
 		}
-		return (ValueEval) f.evaluate(operands, srcRow, srcCol);
+		return f.evaluate(operands, srcRow, srcCol);
 	}
 
 	public int getNumberOfOperands() {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/BooleanFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/BooleanFunction.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/BooleanFunction.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/BooleanFunction.java Mon Aug 17 20:04:45 2009
@@ -39,7 +39,7 @@
  */
 public abstract class BooleanFunction implements Function {
 
-	public final Eval evaluate(Eval[] args, int srcRow, short srcCol) {
+	public final ValueEval evaluate(ValueEval[] args, int srcRow, short srcCol) {
 		if (args.length < 1) {
 			return ErrorEval.VALUE_INVALID;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/CalendarFieldFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/CalendarFieldFunction.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/CalendarFieldFunction.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/CalendarFieldFunction.java Mon Aug 17 20:04:45 2009
@@ -22,7 +22,6 @@
 import java.util.GregorianCalendar;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.EvaluationException;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.OperandResolver;
@@ -49,7 +48,7 @@
 		_needsOneBaseAdjustment = needsOneBaseAdjustment;
 	}
 
-	public Eval evaluate(Eval[] operands, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] operands, int srcCellRow, short srcCellCol) {
 		if (operands.length != 1) {
 			return ErrorEval.VALUE_INVALID;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Choose.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Choose.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Choose.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Choose.java Mon Aug 17 20:04:45 2009
@@ -18,7 +18,6 @@
 package org.apache.poi.hssf.record.formula.functions;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.EvaluationException;
 import org.apache.poi.hssf.record.formula.eval.OperandResolver;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
@@ -29,7 +28,7 @@
  */
 public final class Choose implements Function {
 
-	public Eval evaluate(Eval[] args, int srcRowIndex, short srcColumnIndex) {
+	public ValueEval evaluate(ValueEval[] args, int srcRowIndex, short srcColumnIndex) {
 		if (args.length < 2) {
 			return ErrorEval.VALUE_INVALID;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Column.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Column.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Column.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Column.java Mon Aug 17 20:04:45 2009
@@ -19,13 +19,12 @@
 
 import org.apache.poi.hssf.record.formula.eval.AreaEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.RefEval;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
 public final class Column implements Function {
-    public Eval evaluate(Eval[] evals, int srcCellRow, short srcCellCol) {
+    public ValueEval evaluate(ValueEval[] evals, int srcCellRow, short srcCellCol) {
         ValueEval retval = null;
         int cnum = -1;
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Columns.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Columns.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Columns.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Columns.java Mon Aug 17 20:04:45 2009
@@ -22,6 +22,7 @@
 import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.RefEval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
 /**
  * Implementation for Excel COLUMNS function.
@@ -30,7 +31,7 @@
  */
 public final class Columns implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		switch(args.length) {
 			case 1:
 				// expected

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Count.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Count.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Count.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Count.java Mon Aug 17 20:04:45 2009
@@ -21,6 +21,7 @@
 import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.MissingArgEval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 import org.apache.poi.hssf.record.formula.functions.CountUtils.I_MatchPredicate;
 
 /**
@@ -36,7 +37,7 @@
  */
 public final class Count implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		int nArgs = args.length;
 		if (nArgs < 1) {
 			// too few arguments

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Counta.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Counta.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Counta.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Counta.java Mon Aug 17 20:04:45 2009
@@ -21,6 +21,7 @@
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
 import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 import org.apache.poi.hssf.record.formula.functions.CountUtils.I_MatchPredicate;
 
 /**
@@ -34,7 +35,7 @@
  */
 public final class Counta implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		int nArgs = args.length;
 		if (nArgs < 1) {
 			// too few arguments

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Countif.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Countif.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Countif.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Countif.java Mon Aug 17 20:04:45 2009
@@ -29,6 +29,7 @@
 import org.apache.poi.hssf.record.formula.eval.OperandResolver;
 import org.apache.poi.hssf.record.formula.eval.RefEval;
 import org.apache.poi.hssf.record.formula.eval.StringEval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 import org.apache.poi.hssf.record.formula.functions.CountUtils.I_MatchPredicate;
 import org.apache.poi.ss.usermodel.ErrorConstants;
 
@@ -400,7 +401,7 @@
 		}
 	}
 
-	public Eval evaluate(Eval[] args, int srcRowIndex, short srcColumnIndex) {
+	public ValueEval evaluate(ValueEval[] args, int srcRowIndex, short srcColumnIndex) {
 		switch(args.length) {
 			case 2:
 				// expected

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Errortype.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Errortype.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Errortype.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Errortype.java Mon Aug 17 20:04:45 2009
@@ -18,10 +18,10 @@
 package org.apache.poi.hssf.record.formula.functions;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.EvaluationException;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.OperandResolver;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 import org.apache.poi.hssf.usermodel.HSSFErrorConstants;
 
 /**
@@ -52,7 +52,7 @@
  */
 public final class Errortype implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 
 		try {
 			OperandResolver.getSingleValue(args[0], srcCellRow, srcCellCol);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/False.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/False.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/False.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/False.java Mon Aug 17 20:04:45 2009
@@ -19,7 +19,6 @@
 
 import org.apache.poi.hssf.record.formula.eval.BoolEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
 /**
@@ -28,7 +27,7 @@
  */
 public final class False implements Function {
 
-    public Eval evaluate(Eval[] operands, int srcRow, short srcCol) {
+    public ValueEval evaluate(ValueEval[] operands, int srcRow, short srcCol) {
         ValueEval retval;
         switch (operands.length) {
         default:

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Function.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Function.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Function.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Function.java Mon Aug 17 20:04:45 2009
@@ -19,7 +19,6 @@
 
 import org.apache.poi.hssf.record.formula.eval.BlankEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.MissingArgEval;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
@@ -31,16 +30,14 @@
 public interface Function {
 
 	/**
-	 * @param args the evaluated function arguments. Elements of this array typically implement
-	 * {@link ValueEval}.  Empty values are represented with {@link BlankEval} or {@link
-	 * MissingArgEval}, never <code>null</code>.
+	 * @param args the evaluated function arguments.  Empty values are represented with
+	 * {@link BlankEval} or {@link MissingArgEval}, never <code>null</code>.
 	 * @param srcRowIndex row index of the cell containing the formula under evaluation
 	 * @param srcColumnIndex column index of the cell containing the formula under evaluation
 	 * @return The evaluated result, possibly an {@link ErrorEval}, never <code>null</code>.
 	 * <b>Note</b> - Excel uses the error code <i>#NUM!</i> instead of IEEE <i>NaN</i>, so when
 	 * numeric functions evaluate to {@link Double#NaN} be sure to translate the result to {@link
 	 * ErrorEval#NUM_ERROR}.
-	 *
 	 */
-	Eval evaluate(Eval[] args, int srcRowIndex, short srcColumnIndex);
+	ValueEval evaluate(ValueEval[] args, int srcRowIndex, short srcColumnIndex);
 }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Hlookup.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Hlookup.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Hlookup.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Hlookup.java Mon Aug 17 20:04:45 2009
@@ -42,7 +42,7 @@
  */
 public final class Hlookup implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		Eval arg3 = null;
 		switch(args.length) {
 			case 4:

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Hyperlink.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Hyperlink.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Hyperlink.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Hyperlink.java Mon Aug 17 20:04:45 2009
@@ -18,10 +18,10 @@
 package org.apache.poi.hssf.record.formula.functions;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.EvaluationException;
 import org.apache.poi.hssf.record.formula.eval.OperandResolver;
 import org.apache.poi.hssf.record.formula.eval.StringEval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
 /**
  * Implementation of Excel HYPERLINK function.<p/>
@@ -41,7 +41,7 @@
  */
 public final class Hyperlink implements Function {
 
-	public Eval evaluate(Eval[] operands, int srcRow, short srcCol) {
+	public ValueEval evaluate(ValueEval[] operands, int srcRow, short srcCol) {
 		int lastArgIx = operands.length - 1;
 		if (lastArgIx < 0 || lastArgIx > 1) {
 			return ErrorEval.VALUE_INVALID;

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/If.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/If.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/If.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/If.java Mon Aug 17 20:04:45 2009
@@ -19,7 +19,6 @@
 
 import org.apache.poi.hssf.record.formula.eval.BoolEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.EvaluationException;
 import org.apache.poi.hssf.record.formula.eval.OperandResolver;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
@@ -30,8 +29,8 @@
  */
 public final class If implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
-		Eval falseResult;
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
+		ValueEval falseResult;
 		switch (args.length) {
 			case 3:
 				falseResult = args[2];
@@ -54,7 +53,7 @@
 		return falseResult;
 	}
 
-	private static boolean evaluateFirstArg(Eval arg, int srcCellRow, short srcCellCol)
+	private static boolean evaluateFirstArg(ValueEval arg, int srcCellRow, short srcCellCol)
 			throws EvaluationException {
 		ValueEval ve = OperandResolver.getSingleValue(arg, srcCellRow, srcCellCol);
 		Boolean b = OperandResolver.coerceValueToBoolean(ve, false);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Index.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Index.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Index.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Index.java Mon Aug 17 20:04:45 2009
@@ -47,7 +47,7 @@
  */
 public final class Index implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		int nArgs = args.length;
 		if(nArgs < 2) {
 			// too few arguments

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/IsError.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/IsError.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/IsError.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/IsError.java Mon Aug 17 20:04:45 2009
@@ -20,7 +20,6 @@
 import org.apache.poi.hssf.record.formula.eval.AreaEval;
 import org.apache.poi.hssf.record.formula.eval.BoolEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.RefEval;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
@@ -30,7 +29,7 @@
  */
 public final class IsError implements Function {
 
-    public Eval evaluate(Eval[] operands, int srcCellRow, short srcCellCol) {
+    public ValueEval evaluate(ValueEval[] operands, int srcCellRow, short srcCellCol) {
         ValueEval retval = null;
         boolean b = false;
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/IsNa.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/IsNa.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/IsNa.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/IsNa.java Mon Aug 17 20:04:45 2009
@@ -22,6 +22,7 @@
 import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.EvaluationException;
 import org.apache.poi.hssf.record.formula.eval.OperandResolver;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 import org.apache.poi.ss.usermodel.ErrorConstants;
 
 /**
@@ -38,7 +39,7 @@
  */
 public final class IsNa implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		if(args.length != 1) {
 			return ErrorEval.VALUE_INVALID;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Isblank.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Isblank.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Isblank.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Isblank.java Mon Aug 17 20:04:45 2009
@@ -31,7 +31,7 @@
  */
 public final class Isblank implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		if(args.length != 1) {
 			return ErrorEval.VALUE_INVALID;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Isref.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Isref.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Isref.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Isref.java Mon Aug 17 20:04:45 2009
@@ -22,26 +22,22 @@
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
 import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.RefEval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
 /**
  * @author Amol S. Deshmukh &lt; amolweb at ya hoo dot com &gt;
- *
  */
 public final class Isref implements Function {
-    public Eval evaluate(Eval[] operands, int srcCellRow, short srcCellCol) {
-        Eval retval = BoolEval.FALSE;
+	public ValueEval evaluate(ValueEval[] operands, int srcCellRow, short srcCellCol) {
+		if (operands.length != 1) {
+			return ErrorEval.VALUE_INVALID;
+		}
 
-        switch (operands.length) {
-        default:
-            retval = ErrorEval.VALUE_INVALID;
-            break;
-        case 1:
-            Eval eval = operands[0];
-            if (eval instanceof RefEval || eval instanceof AreaEval) {
-                retval = BoolEval.TRUE;
-            }
-        }
+		Eval eval = operands[0];
+		if (eval instanceof RefEval || eval instanceof AreaEval) {
+			return BoolEval.TRUE;
+		}
 
-        return retval;
-    }
+		return BoolEval.FALSE;
+	}
 }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java Mon Aug 17 20:04:45 2009
@@ -17,28 +17,76 @@
 
 package org.apache.poi.hssf.record.formula.functions;
 
+import org.apache.poi.hssf.record.formula.eval.BoolEval;
+import org.apache.poi.hssf.record.formula.eval.ErrorEval;
+import org.apache.poi.hssf.record.formula.eval.EvaluationException;
+import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.OperandResolver;
 import org.apache.poi.hssf.record.formula.eval.RefEval;
+import org.apache.poi.hssf.record.formula.eval.StringEval;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
 /**
  * @author Amol S. Deshmukh &lt; amolweb at ya hoo dot com &gt;
- *
  */
 public abstract class LogicalFunction implements Function {
 
-    /**
-     * recursively evaluate any RefEvals
-     * TODO - use {@link OperandResolver}
-     */
-    protected ValueEval xlateRefEval(RefEval reval) {
-        ValueEval retval = reval.getInnerValueEval();
-
-        if (retval instanceof RefEval) {
-            RefEval re = (RefEval) retval;
-            retval = xlateRefEval(re);
-        }
-
-        return retval;
-    }
+	/**
+	 * recursively evaluate any RefEvals TODO - use {@link OperandResolver}
+	 */
+	private static ValueEval xlateRefEval(RefEval reval) {
+		ValueEval retval = reval.getInnerValueEval();
+
+		if (retval instanceof RefEval) {
+			RefEval re = (RefEval) retval;
+			retval = xlateRefEval(re);
+		}
+
+		return retval;
+	}
+
+	public final ValueEval evaluate(ValueEval[] operands, int srcCellRow, short srcCellCol) {
+		if (operands.length != 1) {
+			return ErrorEval.VALUE_INVALID;
+		}
+		ValueEval ve;
+		try {
+			ve = OperandResolver.getSingleValue(operands[0], srcCellRow, srcCellCol);
+		} catch (EvaluationException e) {
+			if (false) {
+				// Note - it is more usual to propagate error codes straight to the result like this:
+				return e.getErrorEval();
+				// but logical functions behave a little differently
+			}
+			// this will usually cause a 'FALSE' result except for ISNONTEXT()
+			ve = e.getErrorEval();
+		}
+		if (ve instanceof RefEval) {
+			ve = xlateRefEval((RefEval) ve);
+		}
+		return BoolEval.valueOf(evaluate(ve));
+
+	}
+	protected abstract boolean evaluate(ValueEval arg);
+
+	public static final Function IsLogical = new LogicalFunction() {
+		protected boolean evaluate(ValueEval arg) {
+			return arg instanceof BoolEval;
+		}
+	};
+	public static final Function IsNonText = new LogicalFunction() {
+		protected boolean evaluate(ValueEval arg) {
+			return !(arg instanceof StringEval);
+		}
+	};
+	public static final Function IsNumber = new LogicalFunction() {
+		protected boolean evaluate(ValueEval arg) {
+			return arg instanceof NumberEval;
+		}
+	};
+	public static final Function IsText = new LogicalFunction() {
+		protected boolean evaluate(ValueEval arg) {
+			return arg instanceof StringEval;
+		}
+	};
 }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Lookup.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Lookup.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Lookup.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Lookup.java Mon Aug 17 20:04:45 2009
@@ -19,7 +19,6 @@
 
 import org.apache.poi.hssf.record.formula.eval.AreaEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.EvaluationException;
 import org.apache.poi.hssf.record.formula.eval.OperandResolver;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
@@ -41,7 +40,7 @@
  */
 public final class Lookup implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		switch(args.length) {
 			case 3:
 				break;

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Match.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Match.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Match.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Match.java Mon Aug 17 20:04:45 2009
@@ -67,7 +67,7 @@
 public final class Match implements Function {
 
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 
 		double match_type = 1; // default
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Mode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Mode.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Mode.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Mode.java Mon Aug 17 20:04:45 2009
@@ -74,7 +74,7 @@
 
 	}
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		double result;
 		try {
 			List<Double> temp = new ArrayList<Double>();

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/MultiOperandNumericFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/MultiOperandNumericFunction.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/MultiOperandNumericFunction.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/MultiOperandNumericFunction.java Mon Aug 17 20:04:45 2009
@@ -83,7 +83,7 @@
 
 	private static final int DEFAULT_MAX_NUM_OPERANDS = 30;
 
-	public final Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public final ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 
 		double d;
 		try {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Na.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Na.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Na.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Na.java Mon Aug 17 20:04:45 2009
@@ -18,7 +18,7 @@
 package org.apache.poi.hssf.record.formula.functions;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
 /**
  * Implementation of Excel function NA()
@@ -27,7 +27,7 @@
  */
 public final class Na implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		return ErrorEval.NA;
 	}
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Not.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Not.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Not.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Not.java Mon Aug 17 20:04:45 2009
@@ -19,7 +19,6 @@
 
 import org.apache.poi.hssf.record.formula.eval.BoolEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.EvaluationException;
 import org.apache.poi.hssf.record.formula.eval.OperandResolver;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
@@ -33,7 +32,7 @@
  */
 public final class Not implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		if (args.length != 1) {
 			return ErrorEval.VALUE_INVALID;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NotImplementedFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NotImplementedFunction.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NotImplementedFunction.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NotImplementedFunction.java Mon Aug 17 20:04:45 2009
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula.functions;
 
-import org.apache.poi.hssf.record.formula.eval.Eval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 import org.apache.poi.ss.formula.eval.NotImplementedException;
 
 /**
@@ -38,7 +38,7 @@
 		_functionName = name;
 	}
 
-	public Eval evaluate(Eval[] operands, int srcRow, short srcCol) {
+	public ValueEval evaluate(ValueEval[] operands, int srcRow, short srcCol) {
 		throw new NotImplementedException(_functionName);
 	}
 	public String getFunctionName() {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Now.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Now.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Now.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Now.java Mon Aug 17 20:04:45 2009
@@ -20,8 +20,8 @@
 import java.util.Date;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
 
 /**
@@ -31,7 +31,7 @@
  */
 public final class Now implements Function {
 
-	public Eval evaluate(Eval[] evals, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] evals, int srcCellRow, short srcCellCol) {
 		if (evals.length > 0) {
 			return ErrorEval.VALUE_INVALID;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NumericFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NumericFunction.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NumericFunction.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NumericFunction.java Mon Aug 17 20:04:45 2009
@@ -46,7 +46,7 @@
 		}
 	}
 
-	public final Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public final ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		double result;
 		try {
 			result = eval(args, srcCellRow, srcCellCol);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Offset.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Offset.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Offset.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Offset.java Mon Aug 17 20:04:45 2009
@@ -164,7 +164,7 @@
 		}
 	}
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		if(args.length < 3 || args.length > 5) {
 			return ErrorEval.VALUE_INVALID;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Pi.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Pi.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Pi.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Pi.java Mon Aug 17 20:04:45 2009
@@ -18,7 +18,6 @@
 package org.apache.poi.hssf.record.formula.functions;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
@@ -30,7 +29,7 @@
 
     private static final NumberEval PI_EVAL = new NumberEval(Math.PI);
 
-    public Eval evaluate(Eval[] operands, int srcRow, short srcCol) {
+    public ValueEval evaluate(ValueEval[] operands, int srcRow, short srcCol) {
         ValueEval retval;
         switch (operands.length) {
         default:

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Rand.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Rand.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Rand.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Rand.java Mon Aug 17 20:04:45 2009
@@ -18,7 +18,6 @@
 package org.apache.poi.hssf.record.formula.functions;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
@@ -28,7 +27,7 @@
  */
 public final class Rand implements Function {
 
-    public Eval evaluate(Eval[] operands, int srcRow, short srcCol) {
+    public ValueEval evaluate(ValueEval[] operands, int srcRow, short srcCol) {
         ValueEval retval;
         switch (operands.length) {
         default:

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Row.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Row.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Row.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Row.java Mon Aug 17 20:04:45 2009
@@ -19,14 +19,13 @@
 
 import org.apache.poi.hssf.record.formula.eval.AreaEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.RefEval;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
 public final class Row implements Function {
 
-    public Eval evaluate(Eval[] evals, int srcCellRow, short srcCellCol) {
+    public ValueEval evaluate(ValueEval[] evals, int srcCellRow, short srcCellCol) {
         ValueEval retval = null;
         int rnum = -1;
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Rows.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Rows.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Rows.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Rows.java Mon Aug 17 20:04:45 2009
@@ -22,6 +22,7 @@
 import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.RefEval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
 /**
  * Implementation for Excel ROWS function.
@@ -30,7 +31,7 @@
  */
 public final class Rows implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		switch(args.length) {
 			case 1:
 				// expected

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Sumif.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Sumif.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Sumif.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Sumif.java Mon Aug 17 20:04:45 2009
@@ -41,7 +41,7 @@
  */
 public final class Sumif implements Function {
 
-	public Eval evaluate(Eval[] args, int srcRowIndex, short srcColumnIndex) {
+	public ValueEval evaluate(ValueEval[] args, int srcRowIndex, short srcColumnIndex) {
 		if (args.length < 2) {
 			return ErrorEval.VALUE_INVALID;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Sumproduct.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Sumproduct.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Sumproduct.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Sumproduct.java Mon Aug 17 20:04:45 2009
@@ -20,7 +20,6 @@
 import org.apache.poi.hssf.record.formula.eval.AreaEval;
 import org.apache.poi.hssf.record.formula.eval.BlankEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.EvaluationException;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.NumericValueEval;
@@ -54,14 +53,14 @@
 public final class Sumproduct implements Function {
 
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 
 		int maxN = args.length;
 
 		if(maxN < 1) {
 			return ErrorEval.VALUE_INVALID;
 		}
-		Eval firstArg = args[0];
+		ValueEval firstArg = args[0];
 		try {
 			if(firstArg instanceof NumericValueEval) {
 				return evaluateSingleProduct(args);
@@ -83,7 +82,7 @@
 				+ firstArg.getClass().getName() + ")");
 	}
 
-	private static Eval evaluateSingleProduct(Eval[] evalArgs) throws EvaluationException {
+	private static ValueEval evaluateSingleProduct(ValueEval[] evalArgs) throws EvaluationException {
 		int maxN = evalArgs.length;
 
 		double term = 1D;
@@ -94,9 +93,9 @@
 		return new NumberEval(term);
 	}
 
-	private static double getScalarValue(Eval arg) throws EvaluationException {
+	private static double getScalarValue(ValueEval arg) throws EvaluationException {
 
-		Eval eval;
+		ValueEval eval;
 		if (arg instanceof RefEval) {
 			RefEval re = (RefEval) arg;
 			eval = re.getInnerValueEval();
@@ -116,15 +115,10 @@
 			eval = ae.getRelativeValue(0, 0);
 		}
 
-		if (!(eval instanceof ValueEval)) {
-			throw new RuntimeException("Unexpected value eval class ("
-					+ eval.getClass().getName() + ")");
-		}
-
-		return getProductTerm((ValueEval) eval, true);
+		return getProductTerm(eval, true);
 	}
 
-	private static Eval evaluateAreaSumProduct(Eval[] evalArgs) throws EvaluationException {
+	private static ValueEval evaluateAreaSumProduct(ValueEval[] evalArgs) throws EvaluationException {
 		int maxN = evalArgs.length;
 		AreaEval[] args = new AreaEval[maxN];
 		try {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/T.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/T.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/T.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/T.java Mon Aug 17 20:04:45 2009
@@ -18,20 +18,20 @@
 package org.apache.poi.hssf.record.formula.functions;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.RefEval;
 import org.apache.poi.hssf.record.formula.eval.StringEval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
 public final class T implements Function {
 
-    public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+    public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
         switch (args.length) {
             default:
                 return ErrorEval.VALUE_INVALID;
             case 1:
                  break;
         }
-        Eval arg = args[0];
+        ValueEval arg = args[0];
         if (arg instanceof RefEval) {
             RefEval re = (RefEval) arg;
             arg = re.getInnerValueEval();

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/TextFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/TextFunction.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/TextFunction.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/TextFunction.java Mon Aug 17 20:04:45 2009
@@ -43,7 +43,7 @@
 		return OperandResolver.coerceValueToInt(ve);
 	}
 
-	public final Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public final ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		try {
 			return evaluateFunc(args, srcCellRow, srcCellCol);
 		} catch (EvaluationException e) {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Time.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Time.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Time.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Time.java Mon Aug 17 20:04:45 2009
@@ -38,7 +38,7 @@
 	private static final int SECONDS_PER_DAY = HOURS_PER_DAY * SECONDS_PER_HOUR;
 
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		if (args.length != 3) {
 			return ErrorEval.VALUE_INVALID;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Today.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Today.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Today.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Today.java Mon Aug 17 20:04:45 2009
@@ -21,8 +21,8 @@
 import java.util.GregorianCalendar;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
 
 /**
@@ -32,7 +32,7 @@
  */
 public final class Today implements Function {
 
-	public Eval evaluate(Eval[] evals, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] evals, int srcCellRow, short srcCellCol) {
 		if (evals.length > 0) {
 			return ErrorEval.VALUE_INVALID;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/True.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/True.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/True.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/True.java Mon Aug 17 20:04:45 2009
@@ -19,7 +19,6 @@
 
 import org.apache.poi.hssf.record.formula.eval.BoolEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
 /**
@@ -28,7 +27,7 @@
  */
 public final class True implements Function {
 
-    public Eval evaluate(Eval[] operands, int srcRow, short srcCol) {
+    public ValueEval evaluate(ValueEval[] operands, int srcRow, short srcCol) {
         ValueEval retval;
         switch (operands.length) {
         default:

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Value.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Value.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Value.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Value.java Mon Aug 17 20:04:45 2009
@@ -18,7 +18,6 @@
 package org.apache.poi.hssf.record.formula.functions;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.EvaluationException;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.OperandResolver;
@@ -42,7 +41,7 @@
 	private static final int MIN_DISTANCE_BETWEEN_THOUSANDS_SEPARATOR = 4;
 	private static final Double ZERO = new Double(0.0);
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		if (args.length != 1) {
 			return ErrorEval.VALUE_INVALID;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Vlookup.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Vlookup.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Vlookup.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Vlookup.java Mon Aug 17 20:04:45 2009
@@ -42,7 +42,7 @@
  */
 public final class Vlookup implements Function {
 
-	public Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		Eval arg3 = null;
 		switch(args.length) {
 			case 4:

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/XYNumericFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/XYNumericFunction.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/XYNumericFunction.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/XYNumericFunction.java Mon Aug 17 20:04:45 2009
@@ -97,7 +97,7 @@
 	 */
 	protected abstract Accumulator createAccumulator();
 
-	public final Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol) {
+	public final ValueEval evaluate(ValueEval[] args, int srcCellRow, short srcCellCol) {
 		if (args.length != 2) {
 			return ErrorEval.VALUE_INVALID;
 		}

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestAverage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestAverage.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestAverage.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestAverage.java Mon Aug 17 20:04:45 2009
@@ -22,7 +22,6 @@
 import org.apache.poi.hssf.record.formula.eval.BlankEval;
 import org.apache.poi.hssf.record.formula.eval.BoolEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
 /**
@@ -32,18 +31,18 @@
  */
 public final class TestAverage extends TestCase {
 
-	private static Eval invokeAverage(Eval[] args) {
+	private static ValueEval invokeAverage(ValueEval[] args) {
 		return AggregateFunction.AVERAGE.evaluate(args, -1, (short)-1);
 	}
 
-	private void confirmAverage(Eval[] args, double expected) {
-		Eval result = invokeAverage(args);
+	private void confirmAverage(ValueEval[] args, double expected) {
+		ValueEval result = invokeAverage(args);
 		assertEquals(NumberEval.class, result.getClass());
 		assertEquals(expected, ((NumberEval)result).getNumberValue(), 0);
 	}
 
-	private void confirmAverage(Eval[] args, ErrorEval expectedError) {
-		Eval result = invokeAverage(args);
+	private void confirmAverage(ValueEval[] args, ErrorEval expectedError) {
+		ValueEval result = invokeAverage(args);
 		assertEquals(ErrorEval.class, result.getClass());
 		assertEquals(expectedError.getErrorCode(), ((ErrorEval)result).getErrorCode());
 	}

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestIndex.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestIndex.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestIndex.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestIndex.java Mon Aug 17 20:04:45 2009
@@ -101,7 +101,7 @@
 		ValueEval[] args = new ValueEval[] { arg0, MissingArgEval.instance, new NumberEval(2), };
 		ValueEval actualResult;
 		try {
-			actualResult = (ValueEval) FUNC_INST.evaluate(args, 1, (short)1);
+			actualResult = FUNC_INST.evaluate(args, 1, (short)1);
 		} catch (RuntimeException e) {
 			if (e.getMessage().equals("Unexpected arg eval type (org.apache.poi.hssf.record.formula.eval.MissingArgEval")) {
 				throw new AssertionFailedError("Identified bug 47048b - INDEX() should support missing-arg");

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestLen.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestLen.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestLen.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestLen.java Mon Aug 17 20:04:45 2009
@@ -22,45 +22,44 @@
 import org.apache.poi.hssf.record.formula.eval.BlankEval;
 import org.apache.poi.hssf.record.formula.eval.BoolEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.StringEval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 /**
  * Tests for Excel function LEN()
- * 
+ *
  * @author Josh Micich
  */
 public final class TestLen extends TestCase {
 
-	
-	private static Eval invokeLen(Eval text) {
-		Eval[] args = new Eval[] { text, };
+	private static ValueEval invokeLen(ValueEval text) {
+		ValueEval[] args = new ValueEval[] { text, };
 		return TextFunction.LEN.evaluate(args, -1, (short)-1);
 	}
 
-	private void confirmLen(Eval text, int expected) {
-		Eval result = invokeLen(text);
+	private void confirmLen(ValueEval text, int expected) {
+		ValueEval result = invokeLen(text);
 		assertEquals(NumberEval.class, result.getClass());
 		assertEquals(expected, ((NumberEval)result).getNumberValue(), 0);
 	}
 
-	private void confirmLen(Eval text, ErrorEval expectedError) {
-		Eval result = invokeLen(text);
+	private void confirmLen(ValueEval text, ErrorEval expectedError) {
+		ValueEval result = invokeLen(text);
 		assertEquals(ErrorEval.class, result.getClass());
 		assertEquals(expectedError.getErrorCode(), ((ErrorEval)result).getErrorCode());
 	}
-	
+
 	public void testBasic() {
-		
+
 		confirmLen(new StringEval("galactic"), 8);
 	}
-	
+
 	/**
 	 * Valid cases where text arg is not exactly a string
 	 */
 	public void testUnusualArgs() {
-		
-		// text (first) arg type is number, other args are strings with fractional digits 
+
+		// text (first) arg type is number, other args are strings with fractional digits
 		confirmLen(new NumberEval(123456), 6);
 		confirmLen(BoolEval.FALSE, 5);
 		confirmLen(BoolEval.TRUE, 4);

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestMatch.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestMatch.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestMatch.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestMatch.java Mon Aug 17 20:04:45 2009
@@ -22,7 +22,6 @@
 import org.apache.poi.hssf.record.formula.eval.AreaEval;
 import org.apache.poi.hssf.record.formula.eval.BoolEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.NumericValueEval;
 import org.apache.poi.hssf.record.formula.eval.StringEval;
@@ -41,11 +40,11 @@
 	private static final NumberEval MATCH_SMALLEST_GTE = new NumberEval(-1);
 
 
-	private static Eval invokeMatch(Eval lookup_value, Eval lookup_array, Eval match_type) {
-		Eval[] args = { lookup_value, lookup_array, match_type, };
+	private static ValueEval invokeMatch(ValueEval lookup_value, ValueEval lookup_array, ValueEval match_type) {
+		ValueEval[] args = { lookup_value, lookup_array, match_type, };
 		return new Match().evaluate(args, -1, (short)-1);
 	}
-	private static void confirmInt(int expected, Eval actualEval) {
+	private static void confirmInt(int expected, ValueEval actualEval) {
 		if(!(actualEval instanceof NumericValueEval)) {
 			fail("Expected numeric result");
 		}

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestMid.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestMid.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestMid.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestMid.java Mon Aug 17 20:04:45 2009
@@ -23,7 +23,6 @@
 import org.apache.poi.hssf.record.formula.eval.BlankEval;
 import org.apache.poi.hssf.record.formula.eval.BoolEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.RefEval;
 import org.apache.poi.hssf.record.formula.eval.StringEval;
@@ -36,19 +35,19 @@
 public final class TestMid extends TestCase {
 
 
-	private static Eval invokeMid(Eval text, Eval startPos, Eval numChars) {
-		Eval[] args = new Eval[] { text, startPos, numChars, };
+	private static ValueEval invokeMid(ValueEval text, ValueEval startPos, ValueEval numChars) {
+		ValueEval[] args = new ValueEval[] { text, startPos, numChars, };
 		return TextFunction.MID.evaluate(args, -1, (short)-1);
 	}
 
-	private void confirmMid(Eval text, Eval startPos, Eval numChars, String expected) {
-		Eval result = invokeMid(text, startPos, numChars);
+	private void confirmMid(ValueEval text, ValueEval startPos, ValueEval numChars, String expected) {
+		ValueEval result = invokeMid(text, startPos, numChars);
 		assertEquals(StringEval.class, result.getClass());
 		assertEquals(expected, ((StringEval)result).getStringValue());
 	}
 
-	private void confirmMid(Eval text, Eval startPos, Eval numChars, ErrorEval expectedError) {
-		Eval result = invokeMid(text, startPos, numChars);
+	private void confirmMid(ValueEval text, ValueEval startPos, ValueEval numChars, ErrorEval expectedError) {
+		ValueEval result = invokeMid(text, startPos, numChars);
 		assertEquals(ErrorEval.class, result.getClass());
 		assertEquals(expectedError.getErrorCode(), ((ErrorEval)result).getErrorCode());
 	}

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestNper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestNper.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestNper.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestNper.java Mon Aug 17 20:04:45 2009
@@ -19,8 +19,8 @@
 
 import junit.framework.TestCase;
 
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.hssf.usermodel.HSSFErrorConstants;
 import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator;
@@ -29,18 +29,18 @@
 
 /**
  * Tests for {@link FinanceFunction#NPER}
- * 
+ *
  * @author Josh Micich
  */
 public final class TestNper extends TestCase {
 	public void testSimpleEvaluate() {
 
-		Eval[] args = {
+		ValueEval[] args = {
 			new NumberEval(0.05),
 			new NumberEval(250),
 			new NumberEval(-1000),
 		};
-		Eval result = FinanceFunction.NPER.evaluate(args, 0, (short)0);
+		ValueEval result = FinanceFunction.NPER.evaluate(args, 0, (short)0);
 
 		assertEquals(NumberEval.class, result.getClass());
 		assertEquals(4.57353557, ((NumberEval)result).getNumberValue(), 0.00000001);

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestPmt.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestPmt.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestPmt.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestPmt.java Mon Aug 17 20:04:45 2009
@@ -21,12 +21,11 @@
 import junit.framework.TestCase;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.usermodel.HSSFErrorConstants;
 
 /**
- * 
  * @author Josh Micich
  */
 public final class TestPmt extends TestCase {
@@ -35,14 +34,14 @@
 		// only asserting accuracy to 4 fractional digits
 		assertEquals(expected, ne.getNumberValue(), 0.00005);
 	}
-	private static Eval invoke(Eval[] args) {
+	private static ValueEval invoke(ValueEval[] args) {
 		return FinanceFunction.PMT.evaluate(args, -1, (short)-1);
 	}
 	/**
 	 * Invocation when not expecting an error result
 	 */
-	private static NumberEval invokeNormal(Eval[] args) {
-		Eval ev = invoke(args);
+	private static NumberEval invokeNormal(ValueEval[] args) {
+		ValueEval ev = invoke(args);
 		if(ev instanceof ErrorEval) {
 			throw new AssertionFailedError("Normal evaluation failed with error code: "
 					+ ev.toString());
@@ -51,7 +50,7 @@
 	}
 
 	private static void confirm(double expected, double rate, double nper, double pv, double fv, boolean isBeginning) {
-		Eval[] args = { 
+		ValueEval[] args = {
 				new NumberEval(rate),
 				new NumberEval(nper),
 				new NumberEval(pv),
@@ -68,20 +67,20 @@
 	}
 
 	public void test3args() {
-		
-		Eval[] args = { 
+
+		ValueEval[] args = {
 				new NumberEval(0.005),
 				new NumberEval(24),
 				new NumberEval(1000),
 		};
-		Eval ev = invoke(args);
+		ValueEval ev = invoke(args);
 		if(ev instanceof ErrorEval) {
 			ErrorEval err = (ErrorEval) ev;
 			if(err.getErrorCode() == HSSFErrorConstants.ERROR_VALUE) {
 				throw new AssertionFailedError("Identified bug 44691");
 			}
 		}
-		
+
 		confirm(-44.3206, invokeNormal(args));
 	}
 }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestRoundFuncs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestRoundFuncs.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestRoundFuncs.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestRoundFuncs.java Mon Aug 17 20:04:45 2009
@@ -20,31 +20,31 @@
 import junit.framework.TestCase;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.StringEval;
 
 /**
  * Test cases for ROUND(), ROUNDUP(), ROUNDDOWN()
- * 
+ *
  * @author Josh Micich
  */
 public final class TestRoundFuncs extends TestCase {
 	private static final NumericFunction F = null;
 	public void testRounddownWithStringArg() {
-		
-		Eval strArg = new StringEval("abc");
-		Eval[] args = { strArg, new NumberEval(2), };
-		Eval result = F.ROUNDDOWN.evaluate(args, -1, (short)-1);
+
+		ValueEval strArg = new StringEval("abc");
+		ValueEval[] args = { strArg, new NumberEval(2), };
+		ValueEval result = F.ROUNDDOWN.evaluate(args, -1, (short)-1);
 		assertEquals(ErrorEval.VALUE_INVALID, result);
 	}
-	
+
 	public void testRoundupWithStringArg() {
-		
-		Eval strArg = new StringEval("abc");
-		Eval[] args = { strArg, new NumberEval(2), };
-		Eval result = F.ROUNDUP.evaluate(args, -1, (short)-1);
+
+		ValueEval strArg = new StringEval("abc");
+		ValueEval[] args = { strArg, new NumberEval(2), };
+		ValueEval result = F.ROUNDUP.evaluate(args, -1, (short)-1);
 		assertEquals(ErrorEval.VALUE_INVALID, result);
 	}
-	
+
 }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestSumproduct.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestSumproduct.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestSumproduct.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestSumproduct.java Mon Aug 17 20:04:45 2009
@@ -21,7 +21,6 @@
 
 import org.apache.poi.hssf.record.formula.eval.AreaEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.NumericValueEval;
 import org.apache.poi.hssf.record.formula.eval.RefEval;
@@ -29,16 +28,16 @@
 
 /**
  * Test cases for SUMPRODUCT()
- * 
+ *
  * @author Josh Micich
  */
 public final class TestSumproduct extends TestCase {
-	
-	private static Eval invokeSumproduct(Eval[] args) {
+
+	private static ValueEval invokeSumproduct(ValueEval[] args) {
 		// srcCellRow and srcCellColumn are ignored by SUMPRODUCT
 		return new Sumproduct().evaluate(args, -1, (short)-1);
 	}
-	private static void confirmDouble(double expected, Eval actualEval) {
+	private static void confirmDouble(double expected, ValueEval actualEval) {
 		if(!(actualEval instanceof NumericValueEval)) {
 			fail("Expected numeric result");
 		}
@@ -49,11 +48,11 @@
 	public void testScalarSimple() {
 
 		RefEval refEval = EvalFactory.createRefEval("A1", new NumberEval(3));
-		Eval[] args = {
-			refEval, 
+		ValueEval[] args = {
+			refEval,
 			new NumberEval(2),
 		};
-		Eval result = invokeSumproduct(args);
+		ValueEval result = invokeSumproduct(args);
 		confirmDouble(6D, result);
 	}
 
@@ -70,9 +69,9 @@
 		};
 		AreaEval aeA = EvalFactory.createAreaEval("A1:A3", aValues);
 		AreaEval aeB = EvalFactory.createAreaEval("B1:B3", bValues);
-		
-		Eval[] args = { aeA, aeB, };
-		Eval result = invokeSumproduct(args);
+
+		ValueEval[] args = { aeA, aeB, };
+		ValueEval result = invokeSumproduct(args);
 		confirmDouble(65D, result);
 	}
 
@@ -83,27 +82,27 @@
 
 		AreaEval ae = EvalFactory.createAreaEval("A1:A1", new ValueEval[] { new NumberEval(7), });
 
-		Eval[] args = {
-				ae, 
+		ValueEval[] args = {
+				ae,
 				new NumberEval(2),
 			};
-		Eval result = invokeSumproduct(args);
+		ValueEval result = invokeSumproduct(args);
 		confirmDouble(14D, result);
 	}
 
 	public void testMismatchAreaDimensions() {
-		
+
 		AreaEval aeA = EvalFactory.createAreaEval("A1:A3", new ValueEval[3]);
 		AreaEval aeB = EvalFactory.createAreaEval("B1:D1", new ValueEval[3]);
 
-		Eval[] args;
-		args = new Eval[] { aeA, aeB, };
+		ValueEval[] args;
+		args = new ValueEval[] { aeA, aeB, };
 		assertEquals(ErrorEval.VALUE_INVALID, invokeSumproduct(args));
 
-		args = new Eval[] { aeA, new NumberEval(5), };
+		args = new ValueEval[] { aeA, new NumberEval(5), };
 		assertEquals(ErrorEval.VALUE_INVALID, invokeSumproduct(args));
 	}
-	
+
 	public void testAreaWithErrorCell() {
 		ValueEval[] aValues = {
 			ErrorEval.REF_INVALID,
@@ -112,7 +111,7 @@
 		AreaEval aeA = EvalFactory.createAreaEval("A1:A2", aValues);
 		AreaEval aeB = EvalFactory.createAreaEval("B1:B2", new ValueEval[2]);
 
-		Eval[] args = { aeA, aeB, };
+		ValueEval[] args = { aeA, aeB, };
 		assertEquals(ErrorEval.REF_INVALID, invokeSumproduct(args));
 	}
 }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestTFunc.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestTFunc.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestTFunc.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestTFunc.java Mon Aug 17 20:04:45 2009
@@ -22,14 +22,13 @@
 import org.apache.poi.hssf.record.formula.eval.BlankEval;
 import org.apache.poi.hssf.record.formula.eval.BoolEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.StringEval;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
 
 /**
  * Test cases for Excel function T()
- * 
+ *
  * @author Josh Micich
  */
 public final class TestTFunc extends TestCase {
@@ -37,9 +36,9 @@
 	/**
 	 * @return the result of calling function T() with the specified argument
 	 */
-	private static Eval invokeT(Eval arg) {
-		Eval[] args = { arg, };
-		Eval result = new T().evaluate(args, -1, (short)-1);
+	private static ValueEval invokeT(ValueEval arg) {
+		ValueEval[] args = { arg, };
+		ValueEval result = new T().evaluate(args, -1, (short)-1);
 		assertNotNull("result may never be null", result);
 		return result;
 	}
@@ -47,20 +46,20 @@
 	 * Simulates call: T(A1)
 	 * where cell A1 has the specified innerValue
 	 */
-	private Eval invokeTWithReference(ValueEval innerValue) {
-		Eval arg = EvalFactory.createRefEval("$B$2", innerValue);
+	private ValueEval invokeTWithReference(ValueEval innerValue) {
+		ValueEval arg = EvalFactory.createRefEval("$B$2", innerValue);
 		return invokeT(arg);
 	}
-	
+
 	private static void confirmText(String text) {
-		Eval arg = new StringEval(text);
-		Eval eval = invokeT(arg);
+		ValueEval arg = new StringEval(text);
+		ValueEval eval = invokeT(arg);
 		StringEval se = (StringEval) eval;
 		assertEquals(text, se.getStringValue());
 	}
-	
+
 	public void testTextValues() {
-		
+
 		confirmText("abc");
 		confirmText("");
 		confirmText(" ");
@@ -68,26 +67,26 @@
 		confirmText("123");
 		confirmText("TRUE");
 	}
-	
-	private static void confirmError(Eval arg) {
-		Eval eval = invokeT(arg);
+
+	private static void confirmError(ValueEval arg) {
+		ValueEval eval = invokeT(arg);
 		assertTrue(arg == eval);
 	}
 
 	public void testErrorValues() {
-		
+
 		confirmError(ErrorEval.VALUE_INVALID);
 		confirmError(ErrorEval.NA);
 		confirmError(ErrorEval.REF_INVALID);
 	}
-	
-	private static void confirmString(Eval eval, String expected) {
+
+	private static void confirmString(ValueEval eval, String expected) {
 		assertTrue(eval instanceof StringEval);
 		assertEquals(expected, ((StringEval)eval).getStringValue());
 	}
 
-	private static void confirmOther(Eval arg) {
-		Eval eval = invokeT(arg);
+	private static void confirmOther(ValueEval arg) {
+		ValueEval eval = invokeT(arg);
 		confirmString(eval, "");
 	}
 
@@ -98,8 +97,8 @@
 	}
 
 	public void testRefValues() {
-		Eval eval;
-		
+		ValueEval eval;
+
 		eval = invokeTWithReference(new StringEval("def"));
 		confirmString(eval, "def");
 		eval = invokeTWithReference(new StringEval(" "));
@@ -109,7 +108,7 @@
 		confirmString(eval, "");
 		eval = invokeTWithReference(BoolEval.TRUE);
 		confirmString(eval, "");
-		
+
 		eval = invokeTWithReference(ErrorEval.NAME_INVALID);
 		assertTrue(eval == ErrorEval.NAME_INVALID);
 	}

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestTrim.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestTrim.java?rev=805119&r1=805118&r2=805119&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestTrim.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/functions/TestTrim.java Mon Aug 17 20:04:45 2009
@@ -22,36 +22,36 @@
 import org.apache.poi.hssf.record.formula.eval.BlankEval;
 import org.apache.poi.hssf.record.formula.eval.BoolEval;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.record.formula.eval.Eval;
 import org.apache.poi.hssf.record.formula.eval.NumberEval;
 import org.apache.poi.hssf.record.formula.eval.StringEval;
+import org.apache.poi.hssf.record.formula.eval.ValueEval;
 /**
  * Tests for Excel function TRIM()
- * 
+ *
  * @author Josh Micich
  */
 public final class TestTrim extends TestCase {
 
-	
-	private static Eval invokeTrim(Eval text) {
-		Eval[] args = new Eval[] { text, };
+
+	private static ValueEval invokeTrim(ValueEval text) {
+		ValueEval[] args = new ValueEval[] { text, };
 		return TextFunction.TRIM.evaluate(args, -1, (short)-1);
 	}
 
-	private void confirmTrim(Eval text, String expected) {
-		Eval result = invokeTrim(text);
+	private void confirmTrim(ValueEval text, String expected) {
+		ValueEval result = invokeTrim(text);
 		assertEquals(StringEval.class, result.getClass());
 		assertEquals(expected, ((StringEval)result).getStringValue());
 	}
 
-	private void confirmTrim(Eval text, ErrorEval expectedError) {
-		Eval result = invokeTrim(text);
+	private void confirmTrim(ValueEval text, ErrorEval expectedError) {
+		ValueEval result = invokeTrim(text);
 		assertEquals(ErrorEval.class, result.getClass());
 		assertEquals(expectedError.getErrorCode(), ((ErrorEval)result).getErrorCode());
 	}
-	
+
 	public void testBasic() {
-		
+
 		confirmTrim(new StringEval(" hi "), "hi");
 		confirmTrim(new StringEval("hi "), "hi");
 		confirmTrim(new StringEval("  hi"), "hi");
@@ -59,13 +59,13 @@
 		confirmTrim(new StringEval(""), "");
 		confirmTrim(new StringEval("   "), "");
 	}
-	
+
 	/**
 	 * Valid cases where text arg is not exactly a string
 	 */
 	public void testUnusualArgs() {
-		
-		// text (first) arg type is number, other args are strings with fractional digits 
+
+		// text (first) arg type is number, other args are strings with fractional digits
 		confirmTrim(new NumberEval(123456), "123456");
 		confirmTrim(BoolEval.FALSE, "FALSE");
 		confirmTrim(BoolEval.TRUE, "TRUE");



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message