public void WriteElementProps(BinaryWriter spbifWriter, PageContext pageContext) { StyleWriterStream styleWriterStream = new StyleWriterStream(spbifWriter); Hashtable itemPropsStart = pageContext.ItemPropsStart; long primitiveFromCache = pageContext.Common.GetPrimitiveFromCache <long>(this.m_source.ID, out itemPropsStart); if (primitiveFromCache <= 0) { primitiveFromCache = spbifWriter.BaseStream.Position; itemPropsStart[this.m_source.ID] = primitiveFromCache; spbifWriter.Write((byte)15); spbifWriter.Write((byte)0); spbifWriter.Write((byte)6); spbifWriter.Write((byte)0); this.WriteSharedStyles(styleWriterStream, this.m_source.Style); spbifWriter.Write((byte)255); styleWriterStream.WriteSharedProperty(8, this.m_source.ListLevel); if (this.m_source.ListStyle != null) { styleWriterStream.Write(7, StyleEnumConverter.Translate(this.m_source.ListStyle.Value)); } styleWriterStream.WriteSharedProperty(9, this.m_source.LeftIndent); styleWriterStream.WriteSharedProperty(10, this.m_source.RightIndent); styleWriterStream.WriteSharedProperty(11, this.m_source.HangingIndent); styleWriterStream.WriteSharedProperty(12, this.m_source.SpaceBefore); styleWriterStream.WriteSharedProperty(13, this.m_source.SpaceAfter); styleWriterStream.WriteNotNull(5, this.m_source.ID); spbifWriter.Write((byte)255); } else { spbifWriter.Write((byte)15); spbifWriter.Write((byte)2); spbifWriter.Write(primitiveFromCache); } spbifWriter.Write((byte)1); Utility.WriteReportSize(spbifWriter, 9, this.m_leftIndent); Utility.WriteReportSize(spbifWriter, 10, this.m_rightIndent); Utility.WriteReportSize(spbifWriter, 11, this.m_hangingIndent); if (this.m_listStyle.HasValue) { styleWriterStream.Write(7, (byte)this.m_listStyle.Value); } if (this.m_listLevel.HasValue) { styleWriterStream.Write(8, this.m_listLevel.Value); } if (!this.m_firstLine) { styleWriterStream.Write(15, this.m_firstLine); } Utility.WriteReportSize(spbifWriter, 12, this.m_spaceBefore); Utility.WriteReportSize(spbifWriter, 13, this.m_spaceAfter); styleWriterStream.Write(14, this.m_paragraphNumber); spbifWriter.Write((byte)6); spbifWriter.Write((byte)1); this.WriteNonSharedStyles(styleWriterStream); spbifWriter.Write((byte)255); spbifWriter.Write((byte)4); spbifWriter.Write(this.m_uniqueName); spbifWriter.Write((byte)255); spbifWriter.Write((byte)255); }
private void WriteElementProps(BinaryWriter spbifWriter, PageContext pageContext, bool hideDuplicates, TextBox.TextBoxOffset startPosition, TextBox.TextBoxOffset endPosition, int previousRunCount, List <AspNetCore.ReportingServices.Rendering.RichText.TextRun> richTextRuns) { StyleWriterStream styleWriterStream = new StyleWriterStream(spbifWriter); string text = this.m_source.ID; bool flag = true; ReportStringProperty value = this.m_source.Value; if ((this.m_startCharacterOffset > 0 || endPosition != null || startPosition != null) && value != null && !this.m_source.FormattedValueExpressionBased) { text += "_NV"; flag = false; } TextRunItemizedData textRunItemizedData = null; string value2 = null; Hashtable itemPropsStart = pageContext.ItemPropsStart; long primitiveFromCache = pageContext.Common.GetPrimitiveFromCache <long>(text, out itemPropsStart); if (primitiveFromCache <= 0) { primitiveFromCache = spbifWriter.BaseStream.Position; itemPropsStart[text] = primitiveFromCache; spbifWriter.Write((byte)15); spbifWriter.Write((byte)0); spbifWriter.Write((byte)6); spbifWriter.Write((byte)0); this.WriteSharedStyles(styleWriterStream, this.m_source.Style); spbifWriter.Write((byte)255); styleWriterStream.WriteNotNull(5, text); styleWriterStream.WriteNotNull(8, this.m_source.Label); if (this.m_source.MarkupType != null) { styleWriterStream.Write(7, StyleEnumConverter.Translate(this.m_source.MarkupType.Value)); } styleWriterStream.WriteSharedProperty(9, this.m_source.ToolTip); if (flag && !hideDuplicates && value != null && !this.m_source.FormattedValueExpressionBased) { if (this.m_source.SharedTypeCode == TypeCode.String) { styleWriterStream.WriteNotNull(10, this.GetStringValue(value.Value, (TextBox.TextBoxOffset)null, (TextBox.TextBoxOffset)null, previousRunCount, richTextRuns, out textRunItemizedData)); } else { styleWriterStream.WriteNotNull(10, this.GetStringValue(this.m_source.Instance.Value, (TextBox.TextBoxOffset)null, (TextBox.TextBoxOffset)null, previousRunCount, richTextRuns, out textRunItemizedData)); } } spbifWriter.Write((byte)255); } else { spbifWriter.Write((byte)15); spbifWriter.Write((byte)2); spbifWriter.Write(primitiveFromCache); if (richTextRuns != null && flag && !hideDuplicates && value != null && !this.m_source.FormattedValueExpressionBased) { textRunItemizedData = this.GetGlyphValue(value.Value, previousRunCount, richTextRuns); } } spbifWriter.Write((byte)1); TextRunItemizedData textRunItemizedData2 = null; if (!flag) { if (!hideDuplicates && value != null) { value2 = ((this.m_source.SharedTypeCode != TypeCode.String) ? this.GetStringValue(this.m_source.Instance.Value, startPosition, endPosition, previousRunCount, richTextRuns, out textRunItemizedData2) : this.GetStringValue(value.Value, startPosition, endPosition, previousRunCount, richTextRuns, out textRunItemizedData2)); } } else { value2 = this.GetStringValue(this.m_text, startPosition, endPosition, previousRunCount, richTextRuns, out textRunItemizedData2); } if (textRunItemizedData2 == null) { textRunItemizedData2 = textRunItemizedData; } pageContext.RegisterTextRunData(textRunItemizedData2); styleWriterStream.WriteNotNull(10, value2); styleWriterStream.WriteNotNull(9, this.m_toolTip); styleWriterStream.WriteNotNull(4, this.m_uniqueName); styleWriterStream.WriteNotNull(7, this.m_markup); spbifWriter.Write((byte)6); spbifWriter.Write((byte)1); if (this.m_styles != null) { styleWriterStream.WriteAll(this.m_styles); } spbifWriter.Write((byte)255); this.WriteActions(spbifWriter); spbifWriter.Write((byte)255); spbifWriter.Write((byte)255); }