Exemplo n.º 1
0
        private long SaveRangeEx(IDataStream DataStream, TSaveData SaveData, int FirstCol, int LastCol)
        {
            long Result = 0;

            if (DataStream != null)
            {
                TDefColWidthRecord.SaveRecord(DataStream, DefColWidthChars);
            }
            Result += TDefColWidthRecord.StandardSize();

            int i = FirstCol;
            int k = i;

            while (i <= LastCol)
            {
                if (this[i] == null)
                {
                    i++; continue;
                }
                k = i + 1;
                while (k <= LastCol && GetBiff8Col(k) != null && GetBiff8Col(k).IsEqual(this[i]))
                {
                    k++;
                }

                //We need to ensure this[i] is not bigger than Maxcolumns. this[k] can be=Maxcolumns+1.
                if (i <= FlxConsts.Max_Columns97_2003)
                {
                    if (DataStream != null)
                    {
                        SaveOneRecord(i, k - 1, DataStream, SaveData);
                    }
                    Result += XlsConsts.SizeOfTRecordHeader + TColInfoRecord.Length;
                }
                i = k;
            }
            return(Result);
        }
Exemplo n.º 2
0
 internal void SaveDefColWidth(IDataStream DataStream, TSaveData SaveData)
 {
     TDefColWidthRecord.SaveRecord(DataStream, DefColWidthChars);
 }