/// <summary>
 /// Initializes a new instance of the <see cref="POIFSWriterEvent"/> class.
 /// </summary>
 /// <param name="stream">the POIFSDocumentWriter, freshly opened</param>
 /// <param name="path">the path of the document</param>
 /// <param name="documentName">the name of the document</param>
 /// <param name="limit">the limit, in bytes, that can be written to the stream</param>
 public POIFSWriterEventArgs(DocumentOutputStream stream, POIFSDocumentPath path, string documentName, int limit)
 {
     this.stream = stream;
     this.path = path;
     this.documentName = documentName;
     this.limit = limit;
 }
Ejemplo n.º 2
0
 internal virtual void WriteBlocks(Stream stream)
 {
     if (this.Valid)
     {
         if (this.writer != null)
         {
             DocumentOutputStream stream2 = new DocumentOutputStream(stream, this.size);
             //OnBeforeWriting(new POIFSWriterEventArgs(stream2, this.path, this.name, this.size));
             writer.ProcessPOIFSWriterEvent(new POIFSWriterEvent(stream2, path, name, size));
             stream2.WriteFiller(this.CountBlocks * POIFSConstants.BIG_BLOCK_SIZE, DocumentBlock.FillByte);
         }
         else
         {
             for (int i = 0; i < this.bigBlocks.Length; i++)
             {
                 this.bigBlocks[i].WriteBlocks(stream);
             }
         }
     }
 }
Ejemplo n.º 3
0
 internal virtual void WriteBlocks(Stream stream)
 {
     if (this.Valid)
     {
         if (this.writer != null)
             {
                 DocumentOutputStream stream2 = new DocumentOutputStream(stream, this.size);
                 //OnBeforeWriting(new POIFSWriterEventArgs(stream2, this.path, this.name, this.size));
             writer.ProcessPOIFSWriterEvent(new POIFSWriterEvent(stream2, path, name, size));
             stream2.WriteFiller(this.CountBlocks * POIFSConstants.BIG_BLOCK_SIZE, DocumentBlock.FillByte);
         }
         else
         {
             for (int i = 0; i < this.bigBlocks.Length; i++)
             {
                 this.bigBlocks[i].WriteBlocks(stream);
             }
         }
     }
 }