1 19 20 package jxl.biff.formula; 21 22 import jxl.Sheet; 23 24 27 abstract class ParseItem 28 { 29 32 private ParseItem parent; 33 34 37 private boolean volatileFunction; 38 39 42 private boolean alternateCode; 43 44 47 public ParseItem() 48 { 49 volatileFunction = false; 50 alternateCode = false; 51 } 52 53 56 protected void setParent(ParseItem p) 57 { 58 parent = p; 59 } 60 61 64 protected void setVolatile() 65 { 66 volatileFunction = true; 67 if (parent != null && !parent.isVolatile()) 68 { 69 parent.setVolatile(); 70 } 71 } 72 73 78 final boolean isVolatile() 79 { 80 return volatileFunction; 81 } 82 83 87 abstract void getString(StringBuffer buf); 88 89 94 abstract byte[] getBytes(); 95 96 103 abstract void adjustRelativeCellReferences(int colAdjust, int rowAdjust); 104 105 115 abstract void columnInserted(int sheetIndex, int col, boolean currentSheet); 116 117 127 abstract void columnRemoved(int sheetIndex, int col, boolean currentSheet); 128 129 139 abstract void rowInserted(int sheetIndex, int row, boolean currentSheet); 140 141 151 abstract void rowRemoved(int sheetIndex, int row, boolean currentSheet); 152 153 156 protected void setAlternateCode() 157 { 158 alternateCode = true; 159 } 160 161 166 protected final boolean useAlternateCode() 167 { 168 return alternateCode; 169 } 170 } 171 172 173 174 | Popular Tags |