private void SetMinMaxRow(int rowIndex, XlsBiffRow row) { if (!RowOffsetMap.TryGetValue(rowIndex, out var rowOffset)) { rowOffset = new XlsRowOffset(); rowOffset.MinCellOffset = int.MaxValue; rowOffset.MaxCellOffset = int.MinValue; rowOffset.MaxOverlapRowIndex = int.MinValue; RowOffsetMap.Add(rowIndex, rowOffset); } rowOffset.Record = row; }
private void SetMinMaxRowOffset(int rowIndex, int recordOffset, int maxOverlapRow) { if (!RowOffsetMap.TryGetValue(rowIndex, out var rowOffset)) { rowOffset = new XlsRowOffset(); rowOffset.MinCellOffset = int.MaxValue; rowOffset.MaxCellOffset = int.MinValue; rowOffset.MaxOverlapRowIndex = int.MinValue; RowOffsetMap.Add(rowIndex, rowOffset); } rowOffset.MinCellOffset = Math.Min(recordOffset, rowOffset.MinCellOffset); rowOffset.MaxCellOffset = Math.Max(recordOffset, rowOffset.MaxCellOffset); rowOffset.MaxOverlapRowIndex = Math.Max(maxOverlapRow, rowOffset.MaxOverlapRowIndex); }