Exemplo n.º 1
0
        public override Object Clone()
        {
            IndexRecord rec = new IndexRecord();

            rec.field_1_zero          = field_1_zero;
            rec.field_2_first_row     = field_2_first_row;
            rec.field_3_last_row_add1 = field_3_last_row_add1;
            rec.field_4_ibXF          = field_4_ibXF;
            rec.field_5_dbcells       = new List <int>();
            rec.field_5_dbcells.AddRange(field_5_dbcells);
            return(rec);
        }
Exemplo n.º 2
0
        public override Object Clone()
        {
            IndexRecord rec = new IndexRecord();

            rec.field_1_zero          = field_1_zero;
            rec.field_2_first_row     = field_2_first_row;
            rec.field_3_last_row_add1 = field_3_last_row_add1;
            rec.field_4_zero          = field_4_zero;
            rec.field_5_dbcells       = new IntList();
            rec.field_5_dbcells.AddAll(field_5_dbcells);
            return(rec);
        }
Exemplo n.º 3
0
 public void VisitRecord(Record r)
 {
     if (r is IndexRecord)
     {
         if (_indexRecord != null)
         {
             throw new Exception("too many index records");
         }
         _indexRecord = (IndexRecord)r;
     }
 }
Exemplo n.º 4
0
        public IndexRecord CreateIndexRecord(int indexRecordOffset, int sizeOfInitialSheetRecords)
        {
            IndexRecord result = new IndexRecord();
            result.FirstRow=(firstrow);
            result.LastRowAdd1=(lastrow + 1);
            // Calculate the size of the records from the end of the BOF
            // and up to the RowRecordsAggregate...

            // Add the references to the DBCells in the IndexRecord (one for each block)
            // Note: The offsets are relative to the Workbook BOF. Assume that this is
            // 0 for now.....

            int blockCount = RowBlockCount;
            // Calculate the size of this IndexRecord
            int indexRecSize = IndexRecord.GetRecordSizeForBlockCount(blockCount);

            int currentOffset = indexRecordOffset + indexRecSize + sizeOfInitialSheetRecords;

            for (int block = 0; block < blockCount; block++)
            {
                // each row-block has a DBCELL record.
                // The offset of each DBCELL record needs to be updated in the INDEX record

                // account for row records in this row-block
                currentOffset += GetRowBlockSize(block);
                // account for cell value records after those
                currentOffset += _valuesAgg.GetRowCellBlockSize(
                        GetStartRowNumberForBlock(block), GetEndRowNumberForBlock(block));

                // currentOffset is now the location of the DBCELL record for this row-block
                result.AddDbcell(currentOffset);
                // Add space required to write the DBCELL record (whose reference was just added).
                currentOffset += (8 + (GetRowCountForBlock(block) * 2));
            }
            return result;
        }
Exemplo n.º 5
0
        /// <summary>
        /// Creates the Index record  - not currently used
        /// </summary>
        /// <returns>record containing a IndexRecord</returns>
        protected Record CreateIndex()
        {
            IndexRecord retval = new IndexRecord();

            retval.FirstRow = (0);   // must be Set explicitly
            retval.LastRowAdd1 = (0);
            return retval;
        }
Exemplo n.º 6
0
 public override Object Clone()
 {
     IndexRecord rec = new IndexRecord();
     rec.field_1_zero = field_1_zero;
     rec.field_2_first_row = field_2_first_row;
     rec.field_3_last_row_add1 = field_3_last_row_add1;
     rec.field_4_zero = field_4_zero;
     rec.field_5_dbcells = new IntList();
     rec.field_5_dbcells.AddAll(field_5_dbcells);
     return rec;
 }
Exemplo n.º 7
0
 public override Object Clone()
 {
     IndexRecord rec = new IndexRecord();
     rec.field_1_zero = field_1_zero;
     rec.field_2_first_row = field_2_first_row;
     rec.field_3_last_row_add1 = field_3_last_row_add1;
     rec.field_4_ibXF = field_4_ibXF;
     rec.field_5_dbcells = new List<int>();
     rec.field_5_dbcells.AddRange(field_5_dbcells);
     return rec;
 }