1 2 17 18 19 24 package org.apache.poi.hssf.record.formula; 25 26 import org.apache.poi.util.LittleEndian; 27 import org.apache.poi.hssf.model.Workbook; 28 29 34 35 public class MemErrPtg 36 extends Ptg 37 { 38 public final static short sid = 0x27; 39 private final static int SIZE = 7; 40 private int field_1_reserved; 41 private short field_2_subex_len; 42 43 44 45 public MemErrPtg() 46 { 47 } 48 49 public MemErrPtg(byte [] data, int offset) 50 { 51 field_1_reserved = LittleEndian.getInt(data, 0); 52 field_2_subex_len = LittleEndian.getShort(data, 4); 53 } 54 55 public void setReserved(int res) 56 { 57 field_1_reserved = res; 58 } 59 60 public int getReserved() 61 { 62 return field_1_reserved; 63 } 64 65 public void setSubexpressionLength(short subexlen) 66 { 67 field_2_subex_len = subexlen; 68 } 69 70 public short getSubexpressionLength() 71 { 72 return field_2_subex_len; 73 } 74 75 public void writeBytes(byte [] array, int offset) 76 { 77 } 78 79 public int getSize() 80 { 81 return SIZE; 82 } 83 84 public String toFormulaString(Workbook book) 85 { 86 return "ERR#"; 87 } 88 public byte getDefaultOperandClass() {return Ptg.CLASS_VALUE;} 89 90 public Object clone() { 91 MemErrPtg ptg = new MemErrPtg(); 92 ptg.field_1_reserved = field_1_reserved; 93 ptg.field_2_subex_len = field_2_subex_len; 94 return ptg; 95 } 96 } 97 | Popular Tags |