FileDocCategorySizeDatePackage
RefErrorPtg.javaAPI DocApache Poi 3.0.12737Mon Jan 01 12:39:40 GMT 2007org.apache.poi.hssf.record.formula

RefErrorPtg

public class RefErrorPtg extends Ptg
RefError - handles deleted cell reference
author
Jason Height (jheight at chariot dot net dot au)

Fields Summary
private static final int
SIZE
public static final byte
sid
private int
field_1_reserved
Constructors Summary
private RefErrorPtg()


      
      //Required for clone methods
    
public RefErrorPtg(RecordInputStream in)

        field_1_reserved = in.readInt();

    
Methods Summary
public java.lang.Objectclone()

      RefErrorPtg ptg = new RefErrorPtg();
      ptg.field_1_reserved = field_1_reserved;
      ptg.setClass(ptgClass);
      return ptg;
    
public bytegetDefaultOperandClass()

        return Ptg.CLASS_REF;
    
public intgetReserved()

        return field_1_reserved;
    
public intgetSize()

        return SIZE;
    
public voidsetReserved(int reserved)

        field_1_reserved = reserved;
    
public java.lang.StringtoFormulaString(org.apache.poi.hssf.model.Workbook book)

        //TODO -- should we store a cellreference instance in this ptg?? but .. memory is an issue, i believe!
        return "#REF!";
    
public java.lang.StringtoString()

        StringBuffer buffer = new StringBuffer("[RefError]\n");

        buffer.append("reserved = ").append(getReserved()).append("\n");
        return buffer.toString();
    
public voidwriteBytes(byte[] array, int offset)

        array[offset] = (byte) (sid + ptgClass);
        LittleEndian.putInt(array,offset+1,field_1_reserved);