internal RichTextParagraph(ITextPara para) { //_document = document; _para = para; }
private static object GetTabs(ITextPara para) { int count = para.TabCount; if (count == (int)TomConst.tomUndefined) { return TextPattern.MixedAttributeValue; } else { double[] tabs = new double[count]; for (int i = 0; i < count; i++) { float tbPos; TomAlignment tbAlign; TomLeader tbLeader; para.GetTab(i, out tbPos, out tbAlign, out tbLeader); tabs[i] = tbPos; } return tabs; } }
private static object GetHorizontalTextAlignment(ITextPara para) { // review: ITextPara::GetListAlignment? TomAlignment alignment = para.Alignment; if (alignment == TomAlignment.tomUndefined) { return TextPattern.MixedAttributeValue; } else { // HorizontalTextAlignment enum matcheds TomAlignment enum return (HorizontalTextAlignment)(int)para.Alignment; } }
private static object GetIndentationTrailing(ITextPara para) { float indent = para.RightIndent; if ((TomConst)indent == TomConst.tomUndefined) { return TextPattern.MixedAttributeValue; } else { return (double)indent; } }
private static object GetBulletStyle(ITextPara para) { // look at the ListType field of the paragraph style. TomListType t = para.ListType; if (t == TomListType.tomUndefined) { return TextPattern.MixedAttributeValue; } else { switch (para.ListType & TomListType.tomListTypeMask) { case TomListType.tomListBullet: return BulletStyle.FilledRoundBullet; default: return BulletStyle.None; } } }