poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r648454 - in /poi/branches/ooxml/src: java/org/apache/poi/hssf/model/ java/org/apache/poi/hssf/record/formula/ java/org/apache/poi/hssf/usermodel/ java/org/apache/poi/hssf/util/ java/org/apache/poi/ss/usermodel/ java/org/apache/poi/ss/util/...
Date Tue, 15 Apr 2008 23:18:31 GMT
Author: nick
Date: Tue Apr 15 16:18:25 2008
New Revision: 648454

URL: http://svn.apache.org/viewvc?rev=648454&view=rev
Log:
In the ooxml branch, convert the formula stuff from using hssf.HSSFWorkbook to ss.Workbook, so that everything now works for XSSF too

Added:
    poi/branches/ooxml/src/java/org/apache/poi/ss/util/SheetReferences.java   (with props)
Modified:
    poi/branches/ooxml/src/java/org/apache/poi/hssf/model/FormulaParser.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AbstractFunctionPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AddPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Area3DPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaAPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaErrPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNAPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNVPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaVPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtgA.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtgV.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AttrPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/BoolPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ConcatPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/DividePtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/EqualPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ErrPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ExpPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/GreaterEqualPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/GreaterThanPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/IntPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/IntersectionPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/LessEqualPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/LessThanPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemAreaPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemErrPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemFuncPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MissingArgPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MultiplyPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NamePtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NameXPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NotEqualPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NumberPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ParenthesisPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/PercentPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/PowerPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Ptg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RangePtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Ref3DPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefErrorPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNAPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNVPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ReferencePtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/StringPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/SubtractPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnaryMinusPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnaryPlusPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnionPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnknownPtg.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/usermodel/HSSFName.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
    poi/branches/ooxml/src/java/org/apache/poi/hssf/util/SheetReferences.java
    poi/branches/ooxml/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java
    poi/branches/ooxml/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Workbook.java
    poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/model/FormulaParser.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/model/FormulaParser.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/model/FormulaParser.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/model/FormulaParser.java Tue Apr 15 16:18:25 2008
@@ -27,7 +27,7 @@
 import org.apache.poi.hssf.record.formula.*;
 import org.apache.poi.hssf.record.formula.function.FunctionMetadata;
 import org.apache.poi.hssf.record.formula.function.FunctionMetadataRegistry;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 
 /**
  * This class parses a formula string into a List of tokens in RPN order.
@@ -87,7 +87,7 @@
      */
     private char look;
 
-    private HSSFWorkbook book;
+    private Workbook book;
 
 
     /**
@@ -102,14 +102,14 @@
      *  model.Workbook, then use the convenience method on
      *  usermodel.HSSFFormulaEvaluator
      */
