// Token: 0x06006862 RID: 26722 RVA: 0x001D6B08 File Offset: 0x001D4D08
        internal void GetDurFigureAnchor(FigureParagraph paraFigure, uint fswdir, out int dur)
        {
            int    cpfromElement            = TextContainerHelper.GetCPFromElement(this._paraClient.Paragraph.StructuralCache.TextContainer, paraFigure.Element, ElementEdge.BeforeStart);
            int    firstCharacterIndex      = cpfromElement - this._cpPara;
            double distanceFromCharacterHit = this._line.GetDistanceFromCharacterHit(new CharacterHit(firstCharacterIndex, 0));

            dur = TextDpi.ToTextDpi(distanceFromCharacterHit);
        }
Beispiel #2
0
        // Token: 0x06006B2F RID: 27439 RVA: 0x001EF478 File Offset: 0x001ED678
        internal List <AttachedObject> GetAttachedObjects(int dcpFirst, int dcpLast)
        {
            ITextPointer          contentStart           = TextContainerHelper.GetContentStart(base.StructuralCache.TextContainer, base.Element);
            List <AttachedObject> list                   = new List <AttachedObject>();
            List <TextElement>    attachedObjectElements = this.GetAttachedObjectElements(dcpFirst, dcpLast);

            for (int i = 0; i < attachedObjectElements.Count; i++)
            {
                TextElement textElement = attachedObjectElements[i];
                if (textElement is Figure && base.StructuralCache.CurrentFormatContext.FinitePage)
                {
                    FigureParagraph figureParagraph = new FigureParagraph(textElement, base.StructuralCache);
                    if (base.StructuralCache.CurrentFormatContext.IncrementalUpdate)
                    {
                        figureParagraph.SetUpdateInfo(PTS.FSKCHANGE.fskchNew, false);
                    }
                    FigureObject item = new FigureObject(contentStart.GetOffsetToPosition(textElement.ElementStart), figureParagraph);
                    list.Add(item);
                }
                else
                {
                    FloaterParagraph floaterParagraph = new FloaterParagraph(textElement, base.StructuralCache);
                    if (base.StructuralCache.CurrentFormatContext.IncrementalUpdate)
                    {
                        floaterParagraph.SetUpdateInfo(PTS.FSKCHANGE.fskchNew, false);
                    }
                    FloaterObject item2 = new FloaterObject(contentStart.GetOffsetToPosition(textElement.ElementStart), floaterParagraph);
                    list.Add(item2);
                }
            }
            if (list.Count != 0)
            {
                this.SubmitAttachedObjects(dcpFirst, dcpLast, list);
            }
            return(list);
        }
 // ------------------------------------------------------------------
 // Constructor.
 //
 //      paragraph - Paragraph associated with this object.
 // ------------------------------------------------------------------
 internal FigureParaClient(FigureParagraph paragraph) : base(paragraph)
 {
 }
Beispiel #4
0
 /// <summary> 
 /// Constructor.
 /// </summary>
 /// <param name="dcp">
 /// Figure object's character position. 
 /// </param>
 /// <param name="para"> 
 /// Paragraph associated with figure object. 
 /// </param>
 internal FigureObject(int dcp, FigureParagraph para) 
     : base(dcp, para)
 {
 }
Beispiel #5
0
 // ------------------------------------------------------------------
 // Constructor.
 //
 //      paragraph - Paragraph associated with this object.
 // ------------------------------------------------------------------
 internal FigureParaClient(FigureParagraph paragraph) : base(paragraph)
 {
 }
Beispiel #6
0
 // Token: 0x060067C6 RID: 26566 RVA: 0x001D164A File Offset: 0x001CF84A
 internal FigureObject(int dcp, FigureParagraph para) : base(dcp, para)
 {
 }
Beispiel #7
0
 /// <summary> 
 /// GetDurFigureAnchor
 /// </summary> 
 /// <param name="paraFigure">
 /// IN: FigureParagraph for which we require anchor dur
 /// </param>
 /// <param name="fswdir"> 
 /// IN: current direction
 /// </param> 
 /// <param name="dur"> 
 /// OUT: distance from the beginning of the line to the anchor
 /// </param> 
 internal void GetDurFigureAnchor(
     FigureParagraph paraFigure,
     uint fswdir,
     out int dur) 
 {
     int cpFigure = TextContainerHelper.GetCPFromElement(_paraClient.Paragraph.StructuralCache.TextContainer, paraFigure.Element, ElementEdge.BeforeStart); 
     int dcpFigure = cpFigure - _cpPara; 
     double distance = _line.GetDistanceFromCharacterHit(new CharacterHit(dcpFigure, 0));
     dur = TextDpi.ToTextDpi(distance); 
 }