/** * Sets the previous block * * @param prev the previous block */ public void setPrevious(int prev) { previous = prev; IntegerHelper.getFourBytes(prev, data, PREVIOUS_POS); }
/** * Reads the ptg data from the array starting at the specified position * * @param data the RPN array * @param pos the current position in the array, excluding the ptg identifier * @return the number of bytes read */ public int read(byte[] data, int pos) { value = IntegerHelper.getInt(data[pos], data[pos+1]); return 2; }
/** * Set the index sheet reference for a record name * 0 is for a global reference * */ public void setSheetRef(int i) { sheetRef = i; IntegerHelper.getTwoBytes(sheetRef, data, 8); }
/** * Constructor * * @param c the number of columns * @param r the number of rows */ public DimensionRecord(int r, int c) { super(Type.DIMENSION); numRows = r; numCols = c; data = new byte[14]; IntegerHelper.getFourBytes(numRows, data, 4); IntegerHelper.getTwoBytes(numCols, data, 10); }
/** * Constructor * * @param c the number of columns * @param r the number of rows */ public DimensionRecord(int r, int c) { super(Type.DIMENSION); numRows = r; numCols = c; data = new byte[14]; IntegerHelper.getFourBytes(numRows, data, 4); IntegerHelper.getTwoBytes(numCols, data, 10); }
/** * Initializes an internal supbook record */ private void initInternal() { data = new byte[4]; IntegerHelper.getTwoBytes(numSheets, data, 0); data[2] = 0x1; data[3] = 0x4; type = INTERNAL; }
/** * Sets the position of the data start. This happens to be the position * of the DEFCOLWIDTH record */ void setDataStartPosition(int pos) { IntegerHelper.getFourBytes(pos - bofPosition, data, 12); } }
/** * Gets the data to write out to the file * * @return the binary data */ public byte[] getData() { byte[] data = new byte[2]; IntegerHelper.getTwoBytes(calcCount, data, 0); return data; } }
/** * Sets the position of the data start. This happens to be the position * of the DEFCOLWIDTH record */ void setDataStartPosition(int pos) { IntegerHelper.getFourBytes(pos - bofPosition, data, 12); } }
/** * Reads the ptg data from the array starting at the specified position * * @param data the RPN array * @param pos the current position in the array, excluding the ptg identifier * @return the number of bytes read */ public int read(byte[] data, int pos) { length = IntegerHelper.getInt(data[pos], data[pos+1]); return 2; }
/** * Constructor * * @param newHideMode the hide all flag */ public HideobjRecord(int newHideMode) { super(Type.HIDEOBJ); hidemode = newHideMode; data = new byte[2]; IntegerHelper.getTwoBytes(hidemode, data, 0); }
/** * Sets the size of the file * * @param s the size */ public void setSize(int s) { size = s; IntegerHelper.getFourBytes(s, data, SIZE_POS); }
/** * Constructor */ public DValParser(byte[] data) { int options = IntegerHelper.getInt(data[0], data[1]); promptBoxVisible = (options & PROMPT_BOX_VISIBLE_MASK) != 0; promptBoxAtCell = (options & PROMPT_BOX_AT_CELL_MASK) != 0; validityDataCached = (options & VALIDITY_DATA_CACHED_MASK) != 0; objectId = IntegerHelper.getInt(data[10], data[11], data[12], data[13]); numDVRecords = IntegerHelper.getInt(data[14], data[15], data[16], data[17]); }
/** * Constructor * * @param w the default column width */ public DefaultColumnWidth(int w) { super(Type.DEFCOLWIDTH); width = w; data = new byte[2]; IntegerHelper.getTwoBytes(width, data, 0); }
/** * Sets the child * * @param dir the child */ public void setChild(int dir) { child = dir; IntegerHelper.getFourBytes(child, data, CHILD_POS); }
/** * Set the index sheet reference for a record name * 0 is for a global reference * */ public void setSheetRef(int i) { sheetRef = i; IntegerHelper.getTwoBytes(sheetRef, data, 8); }
/** * Sets the size of the file * * @param s the size */ public void setSize(int s) { size = s; IntegerHelper.getFourBytes(s, data, SIZE_POS); }