-    public FormulaParser(String formula, HSSFWorkbook book){
+    public FormulaParser(String formula, Workbook book){
         formulaString = formula;
         pointer=0;
         this.book = book;
         formulaLength = formulaString.length();
     }
 
-    public static Ptg[] parse(String formula, HSSFWorkbook book) {
+    public static Ptg[] parse(String formula, Workbook book) {
         FormulaParser fp = new FormulaParser(formula, book);
         fp.parse();
         return fp.getRPNPtg();
@@ -252,7 +252,7 @@
             Match('!');
             String sheetName = name;
             String first = GetName();
-            short externIdx = book.getExternalSheetIndex(book.getSheetIndex(sheetName));
+            short externIdx = (short)book.getExternalSheetIndex(book.getSheetIndex(sheetName));
             if (look == ':') {
                 Match(':');
                 String second=GetName();
@@ -927,7 +927,7 @@
      * @param lptgs  list of Ptg, can be null or empty
      * @return a human readable String
      */
-    public static String toFormulaString(HSSFWorkbook book, List lptgs) {
+    public static String toFormulaString(Workbook book, List lptgs) {
         String retval = null;
         if (lptgs == null || lptgs.size() == 0) return "#NAME";
         Ptg[] ptgs = new Ptg[lptgs.size()];
@@ -953,7 +953,7 @@
      * @param ptgs  array of Ptg, can be null or empty
      * @return a human readable String
      */
-    public static String toFormulaString(HSSFWorkbook book, Ptg[] ptgs) {
+    public static String toFormulaString(Workbook book, Ptg[] ptgs) {
         if (ptgs == null || ptgs.length == 0) {
             // TODO - what is the justification for returning "#NAME" (which is not "#NAME?", btw)
             return "#NAME";

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AbstractFunctionPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AbstractFunctionPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AbstractFunctionPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AbstractFunctionPtg.java Tue Apr 15 16:18:25 2008
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.formula.function.FunctionMetadata;
 import org.apache.poi.hssf.record.formula.function.FunctionMetadataRegistry;
 
@@ -73,7 +73,7 @@
         return field_2_fnc_index == FUNCTION_INDEX_EXTERNAL;
     }
 
-    public String toFormulaString(HSSFWorkbook book) {
+    public String toFormulaString(Workbook book) {
         return getName();
     }
 

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AddPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AddPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AddPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AddPtg.java Tue Apr 15 16:18:25 2008
@@ -23,7 +23,7 @@
  */
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -75,7 +75,7 @@
     }
     
     /** Implementation of method from Ptg */
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "+";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Area3DPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Area3DPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Area3DPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Area3DPtg.java Tue Apr 15 16:18:25 2008
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.util.AreaReference;
 import org.apache.poi.hssf.util.CellReference;
@@ -273,7 +273,7 @@
 	 * @return text representation of this area reference that can be used in text
 	 *  formulas. The sheet name will get properly delimited if required.
 	 */
-	public String toFormulaString(HSSFWorkbook book)
+	public String toFormulaString(Workbook book)
 	{
 		// First do the sheet name
 		StringBuffer retval = new StringBuffer();

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaAPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaAPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaAPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaAPtg.java Tue Apr 15 16:18:25 2008
@@ -29,7 +29,7 @@
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.util.AreaReference;
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 
 /**
  * Specifies a rectangular area of cells A1:A4 for instance.

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaErrPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaErrPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaErrPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaErrPtg.java Tue Apr 15 16:18:25 2008
@@ -20,7 +20,7 @@
 import org.apache.poi.util.LittleEndian;
 import org.apache.poi.util.BitField;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -66,7 +66,7 @@
         array[offset] = (byte) (sid + ptgClass);
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "#REF!";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNAPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNAPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNAPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNAPtg.java Tue Apr 15 16:18:25 2008
@@ -29,7 +29,7 @@
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.util.AreaReference;
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 
 /**
  * Specifies a rectangular area of cells A1:A4 for instance.
@@ -58,7 +58,7 @@
       return "AreaNAPtg";
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
       throw new RuntimeException("Coding Error: This method should never be called. This ptg should be converted");
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNPtg.java Tue Apr 15 16:18:25 2008
@@ -29,7 +29,7 @@
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.util.AreaReference;
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 
 /**
  * Specifies a rectangular area of cells A1:A4 for instance.
@@ -61,7 +61,7 @@
     return "AreaNPtg";
   }
 
-  public String toFormulaString(HSSFWorkbook book)
+  public String toFormulaString(Workbook book)
   {
     throw new RuntimeException("Coding Error: This method should never be called. This ptg should be converted");
   }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNVPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNVPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNVPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaNVPtg.java Tue Apr 15 16:18:25 2008
@@ -29,7 +29,7 @@
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.util.AreaReference;
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 
 /**
  * Specifies a rectangular area of cells A1:A4 for instance.
@@ -59,7 +59,7 @@
     return "AreaNVPtg";
   }
 
-  public String toFormulaString(HSSFWorkbook book)
+  public String toFormulaString(Workbook book)
   {
     throw new RuntimeException("Coding Error: This method should never be called. This ptg should be converted");
   }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaPtg.java Tue Apr 15 16:18:25 2008
@@ -24,7 +24,7 @@
 
 import org.apache.poi.hssf.util.AreaReference;
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -303,11 +303,11 @@
         field_4_last_column = column;
     }
     
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
     	return toFormulaString(this, book);
     }
-    protected static String toFormulaString(AreaI area, HSSFWorkbook book) {
+    protected static String toFormulaString(AreaI area, Workbook book) {
     	CellReference topLeft = new CellReference(area.getFirstRow(),area.getFirstColumn(),!area.isFirstRowRelative(),!area.isFirstColRelative());
     	CellReference botRight = new CellReference(area.getLastRow(),area.getLastColumn(),!area.isLastRowRelative(),!area.isLastColRelative());
     	

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaVPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaVPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaVPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AreaVPtg.java Tue Apr 15 16:18:25 2008
@@ -29,7 +29,7 @@
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.util.AreaReference;
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 
 /**
  * Specifies a rectangular area of cells A1:A4 for instance.

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtg.java Tue Apr 15 16:18:25 2008
@@ -23,7 +23,7 @@
 import org.apache.poi.util.StringUtil;
 
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordFormatException;
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.record.SSTRecord;
@@ -198,7 +198,7 @@
         return size;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
     	StringBuffer b = new StringBuffer();
     	b.append("{");

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtgA.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtgA.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtgA.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtgA.java Tue Apr 15 16:18:25 2008
@@ -23,7 +23,7 @@
 import org.apache.poi.util.StringUtil;
 
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordFormatException;
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.record.SSTRecord;

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtgV.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtgV.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtgV.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ArrayPtgV.java Tue Apr 15 16:18:25 2008
@@ -23,7 +23,7 @@
 import org.apache.poi.util.StringUtil;
 
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordFormatException;
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.record.SSTRecord;

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AttrPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AttrPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AttrPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/AttrPtg.java Tue Apr 15 16:18:25 2008
@@ -18,7 +18,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 import org.apache.poi.util.LittleEndian;
@@ -209,11 +209,11 @@
         if(space.isSet(field_1_options)) {
             return operands[ 0 ];
         } else if (optiIf.isSet(field_1_options)) {
-            return toFormulaString((HSSFWorkbook)null) + "(" + operands[ 0 ]             +")";
+            return toFormulaString((Workbook)null) + "(" + operands[ 0 ]             +")";
         } else if (optGoto.isSet(field_1_options)) {
-            return toFormulaString((HSSFWorkbook)null) + operands[0];   //goto isn't a real formula element should not show up
+            return toFormulaString((Workbook)null) + operands[0];   //goto isn't a real formula element should not show up
         } else {
-            return toFormulaString((HSSFWorkbook)null) + "(" + operands[ 0 ] + ")";
+            return toFormulaString((Workbook)null) + "(" + operands[ 0 ] + ")";
         }
     }
   
@@ -228,7 +228,7 @@
         return -1;
     }
         
-   public String toFormulaString(HSSFWorkbook book) {
+   public String toFormulaString(Workbook book) {
       if(semiVolatile.isSet(field_1_options)) {
         return "ATTR(semiVolatile)";
       }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/BoolPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/BoolPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/BoolPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/BoolPtg.java Tue Apr 15 16:18:25 2008
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -70,7 +70,7 @@
         return SIZE;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return field_1_value ? "TRUE" : "FALSE";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ConcatPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ConcatPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ConcatPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ConcatPtg.java Tue Apr 15 16:18:25 2008
@@ -18,7 +18,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -64,7 +64,7 @@
         return 2;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return CONCAT;
     }    

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/DividePtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/DividePtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/DividePtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/DividePtg.java Tue Apr 15 16:18:25 2008
@@ -18,7 +18,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -65,7 +65,7 @@
         return 2;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "/";
     }
@@ -74,7 +74,7 @@
         StringBuffer buffer = new StringBuffer();
 
         buffer.append(operands[ 0 ]);
-        buffer.append(toFormulaString((HSSFWorkbook)null));
+        buffer.append(toFormulaString((Workbook)null));
         buffer.append(operands[ 1 ]);
         return buffer.toString();
     }      

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/EqualPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/EqualPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/EqualPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/EqualPtg.java Tue Apr 15 16:18:25 2008
@@ -18,7 +18,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -64,7 +64,7 @@
         return 2;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "=";
     }
@@ -74,7 +74,7 @@
 
         
         buffer.append(operands[ 0 ]);
-        buffer.append(toFormulaString((HSSFWorkbook)null));
+        buffer.append(toFormulaString((Workbook)null));
         buffer.append(operands[ 1 ]);
         return buffer.toString();
     }       

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ErrPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ErrPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ErrPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ErrPtg.java Tue Apr 15 16:18:25 2008
@@ -19,7 +19,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.usermodel.HSSFErrorConstants;
 
@@ -70,7 +70,7 @@
         array[offset + 1] = (byte)field_1_error_code;
     }
 
-    public String toFormulaString(HSSFWorkbook book) {
+    public String toFormulaString(Workbook book) {
         return HSSFErrorConstants.getText(field_1_error_code);
     }
 

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ExpPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ExpPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ExpPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ExpPtg.java Tue Apr 15 16:18:25 2008
@@ -18,7 +18,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordFormatException;
 import org.apache.poi.hssf.record.RecordInputStream;
 
@@ -73,7 +73,7 @@
       return field_2_first_col;
     }    
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         throw new RecordFormatException("Coding Error: Expected ExpPtg to be converted from Shared to Non-Shared Formula by ValueRecordsAggregate, but it wasn't");
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/GreaterEqualPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/GreaterEqualPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/GreaterEqualPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/GreaterEqualPtg.java Tue Apr 15 16:18:25 2008
@@ -19,7 +19,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 
@@ -67,7 +67,7 @@
         return 2;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return ">=";
     }
@@ -77,7 +77,7 @@
 
         buffer.append(operands[ 0 ]);
 
-        buffer.append(toFormulaString((HSSFWorkbook)null));
+        buffer.append(toFormulaString((Workbook)null));
         buffer.append(operands[ 1 ]);
 
         return buffer.toString();

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/GreaterThanPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/GreaterThanPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/GreaterThanPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/GreaterThanPtg.java Tue Apr 15 16:18:25 2008
@@ -25,7 +25,7 @@
 
 import java.util.List;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -97,7 +97,7 @@
      * Implementation of method from Ptg 
      * @param book the Sheet References
      */
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return this.GREATERTHAN;
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/IntPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/IntPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/IntPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/IntPtg.java Tue Apr 15 16:18:25 2008
@@ -18,7 +18,7 @@
 package org.apache.poi.hssf.record.formula;
 
 import org.apache.poi.util.LittleEndian;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -72,7 +72,7 @@
         return SIZE;
     }
 
-    public String toFormulaString(HSSFWorkbook book) {
+    public String toFormulaString(Workbook book) {
         return String.valueOf(getValue());
     }
     public byte getDefaultOperandClass() {

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/IntersectionPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/IntersectionPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/IntersectionPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/IntersectionPtg.java Tue Apr 15 16:18:25 2008
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -59,7 +59,7 @@
     }
 
     /** Implementation of method from Ptg */
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return " ";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/LessEqualPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/LessEqualPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/LessEqualPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/LessEqualPtg.java Tue Apr 15 16:18:25 2008
@@ -20,7 +20,7 @@
 package org.apache.poi.hssf.record.formula;
 
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 
@@ -68,7 +68,7 @@
         return 2;
     }
 
-    public String toFormulaString( HSSFWorkbook book )
+    public String toFormulaString( Workbook book )
     {
         return "<=";
     }
@@ -77,7 +77,7 @@
     {
         StringBuffer buffer = new StringBuffer();
         buffer.append( operands[0] );
-        buffer.append( toFormulaString( (HSSFWorkbook) null ) );
+        buffer.append( toFormulaString( (Workbook) null ) );
         buffer.append( operands[1] );
         return buffer.toString();
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/LessThanPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/LessThanPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/LessThanPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/LessThanPtg.java Tue Apr 15 16:18:25 2008
@@ -27,7 +27,7 @@
 import java.util.List;
 
 //POI
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -106,7 +106,7 @@
      * Implementation of method from Ptg 
      * @param book the Sheet References
      */
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return this.LESSTHAN;
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemAreaPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemAreaPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemAreaPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemAreaPtg.java Tue Apr 15 16:18:25 2008
@@ -25,7 +25,7 @@
 package org.apache.poi.hssf.record.formula;
 
 import org.apache.poi.util.LittleEndian;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -83,7 +83,7 @@
         return SIZE;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return ""; // TODO: Not sure how to format this. -- DN
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemErrPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemErrPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemErrPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemErrPtg.java Tue Apr 15 16:18:25 2008
@@ -25,7 +25,7 @@
 package org.apache.poi.hssf.record.formula;
 
 import org.apache.poi.util.LittleEndian;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -57,7 +57,7 @@
         array[offset] = (byte) (sid + ptgClass);
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "ERR#";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemFuncPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemFuncPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemFuncPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MemFuncPtg.java Tue Apr 15 16:18:25 2008
@@ -24,7 +24,7 @@
 package org.apache.poi.hssf.record.formula;
 
 import org.apache.poi.util.LittleEndian;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -60,7 +60,7 @@
         LittleEndian.putShort( array, offset + 1, (short)field_1_len_ref_subexpression );
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MissingArgPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MissingArgPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MissingArgPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MissingArgPtg.java Tue Apr 15 16:18:25 2008
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -55,7 +55,7 @@
     }
 
    
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return " ";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MultiplyPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MultiplyPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MultiplyPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/MultiplyPtg.java Tue Apr 15 16:18:25 2008
@@ -16,7 +16,7 @@
 ==================================================================== */
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -68,7 +68,7 @@
     }
     
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "*";
     }
@@ -77,9 +77,9 @@
     {
         StringBuffer buffer = new StringBuffer();
 
-        buffer.append(operands[ 0 ].toFormulaString((HSSFWorkbook)null));
+        buffer.append(operands[ 0 ].toFormulaString((Workbook)null));
         buffer.append("*");
-        buffer.append(operands[ 1 ].toFormulaString((HSSFWorkbook)null));
+        buffer.append(operands[ 1 ].toFormulaString((Workbook)null));
         return buffer.toString();
     }
     
@@ -87,7 +87,7 @@
         StringBuffer buffer = new StringBuffer();
 
         buffer.append(operands[ 0 ]);
-        buffer.append(toFormulaString((HSSFWorkbook)null));
+        buffer.append(toFormulaString((Workbook)null));
         buffer.append(operands[ 1 ]);
         return buffer.toString();
     }                  

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NamePtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NamePtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NamePtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NamePtg.java Tue Apr 15 16:18:25 2008
@@ -17,11 +17,10 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.util.LittleEndian;
-import org.apache.poi.hssf.usermodel.HSSFName;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
-import org.apache.poi.hssf.record.NameRecord;
 import org.apache.poi.hssf.record.RecordInputStream;
+import org.apache.poi.ss.usermodel.Name;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.util.LittleEndian;
 
 /**
  *
@@ -49,13 +48,13 @@
      * in the workbook.  The search for the name record is case insensitive.  If it is not found, 
      * it gets created.
      */
-    public NamePtg(String name, HSSFWorkbook book) {
+    public NamePtg(String name, Workbook book) {
         field_1_label_index = (short)(1+getOrCreateNameRecord(book, name)); // convert to 1-based
     }
     /**
      * @return zero based index of the found or newly created defined name record. 
      */
-    private static final int getOrCreateNameRecord(HSSFWorkbook book, String name) {
+    private static final int getOrCreateNameRecord(Workbook book, String name) {
         // perhaps this logic belongs in Workbook?
         int countNames = book.getNumberOfNames();
         for (int i = 0; i < countNames; i++) {
@@ -64,7 +63,7 @@
             }
         }
         
-        HSSFName nameObj = book.createName();
+        Name nameObj = book.createName();
         nameObj.setNameName(name);
         
         return countNames;
@@ -99,7 +98,7 @@
         return SIZE;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
     	return book.getNameName(field_1_label_index - 1);
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NameXPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NameXPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NameXPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NameXPtg.java Tue Apr 15 16:18:25 2008
@@ -18,7 +18,7 @@
 package org.apache.poi.hssf.record.formula;
 
 import org.apache.poi.util.LittleEndian;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -61,7 +61,7 @@
         return SIZE;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         // -1 to convert definedNameIndex from 1-based to zero-based
         return book.resolveNameXText(field_1_ixals, field_2_ilbl-1); 

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NotEqualPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NotEqualPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NotEqualPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NotEqualPtg.java Tue Apr 15 16:18:25 2008
@@ -18,7 +18,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -64,7 +64,7 @@
         return 2;
     }
 
-    public String toFormulaString( HSSFWorkbook book )
+    public String toFormulaString( Workbook book )
     {
         return "<>";
     }
@@ -75,7 +75,7 @@
 
         buffer.append( operands[0] );
 
-        buffer.append( toFormulaString( (HSSFWorkbook) null ) );
+        buffer.append( toFormulaString( (Workbook) null ) );
         buffer.append( operands[1] );
 
         return buffer.toString();

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NumberPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NumberPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NumberPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/NumberPtg.java Tue Apr 15 16:18:25 2008
@@ -18,7 +18,7 @@
 package org.apache.poi.hssf.record.formula;
 
 import org.apache.poi.util.LittleEndian;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -78,7 +78,7 @@
         return SIZE;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "" + getValue();
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ParenthesisPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ParenthesisPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ParenthesisPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ParenthesisPtg.java Tue Apr 15 16:18:25 2008
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -71,7 +71,7 @@
         return 1;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "()";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/PercentPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/PercentPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/PercentPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/PercentPtg.java Tue Apr 15 16:18:25 2008
@@ -23,7 +23,7 @@
  */
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -74,7 +74,7 @@
     }
     
     /** Implementation of method from Ptg */
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "%";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/PowerPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/PowerPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/PowerPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/PowerPtg.java Tue Apr 15 16:18:25 2008
@@ -19,7 +19,7 @@
 
 import java.util.List;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -66,7 +66,7 @@
         return 2;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "^";
     }
@@ -76,7 +76,7 @@
 
         
         buffer.append(operands[ 0 ]);
-        buffer.append(toFormulaString((HSSFWorkbook)null));
+        buffer.append(toFormulaString((Workbook)null));
         buffer.append(operands[ 1 ]);
         return buffer.toString();
     }       

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Ptg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Ptg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Ptg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Ptg.java Tue Apr 15 16:18:25 2008
@@ -21,7 +21,7 @@
 import java.util.ArrayList;
 import java.util.Stack;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -418,7 +418,7 @@
     /**
      * return a string representation of this token alone
      */
-    public abstract String toFormulaString(HSSFWorkbook book);
+    public abstract String toFormulaString(Workbook book);
     /**
      * dump a debug representation (hexdump) to a string
      */

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RangePtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RangePtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RangePtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RangePtg.java Tue Apr 15 16:18:25 2008
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -59,7 +59,7 @@
     }
 
     /** Implementation of method from Ptg */
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return ":";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Ref3DPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Ref3DPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Ref3DPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/Ref3DPtg.java Tue Apr 15 16:18:25 2008
@@ -18,11 +18,11 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
-import org.apache.poi.hssf.util.CellReference;
 import org.apache.poi.hssf.util.RangeAddress;
-import org.apache.poi.hssf.util.SheetReferences;
+import org.apache.poi.ss.util.CellReference;
+import org.apache.poi.ss.util.SheetReferences;
 import org.apache.poi.util.BitField;
 import org.apache.poi.util.BitFieldFactory;
 import org.apache.poi.util.LittleEndian;
@@ -162,8 +162,8 @@
     }
 
     // TODO - find a home for this method
-    // There is already a method on HSSFWorkbook called getSheetName but it seems to do something different.
-	static String getSheetName(HSSFWorkbook book, int externSheetIndex) {
+    // There is already a method on Workbook called getSheetName but it seems to do something different.
+	static String getSheetName(Workbook book, int externSheetIndex) {
         // TODO - there are 3 ways this method can return null. Is each valid?
         if (book == null) {
             return null;
@@ -179,7 +179,7 @@
      * @return text representation of this cell reference that can be used in text 
      * formulas. The sheet name will get properly delimited if required.
      */
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         StringBuffer retval = new StringBuffer();
         String sheetName = getSheetName(book, field_1_index_extern_sheet);

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefErrorPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefErrorPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefErrorPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefErrorPtg.java Tue Apr 15 16:18:25 2008
@@ -21,7 +21,7 @@
 import org.apache.poi.util.BitField;
 
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -74,7 +74,7 @@
         return SIZE;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         //TODO -- should we store a cellreference instance in this ptg?? but .. memory is an issue, i believe!
         return "#REF!";

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNAPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNAPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNAPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNAPtg.java Tue Apr 15 16:18:25 2008
@@ -28,7 +28,7 @@
 
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 
 /**
  * RefNAPtg
@@ -57,7 +57,7 @@
       return "RefNAPtg";
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
       throw new RuntimeException("Coding Error: This method should never be called. This ptg should be converted");
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNPtg.java Tue Apr 15 16:18:25 2008
@@ -27,7 +27,7 @@
 
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 
 /**
  * RefNPtg
@@ -58,7 +58,7 @@
       return "RefNPtg";
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
       throw new RuntimeException("Coding Error: This method should never be called. This ptg should be converted");
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNVPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNVPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNVPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/RefNVPtg.java Tue Apr 15 16:18:25 2008
@@ -23,7 +23,7 @@
 
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 
 /**
  * RefNVPtg
@@ -54,7 +54,7 @@
     return "RefNVPtg";
   }
 
-  public String toFormulaString(HSSFWorkbook book)
+  public String toFormulaString(Workbook book)
   {
     throw new RuntimeException("Coding Error: This method should never be called. This ptg should be converted");
   }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ReferencePtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ReferencePtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ReferencePtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/ReferencePtg.java Tue Apr 15 16:18:25 2008
@@ -22,7 +22,7 @@
 import org.apache.poi.util.BitFieldFactory;
 
 import org.apache.poi.hssf.util.CellReference;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -176,7 +176,7 @@
         return SIZE;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         //TODO -- should we store a cellreference instance in this ptg?? but .. memory is an issue, i believe!
         return (new CellReference(getRowAsInt(),getColumn(),!isRowRelative(),!isColRelative())).formatAsString();

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/StringPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/StringPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/StringPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/StringPtg.java Tue Apr 15 16:18:25 2008
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.util.BitField;
 import org.apache.poi.util.BitFieldFactory;
 import org.apache.poi.util.StringUtil;
@@ -109,7 +109,7 @@
         }
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "\""+getValue()+"\"";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/SubtractPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/SubtractPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/SubtractPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/SubtractPtg.java Tue Apr 15 16:18:25 2008
@@ -18,7 +18,7 @@
 package org.apache.poi.hssf.record.formula;
 
 import java.util.List;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -63,7 +63,7 @@
         return 2;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "-";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnaryMinusPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnaryMinusPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnaryMinusPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnaryMinusPtg.java Tue Apr 15 16:18:25 2008
@@ -19,7 +19,7 @@
 
 import java.util.List;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -69,7 +69,7 @@
     }
     
     /** Implementation of method from Ptg */
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "+";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnaryPlusPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnaryPlusPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnaryPlusPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnaryPlusPtg.java Tue Apr 15 16:18:25 2008
@@ -19,7 +19,7 @@
 
 import java.util.List;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -69,7 +69,7 @@
     }
     
     /** Implementation of method from Ptg */
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "+";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnionPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnionPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnionPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnionPtg.java Tue Apr 15 16:18:25 2008
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -59,7 +59,7 @@
     }
 
     /** Implementation of method from Ptg */
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return ",";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnknownPtg.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnknownPtg.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnknownPtg.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/UnknownPtg.java Tue Apr 15 16:18:25 2008
@@ -16,7 +16,7 @@
 ==================================================================== */
 package org.apache.poi.hssf.record.formula;
 
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.hssf.record.RecordInputStream;
 
 /**
@@ -51,7 +51,7 @@
         return size;
     }
 
-    public String toFormulaString(HSSFWorkbook book)
+    public String toFormulaString(Workbook book)
     {
         return "UNKNOWN";
     }

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/usermodel/HSSFName.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/usermodel/HSSFName.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/usermodel/HSSFName.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/usermodel/HSSFName.java Tue Apr 15 16:18:25 2008
@@ -112,7 +112,8 @@
     private void setSheetName(String sheetName){
         int sheetNumber = book.getSheetIndex(sheetName);
 
-        short externSheetNumber = book.getExternalSheetIndex(sheetNumber);
+        short externSheetNumber = (short)
+        	book.getExternalSheetIndex(sheetNumber);
         name.setExternSheetNumber(externSheetNumber);
 //        name.setIndexToSheet(externSheetNumber);
 

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java Tue Apr 15 16:18:25 2008
@@ -548,7 +548,7 @@
      * Used by some of the more obscure formula and 
      *  named range things.
      */
-    public short getExternalSheetIndex(int internalSheetIndex) {
+    public int getExternalSheetIndex(int internalSheetIndex) {
     	return workbook.checkExternSheet(internalSheetIndex);
     }
 

Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/util/SheetReferences.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/util/SheetReferences.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/hssf/util/SheetReferences.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/hssf/util/SheetReferences.java Tue Apr 15 16:18:25 2008
@@ -17,9 +17,6 @@
 
 package org.apache.poi.hssf.util;
 
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * Holds a collection of Sheet names and their associated
  * reference numbers.
@@ -27,20 +24,6 @@
  * @author Andrew C. Oliver (acoliver at apache dot org)
  *
  */
-public class SheetReferences
+public class SheetReferences extends org.apache.poi.ss.util.SheetReferences
 {
-    Map map;
-    public SheetReferences()
-    {
-      map = new HashMap(5);
-    }
- 
-    public void addSheetReference(String sheetName, int number) {
-       map.put(new Integer(number), sheetName);
-    } 
-
-    public String getSheetName(int number) {
-       return (String)map.get(new Integer(number));
-    }
-
 }

Modified: poi/branches/ooxml/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java (original)
+++ poi/branches/ooxml/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java Tue Apr 15 16:18:25 2008
@@ -60,7 +60,6 @@
 import org.apache.poi.hssf.record.formula.eval.StringEval;
 import org.apache.poi.hssf.record.formula.eval.ValueEval;
 import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 
 /**
  * @author Amol S. Deshmukh &lt; amolweb at ya hoo dot com &gt;
@@ -333,16 +332,8 @@
     private static ValueEval evaluateCell(Workbook workbook, Sheet sheet, 
             int srcRowNum, short srcColNum, String cellFormulaText) {
     	
-    	FormulaParser parser;
-    	if(workbook instanceof HSSFWorkbook) {
-    		parser = HSSFFormulaEvaluator.getUnderlyingParser(
-    				(HSSFWorkbook)workbook,
-    				cellFormulaText
-    		);
-    	} else {
-    		// Hope for the best...
-    		parser = new FormulaParser(cellFormulaText, null);
-    	}
+    	FormulaParser parser =
+    		new FormulaParser(cellFormulaText, workbook);
     	
         parser.parse();
         Ptg[] ptgs = parser.getRPNPtg();

Added: poi/branches/ooxml/src/java/org/apache/poi/ss/util/SheetReferences.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/ss/util/SheetReferences.java?rev=648454&view=auto
==============================================================================
--- poi/branches/ooxml/src/java/org/apache/poi/ss/util/SheetReferences.java (added)
+++ poi/branches/ooxml/src/java/org/apache/poi/ss/util/SheetReferences.java Tue Apr 15 16:18:25 2008
@@ -0,0 +1,46 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.util;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Holds a collection of Sheet names and their associated
+ * reference numbers.
+ *
+ * @author Andrew C. Oliver (acoliver at apache dot org)
+ *
+ */
+public class SheetReferences
+{
+    Map map;
+    public SheetReferences()
+    {
+      map = new HashMap(5);
+    }
+ 
+    public void addSheetReference(String sheetName, int number) {
+       map.put(new Integer(number), sheetName);
+    } 
+
+    public String getSheetName(int number) {
+       return (String)map.get(new Integer(number));
+    }
+
+}

Propchange: poi/branches/ooxml/src/java/org/apache/poi/ss/util/SheetReferences.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: poi/branches/ooxml/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Workbook.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Workbook.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Workbook.java (original)
+++ poi/branches/ooxml/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Workbook.java Tue Apr 15 16:18:25 2008
@@ -21,6 +21,8 @@
 import java.io.OutputStream;
 import java.util.List;
 
+import org.apache.poi.ss.util.SheetReferences;
+
 public interface Workbook {
 
     /**
@@ -142,6 +144,15 @@
     int getSheetIndex(Sheet sheet);
 
     /**
+     * Returns the external sheet index of the sheet
+     *  with the given internal index, creating one
+     *  if needed.
+     * Used by some of the more obscure formula and 
+     *  named range things.
+     */
+    int getExternalSheetIndex(int internalSheetIndex);
+    
+    /**
      * create an HSSFSheet for this HSSFWorkbook, adds it to the sheets and returns
      * the high level representation.  Use this to create new sheets.
      *
@@ -206,6 +217,8 @@
 
     void removeSheetAt(int index);
 
+    SheetReferences getSheetReferences();
+    
     /**
      * determine whether the Excel GUI will backup the workbook when saving.
      *
@@ -351,6 +364,14 @@
      * @return named range name
      */
     String getNameName(int index);
+
+    /**
+     * TODO - make this less cryptic / move elsewhere
+     * @param refIndex Index to REF entry in EXTERNSHEET record in the Link Table
+     * @param definedNameIndex zero-based to DEFINEDNAME or EXTERNALNAME record
+     * @return the string representation of the defined or external name
+     */
+    String resolveNameXText(int refIndex, int definedNameIndex);
 
     /**
      * Sets the printarea for the sheet provided

Modified: poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java?rev=648454&r1=648453&r2=648454&view=diff
==============================================================================
--- poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java (original)
+++ poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java Tue Apr 15 16:18:25 2008
@@ -39,6 +39,7 @@
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.StylesSource;
 import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.util.SheetReferences;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 import org.apache.poi.xssf.model.CommentsTable;
@@ -498,8 +499,17 @@
     	}
     	return -1;
     }
+    
+    /**
+     * TODO - figure out what the hell this methods does in
+     *  HSSF...
+     */
+    public String resolveNameXText(int refIndex, int definedNameIndex) {
+		// TODO Replace with something proper
+		return null;
+	}
 
-    public short getNumCellStyles() {
+	public short getNumCellStyles() {
         // TODO Auto-generated method stub
         return 0;
     }
@@ -573,12 +583,33 @@
     public int getSheetIndex(Sheet sheet) {
         return this.sheets.indexOf(sheet);
     }
+    
+    /**
+     * Returns the external sheet index of the sheet
+     *  with the given internal index, creating one
+     *  if needed.
+     * Used by some of the more obscure formula and 
+     *  named range things.
+     * Fairly easy on XSSF (we think...) since the
+     *  internal and external indicies are the same
+     */
+    public int getExternalSheetIndex(int internalSheetIndex) {
+    	return internalSheetIndex;
+    }
 
     public String getSheetName(int sheet) {
         return this.workbook.getSheets().getSheetArray(sheet).getName();
     }
+    
+    public SheetReferences getSheetReferences() {
+    	SheetReferences sr = new SheetReferences();
+    	for(int i=0; i<getNumberOfSheets(); i++) {
+    		sr.addSheetReference(getSheetName(i), i);
+    	}
+    	return sr;
+	}
 
-    public void insertChartRecord() {
+	public void insertChartRecord() {
         // TODO Auto-generated method stub
 
     }



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


Mime
View raw message