1 19 20 package jxl.biff; 21 22 25 public final class Type 26 { 27 30 public final int value; 31 34 private static Type[] types = new Type[0]; 35 36 42 private Type(int v) 43 { 44 value = v; 45 46 Type[] newTypes = new Type[types.length + 1]; 48 System.arraycopy(types, 0, newTypes, 0, types.length); 49 newTypes[types.length] = this; 50 types = newTypes; 51 } 52 53 private static class ArbitraryType {}; 54 private static ArbitraryType arbitrary = new ArbitraryType(); 55 56 59 private Type(int v, ArbitraryType arb) 60 { 61 value = v; 62 } 63 64 68 public int hashCode() 69 { 70 return value; 71 } 72 73 78 public boolean equals(Object o) 79 { 80 if (o == this) 81 { 82 return true; 83 } 84 85 if (!(o instanceof Type)) 86 { 87 return false; 88 } 89 90 Type t = (Type) o; 91 92 return value == t.value; 93 } 94 95 100 public static Type getType(int v) 101 { 102 for (int i = 0; i < types.length; i++) 103 { 104 if (types[i].value == v) 105 { 106 return types[i]; 107 } 108 } 109 110 return UNKNOWN; 111 } 112 113 118 public static Type createType(int v) 119 { 120 return new Type(v, arbitrary); 121 } 122 123 125 public static final Type BOF = new Type(0x809); 126 128 public static final Type EOF = new Type(0x0a); 129 131 public static final Type BOUNDSHEET = new Type(0x85); 132 134 public static final Type SUPBOOK = new Type(0x1ae); 135 137 public static final Type EXTERNSHEET = new Type(0x17); 138 140 public static final Type DIMENSION = new Type(0x200); 141 143 public static final Type BLANK = new Type(0x201); 144 146 public static final Type MULBLANK = new Type(0xbe); 147 149 public static final Type ROW = new Type(0x208); 150 152 public static final Type NOTE = new Type(0x1c); 153 155 public static final Type TXO = new Type(0x1b6); 156 158 public static final Type RK = new Type(0x7e); 159 161 public static final Type RK2 = new Type(0x27e); 162 164 public static final Type MULRK = new Type(0xbd); 165 167 public static final Type INDEX = new Type(0x20b); 168 170 public static final Type DBCELL = new Type(0xd7); 171 173 public static final Type SST = new Type(0xfc); 174 176 public static final Type COLINFO = new Type(0x7d); 177 179 public static final Type EXTSST = new Type(0xff); 180 182 public static final Type CONTINUE = new Type(0x3c); 183 185 public static final Type LABEL = new Type(0x204); 186 188 public static final Type RSTRING = new Type(0xd6); 189 191 public static final Type LABELSST = new Type(0xfd); 192 194 public static final Type NUMBER = new Type(0x203); 195 197 public static final Type NAME = new Type(0x18); 198 200 public static final Type TABID = new Type(0x13d); 201 203 public static final Type ARRAY = new Type(0x221); 204 206 public static final Type STRING = new Type(0x207); 207 209 public static final Type FORMULA = new Type(0x406); 210 212 public static final Type FORMULA2 = new Type(0x6); 213 215 public static final Type SHAREDFORMULA = new Type(0x4bc); 216 218 public static final Type FORMAT = new Type(0x41e); 219 221 public static final Type XF = new Type(0xe0); 222 224 public static final Type BOOLERR = new Type(0x205); 225 227 public static final Type INTERFACEHDR = new Type(0xe1); 228 230 public static final Type SAVERECALC = new Type(0x5f); 231 233 public static final Type INTERFACEEND = new Type(0xe2); 234 236 public static final Type XCT = new Type(0x59); 237 239 public static final Type CRN = new Type(0x5a); 240 242 public static final Type DEFCOLWIDTH = new Type(0x55); 243 245 public static final Type DEFAULTROWHEIGHT = new Type(0x225); 246 248 public static final Type WRITEACCESS = new Type(0x5c); 249 251 public static final Type WSBOOL = new Type(0x81); 252 254 public static final Type CODEPAGE = new Type(0x42); 255 257 public static final Type DSF = new Type(0x161); 258 260 public static final Type FNGROUPCOUNT = new Type(0x9c); 261 263 public static final Type COUNTRY = new Type(0x8c); 264 266 public static final Type PROTECT = new Type(0x12); 267 269 public static final Type SCENPROTECT = new Type(0xdd); 270 272 public static final Type OBJPROTECT = new Type(0x63); 273 275 public static final Type PRINTHEADERS = new Type(0x2a); 276 278 public static final Type HEADER = new Type(0x14); 279 281 public static final Type FOOTER = new Type(0x15); 282 284 public static final Type HCENTER = new Type(0x83); 285 287 public static final Type VCENTER = new Type(0x84); 288 290 public static final Type FILEPASS = new Type(0x2f); 291 293 public static final Type SETUP = new Type(0xa1); 294 296 public static final Type PRINTGRIDLINES = new Type(0x2b); 297 299 public static final Type GRIDSET = new Type(0x82); 300 302 public static final Type GUTS = new Type(0x80); 303 305 public static final Type WINDOWPROTECT = new Type(0x19); 306 308 public static final Type PROT4REV = new Type(0x1af); 309 311 public static final Type PROT4REVPASS = new Type(0x1bc); 312 314 public static final Type PASSWORD = new Type(0x13); 315 317 public static final Type REFRESHALL = new Type(0x1b7); 318 320 public static final Type WINDOW1 = new Type(0x3d); 321 323 public static final Type WINDOW2 = new Type(0x23e); 324 326 public static final Type BACKUP = new Type(0x40); 327 329 public static final Type HIDEOBJ = new Type(0x8d); 330 332 public static final Type NINETEENFOUR = new Type(0x22); 333 335 public static final Type PRECISION = new Type(0xe); 336 338 public static final Type BOOKBOOL = new Type(0xda); 339 341 public static final Type FONT = new Type(0x31); 342 344 public static final Type MMS = new Type(0xc1); 345 347 public static final Type CALCMODE = new Type(0x0d); 348 350 public static final Type CALCCOUNT = new Type(0x0c); 351 353 public static final Type REFMODE = new Type(0x0f); 354 356 public static final Type TEMPLATE = new Type(0x60); 357 359 public static final Type OBJPROJ = new Type(0xd3); 360 362 public static final Type DELTA = new Type(0x10); 363 365 public static final Type MERGEDCELLS = new Type(0xe5); 366 368 public static final Type ITERATION = new Type(0x11); 369 371 public static final Type STYLE = new Type(0x293); 372 374 public static final Type USESELFS = new Type(0x160); 375 377 public static final Type HORIZONTALPAGEBREAKS = new Type(0x1b); 378 380 public static final Type SELECTION = new Type(0x1d); 381 383 public static final Type HLINK = new Type(0x1b8); 384 386 public static final Type OBJ = new Type(0x5d); 387 389 public static final Type MSODRAWING = new Type(0xec); 390 392 public static final Type MSODRAWINGGROUP = new Type(0xeb); 393 395 public static final Type LEFTMARGIN = new Type(0x26); 396 398 public static final Type RIGHTMARGIN = new Type(0x27); 399 401 public static final Type TOPMARGIN = new Type(0x28); 402 404 public static final Type BOTTOMMARGIN = new Type(0x29); 405 407 public static final Type EXTERNNAME = new Type(0x23); 408 410 public static final Type PALETTE = new Type(0x92); 411 413 public static final Type PLS = new Type(0x4d); 414 416 public static final Type SCL = new Type(0xa0); 417 419 public static final Type PANE = new Type(0x41); 420 422 public static final Type WEIRD1 = new Type(0xef); 423 425 public static final Type SORT = new Type(0x90); 426 428 public static final Type DV = new Type(0x1be); 429 431 public static final Type DVAL = new Type(0x1b2); 432 434 public static final Type BUTTONPROPERTYSET = new Type(0x1ba); 435 436 439 public static final Type FONTX = new Type(0x1026); 440 442 public static final Type IFMT = new Type(0x104e); 443 445 public static final Type FBI = new Type(0x1060); 446 448 public static final Type ALRUNS = new Type(0x1050); 449 451 public static final Type UNKNOWN = new Type(0xffff); 452 453 public static final Type U1C0 = new Type(0x1c0); 455 public static final Type U1C1 = new Type(0x1c1); 456 457 } 458 459 460 461 462 463 464 465 466 467 | Popular Tags |