コード例 #1
0
ファイル: POIFSDocument.cs プロジェクト: xewn/Npoi.Core
 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);
     }
 }
コード例 #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;
 }
コード例 #3
0
 public POIFSDocument(string name, int size, POIFSDocumentPath path, POIFSWriterListener writer)
     : this(name, size, POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, path, writer)
 {
 }