--- /dev/null
+/*\r
+ * Created on Nov 25, 2006\r
+ *\r
+ */\r
+package org.apache.poi.hssf.record.formula.functions;\r
+\r
+import org.apache.poi.hssf.record.formula.eval.RefEval;\r
+import org.apache.poi.hssf.record.formula.eval.ValueEval;\r
+\r
+/**\r
+ * @author Amol S. Deshmukh < amolweb at ya hoo dot com >\r
+ *\r
+ */\r
+public abstract class LogicalFunction implements Function {\r
+\r
+ /**\r
+ * recursively evaluate any RefEvals\r
+ * @param reval\r
+ * @return\r
+ */\r
+ protected ValueEval xlateRefEval(RefEval reval) {\r
+ ValueEval retval = (ValueEval) reval.getInnerValueEval();\r
+ \r
+ if (retval instanceof RefEval) {\r
+ RefEval re = (RefEval) retval;\r
+ retval = xlateRefEval(re);\r
+ }\r
+\r
+ return retval;\r
+ }\r
+}\r