Ejemplo n.º 1
0
        public void Init(CreateAndRegisterStream createAndRegisterStream, AutoFit autoFit, string reportName)
        {
            this.m_outStream       = createAndRegisterStream(reportName, "doc", null, "application/msword", false, StreamOper.CreateAndRegister);
            this.m_tableStream     = createAndRegisterStream("TableStream", null, null, null, true, StreamOper.CreateOnly);
            this.m_mainStream      = createAndRegisterStream("WordDocument", null, null, null, true, StreamOper.CreateOnly);
            this.m_fontTable       = createAndRegisterStream("FontTable", null, null, null, true, StreamOper.CreateOnly);
            this.m_dataStream      = createAndRegisterStream("Data", null, null, null, true, StreamOper.CreateOnly);
            this.m_listStream      = createAndRegisterStream("List", null, null, null, true, StreamOper.CreateOnly);
            this.m_listLevelStream = createAndRegisterStream("ListLevel", null, null, null, true, StreamOper.CreateOnly);
            Stream textPiece = createAndRegisterStream("TextPiece", null, null, null, true, StreamOper.CreateOnly);
            Stream chpTable  = createAndRegisterStream("ChpTable", null, null, null, true, StreamOper.CreateOnly);
            Stream papTable  = createAndRegisterStream("PapTable", null, null, null, true, StreamOper.CreateOnly);

            this.m_charFormat  = new CharacterFormat(chpTable, this.m_fcStart);
            this.m_parFormat   = new ParagraphFormat(papTable, this.m_fcStart);
            this.m_wordText    = new WordText(textPiece);
            this.m_secFormat   = new SectionFormat();
            this.m_currentRow  = new TableData(1, true);
            this.m_tapStack    = new Stack <TableData>();
            this.m_fontNameSet = new Dictionary <string, int>();
            this.WriteFont("Times New Roman");
            this.WriteFont("Symbol");
            this.WriteFont("Arial");
            this.m_imgIndex    = 0;
            this.m_fldsMain    = new FieldsTable();
            this.m_fldsHdr     = new FieldsTable();
            this.m_fldsCurrent = this.m_fldsMain;
            this.m_bookmarks   = new Bookmarks();
            this.m_images      = new Dictionary <ImageHash, int>();
            this.m_autoFit     = autoFit;
        }
Ejemplo n.º 2
0
 public void InitHeaderFooter()
 {
     this.m_ccpText             = this.m_wordText.CurrentCp;
     this.m_headerFooterOffsets = new int[14 + 6 * this.m_secFormat.SectionCount];
     this.m_fldsCurrent         = this.m_fldsHdr;
 }