// Token: 0x060067C0 RID: 26560 RVA: 0x001D1538 File Offset: 0x001CF738
        internal override void Update(EmbeddedObject newObject)
        {
            AttachedObject attachedObject = newObject as AttachedObject;

            ErrorHandler.Assert(attachedObject != null, ErrorHandler.EmbeddedObjectTypeMismatch);
            ErrorHandler.Assert(attachedObject.Element.Equals(this.Element), ErrorHandler.EmbeddedObjectOwnerMismatch);
            this.Dcp = attachedObject.Dcp;
            this.Para.SetUpdateInfo(PTS.FSKCHANGE.fskchInside, false);
        }
Example #2
0
        // Token: 0x06006B3E RID: 27454 RVA: 0x001EF93C File Offset: 0x001EDB3C
        internal void UpdateTextContentRangeFromAttachedObjects(TextContentRange textContentRange, int dcpFirst, int dcpLast, PTS.FSATTACHEDOBJECTDESCRIPTION[] arrayAttachedObjectDesc)
        {
            int num  = dcpFirst;
            int num2 = 0;

            while (this._attachedObjects != null && num2 < this._attachedObjects.Count)
            {
                AttachedObject attachedObject = this._attachedObjects[num2];
                int            paragraphStartCharacterPosition = attachedObject.Para.ParagraphStartCharacterPosition;
                int            cch = attachedObject.Para.Cch;
                if (paragraphStartCharacterPosition >= num && paragraphStartCharacterPosition < dcpLast)
                {
                    textContentRange.Merge(new TextContentRange(num, paragraphStartCharacterPosition, base.StructuralCache.TextContainer));
                    num = paragraphStartCharacterPosition + cch;
                }
                if (dcpLast < num)
                {
                    break;
                }
                num2++;
            }
            if (num < dcpLast)
            {
                textContentRange.Merge(new TextContentRange(num, dcpLast, base.StructuralCache.TextContainer));
            }
            int num3 = 0;

            while (arrayAttachedObjectDesc != null && num3 < arrayAttachedObjectDesc.Length)
            {
                PTS.FSATTACHEDOBJECTDESCRIPTION fsattachedobjectdescription = arrayAttachedObjectDesc[num3];
                BaseParaClient baseParaClient = base.PtsContext.HandleToObject(arrayAttachedObjectDesc[num3].pfsparaclient) as BaseParaClient;
                PTS.ValidateHandle(baseParaClient);
                textContentRange.Merge(baseParaClient.GetTextContentRange());
                num3++;
            }
        }