コード例 #1
0
 /**
 * Writes the RTF information group and its elements.
 */    
 public override void WriteContent(Stream result) {
     result.Write(OPEN_GROUP, 0, OPEN_GROUP.Length);
     result.Write(INFO_GROUP, 0, INFO_GROUP.Length);
     for (int i = 0; i < infoElements.Count; i++) {
         RtfInfoElement infoElement = (RtfInfoElement) infoElements[i];
         infoElement.WriteContent(result);
     }
     
     // handle document protection
     if (document.GetDocumentSettings().IsDocumentProtected()) {
         byte[] t;
         result.Write(OPEN_GROUP, 0, OPEN_GROUP.Length);
         result.Write(INFO_PASSWORD, 0, INFO_PASSWORD.Length);
         result.Write(DELIMITER, 0, DELIMITER.Length);
         result.Write(t = document.GetDocumentSettings().GetProtectionHashBytes(), 0, t.Length);
         result.Write(CLOSE_GROUP, 0, CLOSE_GROUP.Length);
     }
     result.Write(CLOSE_GROUP, 0, CLOSE_GROUP.Length);
     this.document.OutputDebugLinebreak(result);
 }
コード例 #2
0
 /**
  * Adds an RtfInfoElement to the list of RtfInfoElements
  *
  * @param rtfInfoElement The RtfInfoElement to add
  */
 public void AddInfoElement(RtfInfoElement rtfInfoElement)
 {
     this.infoGroup.Add(rtfInfoElement);
 }
コード例 #3
0
 /**
 * Adds an RtfInfoElement to the RtfInfoGroup
 * 
 * @param infoElement The RtfInfoElement to add
 */
 public void Add(RtfInfoElement infoElement) {
     this.infoElements.Add(infoElement);
 }