Ejemplo n.º 1
0
 public SSTRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord) : base(SSTRecord.staticDescriptor, bodyLength, br)
 {
     object[] objArray1 = base.GetArguments();
     this.TotalStringCount  = (int)((uint)objArray1[0]);
     this.UniqueStringCount = (int)((uint)objArray1[1]);
     base.ExcelStrings      = (ExcelLongStrings)objArray1[2];
 }
Ejemplo n.º 2
0
        public static AbsXLSRec Read(BinaryReader br, AbsXLSRec previousRecord)
        {
            int num1 = br.ReadUInt16();

            if (num1 == 0)
            {
                return(null);
            }
            int           num2        = br.ReadUInt16();
            XLSDescriptor descriptor1 = XLSDescriptors.GetByCode(num1);

            if (!XLSDescriptors.ValidBodySize(descriptor1, num2, false))
            {
                descriptor1 = null;
            }
            if ((descriptor1 != null) && (descriptor1.Name == "FILEPASS"))
            {
                throw new Exception("Current version of ExcelLite can't read encrypted workbooks. You can use only simple password protection against modifying (set in MS Excel 'Save As' dialog).");
            }
            if ((descriptor1 != null) && (descriptor1.HandlerClass != typeof(XLSRecord)))
            {
                object[] objArray1 = new object[] { num2, br, previousRecord };
                return((AbsXLSRec)Activator.CreateInstance(descriptor1.HandlerClass, objArray1));
            }
            return(new XLSRecord(num1, num2, br));
        }
Ejemplo n.º 3
0
 public ExtSSTRecord(int stringsInBucket, int offset, AbsXLSRec sstRecord) : base(ExtSSTRecord.staticDescriptor)
 {
     base.InitializeBody((byte[])null);
     this.stringsInBucket = stringsInBucket;
     this.offset          = offset;
     this.sstRecord       = sstRecord;
 }
Ejemplo n.º 4
0
        public void Read(BinaryReader br)
        {
            AbsXLSRec rec1 = null;

            while (br.PeekChar() != -1)
            {
                rec1 = AbsXLSRec.Read(br, rec1);
                if (rec1 == null)
                {
                    return;
                }
                this.Add(rec1);
            }
        }
Ejemplo n.º 5
0
        public ContinueRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord) : base(ContinueRecord.staticDescriptor, bodyLength, br)
        {
            SSTRelated related1 = previousRecord as SSTRelated;

            if ((related1 != null) && (related1.ExcelStrings != null))
            {
                using (MemoryStream stream1 = new MemoryStream(this.Body))
                {
                    using (BinaryReader reader1 = new BinaryReader(stream1, new UnicodeEncoding()))
                    {
                        base.ExcelStrings = new ExcelLongStrings(reader1, bodyLength, related1.ExcelStrings.CharsRemaining);
                    }
                }
            }
        }
Ejemplo n.º 6
0
 protected override void InitializeDelayed()
 {
     object[] objArray2;
     if (this.FirstRow == null)
     {
         objArray2    = new object[2];
         objArray2[0] = 0;
         object[] objArray3 = new object[0];
         objArray2[1] = objArray3;
         base.InitializeDelayed(objArray2);
     }
     else
     {
         uint      num1 = (uint)(base.Address - this.FirstRow.Address);
         AbsXLSRec rec1 = this;
         int       num2 = this.StartingCellsForRows.Count - 1;
         while (num2 >= 0)
         {
             if (this.StartingCellsForRows[num2] == null)
             {
                 this.StartingCellsForRows[num2] = rec1;
             }
             else
             {
                 rec1 = (AbsXLSRec)this.StartingCellsForRows[num2];
             }
             num2--;
         }
         object[] objArray1 = new object[this.StartingCellsForRows.Count];
         int      num3      = this.FirstRow.Address + 20;
         for (num2 = 0; num2 < this.StartingCellsForRows.Count; num2++)
         {
             int num4 = ((AbsXLSRec)this.StartingCellsForRows[num2]).Address;
             objArray1[num2] = (ushort)(num4 - num3);
             num3            = num4;
         }
         objArray2 = new object[] { num1, objArray1 };
         base.InitializeDelayed(objArray2);
     }
 }
Ejemplo n.º 7
0
 public MergedCellsRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord) : base(MergedCellsRecord.staticDescriptor, bodyLength, br)
 {
 }
Ejemplo n.º 8
0
 public StyleRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord) : base(StyleRecord.staticDescriptor, bodyLength, br)
 {
 }
Ejemplo n.º 9
0
 public int Add(AbsXLSRec record)
 {
     return(this.records.Add(record));
 }
Ejemplo n.º 10
0
 public RKRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord)
 {
     this.Header = new CellRecordHeader(br);
     this.Val    = br.ReadUInt32();
 }
Ejemplo n.º 11
0
 public BoundSheetRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord) : base(BoundSheetRecord.staticDescriptor, bodyLength, br)
 {
     this.SheetName = (ExcelShortString)base.GetArguments()[3];
 }
Ejemplo n.º 12
0
 public BoundSheetRecord(ExcelShortString sheetName, AbsXLSRec sheetBOFRecord) : base(BoundSheetRecord.staticDescriptor)
 {
     base.InitializeBody((byte[])null);
     this.SheetName      = sheetName;
     this.sheetBOFRecord = sheetBOFRecord;
 }
 public HorizontalPageBreaksRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord) : base(HorizontalPageBreaksRecord.staticDescriptor, bodyLength, br)
 {
 }
Ejemplo n.º 14
0
 ///<summary>
 ///Initializes a new instance of the <see cref="MB.WinEIDrive.Excel.ExternsheetRecord" /> class.
 ///</summary>
 ///<param name="bodyLength">Length of the body.</param>
 ///<param name="br">The binary reader to read from.</param>
 ///<param name="previousRecord">The previous record.</param>
 public ExternsheetRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord) : base(ExternsheetRecord.staticDescriptor, bodyLength, br)
 {
 }
Ejemplo n.º 15
0
 public DBCellRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord) : base(DBCellRecord.staticDescriptor, bodyLength, br)
 {
     this.StartingCellsForRows = new ArrayList();
 }
Ejemplo n.º 16
0
 public IndexRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord) : base(IndexRecord.staticDescriptor, bodyLength, br)
 {
     this.FirstRow       = -1;
     this.LastRowPlusOne = -1;
     this.DBCells        = new ArrayList();
 }