poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r1037228 - in /poi/trunk/src: java/org/apache/poi/hssf/record/formula/ 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/hs...
Date Sat, 20 Nov 2010 14:49:48 GMT
Author: yegor
Date: Sat Nov 20 14:49:47 2010
New Revision: 1037228

URL: http://svn.apache.org/viewvc?rev=1037228&view=rev
Log:
removed dependencies on HSSF, prepare to move common formula stuff to org.apache.poi.ss.formula

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/AreaErrPtg.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/DeletedArea3DPtg.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/DeletedRef3DPtg.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/ErrPtg.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/RefErrorPtg.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/atp/YearFracCalculator.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/ErrorEval.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/OperandResolver.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/RefEval.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/DateFunc.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/Now.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/Today.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/atp/TestRandBetween.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/atp/TestYearFracCalculator.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/AreaErrPtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/AreaErrPtg.java?rev=1037228&r1=1037227&r2=1037228&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/AreaErrPtg.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/AreaErrPtg.java Sat Nov 20 14:49:47
2010
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFErrorConstants;
+import org.apache.poi.ss.usermodel.ErrorConstants;
 import org.apache.poi.util.LittleEndianInput;
 import org.apache.poi.util.LittleEndianOutput;
 
@@ -49,7 +49,7 @@ public final class AreaErrPtg extends Op
 	}
 
 	public String toFormulaString() {
-		return HSSFErrorConstants.getText(HSSFErrorConstants.ERROR_REF);
+		return ErrorConstants.getText(ErrorConstants.ERROR_REF);
 	}
 
 	public byte getDefaultOperandClass() {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/DeletedArea3DPtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/DeletedArea3DPtg.java?rev=1037228&r1=1037227&r2=1037228&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/DeletedArea3DPtg.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/DeletedArea3DPtg.java Sat Nov 20
14:49:47 2010
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFErrorConstants;
+import org.apache.poi.ss.usermodel.ErrorConstants;
 import org.apache.poi.ss.formula.FormulaRenderingWorkbook;
 import org.apache.poi.ss.formula.WorkbookDependentFormula;
 import org.apache.poi.util.LittleEndianInput;
@@ -49,7 +49,7 @@ public final class DeletedArea3DPtg exte
 	}
 	public String toFormulaString(FormulaRenderingWorkbook book) {
 		return ExternSheetNameResolver.prependSheetName(book, field_1_index_extern_sheet, 
-				HSSFErrorConstants.getText(HSSFErrorConstants.ERROR_REF));
+				ErrorConstants.getText(ErrorConstants.ERROR_REF));
 	}
 	public String toFormulaString() {
 		throw new RuntimeException("3D references need a workbook to determine formula text");

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/DeletedRef3DPtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/DeletedRef3DPtg.java?rev=1037228&r1=1037227&r2=1037228&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/DeletedRef3DPtg.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/DeletedRef3DPtg.java Sat Nov 20
14:49:47 2010
@@ -18,7 +18,7 @@
 package org.apache.poi.hssf.record.formula;
 
 
-import org.apache.poi.hssf.usermodel.HSSFErrorConstants;
+import org.apache.poi.ss.usermodel.ErrorConstants;
 import org.apache.poi.ss.formula.FormulaRenderingWorkbook;
 import org.apache.poi.ss.formula.WorkbookDependentFormula;
 import org.apache.poi.util.LittleEndianInput;
@@ -49,7 +49,7 @@ public final class DeletedRef3DPtg exten
 
 	public String toFormulaString(FormulaRenderingWorkbook book) {
 		return ExternSheetNameResolver.prependSheetName(book, field_1_index_extern_sheet, 
-				HSSFErrorConstants.getText(HSSFErrorConstants.ERROR_REF));
+				ErrorConstants.getText(ErrorConstants.ERROR_REF));
 	}
 	public String toFormulaString() {
 		throw new RuntimeException("3D references need a workbook to determine formula text");

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/ErrPtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/ErrPtg.java?rev=1037228&r1=1037227&r2=1037228&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/ErrPtg.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/ErrPtg.java Sat Nov 20 14:49:47
2010
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFErrorConstants;
+import org.apache.poi.ss.usermodel.ErrorConstants;
 import org.apache.poi.util.LittleEndianInput;
 import org.apache.poi.util.LittleEndianOutput;
 
@@ -27,7 +27,7 @@ import org.apache.poi.util.LittleEndianO
 public final class ErrPtg extends ScalarConstantPtg {
 
     // convenient access to namespace
-    private static final HSSFErrorConstants EC = null;
+    private static final ErrorConstants EC = null;
 
     /** <b>#NULL!</b>  - Intersection of two cell ranges is empty */
     public static final ErrPtg NULL_INTERSECTION = new ErrPtg(EC.ERROR_NULL);
@@ -52,7 +52,7 @@ public final class ErrPtg extends Scalar
     /** Creates new ErrPtg */
 
     private ErrPtg(int errorCode) {
-        if(!HSSFErrorConstants.isValidCode(errorCode)) {
+        if(!ErrorConstants.isValidCode(errorCode)) {
             throw new IllegalArgumentException("Invalid error code (" + errorCode + ")");
         }
         field_1_error_code = errorCode;
@@ -68,7 +68,7 @@ public final class ErrPtg extends Scalar
     }
 
     public String toFormulaString() {
-        return HSSFErrorConstants.getText(field_1_error_code);
+        return ErrorConstants.getText(field_1_error_code);
     }
 
     public int getSize() {
@@ -81,13 +81,13 @@ public final class ErrPtg extends Scalar
 
     public static ErrPtg valueOf(int code) {
         switch(code) {
-            case HSSFErrorConstants.ERROR_DIV_0: return DIV_ZERO;
-            case HSSFErrorConstants.ERROR_NA: return N_A;
-            case HSSFErrorConstants.ERROR_NAME: return NAME_INVALID;
-            case HSSFErrorConstants.ERROR_NULL: return NULL_INTERSECTION;
-            case HSSFErrorConstants.ERROR_NUM: return NUM_ERROR;
-            case HSSFErrorConstants.ERROR_REF: return REF_INVALID;
-            case HSSFErrorConstants.ERROR_VALUE: return VALUE_INVALID;
+            case ErrorConstants.ERROR_DIV_0: return DIV_ZERO;
+            case ErrorConstants.ERROR_NA: return N_A;
+            case ErrorConstants.ERROR_NAME: return NAME_INVALID;
+            case ErrorConstants.ERROR_NULL: return NULL_INTERSECTION;
+            case ErrorConstants.ERROR_NUM: return NUM_ERROR;
+            case ErrorConstants.ERROR_REF: return REF_INVALID;
+            case ErrorConstants.ERROR_VALUE: return VALUE_INVALID;
         }
         throw new RuntimeException("Unexpected error code (" + code + ")");
     }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/RefErrorPtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/RefErrorPtg.java?rev=1037228&r1=1037227&r2=1037228&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/RefErrorPtg.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/RefErrorPtg.java Sat Nov 20 14:49:47
2010
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFErrorConstants;
+import org.apache.poi.ss.usermodel.ErrorConstants;
 import org.apache.poi.util.LittleEndianInput;
 import org.apache.poi.util.LittleEndianOutput;
 
@@ -53,7 +53,7 @@ public final class RefErrorPtg extends O
     }
 
     public String toFormulaString() {
-        return HSSFErrorConstants.getText(HSSFErrorConstants.ERROR_REF);
+        return ErrorConstants.getText(ErrorConstants.ERROR_REF);
     }
     
     public byte getDefaultOperandClass() {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/atp/YearFracCalculator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/atp/YearFracCalculator.java?rev=1037228&r1=1037227&r2=1037228&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/atp/YearFracCalculator.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/atp/YearFracCalculator.java Sat
Nov 20 14:49:47 2010
@@ -23,7 +23,7 @@ import java.util.TimeZone;
 
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
 import org.apache.poi.hssf.record.formula.eval.EvaluationException;
-import org.apache.poi.hssf.usermodel.HSSFDateUtil;
+import org.apache.poi.ss.usermodel.DateUtil;
 
 
 /**
@@ -317,7 +317,7 @@ final class YearFracCalculator {
 
 	private static SimpleDate createDate(int dayCount) {
 		GregorianCalendar calendar = new GregorianCalendar(UTC_TIME_ZONE);
-		HSSFDateUtil.setCalendar(calendar, dayCount, 0, false);
+		DateUtil.setCalendar(calendar, dayCount, 0, false);
 		return new SimpleDate(calendar);
 	}
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/ErrorEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/ErrorEval.java?rev=1037228&r1=1037227&r2=1037228&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/ErrorEval.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/ErrorEval.java Sat Nov 20 14:49:47
2010
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula.eval;
 
-import org.apache.poi.hssf.usermodel.HSSFErrorConstants;
+import org.apache.poi.ss.usermodel.ErrorConstants;
 
 /**
  * @author Amol S. Deshmukh &lt; amolweb at ya hoo dot com &gt;
@@ -26,7 +26,7 @@ import org.apache.poi.hssf.usermodel.HSS
 public final class ErrorEval implements ValueEval {
 
     // convenient access to namespace
-    private static final HSSFErrorConstants EC = null;
+    private static final ErrorConstants EC = null;
 
     /** <b>#NULL!</b>  - Intersection of two cell ranges is empty */
     public static final ErrorEval NULL_INTERSECTION = new ErrorEval(EC.ERROR_NULL);
@@ -58,13 +58,13 @@ public final class ErrorEval implements 
      */
     public static ErrorEval valueOf(int errorCode) {
         switch(errorCode) {
-            case HSSFErrorConstants.ERROR_NULL:  return NULL_INTERSECTION;
-            case HSSFErrorConstants.ERROR_DIV_0: return DIV_ZERO;
-            case HSSFErrorConstants.ERROR_VALUE: return VALUE_INVALID;
-            case HSSFErrorConstants.ERROR_REF:   return REF_INVALID;
-            case HSSFErrorConstants.ERROR_NAME:  return NAME_INVALID;
-            case HSSFErrorConstants.ERROR_NUM:   return NUM_ERROR;
-            case HSSFErrorConstants.ERROR_NA:    return NA;
+            case ErrorConstants.ERROR_NULL:  return NULL_INTERSECTION;
+            case ErrorConstants.ERROR_DIV_0: return DIV_ZERO;
+            case ErrorConstants.ERROR_VALUE: return VALUE_INVALID;
+            case ErrorConstants.ERROR_REF:   return REF_INVALID;
+            case ErrorConstants.ERROR_NAME:  return NAME_INVALID;
+            case ErrorConstants.ERROR_NUM:   return NUM_ERROR;
+            case ErrorConstants.ERROR_NA:    return NA;
             // non-std errors (conditions modeled as errors by POI)
             case CIRCULAR_REF_ERROR_CODE:        return CIRCULAR_REF_ERROR;
         }
@@ -77,8 +77,8 @@ public final class ErrorEval implements 
      * @return the String representation of the specified Excel error code.
      */
     public static String getText(int errorCode) {
-        if(HSSFErrorConstants.isValidCode(errorCode)) {
-            return HSSFErrorConstants.getText(errorCode);
+        if(ErrorConstants.isValidCode(errorCode)) {
+            return ErrorConstants.getText(errorCode);
         }
         // It is desirable to make these (arbitrary) strings look clearly different from
any other
         // value expression that might appear in a formula.  In addition these error strings
should

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/OperandResolver.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/OperandResolver.java?rev=1037228&r1=1037227&r2=1037228&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/OperandResolver.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/OperandResolver.java Sat Nov
20 14:49:47 2010
@@ -149,7 +149,7 @@ public final class OperandResolver {
 		cells this method could not detect it.
 
 		Logic to detect evaluation cycles of all kinds has been coded in EvaluationCycleDetector
-		(and HSSFFormulaEvaluator).
+		(and FormulaEvaluator).
 		 */
 		}
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/RefEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/RefEval.java?rev=1037228&r1=1037227&r2=1037228&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/RefEval.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/eval/RefEval.java Sat Nov 20 14:49:47
2010
@@ -23,7 +23,7 @@ package org.apache.poi.hssf.record.formu
  * RefEval is the super interface for Ref2D and Ref3DEval. Basically a RefEval
  * impl should contain reference to the original ReferencePtg or Ref3DPtg as
  * well as the final "value" resulting from the evaluation of the cell
- * reference. Thus if the HSSFCell has type CELL_TYPE_NUMERIC, the contained
+ * reference. Thus if the Cell has type CELL_TYPE_NUMERIC, the contained
  * value object should be of type NumberEval; if cell type is CELL_TYPE_STRING,
  * contained value object should be of type StringEval
  */

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=1037228&r1=1037227&r2=1037228&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
Sat Nov 20 14:49:47 2010
@@ -26,7 +26,7 @@ import org.apache.poi.hssf.record.formul
 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.HSSFDateUtil;
+import org.apache.poi.ss.usermodel.DateUtil;
 
 /**
  * Implementation of Excel functions DAY, MONTH and YEAR
@@ -73,7 +73,7 @@ public final class CalendarFieldFunction
 			}
 			throw new IllegalStateException("bad date field " + _dateFieldId);
 		}
-		Date d = HSSFDateUtil.getJavaDate(serialDay, false); // TODO fix 1900/1904 problem
+		Date d = DateUtil.getJavaDate(serialDay, false); // TODO fix 1900/1904 problem
 
 		Calendar c = new GregorianCalendar();
 		c.setTime(d);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/DateFunc.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/DateFunc.java?rev=1037228&r1=1037227&r2=1037228&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/DateFunc.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/DateFunc.java Sat Nov
20 14:49:47 2010
@@ -24,7 +24,7 @@ import org.apache.poi.hssf.record.formul
 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.ValueEval;
-import org.apache.poi.hssf.usermodel.HSSFDateUtil;
+import org.apache.poi.ss.usermodel.DateUtil;
 
 
 /**
@@ -77,7 +77,7 @@ public final class DateFunc extends Fixe
 		c.set(year, month, day, 0, 0, 0);
 		c.set(Calendar.MILLISECOND, 0);
 
-		return HSSFDateUtil.getExcelDate(c.getTime(), false); // TODO - fix 1900/1904 problem
+		return DateUtil.getExcelDate(c.getTime(), false); // TODO - fix 1900/1904 problem
 	}
 
 	private static int getYear(double d) {

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=1037228&r1=1037227&r2=1037228&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 Sat Nov
20 14:49:47 2010
@@ -22,7 +22,7 @@ import org.apache.poi.hssf.record.formul
 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;
+import org.apache.poi.ss.usermodel.ErrorConstants;
 
 /**
  * Implementation for the ERROR.TYPE() Excel function.
@@ -45,7 +45,7 @@ import org.apache.poi.hssf.usermodel.HSS
  *    </table>
  *
  * Note - the results of ERROR.TYPE() are different to the constants defined in
- * <tt>HSSFErrorConstants</tt>.
+ * <tt>ErrorConstants</tt>.
  * </p>
  *
  * @author Josh Micich
@@ -65,13 +65,13 @@ public final class Errortype extends Fix
 
 	private int translateErrorCodeToErrorTypeValue(int errorCode) {
 		switch (errorCode) {
-			case HSSFErrorConstants.ERROR_NULL:  return 1;
-			case HSSFErrorConstants.ERROR_DIV_0: return 2;
-			case HSSFErrorConstants.ERROR_VALUE: return 3;
-			case HSSFErrorConstants.ERROR_REF:   return 4;
-			case HSSFErrorConstants.ERROR_NAME:  return 5;
-			case HSSFErrorConstants.ERROR_NUM:   return 6;
-			case HSSFErrorConstants.ERROR_NA :   return 7;
+			case ErrorConstants.ERROR_NULL:  return 1;
+			case ErrorConstants.ERROR_DIV_0: return 2;
+			case ErrorConstants.ERROR_VALUE: return 3;
+			case ErrorConstants.ERROR_REF:   return 4;
+			case ErrorConstants.ERROR_NAME:  return 5;
+			case ErrorConstants.ERROR_NUM:   return 6;
+			case ErrorConstants.ERROR_NA :   return 7;
 		}
 		throw new IllegalArgumentException("Invalid error code (" + errorCode + ")");
 	}

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=1037228&r1=1037227&r2=1037228&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 Sat Nov 20 14:49:47
2010
@@ -21,7 +21,7 @@ import java.util.Date;
 
 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;
+import org.apache.poi.ss.usermodel.DateUtil;
 
 /**
  * Implementation of Excel NOW() Function
@@ -32,6 +32,6 @@ public final class Now extends Fixed0Arg
 
 	public ValueEval evaluate(int srcRowIndex, int srcColumnIndex) {
 		Date now = new Date(System.currentTimeMillis());
-		return new NumberEval(HSSFDateUtil.getExcelDate(now));
+		return new NumberEval(DateUtil.getExcelDate(now));
 	}
 }

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=1037228&r1=1037227&r2=1037228&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 Sat Nov 20
14:49:47 2010
@@ -22,7 +22,7 @@ import java.util.GregorianCalendar;
 
 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;
+import org.apache.poi.ss.usermodel.DateUtil;
 
 /**
  * Implementation of Excel TODAY() Function<br/>
@@ -36,6 +36,6 @@ public final class Today extends Fixed0A
 		Calendar now = new GregorianCalendar();
 		now.set(now.get(Calendar.YEAR), now.get(Calendar.MONTH), now.get(Calendar.DATE),0,0,0);
 		now.set(Calendar.MILLISECOND, 0);
-		return new NumberEval(HSSFDateUtil.getExcelDate(now.getTime()));
+		return new NumberEval(DateUtil.getExcelDate(now.getTime()));
 	}
 }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/atp/TestRandBetween.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/atp/TestRandBetween.java?rev=1037228&r1=1037227&r2=1037228&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/atp/TestRandBetween.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/atp/TestRandBetween.java Sat
Nov 20 14:49:47 2010
@@ -20,7 +20,6 @@ import junit.framework.TestCase;
 
 import org.apache.poi.hssf.HSSFTestDataSamples;
 import org.apache.poi.hssf.record.formula.eval.ErrorEval;
-import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.FormulaEvaluator;
 import org.apache.poi.ss.usermodel.Row;
@@ -50,7 +49,7 @@ public class TestRandBetween extends Tes
 		Row row = sheet.createRow(0);
 		bottomValueCell = row.createCell(0);
 		topValueCell = row.createCell(1);
-		formulaCell = row.createCell(2, HSSFCell.CELL_TYPE_FORMULA);
+		formulaCell = row.createCell(2, Cell.CELL_TYPE_FORMULA);
 	}
 	
 	@Override

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/atp/TestYearFracCalculator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/atp/TestYearFracCalculator.java?rev=1037228&r1=1037227&r2=1037228&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/atp/TestYearFracCalculator.java
(original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/atp/TestYearFracCalculator.java
Sat Nov 20 14:49:47 2010
@@ -23,7 +23,7 @@ import java.util.GregorianCalendar;
 import junit.framework.TestCase;
 
 import org.apache.poi.hssf.record.formula.eval.EvaluationException;
-import org.apache.poi.hssf.usermodel.HSSFDateUtil;
+import org.apache.poi.ss.usermodel.DateUtil;
 
 /**
  * Specific test cases for YearFracCalculator
@@ -62,6 +62,6 @@ public final class TestYearFracCalculato
 		
 		c.set(year, month-1, day, 0, 0, 0);
 		c.set(Calendar.MILLISECOND, 0);
-		return HSSFDateUtil.getExcelDate(c.getTime());
+		return DateUtil.getExcelDate(c.getTime());
 	}
 }



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


Mime
View raw message