// Token: 0x06006661 RID: 26209 RVA: 0x001CC214 File Offset: 0x001CA414
 internal double CalcLineAdvanceForTextParagraph(TextParagraph textParagraph, int dcp, double lineAdvance)
 {
     if (!DoubleUtil.IsNaN(this._lineHeight))
     {
         LineStackingStrategy lineStackingStrategy = this.LineStackingStrategy;
         if (lineStackingStrategy != LineStackingStrategy.BlockLineHeight)
         {
             if (lineStackingStrategy != LineStackingStrategy.MaxHeight)
             {
             }
             if (dcp == 0 && textParagraph.HasFiguresOrFloaters() && textParagraph.GetLastDcpAttachedObjectBeforeLine(0) + textParagraph.ParagraphStartCharacterPosition == textParagraph.ParagraphEndCharacterPosition)
             {
                 lineAdvance = this._lineHeight;
             }
             else
             {
                 lineAdvance = Math.Max(lineAdvance, this._lineHeight);
             }
         }
         else
         {
             lineAdvance = this._lineHeight;
         }
     }
     return(lineAdvance);
 }
        /// <summary>
        /// Calculate line advance for TextParagraphs - this method has special casing in case the LineHeight property on the Paragraph element
        /// needs to be respected
        /// </summary>
        /// <param name="textParagraph">
        /// TextParagraph that owns the line
        /// </param>
        /// <param name="dcp">
        /// Dcp of the line
        /// </param>
        /// <param name="lineAdvance">
        /// Calculated height of the line
        /// </param>
        internal double CalcLineAdvanceForTextParagraph(TextParagraph textParagraph, int dcp, double lineAdvance)
        {
            if (!double.IsNaN(_lineHeight))
            {
                switch (LineStackingStrategy)
                {
                case LineStackingStrategy.BlockLineHeight:
                    lineAdvance = _lineHeight;
                    break;

                case LineStackingStrategy.MaxHeight:
                default:
                    if (dcp == 0 && textParagraph.HasFiguresOrFloaters() &&
                        ((textParagraph.GetLastDcpAttachedObjectBeforeLine(0) + textParagraph.ParagraphStartCharacterPosition)
                         == textParagraph.ParagraphEndCharacterPosition))
                    {
                        // The Paragraph element contains only figures and floaters and has LineHeight set. In this case LineHeight
                        // should be respected
                        lineAdvance = _lineHeight;
                    }
                    else
                    {
                        lineAdvance = Math.Max(lineAdvance, _lineHeight);
                    }
                    break;
                    //    case LineStackingStrategy.InlineLineHeight:
                    //        // Inline uses the height of the line just processed.
                    //        break;

                    //    case LineStackingStrategy.GridHeight:
                    //        lineAdvance = (((TextDpi.ToTextDpi(lineAdvance) - 1) / TextDpi.ToTextDpi(_lineHeight)) + 1) * _lineHeight;
                    //        break;
                    //}
                }
            }
            return(lineAdvance);
        }
        /// <summary>
        /// Calculate line advance for TextParagraphs - this method has special casing in case the LineHeight property on the Paragraph element
        /// needs to be respected
        /// </summary>
        /// <param name="textParagraph">
        /// TextParagraph that owns the line
        /// </param>
        /// <param name="dcp">
        /// Dcp of the line
        /// </param>
        /// <param name="lineAdvance">
        /// Calculated height of the line
        /// </param>
        internal double CalcLineAdvanceForTextParagraph(TextParagraph textParagraph, int dcp, double lineAdvance)
        {
            if (!DoubleUtil.IsNaN(_lineHeight))
            {
                switch (LineStackingStrategy)
                {
                    case LineStackingStrategy.BlockLineHeight:
                        lineAdvance = _lineHeight;
                        break;

                    case LineStackingStrategy.MaxHeight:
                    default:
                        if (dcp == 0 && textParagraph.HasFiguresOrFloaters() &&
                           ((textParagraph.GetLastDcpAttachedObjectBeforeLine(0) + textParagraph.ParagraphStartCharacterPosition)
                             == textParagraph.ParagraphEndCharacterPosition))
                        {
                            // The Paragraph element contains only figures and floaters and has LineHeight set. In this case LineHeight
                            // should be respected
                            lineAdvance = _lineHeight;
                        }
                        else
                        {
                            lineAdvance = Math.Max(lineAdvance, _lineHeight);
                        }
                        break;
                    //    case LineStackingStrategy.InlineLineHeight:
                    //        // Inline uses the height of the line just processed.
                    //        break;

                    //    case LineStackingStrategy.GridHeight:
                    //        lineAdvance = (((TextDpi.ToTextDpi(lineAdvance) - 1) / TextDpi.ToTextDpi(_lineHeight)) + 1) * _lineHeight;
                    //        break;
                    //}
                }
            }
            return lineAdvance;
        }