Exemplo n.º 1
0
 /**
  * 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);
 }
Exemplo n.º 2
0
 /**
  * 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)
 {
 }
Exemplo n.º 4
0
 /**
  * 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;
 }
Exemplo n.º 5
0
 /**
  * Constructor used by the writable records
  *
  * @param t the type
  */
 protected RecordData(Type t)
 {
     code = t.value;
 }
Exemplo n.º 6
0
        /**
         * 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);
                }
        }
Exemplo n.º 7
0
 /**
  * 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;
 }
Exemplo n.º 8
0
        /**
         * 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);
                }
        }
Exemplo n.º 9
0
 /**
  * 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;
 }