Exemplo n.º 1
0
        public void Save()
        {
            this._sectionProperties.WriteToBody(this._currentPart.Writer.TextWriter, (OpenXmlSectionPropertiesModel.IHeaderFooterReferences)(object) this._currentHeaderFooterReferences);
            this._firstSection = true;
            this._sectionProperties.Continuous = false;
            this.WriteCloseTag(CT_Document.BodyElementName);
            this.WriteCloseTag(this._currentPart.Part.Tag);
            Package     zipPackage = this.ZipPackage;
            PackagePart part       = zipPackage.GetPart(new Uri(PartManager.CleanName(this._currentPart.PartName), UriKind.Relative));
            Stream      stream     = part.GetStream();

            this._currentPart.Writer.Interleave(stream, this.WriteInterleaverToDocument);
            this.WriteNumberingPart();
            this._manager.Write();
        }
Exemplo n.º 2
0
        private void FinishHeaderOrFooter()
        {
            if (this._currentPart.Writer.Location == this._currentPart.StartingLocation)
            {
                OpenXmlParagraphModel.WriteInvisibleParagraph(this._currentPart.Writer.TextWriter);
            }
            this.WriteCloseTag(this._currentPart.Part.Tag);
            Package     zipPackage = this.ZipPackage;
            PackagePart part       = zipPackage.GetPart(new Uri(PartManager.CleanName(this._currentPart.PartName), UriKind.Relative));
            Stream      stream     = part.GetStream();

            this._currentPart.Writer.Interleave(stream, this.WriteInterleaverToHeaderOrFooter);
            this._currentPart.Stream.Dispose();
            this._currentPart = this._documentPart;
        }