internal void Save() { _sectionProperties.WriteToBody(_currentPart.Writer.TextWriter, _currentHeaderFooterReferences); _firstSection = true; _sectionProperties.Continuous = false; WriteCloseTag(CT_Document.BodyElementName); WriteCloseTag(_currentPart.Part.Tag); Stream stream = ZipPackage.GetPart(new Uri(PartManager.CleanName(_currentPart.PartName), UriKind.Relative)).GetStream(); _currentPart.Writer.Interleave(stream, WriteInterleaverToDocument); WriteNumberingPart(); _manager.Write(); }
private void FinishHeaderOrFooter() { if (_currentPart.Writer.Location == _currentPart.StartingLocation) { OpenXmlParagraphModel.WriteInvisibleParagraph(_currentPart.Writer.TextWriter); } WriteCloseTag(_currentPart.Part.Tag); Stream stream = ZipPackage.GetPart(new Uri(PartManager.CleanName(_currentPart.PartName), UriKind.Relative)).GetStream(); _currentPart.Writer.Interleave(stream, WriteInterleaverToHeaderOrFooter); _currentPart.Stream.Dispose(); _currentPart = _documentPart; }