private Row GetBlockRow(ushort rbIdx, ushort brIdx) { Row blockRow = new Row(); ushort j = 0; ushort row1 = (ushort)(_worksheet.Rows.MinRow + ((rbIdx - 1) * 32)); CachedBlockRow cachedBlockRow = _worksheet.CachedBlockRow; ushort rowMin = row1; ushort rowMax = (ushort)(rowMin + 31); if (cachedBlockRow.RowBlockIndex == rbIdx) { if (cachedBlockRow.BlockRowIndex == brIdx) { return(cachedBlockRow.Row); } else if (brIdx < cachedBlockRow.BlockRowIndex) { //NOTE: !!! Is this right? vba said ".Row.Row" !!! rowMax = cachedBlockRow.Row.RowIndex; } else if (brIdx > cachedBlockRow.BlockRowIndex) { if (cachedBlockRow.RowBlockIndex > 0) { rowMin = (ushort)(cachedBlockRow.Row.RowIndex + 1); j = cachedBlockRow.BlockRowIndex; } else { rowMin = 1; } } } for (ushort i = rowMin; i <= rowMax; i++) { if (_worksheet.Rows.RowExists(i)) { j++; if (j == brIdx) { blockRow = _worksheet.Rows[i]; _worksheet.CachedBlockRow = new CachedBlockRow(rbIdx, brIdx, blockRow); } } } return(blockRow); }
// Token: 0x06000256 RID: 598 RVA: 0x0000AD34 File Offset: 0x00009D34 private Row GetBlockRow(ushort rbIdx, ushort brIdx) { Row row = new Row(); ushort num = 0; ushort num2 = (ushort)((ulong)this._worksheet.Rows.MinRow + (ulong)((long)((rbIdx - 1) * 32))); CachedBlockRow cachedBlockRow = this._worksheet.CachedBlockRow; ushort num3 = num2; ushort num4 = (ushort)(num3 + 31); if (cachedBlockRow.RowBlockIndex == rbIdx) { if (cachedBlockRow.BlockRowIndex == brIdx) { return(cachedBlockRow.Row); } if (brIdx < cachedBlockRow.BlockRowIndex) { num4 = cachedBlockRow.Row.RowIndex; } else if (brIdx > cachedBlockRow.BlockRowIndex) { if (cachedBlockRow.RowBlockIndex > 0) { num3 = (ushort)(cachedBlockRow.Row.RowIndex + 1); num = cachedBlockRow.BlockRowIndex; } else { num3 = 1; } } } for (ushort num5 = num3; num5 <= num4; num5 += 1) { if (this._worksheet.Rows.RowExists(num5)) { num += 1; if (num == brIdx) { row = this._worksheet.Rows[num5]; this._worksheet.CachedBlockRow = new CachedBlockRow(rbIdx, brIdx, row); } } } return(row); }
internal Worksheet(XlsDocument doc) { _doc = doc; _visibility = WorksheetVisibilities.Default; _sheettype = WorksheetTypes.Default; _streamByteLength = 0; _dbCellOffsets = new int[0]; _cells = new Cells(this); _rows = new Rows(); _rowBlocks = new RowBlocks(this); _cachedBlockRow = CachedBlockRow.Empty; _columnInfos = new List<ColumnInfo>(); }
internal Worksheet(XlsDocument doc) { _doc = doc; _visibility = WorksheetVisibilities.Default; _sheettype = WorksheetTypes.Default; _streamByteLength = 0; _dbCellOffsets = new int[0]; _cells = new Cells(this); _rows = new Rows(); _rowBlocks = new RowBlocks(this); _cachedBlockRow = CachedBlockRow.Empty; _columnInfos = new List <ColumnInfo>(); }