Beispiel #1
0
 public POIFSDocument(string name, int size, POIFSBigBlockSize bigBlockSize, POIFSDocumentPath path, POIFSWriterListener writer)
 {
     _size              = size;
     _bigBigBlockSize   = bigBlockSize;
     _property          = new DocumentProperty(name, _size);
     _property.Document = this;
     if (_property.ShouldUseSmallBlocks)
     {
         _small_store = new SmallBlockStore(_bigBigBlockSize, path, name, size, writer);
         _big_store   = new BigBlockStore(_bigBigBlockSize, EMPTY_BIG_BLOCK_ARRAY);
     }
     else
     {
         _small_store = new SmallBlockStore(_bigBigBlockSize, EMPTY_SMALL_BLOCK_ARRAY);
         _big_store   = new BigBlockStore(_bigBigBlockSize, path, name, size, writer);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DocumentDescriptor"/> class.
 /// </summary>
 /// <param name="path">the Document path</param>
 /// <param name="name">the Document name</param>
 public DocumentDescriptor(POIFSDocumentPath path, string name)
 {
     if (path == null)
     {
         throw new NullReferenceException("path must not be null");
     }
     if (name == null)
     {
         throw new NullReferenceException("name must not be null");
     }
     if (name.Length == 0)
     {
         throw new ArgumentException("name cannot be empty");
     }
     this.path = path;
     this.name = name;
 }
Beispiel #3
0
 public POIFSDocument(string name, int size, POIFSDocumentPath path, POIFSWriterListener writer)
     : this(name, size, POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, path, writer)
 {
 }