예제 #1
0
        /// <summary>
        /// Renders a section to RTF
        /// </summary>
        internal override void Render()
        {
            this.useEffectiveValue = true;

            Sections secs = DocumentRelations.GetParent(this.section) as Sections;

            if (this.section != secs.First)
            {
                this.rtfWriter.WriteControl("pard");
                this.rtfWriter.WriteControl("sect");
            }
            this.rtfWriter.WriteControl("sectd");

            //Rendering some footnote attributes:
            this.docRenderer.RenderSectionProperties();

            object pageStp = this.section.PageSetup;

            if (pageStp != null)
            {
                RendererFactory.CreateRenderer((PageSetup)pageStp, this.docRenderer).Render();
            }

            object hdrs = GetValueAsIntended("Headers");

            if (hdrs != null)
            {
                HeadersFootersRenderer hfr = new HeadersFootersRenderer(hdrs as HeadersFooters, this.docRenderer);
                //PageSetup muss hier gesetzt werden, da die HeaderFooter anderem Abschnitt gehören können als das PageSetup
                hfr.PageSetup = (PageSetup)pageStp;
                hfr.Render();
            }

            object ftrs = GetValueAsIntended("Footers");

            if (ftrs != null)
            {
                HeadersFootersRenderer hfr = new HeadersFootersRenderer(ftrs as HeadersFooters, this.docRenderer);
                hfr.PageSetup = (PageSetup)pageStp;
                hfr.Render();
            }

            if (!section.IsNull("Elements"))
            {
                foreach (DocumentObject docObj in this.section.Elements)
                {
                    RendererBase rndrr = RendererFactory.CreateRenderer(docObj, this.docRenderer);
                    if (rndrr != null)
                    {
                        rndrr.Render();
                    }
                }
            }
        }
예제 #2
0
        /// <summary>
        /// Renders a section to RTF
        /// </summary>
        internal override void Render()
        {
            _useEffectiveValue = true;

            Sections secs = DocumentRelations.GetParent(_section) as Sections;

            if (_section != secs.First)
            {
                _rtfWriter.WriteControl("pard");
                _rtfWriter.WriteControl("sect");
            }
            _rtfWriter.WriteControl("sectd");

            //Rendering some footnote attributes:
            _docRenderer.RenderSectionProperties();

            object pageStp = _section.PageSetup;

            if (pageStp != null)
            {
                RendererFactory.CreateRenderer((PageSetup)pageStp, _docRenderer).Render();
            }

            object hdrs = GetValueAsIntended("Headers");

            if (hdrs != null)
            {
                HeadersFootersRenderer hfr = new HeadersFootersRenderer(hdrs as HeadersFooters, _docRenderer);
                // PageSetup has to be set here, because HeaderFooter could be from a different section than PageSetup.
                hfr.PageSetup = (PageSetup)pageStp;
                hfr.Render();
            }

            object ftrs = GetValueAsIntended("Footers");

            if (ftrs != null)
            {
                HeadersFootersRenderer hfr = new HeadersFootersRenderer(ftrs as HeadersFooters, _docRenderer);
                hfr.PageSetup = (PageSetup)pageStp;
                hfr.Render();
            }

            if (!_section.IsNull("Elements"))
            {
                foreach (DocumentObject docObj in _section.Elements)
                {
                    RendererBase rndrr = RendererFactory.CreateRenderer(docObj, _docRenderer);
                    if (rndrr != null)
                    {
                        rndrr.Render();
                    }
                }
            }
        }
예제 #3
0
    /// <summary>
    /// Renders a section to RTF
    /// </summary>
    internal override void Render()
    {
      this.useEffectiveValue = true;

      Sections secs = DocumentRelations.GetParent(this.section) as Sections;
      if (this.section != secs.First)
      {
        this.rtfWriter.WriteControl("pard");
        this.rtfWriter.WriteControl("sect");
      }
      this.rtfWriter.WriteControl("sectd");

      //Rendering some footnote attributes:
      this.docRenderer.RenderSectionProperties();

      object pageStp = this.section.PageSetup;
      if (pageStp != null)
        RendererFactory.CreateRenderer((PageSetup)pageStp, this.docRenderer).Render();

      object hdrs = GetValueAsIntended("Headers");
      if (hdrs != null)
      {
        HeadersFootersRenderer hfr = new HeadersFootersRenderer(hdrs as HeadersFooters, this.docRenderer);
        //PageSetup muss hier gesetzt werden, da die HeaderFooter anderem Abschnitt gehören können als das PageSetup
        hfr.PageSetup = (PageSetup)pageStp;
        hfr.Render();
      }

      object ftrs = GetValueAsIntended("Footers");
      if (ftrs != null)
      {
        HeadersFootersRenderer hfr = new HeadersFootersRenderer(ftrs as HeadersFooters, this.docRenderer);
        hfr.PageSetup = (PageSetup)pageStp;
        hfr.Render();
      }

      if (!section.IsNull("Elements"))
      {
        foreach (DocumentObject docObj in this.section.Elements)
        {
          RendererBase rndrr = RendererFactory.CreateRenderer(docObj, this.docRenderer);
          if (rndrr != null)
            rndrr.Render();
        }
      }
    }
예제 #4
0
        /// <summary>
        /// Renders a section to RTF
        /// </summary>
        internal override void Render()
        {
            _useEffectiveValue = true;

            Sections secs = DocumentRelations.GetParent(_section) as Sections;
            if (_section != secs.First)
            {
                _rtfWriter.WriteControl("pard");
                _rtfWriter.WriteControl("sect");
            }
            _rtfWriter.WriteControl("sectd");

            //Rendering some footnote attributes:
            _docRenderer.RenderSectionProperties();

            object pageStp = _section.PageSetup;
            if (pageStp != null)
                RendererFactory.CreateRenderer((PageSetup)pageStp, _docRenderer).Render();

            object hdrs = GetValueAsIntended("Headers");
            if (hdrs != null)
            {
                HeadersFootersRenderer hfr = new HeadersFootersRenderer(hdrs as HeadersFooters, _docRenderer);
                // PageSetup has to be set here, because HeaderFooter could be from a different section than PageSetup.
                hfr.PageSetup = (PageSetup)pageStp;
                hfr.Render();
            }

            object ftrs = GetValueAsIntended("Footers");
            if (ftrs != null)
            {
                HeadersFootersRenderer hfr = new HeadersFootersRenderer(ftrs as HeadersFooters, _docRenderer);
                hfr.PageSetup = (PageSetup)pageStp;
                hfr.Render();
            }

            if (!_section.IsNull("Elements"))
            {
                foreach (DocumentObject docObj in _section.Elements)
                {
                    RendererBase rndrr = RendererFactory.CreateRenderer(docObj, _docRenderer);
                    if (rndrr != null)
                        rndrr.Render();
                }
            }
        }