public WordDocument(Stream stream) { package = new WordDocumentPackage(stream); Body = new DocumentBody(this, package.DocumentPart); FooderCollection = new FooderCollection(package, this); NumberingCollection = new NumberingCollection(package.NumberingPart, package); }
public WordDocument(CultureInfo culture, bool isTemplate = false) { package = new WordDocumentPackage(culture, isTemplate); Body = new DocumentBody(this, package.DocumentPart); FooderCollection = new FooderCollection(package, this); NumberingCollection = new NumberingCollection(null, package); }
public void Save(Stream stream) { Body.SavePackagePart(); FooderCollection.SavePackageParts(); Styles.SavePackagePart(); NumberingCollection.SavePackagePart(); package.Save(stream); }
public int GetNewDrawingId() { return(new[] { 1, Body.GetMaxDrawingId(), FooderCollection.GetMaxDrawingId() // TODO: Here go other document parts that may contain drawings } .Max()); }