public override TextRun this[int i] { get { if (i < 0 || i >= Count) { throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidParameterRange, i, 0, Count); } TextRun textRun = m_textRuns[i]; if (textRun == null) { if (m_paragraph.IsOldSnapshot) { textRun = new ShimTextRun(m_paragraph, m_paragraph.RenderingContext); } else { Microsoft.ReportingServices.ReportIntermediateFormat.TextRun textRun2 = ((InternalParagraph)m_paragraph).ParagraphDef.TextRuns[i]; textRun = new InternalTextRun(m_paragraph, i, textRun2, m_paragraph.RenderingContext); } m_textRuns[i] = textRun; } return(textRun); } }
private void EvaluateOriginalValue() { if (m_originalValueEvaluated) { return; } m_originalValueEvaluated = true; Microsoft.ReportingServices.ReportIntermediateFormat.TextRun textRunDef = TextRunDef; ExpressionInfo value = textRunDef.Value; if (value != null) { if (value.IsExpression) { m_originalValue = textRunDef.EvaluateValue(ReportScopeInstance, base.ReportElementDef.RenderingContext.OdpContext); m_originalValueNeedsReset = true; } else { m_originalValue = default(VariantResult); m_originalValue.Value = value.Value; ReportRuntime.SetVariantType(ref m_originalValue); } } }
internal TextRunImpl(Microsoft.ReportingServices.ReportIntermediateFormat.TextBox textBoxDef, Microsoft.ReportingServices.ReportIntermediateFormat.TextRun textRunDef, Microsoft.ReportingServices.RdlExpressions.ReportRuntime reportRT, IErrorContext iErrorContext, IScope scope) { m_textBoxDef = textBoxDef; m_textRunDef = textRunDef; m_reportRT = reportRT; m_iErrorContext = iErrorContext; m_scope = scope; }
internal override object PublishClone(AutomaticSubtotalContext context) { Paragraph paragraph = (Paragraph)base.PublishClone(context); if (m_textRuns != null) { paragraph.m_textRuns = new List <TextRun>(m_textRuns.Count); foreach (TextRun textRun2 in m_textRuns) { TextRun textRun = (TextRun)textRun2.PublishClone(context); textRun.Paragraph = paragraph; paragraph.m_textRuns.Add(textRun); } } if (m_styleClass != null) { paragraph.m_styleClass = (Style)m_styleClass.PublishClone(context); } if (m_leftIndent != null) { paragraph.m_leftIndent = (ExpressionInfo)m_leftIndent.PublishClone(context); } if (m_rightIndent != null) { paragraph.m_rightIndent = (ExpressionInfo)m_rightIndent.PublishClone(context); } if (m_hangingIndent != null) { paragraph.m_hangingIndent = (ExpressionInfo)m_hangingIndent.PublishClone(context); } if (m_spaceBefore != null) { paragraph.m_spaceBefore = (ExpressionInfo)m_spaceBefore.PublishClone(context); } if (m_spaceAfter != null) { paragraph.m_spaceAfter = (ExpressionInfo)m_spaceAfter.PublishClone(context); } if (m_listStyle != null) { paragraph.m_listStyle = (ExpressionInfo)m_listStyle.PublishClone(context); } if (m_listLevel != null) { paragraph.m_listLevel = (ExpressionInfo)m_listLevel.PublishClone(context); } return(paragraph); }
private TextRun GetOrCreateSingleTextRun(IntermediateFormatReader reader) { if (m_paragraphs == null) { m_isSimple = true; m_paragraphs = new List <Paragraph>(1); Paragraph paragraph = new Paragraph(this, 0, -1); paragraph.GlobalID = -1; m_paragraphs.Add(paragraph); List <TextRun> list = new List <TextRun>(1); TextRun textRun = new TextRun(paragraph, 0, -1); textRun.GlobalID = -1; list.Add(textRun); paragraph.TextRuns = list; return(textRun); } return(m_paragraphs[0].TextRuns[0]); }
public override TextRun this[int index] { get { if (index < 0 || index >= Count) { throw new ArgumentOutOfRangeException("index"); } TextRunImpl textRunImpl = m_textRuns[index]; if (textRunImpl == null) { Microsoft.ReportingServices.ReportIntermediateFormat.TextRun textRunDef = m_paragraphDef.TextRuns[index]; textRunImpl = new TextRunImpl(m_textBoxDef, textRunDef, m_reportRT, m_iErrorContext, m_scope); m_textRuns[index] = textRunImpl; } return(textRunImpl); } }
internal InternalTextRun(Paragraph paragraph, int indexIntoParentCollectionDef, Microsoft.ReportingServices.ReportIntermediateFormat.TextRun textRun, RenderingContext renderingContext) : base(paragraph, indexIntoParentCollectionDef, renderingContext) { m_textRunDef = textRun; }
public override void Deserialize(IntermediateFormatReader reader) { base.Deserialize(reader); reader.RegisterDeclaration(m_Declaration); while (reader.NextMember()) { switch (reader.CurrentMember.MemberName) { case MemberName.Paragraphs: m_paragraphs = reader.ReadGenericListOfRIFObjects <Paragraph>(); break; case MemberName.Value: { TextRun orCreateSingleTextRun = GetOrCreateSingleTextRun(reader); ExpressionInfo expressionInfo = (ExpressionInfo)reader.ReadRIFObject(); m_hasValue = true; m_hasExpressionBasedValue = expressionInfo.IsExpression; orCreateSingleTextRun.Value = expressionInfo; if (m_styleClass != null) { orCreateSingleTextRun.Paragraph.StyleClass = new ParagraphFilteredStyle(m_styleClass); orCreateSingleTextRun.StyleClass = new TextRunFilteredStyle(m_styleClass); m_styleClass = new TextBoxFilteredStyle(m_styleClass); } break; } case MemberName.CanScrollVertically: m_canScrollVertically = reader.ReadBoolean(); break; case MemberName.CanGrow: m_canGrow = reader.ReadBoolean(); break; case MemberName.CanShrink: m_canShrink = reader.ReadBoolean(); break; case MemberName.HideDuplicates: m_hideDuplicates = reader.ReadString(); break; case MemberName.Action: m_action = (Action)reader.ReadRIFObject(); break; case MemberName.IsToggle: m_isToggle = reader.ReadBoolean(); break; case MemberName.InitialToggleState: m_initialToggleState = (ExpressionInfo)reader.ReadRIFObject(); break; case MemberName.ValueReferenced: m_valueReferenced = reader.ReadBoolean(); break; case MemberName.TextRunValueReferenced: m_textRunValueReferenced = reader.ReadBoolean(); break; case MemberName.RecursiveSender: m_recursiveSender = reader.ReadBoolean(); break; case MemberName.DataElementStyleAttribute: m_dataElementStyleAttribute = reader.ReadBoolean(); break; case MemberName.ContainingScopes: if (reader.ReadListOfReferencesNoResolution(this) == 0) { m_containingScopes = new GroupingList(); } break; case MemberName.UserSort: m_userSort = (EndUserSort)reader.ReadRIFObject(); break; case MemberName.IsTablixCellScope: m_isTablixCellScope = reader.ReadBoolean(); break; case MemberName.IsSubReportTopLevelScope: m_isSubReportTopLevelScope = reader.ReadBoolean(); break; case MemberName.DataType: GetOrCreateSingleTextRun(reader).DataType = (DataType)reader.ReadEnum(); break; case MemberName.KeepTogether: m_keepTogether = reader.ReadBoolean(); break; case MemberName.SequenceID: m_sequenceID = reader.ReadInt32(); break; case MemberName.RecursiveMember: m_recursiveMember = reader.ReadReference <TablixMember>(this); break; case MemberName.HasExpressionBasedValue: m_hasExpressionBasedValue = reader.ReadBoolean(); break; case MemberName.HasValue: m_hasValue = reader.ReadBoolean(); break; case MemberName.IsSimple: m_isSimple = reader.ReadBoolean(); break; case MemberName.HasNonRecursiveSender: m_hasNonRecursiveSender = reader.ReadBoolean(); break; default: Global.Tracer.Assert(condition: false); break; } } }