1 19 20 package jxl.biff.formula; 21 22 import java.util.Stack ; 23 24 import common.Assert; 25 import jxl.WorkbookSettings; 26 import jxl.Sheet; 27 import jxl.biff.IntegerHelper; 28 29 32 class MemFunc extends Operand implements ParsedThing 33 { 34 37 private int length; 38 39 42 private ParseItem[] subExpression; 43 44 47 public MemFunc() 48 { 49 } 50 51 58 public int read(byte[] data, int pos) 59 { 60 length = IntegerHelper.getInt(data[pos], data[pos+1]); 61 return 2; 62 } 63 64 67 public void getOperands(Stack s) 68 { 69 } 70 71 public void getString(StringBuffer buf) 72 { 73 if (subExpression.length == 1) 74 { 75 subExpression[0].getString(buf); 76 } 77 else if (subExpression.length == 2) 78 { 79 subExpression[1].getString(buf); 80 buf.append(':'); 81 subExpression[0].getString(buf); 82 } 83 } 84 85 92 byte[] getBytes() 93 { 94 return null; 95 } 96 97 98 104 int getPrecedence() 105 { 106 return 5; 107 } 108 109 114 public int getLength() 115 { 116 return length; 117 } 118 119 public void setSubExpression(ParseItem[] pi) 120 { 121 subExpression = pi; 122 } 123 } 124 125 126 127 128 | Popular Tags |