using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.Text; namespace FastReport.RichTextParser { /// /// This class represents a RTF document header. /// /// /// Refer to RTF-1.7 spec for detail description /// class RTF_Header { private RichDocument doc; private enum HeaderParserState { Starting, Signature, GlobalProperties, SubitemFirstLevel, FontTable, ColorTable, StyleSheet, DocInfoSection, SkipFormatExtension } private enum StyleState { Wait, Parse }; private bool header_active; private int recursion_counter; private HeaderParserState tag_state; private StyleState style_state; private Dictionary font_ids; public RichDocument Document { get { return doc; } } public RTF_Header(RichDocument doc) { this.doc = doc; this.doc.font_list = new List(); this.doc.color_list = new List(); this.doc.color_list.Add(Color.Black); this.doc.style_list = new List