protected void AcceptFormatRevisionCore(FormatBase format, int[] keysToPreserve, WordAttrCollection attr) { if (attr != null) { if ((format != null) && (keysToPreserve != null)) { object[] objArray = new object[keysToPreserve.Length]; for (int j = 0; j < keysToPreserve.Length; j++) { objArray[j] = base.method_31(keysToPreserve[j]); } attr.ClearAttrs(); for (int k = 0; k < keysToPreserve.Length; k++) { if (objArray[k] != null) { this.SetAttr(keysToPreserve[k], objArray[k]); } } } for (int i = 0; i < base.Count; i++) { attr.SetAttr(base.method_18(i), base.method_19(i)); } } }
protected override object CloneImpl() { FormatBase base2 = base.CloneImpl() as FormatBase; this.method_21(base2); return(base2); }
protected virtual void OnChange(FormatBase format, int propKey) { if (this.formatBase_1 != null) { this.ParentFormat.OnChange(format, propKey); } }
internal override void CopyPropertiesTo(FormatBase destFormat) { Border border = destFormat as Border; if (base.HasKey(2)) { border.BorderType = this.BorderType; } if (base.HasKey(1)) { border.Color = this.Color; } if (base.HasKey(3)) { border.LineWidth = this.LineWidth; } if (base.HasKey(4)) { border.Space = this.Space; } if (base.HasKey(5)) { border.Shadow = this.Shadow; } if (base.HasKey(7)) { border.Frame = this.Frame; } if (base.HasKey(6)) { border.HasNoneStyle = this.HasNoneStyle; } }
private void method_55(FormatBase A_0, int A_1) { int num = A_1; if (num > 0xbfe) { if (((num != 0xc08) && (num != 0xc12)) && (num != 0xc1c)) { return; } } else { switch (num) { case 0xbc4: case 0xbc6: this.PreferredWidth.IsDefault = false; break; case 0xbc5: break; case 0xbfe: goto Label_0051; default: return; } return; } Label_0051: this.Paddings.IsDefault = false; }
protected override void OnChange(FormatBase format, int propKey) { this.method_55(format, propKey); if ((!this.bool_2 && ((base.OwnerBase == null) || !base.OwnerBase.Document.bool_3)) && (((format is Spire.Doc.Documents.Borders) || (format is Border)) || !(format is Spire.Doc.Formatting.Paddings))) { } }
protected internal void ImportContainer(FormatBase format) { this.method_21(format); this.EnsureComposites(); this.IsDefault = false; this.method_8(); this.ImportMembers(format); this.method_20(format); }
protected void EnsureComposites(params int[] keys) { foreach (int num2 in keys) { FormatBase defComposite = this.GetDefComposite(num2); defComposite.EnsureComposites(); defComposite.IsDefault = false; } }
internal void method_25(FormatBase A_0) { foreach (KeyValuePair <int, object> pair in A_0.PropertiesHash) { if (!this.PropertiesHash.ContainsKey(pair.Key)) { this.PropertiesHash.Add(pair.Key, pair.Value); } } }
private void method_20(FormatBase A_0) { if ((A_0.list_1 != null) && (A_0.list_1.Count > 0)) { foreach (XmlNode node in A_0.XmlProps) { this.XmlProps.Add(node.Clone()); } } }
protected override void ImportMembers(FormatBase format) { if (format is CellFormat) { this.Borders.method_0(this); this.SamePaddingsAsTable = ((CellFormat)format).SamePaddingsAsTable; } else { this.method_57(format as RowFormat); } }
internal void method_21(FormatBase A_0) { Dictionary <int, object> propertiesHash = A_0.PropertiesHash; this.m_propertiesHash = new Dictionary <int, object>(propertiesHash.Count); IDictionaryEnumerator enumerator = propertiesHash.GetEnumerator(); while (enumerator.MoveNext()) { this.m_propertiesHash.Add((int)enumerator.Key, enumerator.Value); } }
public FormatBase(FormatBase parent, int parentKey) : this(null) { int num = 2; if ((parent.KeysOffset + 8) > 0x20) { throw new ArgumentOutOfRangeException(BookmarkStart.b("䜧䰩䨫崭唯䘱", num)); } this.m_propertiesHash = parent.PropertiesHash; this.m_propsUpdateFlags = parent.PropsUpdateFlags; this.int_6 = parentKey; this.formatBase_1 = parent; this.m_keysOffset = parent.KeysOffset + 8; }
internal virtual void CopyPropertiesTo(FormatBase destFormat) { foreach (KeyValuePair <int, object> pair in this.PropertiesHash) { if (pair.Value is FormatBase) { (pair.Value as FormatBase).CopyPropertiesTo(destFormat[pair.Key] as FormatBase); } else { destFormat[pair.Key] = pair.Value; } } }
internal void method_26(FormatBase A_0) { foreach (KeyValuePair <int, object> pair in A_0.PropertiesHash) { if ((!(pair.Value is Borders) && !(pair.Value is Border)) && (!(pair.Value is Paddings) && !(pair.Value is RowFormat.TablePositioning))) { if (this.PropertiesHash.ContainsKey(pair.Key)) { this.PropertiesHash[pair.Key] = pair.Value; } else { this.PropertiesHash.Add(pair.Key, pair.Value); } } } }
internal void method_22(FormatBase A_0, int A_1) { Dictionary <int, object> propertiesHash = A_0.PropertiesHash; if (propertiesHash.ContainsKey(A_1)) { object obj2 = propertiesHash[A_1]; if (!this.m_propertiesHash.ContainsKey(A_1)) { this.m_propertiesHash.Add(A_1, obj2); } else { this.m_propertiesHash[A_1] = obj2; } } }
internal void method_27(FormatBase A_0) { FormatBase base2 = A_0.method_23(); base2.BaseFormat = null; for (FormatBase base3 = A_0.BaseFormat; base3 != null; base3 = base3.BaseFormat) { foreach (KeyValuePair <int, object> pair in base3.PropertiesHash) { if (((!(pair.Value is Borders) && !(pair.Value is Border)) && (!(pair.Value is Paddings) && !(pair.Value is RowFormat.TablePositioning))) && !base2.PropertiesHash.ContainsKey(pair.Key)) { base2.PropertiesHash.Add(pair.Key, pair.Value); } } } this.method_26(base2); base2 = null; }
protected FormatBase GetDefComposite(int key, FormatBase value) { int fullKey = this.GetFullKey(key); this.PropertiesHash[fullKey] = value; if ((this.BaseFormat != null) && (this.BaseFormat.PropertiesHash != null)) { FormatBase base2; if (this.BaseFormat.PropertiesHash.ContainsKey(fullKey)) { base2 = this.BaseFormat.PropertiesHash[fullKey] as FormatBase; } else { base2 = this.BaseFormat[fullKey] as FormatBase; } value.ApplyBase(base2); } return(value); }
private object method_29(int A_0) { object obj2 = this.BaseFormat[A_0]; if ((((this is CharacterFormat) && ((this as CharacterFormat).TableStyleCharacterFormat != null)) && !(obj2 is bool)) || ((this is ParagraphFormat) && ((this as ParagraphFormat).TableStyleParagraphFormat != null))) { FormatBase baseFormat = this.BaseFormat; int fullKey = this.GetFullKey(A_0); while (!baseFormat.PropertiesHash.ContainsKey(fullKey)) { if (baseFormat.BaseFormat == null) { if (this is CharacterFormat) { return((this as CharacterFormat).TableStyleCharacterFormat[A_0]); } return((this as ParagraphFormat).TableStyleParagraphFormat[A_0]); } baseFormat = baseFormat.BaseFormat; } } if ((this is ParagraphFormat) && (((A_0 == 0x488) || (A_0 == 0x492)) || ((A_0 == 0x44) || (A_0 == 70)))) { ListFormat listFormat = null; if ((this as ParagraphFormat).OwnerBase is Paragraph) { listFormat = ((this as ParagraphFormat).OwnerBase as Paragraph).ListFormat; } else if ((this as ParagraphFormat).OwnerBase is ParagraphStyle) { listFormat = ((this as ParagraphFormat).OwnerBase as ParagraphStyle).ListFormat; } if ((listFormat != null) && listFormat.IsEmptyList) { return(null); } } return(obj2); }
public Border(FormatBase parent, int baseKey) : base(parent, baseKey) { switch (baseKey) { case 1: this.borderPositions_0 = BorderPositions.Left; break; case 2: this.borderPositions_0 = BorderPositions.Top; break; case 3: this.borderPositions_0 = BorderPositions.Bottom; break; case 4: this.borderPositions_0 = BorderPositions.Right; break; case 5: this.borderPositions_0 = BorderPositions.Vertical; break; case 6: this.borderPositions_0 = BorderPositions.Horizontal; break; case 7: this.borderPositions_0 = BorderPositions.DiagonalDown; break; case 8: this.borderPositions_0 = BorderPositions.DiagonalUp; break; } base.method_0(parent); }
internal Paddings(FormatBase A_0, int A_1) : base(A_0, A_1) { this.bool_3 = true; }
protected override void OnChange(FormatBase format, int propertyKey) { base.OnChange(format, propertyKey); }
internal override void ApplyBase(FormatBase baseFormat) { base.ApplyBase(baseFormat); this.Borders.ApplyBase((baseFormat as CellFormat).Borders); this.Paddings.ApplyBase((baseFormat as CellFormat).Paddings); }
protected virtual void ImportMembers(FormatBase format) { }
internal void method_24(FormatBase A_0) { this.m_propertiesHash = A_0.PropertiesHash; }
public FormatBase(FormatBase parent, int parentKey, int parentOffset) : this(parent, parentKey) { }
internal virtual void ApplyBase(FormatBase baseFormat) { this.formatBase_0 = baseFormat; }
public WordAttrCollection(FormatBase parent, int baseKey) : base(parent, baseKey) { }
internal override void ApplyBase(FormatBase baseFormat) { base.ApplyBase(baseFormat); }