AddDefaultNumberingXml() static private method

If this document does not contain a /word/numbering.xml add the default one generated by Microsoft Word when the default bullet, numbered and multilevel lists are added to a blank document
static private AddDefaultNumberingXml ( Package package ) : System.Xml.Linq.XDocument
package System.IO.Packaging.Package
return System.Xml.Linq.XDocument
Ejemplo n.º 1
0
        private void ValidateDocXNumberingPartExists()
        {
            Uri uri = new Uri("/word/numbering.xml", UriKind.Relative);

            if (!base.Document.package.PartExists(uri))
            {
                base.Document.numbering = HelperFunctions.AddDefaultNumberingXml(base.Document.package);
            }
        }
Ejemplo n.º 2
0
        private void ValidateDocXNumberingPartExists()
        {
            var numberingUri = new Uri("/word/numbering.xml", UriKind.Relative);

            // If the internal document contains no /word/numbering.xml create one.
            if (!Document.package.PartExists(numberingUri))
            {
                Document.numbering = HelperFunctions.AddDefaultNumberingXml(Document.package);
            }
        }