private void method_4() { if (this.OwnerSDTInlineContent != null) { SDTInlineContent ownerSDTInlineContent = this.OwnerSDTInlineContent; int count = ownerSDTInlineContent.Items.Count; if ((this.int_2 >= count) || (this.textRange_0 != ownerSDTInlineContent.Items[this.int_2])) { this.int_2 = this.textRange_0.method_5(); } if ((this.int_3 >= count) || (this.textRange_1 != ownerSDTInlineContent.Items[this.int_3])) { this.int_3 = this.textRange_1.method_5(); } } else { if ((this.textRange_0.Owner != this.OwnerParagraph) || (this.textRange_1.Owner != this.OwnerParagraph)) { throw new InvalidOperationException(); } int num2 = this.OwnerParagraph.Items.Count; if ((this.int_2 >= num2) || (this.textRange_0 != this.OwnerParagraph.Items[this.int_2])) { this.int_2 = this.textRange_0.method_5(); } if ((this.int_3 >= num2) || (this.textRange_1 != this.OwnerParagraph.Items[this.int_3])) { this.int_3 = this.textRange_1.method_5(); } } }
public StructureDocumentTagInline(Document doc) : base(doc) { this.sdtproperties_0 = new Spire.Doc.Documents.SDTProperties(this); this.sdtinlineContent_0 = new SDTInlineContent(doc, this); this.sdtinlineContent_0.method_0(this); base.m_charFormat = new CharacterFormat(doc); }
protected override object CloneImpl() { SDTInlineContent content = (SDTInlineContent)base.CloneImpl(); content.paragraphItemCollection_0 = new ParagraphItemCollection(base.Document); content.paragraphItemCollection_0.method_0(content); this.paragraphItemCollection_0.method_22(content.paragraphItemCollection_0); content.stringBuilder_0 = new StringBuilder(1); content.stringBuilder_0.Append(this.Text); content.method_0(null); return(content); }
internal void method_3(SDTInlineContent A_0, int A_1, bool A_2, CharacterFormat A_3) { this.method_1(); foreach (TextRange range2 in this.textRange_2) { TextRange entity = (TextRange)range2.Clone(); if (A_2 && (A_3 != null)) { entity.CharacterFormat.ImportContainer(A_3); } A_0.Items.Insert(A_1, entity); A_1++; } }
internal TextSelection(SDTInlineContent A_0, int A_1, int A_2) { this.list_0 = new List <TextRange>(); this.sdtinlineContent_0 = A_0; this.paragraph_0 = A_0.OwnerParagraph; if (A_0.Items.Count != 0) { TextRange range; this.int_2 = Class191.smethod_4(A_0, A_1 + 1, out range); if (range != null) { this.int_0 = A_1 - range.StartPos; this.textRange_0 = range; this.int_3 = Class191.smethod_4(A_0, A_2, out range); if ((this.int_3 >= this.int_2) && (range != null)) { this.int_1 = A_2 - range.StartPos; } else { for (int j = A_0.Items.Count; j > 0; j--) { ParagraphBase base2 = A_0[j - 1]; if (base2 is TextRange) { range = base2 as TextRange; break; } } this.int_1 = (A_2 - range.StartPos) - 1; } this.textRange_1 = range; if (this.int_1 == range.TextLength) { this.int_1 = -1; } for (int i = this.int_2; i <= this.int_3; i++) { range = A_0.Items[i] as TextRange; if (range != null) { this.list_0.Add(range); } } } } }