internal static Numbering CreateNumbering(NumberingDefinitionsPart numberingDefinitionsPart) { //For now do not add bullet and numbered list when there are already numberings defined. //Otherwise the orgiginal numbering will not work. var element = new Numbering(); if (numberingDefinitionsPart != null) { element.Load(numberingDefinitionsPart); } else { var abstractNumberId = element.ChildElements.OfType <AbstractNum>().Count(); element.Append(CreateBulletList(abstractNumberId)); element.Append(CreateNumberedList(abstractNumberId + 1)); } return(element); }