GetContent() private method

private GetContent ( ) : Object[]
return Object[]
Esempio n. 1
0
 /**
  * Constructs a RtfHeaderFooter as a copy of an existing RtfHeaderFooter.
  * For internal use only.
  *
  * @param doc The RtfDocument this RtfHeaderFooter belongs to
  * @param headerFooter The RtfHeaderFooter to copy
  * @param displayAt The display location of this RtfHeaderFooter
  */
 protected internal RtfHeaderFooter(RtfDocument doc, RtfHeaderFooter headerFooter, int displayAt) : base(new Phrase(""), false)
 {
     this.document  = doc;
     this.content   = headerFooter.GetContent();
     this.displayAt = displayAt;
     for (int i = 0; i < this.content.Length; i++)
     {
         if (this.content[i] is IElement)
         {
             try {
                 this.content[i] = this.document.GetMapper().MapElement((IElement)this.content[i]);
             } catch (DocumentException) {
             }
         }
         if (this.content[i] is IRtfBasicElement)
         {
             ((IRtfBasicElement)this.content[i]).SetInHeader(true);
         }
     }
 }
Esempio n. 2
0
 /**
 * Constructs a RtfHeaderFooter as a copy of an existing RtfHeaderFooter.
 * For internal use only.
 *
 * @param doc The RtfDocument this RtfHeaderFooter belongs to
 * @param headerFooter The RtfHeaderFooter to copy
 * @param displayAt The display location of this RtfHeaderFooter
 */
 protected internal RtfHeaderFooter(RtfDocument doc, RtfHeaderFooter headerFooter, int displayAt)
     : base(new Phrase(""), false)
 {
     this.document = doc;
     this.content = headerFooter.GetContent();
     this.displayAt = displayAt;
     for (int i = 0; i < this.content.Length; i++) {
         if (this.content[i] is IElement) {
             try {
                 this.content[i] = this.document.GetMapper().MapElement((IElement) this.content[i])[0];
             } catch (DocumentException) {
             }
         }
         if (this.content[i] is IRtfBasicElement) {
             ((IRtfBasicElement) this.content[i]).SetInHeader(true);
         }
     }
 }