using System; using System.Collections.Generic; using System.Text; namespace Biff8Excel.Excel { public class Index : IDisposable { Biff8Excel.Records.INdex m_index; uint m_streamOffset; // Position of this record in the Output Stream uint m_DefColumnRecordOffset; uint[] m_DBOffsets; public byte[] WriteRecord() { return m_index.GetByte(); } public uint StreamOffset { set { m_streamOffset = value; } get { return m_streamOffset; } } public ushort FirstRowUsed { set { m_index.FirstRowIndex = value; } } public ushort LastRowUsed { set { if ( value > (ushort.MaxValue - 1)) throw new ArgumentException("LastRowUsed too bigger", "value"); m_index.LastRowIndex = ((uint)(value + 1)); } } public uint DefColumnRecordOffset { set { m_DefColumnRecordOffset = value; m_index.DefColumnRecordOffset = value; } get { return m_DefColumnRecordOffset; } } public uint[] DBCellOffsets { set { m_DBOffsets = value; m_index.DBCellOffsets = value; } get { return m_DBOffsets; } } public Index() { m_index = new Biff8Excel.Records.INdex(); } #region IDisposable ³ΙΤ± public void Dispose() { m_index = null; } #endregion } }