public void RenderSection(DocumentSection section)
        {
            RenderParagraph(section.Heading, _formatting.SectionHeading);

            RenderSectionText(section.Text);

            foreach (DocumentSubSection subSection in section.SubSections)
            {
                _documentSubSectionRenderer.RenderSubSection(subSection);
            }

            _wordDocument.InsertSectionPageBreak();
        }
        private DocumentSection LoadDocumentSection(DocumentStructureEntity documentStructureEntity)
        {
            DocumentSection section = new DocumentSection();

            section.Tags = new[] { documentStructureEntity.TagName };

            section.Text = _documentTagService.LoadTagText(section.Tags);

            section.Heading = _documentTagService.LoadTagHeading(section.Tags);

            section.SubSections = LoadDocumentSubSections(documentStructureEntity.TagName, documentStructureEntity.ChildTags).ToArray();

            return section;
        }
Beispiel #3
0
        private void RenderSection(DocumentSection section)
        {
            IDocumentSectionRenderingOptions options =
                new DocumentSectionRenderingOptionsFactory().Build(section.Tags.FirstOrDefault());

            new DocumentSectionRendererFactory(_wordDocument)
                .Build(options)
                .RenderSection(section);
        }