1 2 17 18 19 20 package org.apache.poi.hdf.extractor; 21 22 27 28 public class TC 29 { 30 31 boolean _fFirstMerged; 32 boolean _fMerged; 33 boolean _fVertical; 34 boolean _fBackward; 35 boolean _fRotateFont; 36 boolean _fVertMerge; 37 boolean _fVertRestart; 38 short _vertAlign; 39 short[] _brcTop = new short[2]; 40 short[] _brcLeft = new short[2]; 41 short[] _brcBottom = new short[2]; 42 short[] _brcRight = new short [2]; 43 44 public TC() 45 { 46 } 47 static TC convertBytesToTC(byte[] array, int offset) 48 { 49 TC tc = new TC(); 50 int rgf = Utils.convertBytesToShort(array, offset); 51 tc._fFirstMerged = (rgf & 0x0001) > 0; 52 tc._fMerged = (rgf & 0x0002) > 0; 53 tc._fVertical = (rgf & 0x0004) > 0; 54 tc._fBackward = (rgf & 0x0008) > 0; 55 tc._fRotateFont = (rgf & 0x0010) > 0; 56 tc._fVertMerge = (rgf & 0x0020) > 0; 57 tc._fVertRestart = (rgf & 0x0040) > 0; 58 tc._vertAlign = (short)((rgf & 0x0180) >> 7); 59 60 tc._brcTop[0] = Utils.convertBytesToShort(array, offset + 4); 61 tc._brcTop[1] = Utils.convertBytesToShort(array, offset + 6); 62 63 tc._brcLeft[0] = Utils.convertBytesToShort(array, offset + 8); 64 tc._brcLeft[1] = Utils.convertBytesToShort(array, offset + 10); 65 66 tc._brcBottom[0] = Utils.convertBytesToShort(array, offset + 12); 67 tc._brcBottom[1] = Utils.convertBytesToShort(array, offset + 14); 68 69 tc._brcRight[0] = Utils.convertBytesToShort(array, offset + 16); 70 tc._brcRight[1] = Utils.convertBytesToShort(array, offset + 18); 71 72 return tc; 73 } 74 75 } 76 | Popular Tags |