/** * Constructor * * @param offset the offset in the raw file * @param f the excel 97 biff file * @param d the data record */ public Record(byte[] d, int offset, File f) { code = IntegerHelper.getInt(d[offset],d[offset + 1]); length = IntegerHelper.getInt(d[offset + 2],d[offset + 3]); file = f; file.skip(4); dataPos = f.getPos(); file.skip(length); type = Type.getType(code); }
/** * Constructor */ public MarginRecord(Type t, double v) : base(t) { margin = v; }
/** * Constructor used by the writable records * * @param t the biff type of this record */ protected WritableRecordData(Type t) : base(t) { }
/** * In the case of dodgy records, this method may be called to forcibly * set the type in order to continue processing * * @param t the forcibly overridden type */ public void setType(Type t) { type = t; }
/** * Constructor used by the writable records * * @param t the type */ protected RecordData(Type t) { code = t.value; }
/** * Copy constructor * * @param c the column * @param t the cell type * @param r the row * @param cv the value to copy */ protected CellValue(Type t, int c, int r, CellValue cv) : base(t) { row = r; column = c; format = cv.format; referenced = false; copied = false; // used during a deep copy, so the cell features need // to be added again if (cv.features != null) { features = new WritableCellFeatures(cv.features); features.setWritableCell(this); } }
/** * Overloaded constructor used when building writable cells from the * Java API which also takes a format * * @param c the column * @param t the cell type * @param r the row * @param st the format to apply to this cell */ protected CellValue(Type t, int c, int r, CellFormat st) : base(t) { row = r; column = c; format = (XFRecord)st; referenced = false; copied = false; }
/** * Constructor used when creating a writable cell from a read-only cell * (when copying a workbook) * * @param c the cell to clone * @param t the type of this cell */ protected CellValue(Type t, Cell c) : this(t, c.getColumn(), c.getRow()) { copied = true; format = (XFRecord)c.getCellFormat(); if (c.getCellFeatures() != null) { features = new WritableCellFeatures(c.getCellFeatures()); features.setWritableCell(this); } }
/** * Constructor used when building writable cells from the Java API * * @param c the column * @param t the type indicator * @param r the row */ protected CellValue(Type t, int c, int r) : this(t, c, r, WritableWorkbook.NORMAL_STYLE) { copied = false; }