private void method_18() { int num = 9; this.styleCollection_0 = new StyleCollection(this.DefaultParaPr.Document); for (int i = 0; i < 15; i++) { this.styleCollection_0.InnerList.Insert(i, null); } int num3 = 15; foreach (Style style2 in this) { Style style = style2.Clone() as Style; if ((style2.Name == BookmarkStart.b("愮帰䄲場嘶唸", num)) && (this.styleCollection_0.InnerList[0] == null)) { style.StyleDocId = 0; style.method_14(StyleIdentifier.Normal); this.styleCollection_0.InnerList[0] = style; } else if ((style2.StyleIdentifier < StyleIdentifier.Index1) && (this.styleCollection_0.InnerList[(int)style2.StyleIdentifier] == null)) { style.StyleDocId = (int)style2.StyleIdentifier; this.styleCollection_0.InnerList[style.StyleDocId] = style; } else if ((style2.StyleIdentifier == StyleIdentifier.DefaultParagraphFont) && (this.styleCollection_0.InnerList[10] == null)) { style.StyleDocId = 10; this.styleCollection_0.InnerList[10] = style; } else if ((style2.StyleIdentifier == StyleIdentifier.TableNormal) && (this.styleCollection_0.InnerList[11] == null)) { style.StyleDocId = 11; this.styleCollection_0.InnerList[11] = style; } else if ((style2.StyleIdentifier == StyleIdentifier.NoList) && (this.styleCollection_0.InnerList[12] == null)) { style.StyleDocId = 12; this.styleCollection_0.InnerList[12] = style; } else { style.StyleDocId = num3; this.styleCollection_0.InnerList.Add(style); num3++; } this.styleCollection_0.class656_0.method_5(style.StyleDocId, style); } while (this.styleCollection_0.InnerList.Contains(null)) { this.styleCollection_0.InnerList.Remove(null); } }
internal override void CloneToImpl(CollectionEx coll) { StyleCollection styles = coll as StyleCollection; int num = 0; int count = base.InnerList.Count; while (num < count) { styles.Add((base.InnerList[num] as IStyle).Clone()); num++; } }
public int Add(IStyle style) { int num = 9; if (style == null) { throw new ArgumentNullException(BookmarkStart.b("尮䔰䨲头制", num)); } DocumentSerializable serializable = (DocumentSerializable)style; serializable.CloneRelationsTo(base.Document, null); serializable.method_0(base.Document); if ((style as Style).BaseStyle != null) { Style baseStyle = (style as Style).BaseStyle as Style; if (!(this.FindByName(baseStyle.Name, baseStyle.StyleType) is Style)) { this.Add(baseStyle.Clone()); } if (style is ParagraphStyle) { (style as ParagraphStyle).ApplyBaseStyle(baseStyle.Name); } else if (style is Class13) { (style as Class13).ApplyBaseStyle(baseStyle.Name); } else { (style as Style).ApplyBaseStyle(baseStyle.Name); } } if (this.styleCollection_0 != null) { this.styleCollection_0.method_4(); this.styleCollection_0 = null; } return(base.InnerList.Add(style)); }
public ListStyle FindByName(string name) { return(StyleCollection.smethod_0(base.InnerList, name) as ListStyle); }