public ProtectionSequence(IStreamReader reader) : base(reader) { // PROTECTION = [Protect] [ScenarioProtect] [ObjProtect] [Password] // [Protect] if (BiffRecord.GetNextRecordType(reader) == RecordType.Protect) { this.Protect = (Protect)BiffRecord.ReadRecord(reader); } // [ScenarioProtect] if (BiffRecord.GetNextRecordType(reader) == RecordType.ScenarioProtect) { this.ScenarioProtect = (ScenarioProtect)BiffRecord.ReadRecord(reader); } // [ObjProtect] if (BiffRecord.GetNextRecordType(reader) == RecordType.ObjProtect) { this.ObjProtect = (ObjProtect)BiffRecord.ReadRecord(reader); } // [Password] if (BiffRecord.GetNextRecordType(reader) == RecordType.Password) { this.Password = (Password)BiffRecord.ReadRecord(reader); } }
public DvAxisSequence(IStreamReader reader) : base(reader) { // DVAXIS = Axis Begin [ValueRange] [AXM] AXS [CRTMLFRT] End // Axis this.Axis = (Axis)BiffRecord.ReadRecord(reader); // Begin this.Begin = (Begin)BiffRecord.ReadRecord(reader); // [ValueRange] if (BiffRecord.GetNextRecordType(reader) == RecordType.ValueRange) { this.ValueRange = (ValueRange)BiffRecord.ReadRecord(reader); } // [AXM] if (BiffRecord.GetNextRecordType(reader) == RecordType.YMult) { this.AxmSequence = new AxmSequence(reader); } // AXS this.AxsSequence = new AxsSequence(reader); // [CRTMLFRT] if (BiffRecord.GetNextRecordType(reader) == RecordType.CrtMlFrt) { this.CrtMlfrtSequence = new CrtMlfrtSequence(reader); } // End this.End = (End)BiffRecord.ReadRecord(reader); }
public LegendExceptionGroup(IStreamReader reader) : base(reader) { // *(LegendException [Begin ATTACHEDLABEL End]) this.LegendException = (LegendException)BiffRecord.ReadRecord(reader); // [Begin ATTACHEDLABEL End] if (BiffRecord.GetNextRecordType(reader) == RecordType.Begin) { // Begin this.Begin = (Begin)BiffRecord.ReadRecord(reader); // ATTACHEDLABEL this.AttachedLabelSequence = new AttachedLabelSequence(reader); //[TEXTPROPS] if (BiffRecord.GetNextRecordType(reader) == RecordType.RichTextStream || BiffRecord.GetNextRecordType(reader) == RecordType.TextPropsStream) { this.TextPropsSequence = new TextPropsSequence(reader); } // End this.End = (End)BiffRecord.ReadRecord(reader); } }
public FrameSequence(IStreamReader reader) : base(reader) { // FRAME = Frame Begin LineFormat AreaFormat [GELFRAME] [SHAPEPROPS] End // Frame this.Frame = (Frame)BiffRecord.ReadRecord(reader); // Begin this.Begin = (Begin)BiffRecord.ReadRecord(reader); // LineFormat this.LineFormat = (LineFormat)BiffRecord.ReadRecord(reader); // AreaFormat this.AreaFormat = (AreaFormat)BiffRecord.ReadRecord(reader); // [GELFRAME] if (BiffRecord.GetNextRecordType(reader) == RecordType.GelFrame) { this.GelFrameSequence = new GelFrameSequence(reader); } // [SHAPEPROPS] if (BiffRecord.GetNextRecordType(reader) == RecordType.ShapePropsStream) { this.ShapePropsSequence = new ShapePropsSequence(reader); } // End this.End = (End)BiffRecord.ReadRecord(reader); }
public SeriesFormatSequence(IStreamReader reader) : base(reader) { // SERIESFORMAT = // Series Begin 4AI *SS // (SerToCrt / (SerParent (SerAuxTrend / SerAuxErrBar))) // *(LegendException [Begin ATTACHEDLABEL End]) // End // Series this.Series = (Series)BiffRecord.ReadRecord(reader); // Begin this.Begin = (Begin)BiffRecord.ReadRecord(reader); // 4AI this.AiSequences = new List <AiSequence>(); for (int i = 0; i < 4; i++) { this.AiSequences.Add(new AiSequence(reader)); } // *SS this.SsSequence = new List <SsSequence>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.DataFormat) { this.SsSequence.Add(new SsSequence(reader)); } // (SerToCrt / (SerParent (SerAuxTrend / SerAuxErrBar))) if (BiffRecord.GetNextRecordType(reader) == RecordType.SerToCrt) { this.SerToCrt = (SerToCrt)BiffRecord.ReadRecord(reader); } else { this.SerParent = (SerParent)BiffRecord.ReadRecord(reader); // (SerAuxTrend / SerAuxErrBar) if (BiffRecord.GetNextRecordType(reader) == RecordType.SerAuxTrend) { this.SerAuxTrend = (SerAuxTrend)BiffRecord.ReadRecord(reader); } else { this.SerAuxErrBar = (SerAuxErrBar)BiffRecord.ReadRecord(reader); } } // *(LegendException [Begin ATTACHEDLABEL End]) while (BiffRecord.GetNextRecordType(reader) == RecordType.LegendException) { this.LegendExceptionSequence = new LegendExceptionGroup(reader); } // End this.End = (End)BiffRecord.ReadRecord(reader); }
public WindowSequence(IStreamReader reader) : base(reader) { // Window2 [PLV] [Scl] [Pane] *Selection // Window2 this.Window2 = (Window2)BiffRecord.ReadRecord(reader); // [PLV] if (BiffRecord.GetNextRecordType(reader) == RecordType.PLV) { this.PLV = (PLV)BiffRecord.ReadRecord(reader); } // [Scl] if (BiffRecord.GetNextRecordType(reader) == RecordType.Scl) { this.Scl = (Scl)BiffRecord.ReadRecord(reader); } // [Pane] if (BiffRecord.GetNextRecordType(reader) == RecordType.Pane) { this.Pane = (Pane)BiffRecord.ReadRecord(reader); } //*Selection this.Selections = new List <Selection>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.Selection) { this.Selections.Add((Selection)BiffRecord.ReadRecord(reader)); } }
public AxisParentSequence(IStreamReader reader) : base(reader) { // AXISPARENT = AxisParent Begin Pos [AXES] 1*4CRT End // AxisParent this.AxisParent = (AxisParent)BiffRecord.ReadRecord(reader); // Begin this.Begin = (Begin)BiffRecord.ReadRecord(reader); // Pos this.Pos = (Pos)BiffRecord.ReadRecord(reader); // [AXES] RecordType next = BiffRecord.GetNextRecordType(reader); if (next == RecordType.Axis || next == RecordType.Text || next == RecordType.PlotArea) { this.AxesSequence = new AxesSequence(reader); } // 1*4CRT this.CrtSequences = new List <CrtSequence>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.ChartFormat) { this.CrtSequences.Add(new CrtSequence(reader)); } // End this.End = (End)BiffRecord.ReadRecord(reader); }
public static BiffRecord ReadRecord(IStreamReader reader) { BiffRecord result = null; try { RecordType id = (RecordType)reader.ReadUInt16(); UInt16 length = reader.ReadUInt16(); // skip leading StartBlock/EndBlock records if (id == RecordType.StartBlock || id == RecordType.EndBlock || id == RecordType.StartObject || id == RecordType.EndObject || id == RecordType.ChartFrtInfo) { // skip the body of this record reader.ReadBytes(length); // get the next record return(ReadRecord(reader)); } else if (id == RecordType.FrtWrapper) { // return type of wrapped Biff record FrtWrapper frtWrapper = new FrtWrapper(reader, id, length); return(frtWrapper.wrappedRecord); } Type cls; if (TypeToRecordClassMapping.TryGetValue((UInt16)id, out cls)) { ConstructorInfo constructor = cls.GetConstructor( new Type[] { typeof(IStreamReader), typeof(RecordType), typeof(UInt16) } ); try { result = (BiffRecord)constructor.Invoke( new object[] { reader, id, length } ); } catch (TargetInvocationException e) { throw e.InnerException; } } else { result = new UnknownBiffRecord(reader, (RecordType)id, length); } return(result); } catch (OutOfMemoryException e) { throw new Exception("Invalid BIFF record", e); } }
public AxsSequence(IStreamReader reader) : base(reader) { //AXS = [IFmtRecord] [Tick] [FontX] *4(AxisLine LineFormat) [AreaFormat] [GELFRAME] *4SHAPEPROPS [TextPropsStream *ContinueFrt12] //[IFmtRecord] if (BiffRecord.GetNextRecordType(reader) == RecordType.IFmtRecord) { this.IFmtRecord = (IFmtRecord)BiffRecord.ReadRecord(reader); } //[Tick] if (BiffRecord.GetNextRecordType(reader) == RecordType.Tick) { this.Tick = (Tick)BiffRecord.ReadRecord(reader); } //[FontX] if (BiffRecord.GetNextRecordType(reader) == RecordType.FontX) { this.FontX = (FontX)BiffRecord.ReadRecord(reader); } //*4(AxisLine LineFormat) AxisLineFormatGroups = new List <AxisLineFormatGroup>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.AxisLine) { this.AxisLineFormatGroups.Add(new AxisLineFormatGroup(reader)); } //[AreaFormat] if (BiffRecord.GetNextRecordType(reader) == RecordType.AreaFormat) { this.AreaFormat = (AreaFormat)BiffRecord.ReadRecord(reader); } //[GELFRAME] if (BiffRecord.GetNextRecordType(reader) == RecordType.GelFrame) { this.GelFrame = (GelFrame)BiffRecord.ReadRecord(reader); } //*4SHAPEPROPS this.ShapePropsSequences = new List <ShapePropsSequence>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.ShapePropsStream) { this.ShapePropsSequences.Add(new ShapePropsSequence(reader)); } //[TextPropsStream *ContinueFrt12] if (BiffRecord.GetNextRecordType(reader) == RecordType.TextPropsStream) { this.TextPropsStream = (TextPropsStream)BiffRecord.ReadRecord(reader); while (BiffRecord.GetNextRecordType(reader) == RecordType.ContinueFrt12) { this.ContinueFrt12s.Add((ContinueFrt12)BiffRecord.ReadRecord(reader)); } } }
public AxisLineFormatGroup(IStreamReader reader) { // *4(AxisLine LineFormat) this.AxisLine = (AxisLine)BiffRecord.ReadRecord(reader); this.LineFormat = (LineFormat)BiffRecord.ReadRecord(reader); }
public PageSetupSequence(IStreamReader reader) : base(reader) { //PAGESETUP = Header Footer HCenter VCenter [LeftMargin] [RightMargin] [TopMargin] [BottomMargin] [Pls *Continue] Setup // Header this.Header = (Header)BiffRecord.ReadRecord(reader); // Footer this.Footer = (Footer)BiffRecord.ReadRecord(reader); // HCenter this.HCenter = (HCenter)BiffRecord.ReadRecord(reader); // VCenter this.VCenter = (VCenter)BiffRecord.ReadRecord(reader); // [LeftMargin] if (BiffRecord.GetNextRecordType(reader) == RecordType.LeftMargin) { this.LeftMargin = (LeftMargin)BiffRecord.ReadRecord(reader); } // [RightMargin] if (BiffRecord.GetNextRecordType(reader) == RecordType.RightMargin) { this.RightMargin = (RightMargin)BiffRecord.ReadRecord(reader); } // [TopMargin] if (BiffRecord.GetNextRecordType(reader) == RecordType.TopMargin) { this.TopMargin = (TopMargin)BiffRecord.ReadRecord(reader); } // [BottomMargin] if (BiffRecord.GetNextRecordType(reader) == RecordType.BottomMargin) { this.BottomMargin = (BottomMargin)BiffRecord.ReadRecord(reader); } // [Pls *Continue] if (BiffRecord.GetNextRecordType(reader) == RecordType.Pls) { this.Pls = (Pls)BiffRecord.ReadRecord(reader); this.Continues = new List <Continue>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.Continue) { this.Continues.Add((Continue)BiffRecord.ReadRecord(reader)); } } // Setup this.Setup = (Setup)BiffRecord.ReadRecord(reader); }
public DatSequence(IStreamReader reader) : base(reader) { // DAT = Dat Begin LD End this.Dat = (Dat)BiffRecord.ReadRecord(reader); this.Begin = (Begin)BiffRecord.ReadRecord(reader); this.LdSequence = new LdSequence(reader); this.End = (End)BiffRecord.ReadRecord(reader); }
public TextObjectSequence(IStreamReader reader) : base(reader) { //TEXTOBJECT = TxO *Continue // TxO this.TxO = (TxO)BiffRecord.ReadRecord(reader); // Continue this.Continue = new List <Continue>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.Continue) { this.Continue.Add((Continue)BiffRecord.ReadRecord(reader)); } }
public PicfSequence(IStreamReader reader) : base(reader) { // PICF = Begin PicF End // Begin this.Begin = (Begin)BiffRecord.ReadRecord(reader); // PicF this.PicF = (PicF)BiffRecord.ReadRecord(reader); // End this.End = (End)BiffRecord.ReadRecord(reader); }
public ChartSheetSequence(IStreamReader reader) : base(reader) { //BOF this.BOF = (BOF)BiffRecord.ReadRecord(reader); // [ChartFrtInfo] (not specified) if (BiffRecord.GetNextRecordType(reader) == RecordType.ChartFrtInfo) { this.ChartFrtInfo = (ChartFrtInfo)BiffRecord.ReadRecord(reader); } //CHARTSHEETCONTENT this.ChartSheetContentSequence = new ChartSheetContentSequence(reader); }
public AiSequence(IStreamReader reader) : base(reader) { //AI = BRAI [SeriesText] //BRAI this.BRAI = (BRAI)BiffRecord.ReadRecord(reader); //[SeriesText] if (BiffRecord.GetNextRecordType(reader) == RecordType.SeriesText) { this.SeriesText = (SeriesText)BiffRecord.ReadRecord(reader); } }
public BackgroundSequence(IStreamReader reader) : base(reader) { // BACKGROUND = BkHim *Continue // BkHim this.BkHim = (BkHim)BiffRecord.ReadRecord(reader); // *Continue this.Continues = new List <Continue>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.Continue) { this.Continues.Add((Continue)BiffRecord.ReadRecord(reader)); } }
public ObjectGroup(IStreamReader reader) { if (BiffRecord.GetNextRecordType(reader) == RecordType.Obj) { this.Obj = (Obj)BiffRecord.ReadRecord(reader); } else if (BiffRecord.GetNextRecordType(reader) == RecordType.TxO) { this.TextObjectSequence = new TextObjectSequence(reader); } else if (BiffRecord.GetNextRecordType(reader) == RecordType.BOF) { this.ChartSheetSequence = new ChartSheetSequence(reader); } }
public ShapePropsSequence(IStreamReader reader) : base(reader) { // SHAPEPROPS = ShapePropsStream *ContinueFrt12 // ShapePropsStream this.ShapePropsStream = (ShapePropsStream)BiffRecord.ReadRecord(reader); // *ContinueFrt12 this.ContinueFrt12s = new List <ContinueFrt12>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.ContinueFrt12) { this.ContinueFrt12s.Add((ContinueFrt12)BiffRecord.ReadRecord(reader)); } }
// public Obj Obj; public ObjSequence(IStreamReader reader) : base(reader) { //OBJ = Obj *Continue // Obj // this.Obj = (Obj)BiffRecord.ReadRecord(reader); // *Continue this.Continue = new List <Continue>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.Continue) { this.Continue.Add((Continue)BiffRecord.ReadRecord(reader)); } }
public SortData12Sequence(IStreamReader reader) : base(reader) { // SORTDATA12 = SortData *ContinueFrt12 // SortData this.SortData = (SortData)BiffRecord.ReadRecord(reader); // *ContinueFrt12 this.ContinueFrt12s = new List <ContinueFrt12>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.ContinueFrt12) { this.ContinueFrt12s.Add((ContinueFrt12)BiffRecord.ReadRecord(reader)); } }
public AutoFilterGroup(IStreamReader reader) { if (BiffRecord.GetNextRecordType(reader) == RecordType.AutoFilter) { this.AutoFilter = (AutoFilter)BiffRecord.ReadRecord(reader); } else { this.AutoFilter12 = (AutoFilter12)BiffRecord.ReadRecord(reader); this.ContinueFrt12s = new List <ContinueFrt12>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.ContinueFrt12) { this.ContinueFrt12s.Add((ContinueFrt12)BiffRecord.ReadRecord(reader)); } } }
//public EndObject EndObject; public AxmSequence(IStreamReader reader) : base(reader) { //AXM = YMult StartObject ATTACHEDLABEL EndObject //YMult this.YMult = (YMult)BiffRecord.ReadRecord(reader); //StartObject //this.StartObject = (StartObject)BiffRecord.ReadRecord(reader); //ATTACHEDLABEL this.AttachedLabelSequence = new AttachedLabelSequence(reader); //EndObject //this.EndObject = (EndObject)BiffRecord.ReadRecord(reader); }
//public EndObject EndObject; public DataLabelGroup(IStreamReader reader) { // *([DataLabExt StartObject] ATTACHEDLABEL [EndObject]) if (BiffRecord.GetNextRecordType(reader) == RecordType.DataLabExt) { this.DataLabExt = (DataLabExt)BiffRecord.ReadRecord(reader); //this.StartObject = (StartObject)BiffRecord.ReadRecord(reader); } this.AttachedLabelSequence = new AttachedLabelSequence(reader); //if (BiffRecord.GetNextRecordType(reader) == RecordType.EndObject) //{ // this.EndObject = (EndObject)BiffRecord.ReadRecord(reader); //} }
public LdSequence(IStreamReader reader) : base(reader) { /// Legend Begin Pos ATTACHEDLABEL [FRAME] [CrtLayout12] [TEXTPROPS] [CRTMLFRT] End // Legend this.Legend = (Legend)BiffRecord.ReadRecord(reader); // Begin this.Begin = (Begin)BiffRecord.ReadRecord(reader); // Pos this.Pos = (Pos)BiffRecord.ReadRecord(reader); // [ATTACHEDLABEL] this.AttachedLabelSequence = new AttachedLabelSequence(reader); // [FRAME] if (BiffRecord.GetNextRecordType(reader) == RecordType.Frame) { this.FrameSequence = new FrameSequence(reader); } // [CrtLayout12] if (BiffRecord.GetNextRecordType(reader) == RecordType.CrtLayout12) { this.CrtLayout12 = (CrtLayout12)BiffRecord.ReadRecord(reader); } // [TEXTPROPS] if (BiffRecord.GetNextRecordType(reader) == RecordType.RichTextStream || BiffRecord.GetNextRecordType(reader) == RecordType.TextPropsStream) { this.TextPropsSequence = new TextPropsSequence(reader); } //[CRTMLFRT] if (BiffRecord.GetNextRecordType(reader) == RecordType.CrtMlFrt) { this.CrtMlfrtSequence = new CrtMlfrtSequence(reader); } // End this.End = (End)BiffRecord.ReadRecord(reader); }
public ObjectsSequence(IStreamReader reader) : base(reader) { // OBJECTS = *(MsoDrawing *Continue *(TEXTOBJECT / OBJ / CHART)) [MsoDrawingSelection] // *(MsoDrawing *Continue *(TEXTOBJECT / OBJ / CHART)) this.DrawingsGroup = new List <DrawingsGroup>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.MsoDrawing) { this.DrawingsGroup.Add(new DrawingsGroup(reader)); } // [MsoDrawingSelection] if (BiffRecord.GetNextRecordType(reader) == RecordType.MsoDrawingSelection) { this.MsoDrawingSelection = (MsoDrawingSelection)BiffRecord.ReadRecord(reader); } }
public SeriesGroup(IStreamReader reader) { // SIIndex *(Number / BoolErr / Blank / Label) // SIIndex this.SIIndex = (SIIndex)BiffRecord.ReadRecord(reader); // *(Number / BoolErr / Blank / Label) this.Data = new List <AbstractCellContent>(); while ( BiffRecord.GetNextRecordType(reader) == RecordType.Number || BiffRecord.GetNextRecordType(reader) == RecordType.BoolErr || BiffRecord.GetNextRecordType(reader) == RecordType.Blank || BiffRecord.GetNextRecordType(reader) == RecordType.Label) { this.Data.Add((AbstractCellContent)BiffRecord.ReadRecord(reader)); } }
public IvAxisSequence(IStreamReader reader) : base(reader) { // IVAXIS = Axis Begin [CatSerRange] AxcExt [CatLab] AXS [CRTMLFRT] End // Axis this.Axis = (Axis)BiffRecord.ReadRecord(reader); // Begin this.Begin = (Begin)BiffRecord.ReadRecord(reader); // [CatSerRange] if (BiffRecord.GetNextRecordType(reader) == RecordType.CatSerRange) { this.CatSerRange = (CatSerRange)BiffRecord.ReadRecord(reader); } // AxcExt if (BiffRecord.GetNextRecordType(reader) == RecordType.AxcExt) { // NOTE: we parse this as an optional record because then we can use the IvAxisSequence to // parse a SeriesDataSequence as well. SeriesDataSequence is just a simple version of IvAxisSequence. // This simplifies mapping later on. this.AxcExt = (AxcExt)BiffRecord.ReadRecord(reader); } // [CatLab] if (BiffRecord.GetNextRecordType(reader) == RecordType.CatLab) { this.CatLab = (CatLab)BiffRecord.ReadRecord(reader); } // AXS this.AxsSequence = new AxsSequence(reader); // [CRTMLFRT] if (BiffRecord.GetNextRecordType(reader) == RecordType.CrtMlFrt) { this.CrtMlfrtSequence = new CrtMlfrtSequence(reader); } // End this.End = (End)BiffRecord.ReadRecord(reader); }
public CrtMlfrtSequence(IStreamReader reader) : base(reader) { //Spec says: CRTMLFRT = CrtMlFrt *CrtMlFrtContinue //Reality says: CRTMLFRT = *CrtMlFrt *CrtMlFrtContinue this.CrtMlFrts = new List <CrtMlFrt>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.CrtMlFrt) { this.CrtMlFrts.Add((CrtMlFrt)BiffRecord.ReadRecord(reader)); } this.CrtMlFrtContinues = new List <CrtMlFrtContinue>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.CrtMlFrtContinue) { this.CrtMlFrtContinues.Add((CrtMlFrtContinue)BiffRecord.ReadRecord(reader)); } }
public TextPropsSequence(IStreamReader reader) : base(reader) { // TEXTPROPS = (RichTextStream / TextPropsStream) *ContinueFrt12 // (RichTextStream / TextPropsStream) if (BiffRecord.GetNextRecordType(reader) == RecordType.TextPropsStream) { this.TextPropsStream = (TextPropsStream)BiffRecord.ReadRecord(reader); } else { this.RichTextStream = (RichTextStream)BiffRecord.ReadRecord(reader); } //*ContinueFrt12 this.ContinueFrt12s = new List <ContinueFrt12>(); while (BiffRecord.GetNextRecordType(reader) == RecordType.ContinueFrt12) { this.ContinueFrt12s.Add((ContinueFrt12)BiffRecord.ReadRecord(reader)); } }