jxl.read.biff
Class SharedFormulaRecord

java.lang.Object
  |
  +--jxl.read.biff.SharedFormulaRecord

class SharedFormulaRecord
extends java.lang.Object

A shared formula


Field Summary
private  ExternalSheet externalSheet
          A handle to the external sheet
private  int firstCol
          The first column to which this shared formula applies
private  int firstRow
          The first row to which this shared formula applies
private  java.util.ArrayList formulas
          The rest of the comprising this shared formula
private  int lastCol
          The last column to which this shared formula applies
private  int lastRow
          The last row to which this shared formula applies
private  SheetImpl sheet
          A handle to the sheet
private  BaseSharedFormulaRecord templateFormula
          The first (template) formula comprising this group
private  byte[] tokens
          The token data
 
Constructor Summary
SharedFormulaRecord(Record t, BaseSharedFormulaRecord fr, ExternalSheet es, SheetImpl si)
          Constructs this object from the raw data.
 
Method Summary
 boolean add(BaseSharedFormulaRecord fr)
          Adds this formula to the list of formulas, if it falls within the bounds
(package private)  Cell[] getFormulas(FormattingRecords fr, boolean nf)
          Manufactures individual cell formulas out the whole shared formula debacle
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

firstRow

private int firstRow
The first row to which this shared formula applies

lastRow

private int lastRow
The last row to which this shared formula applies

firstCol

private int firstCol
The first column to which this shared formula applies

lastCol

private int lastCol
The last column to which this shared formula applies

templateFormula

private BaseSharedFormulaRecord templateFormula
The first (template) formula comprising this group

formulas

private java.util.ArrayList formulas
The rest of the comprising this shared formula

tokens

private byte[] tokens
The token data

externalSheet

private ExternalSheet externalSheet
A handle to the external sheet

sheet

private SheetImpl sheet
A handle to the sheet
Constructor Detail

SharedFormulaRecord

public SharedFormulaRecord(Record t,
                           BaseSharedFormulaRecord fr,
                           ExternalSheet es,
                           SheetImpl si)
Constructs this object from the raw data. Creates either a NumberFormulaRecord or a StringFormulaRecord depending on whether this formula represents a numerical calculation or not
Parameters:
excelFile - the excel file
t - the raw data
es - the workbook, which contains the external sheet references
si - the sheet
Method Detail

add

public boolean add(BaseSharedFormulaRecord fr)
Adds this formula to the list of formulas, if it falls within the bounds
Parameters:
fr - the formula record to test for membership of this group
Returns:
TRUE if the formulas was added, FALSE otherwise

getFormulas

Cell[] getFormulas(FormattingRecords fr,
                   boolean nf)
Manufactures individual cell formulas out the whole shared formula debacle
Parameters:
fr - the formatting records
nf - flag indicating whether this uses the 1904 date system
Returns:
an array of formulas to be added to the sheet