1 16 17 18 23 package org.apache.poi.hssf.record.formula; 24 25 import org.apache.poi.util.LittleEndian; 26 import org.apache.poi.hssf.model.Workbook; 27 28 31 public class MemFuncPtg extends ControlPtg 32 { 33 34 public final static byte sid = 0x29; 35 private short field_1_len_ref_subexpression = 0; 36 37 public MemFuncPtg() 38 { 39 } 41 42 45 public MemFuncPtg( byte[] data, int offset ) 46 { 47 offset++; 48 field_1_len_ref_subexpression = LittleEndian.getShort( data, offset + 0 ); 49 } 50 51 public int getSize() 52 { 53 return 3; 54 } 55 56 public void writeBytes( byte[] array, int offset ) 57 { 58 array[offset + 0] = sid ; 59 LittleEndian.putShort( array, offset + 1, (short)field_1_len_ref_subexpression ); 60 } 61 62 public String toFormulaString(Workbook book) 63 { 64 return ""; 65 } 66 67 public byte getDefaultOperandClass() 68 { 69 return 0; 70 } 71 72 public int getNumberOfOperands() 73 { 74 return field_1_len_ref_subexpression; 75 } 76 77 public Object clone() 78 { 79 MemFuncPtg ptg = new MemFuncPtg(); 80 ptg.field_1_len_ref_subexpression = this.field_1_len_ref_subexpression; 81 return ptg; 82 } 83 84 public int getLenRefSubexpression() 85 { 86 return field_1_len_ref_subexpression; 87 } 88 89 public void setLenRefSubexpression(int len) 90 { 91 field_1_len_ref_subexpression = (short)len; 92 } 93 94 } | Popular Tags |