internal void WriteElementProps(BinaryWriter spbifWriter, PageContext pageContext) { StyleWriterStream styleWriterStream = new StyleWriterStream(spbifWriter); Hashtable itemPropsStart = pageContext.ItemPropsStart; long primitiveFromCache = pageContext.Common.GetPrimitiveFromCache <long>(m_source.ID, out itemPropsStart); if (primitiveFromCache <= 0) { primitiveFromCache = spbifWriter.BaseStream.Position; itemPropsStart[m_source.ID] = primitiveFromCache; spbifWriter.Write((byte)15); spbifWriter.Write((byte)0); spbifWriter.Write((byte)6); spbifWriter.Write((byte)0); WriteSharedStyles(styleWriterStream, m_source.Style); spbifWriter.Write(byte.MaxValue); styleWriterStream.WriteSharedProperty(8, m_source.ListLevel); if (m_source.ListStyle != null) { styleWriterStream.Write(7, StyleEnumConverter.Translate(m_source.ListStyle.Value)); } styleWriterStream.WriteSharedProperty(9, m_source.LeftIndent); styleWriterStream.WriteSharedProperty(10, m_source.RightIndent); styleWriterStream.WriteSharedProperty(11, m_source.HangingIndent); styleWriterStream.WriteSharedProperty(12, m_source.SpaceBefore); styleWriterStream.WriteSharedProperty(13, m_source.SpaceAfter); styleWriterStream.WriteNotNull(5, m_source.ID); spbifWriter.Write(byte.MaxValue); } else { spbifWriter.Write((byte)15); spbifWriter.Write((byte)2); spbifWriter.Write(primitiveFromCache); } spbifWriter.Write((byte)1); Utility.WriteReportSize(spbifWriter, 9, m_leftIndent); Utility.WriteReportSize(spbifWriter, 10, m_rightIndent); Utility.WriteReportSize(spbifWriter, 11, m_hangingIndent); if (m_listStyle.HasValue) { styleWriterStream.Write(7, (byte)m_listStyle.Value); } if (m_listLevel.HasValue) { styleWriterStream.Write(8, m_listLevel.Value); } if (!m_firstLine) { styleWriterStream.Write(15, m_firstLine); } Utility.WriteReportSize(spbifWriter, 12, m_spaceBefore); Utility.WriteReportSize(spbifWriter, 13, m_spaceAfter); styleWriterStream.Write(14, m_paragraphNumber); spbifWriter.Write((byte)6); spbifWriter.Write((byte)1); WriteNonSharedStyles(styleWriterStream); spbifWriter.Write(byte.MaxValue); spbifWriter.Write((byte)4); spbifWriter.Write(m_uniqueName); spbifWriter.Write(byte.MaxValue); spbifWriter.Write(byte.MaxValue); }
internal void WriteElementProps(RPLParagraphProps elemProps, PageContext pageContext) { Hashtable itemPropsStart = pageContext.ItemPropsStart; RPLParagraphPropsDef rPLParagraphPropsDef = pageContext.Common.GetFromCache <RPLParagraphPropsDef>(m_source.ID, out itemPropsStart); if (rPLParagraphPropsDef == null) { rPLParagraphPropsDef = new RPLParagraphPropsDef(); rPLParagraphPropsDef.SharedStyle = new RPLStyleProps(); WriteSharedStyles(new StyleWriterOM(rPLParagraphPropsDef.SharedStyle), m_source.Style); if (m_source.ListLevel != null && !m_source.ListLevel.IsExpression) { rPLParagraphPropsDef.ListLevel = m_source.ListLevel.Value; } if (m_source.ListStyle != null && !m_source.ListStyle.IsExpression) { rPLParagraphPropsDef.ListStyle = (RPLFormat.ListStyles)StyleEnumConverter.Translate(m_source.ListStyle.Value); } if (m_source.LeftIndent != null && !m_source.LeftIndent.IsExpression) { rPLParagraphPropsDef.LeftIndent = new RPLReportSize(m_source.LeftIndent.Value.ToString()); } if (m_source.RightIndent != null && !m_source.RightIndent.IsExpression) { rPLParagraphPropsDef.RightIndent = new RPLReportSize(m_source.RightIndent.Value.ToString()); } if (m_source.HangingIndent != null && !m_source.HangingIndent.IsExpression) { rPLParagraphPropsDef.HangingIndent = new RPLReportSize(m_source.HangingIndent.Value.ToString()); } if (m_source.SpaceBefore != null && !m_source.SpaceBefore.IsExpression) { rPLParagraphPropsDef.SpaceBefore = new RPLReportSize(m_source.SpaceBefore.Value.ToString()); } if (m_source.SpaceAfter != null && !m_source.SpaceAfter.IsExpression) { rPLParagraphPropsDef.SpaceAfter = new RPLReportSize(m_source.SpaceAfter.Value.ToString()); } rPLParagraphPropsDef.ID = m_source.ID; itemPropsStart[m_source.ID] = rPLParagraphPropsDef; } elemProps.Definition = rPLParagraphPropsDef; if (m_leftIndent != null) { elemProps.LeftIndent = new RPLReportSize(m_leftIndent.ToString()); } if (m_rightIndent != null) { elemProps.RightIndent = new RPLReportSize(m_rightIndent.ToString()); } if (m_hangingIndent != null) { elemProps.HangingIndent = new RPLReportSize(m_hangingIndent.ToString()); } if (m_listStyle.HasValue) { elemProps.ListStyle = m_listStyle.Value; } if (m_listLevel.HasValue) { elemProps.ListLevel = m_listLevel.Value; } if (m_spaceBefore != null) { elemProps.SpaceBefore = new RPLReportSize(m_spaceBefore.ToString()); } if (m_spaceAfter != null) { elemProps.SpaceAfter = new RPLReportSize(m_spaceAfter.ToString()); } elemProps.ParagraphNumber = m_paragraphNumber; elemProps.FirstLine = m_firstLine; elemProps.UniqueName = m_uniqueName; RPLStyleProps rPLStyleProps = null; if (m_styles != null) { rPLStyleProps = new RPLStyleProps(); ((StyleWriter) new StyleWriterOM(rPLStyleProps)).WriteAll(m_styles); } elemProps.NonSharedStyle = rPLStyleProps; }
internal long WriteToStream(BinaryWriter writer, PageContext pageContext, bool hideDuplicates, TextBox.TextBoxOffset startPosition, TextBox.TextBoxOffset endPosition, List <Microsoft.ReportingServices.Rendering.RichText.TextRun> richTextParaRuns) { int num = 0; int num2 = 0; List <long> list = new List <long>(); if (endPosition == null && startPosition == null) { foreach (TextRun textRun in m_textRuns) { num2 = num; num += textRun.SplitIndices.Count + 1; long item = textRun.WriteToStream(writer, pageContext, hideDuplicates, null, null, num2, richTextParaRuns); list.Add(item); } } else { int num3 = -1; if (startPosition != null) { num3 = startPosition.TextRunIndex; } int num4 = -1; if (endPosition != null) { num4 = endPosition.TextRunIndex; } long num5 = 0L; foreach (TextRun textRun2 in m_textRuns) { num2 = num; num += textRun2.SplitIndices.Count + 1; if (num3 >= num) { continue; } if (endPosition == null) { num5 = textRun2.WriteToStream(writer, pageContext, hideDuplicates, startPosition, null, num2, richTextParaRuns); list.Add(num5); continue; } if (num < num4) { num5 = textRun2.WriteToStream(writer, pageContext, hideDuplicates, startPosition, null, num2, richTextParaRuns); list.Add(num5); continue; } if (num == num4) { num5 = textRun2.WriteToStream(writer, pageContext, hideDuplicates, startPosition, null, num2, richTextParaRuns); list.Add(num5); if (endPosition.CharacterIndex > 0) { continue; } break; } num5 = textRun2.WriteToStream(writer, pageContext, hideDuplicates, startPosition, endPosition, num2, richTextParaRuns); list.Add(num5); break; } } long position = writer.BaseStream.Position; writer.Write((byte)19); if (m_source != null) { WriteElementProps(writer, pageContext); } else { writer.Write((byte)15); writer.Write((byte)0); writer.Write(byte.MaxValue); writer.Write((byte)1); writer.Write(byte.MaxValue); writer.Write(byte.MaxValue); } writer.Write(list.Count); foreach (long item2 in list) { writer.Write(item2); } writer.Write(byte.MaxValue); return(position); }
internal override void WriteItemSharedStyleProps(RPLStyleProps rplStyleProps, Style style, PageContext pageContext) { PageItem.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.BackgroundColor, 34); WriteBackgroundImage(style, writeShared: true, rplStyleProps, pageContext); }
internal override void WriteCustomNonSharedItemProps(RPLElementProps nonSharedProps, PageContext pageContext) { ActionInfoWithDynamicImageMapCollection actionImageMaps = null; ((RPLDynamicImageProps)nonSharedProps).DynamicImageContent = LoadDynamicImage(out actionImageMaps, pageContext); }
private static void CollectTextBoxes(Microsoft.ReportingServices.OnDemandReportRendering.Tablix tablix, PageContext pageContext, bool useForPageHFEval, Dictionary <string, List <object> > textBoxes) { if (tablix != null && useForPageHFEval && ShouldBeCollected(tablix)) { TablixInstance tablixInstance = (TablixInstance)tablix.Instance; CollectTablixMembersContents(tablix, null, -1, TablixState.ColMembers, tablixInstance.NoRows, pageContext, useForPageHFEval: true, textBoxes); CollectTablixMembersContents(tablix, null, 0, TablixState.RowMembers, tablixInstance.NoRows, pageContext, useForPageHFEval: true, textBoxes); } }
internal override RPLElement CreateRPLElement(RPLElementProps props, PageContext pageContext) { RPLElement rPLElement = CreateRPLElement(); WriteElementProps(rPLElement.ElementProps, pageContext); return rPLElement; }
internal ReportSection(Microsoft.ReportingServices.OnDemandReportRendering.ReportSection reportSection, PageContext pageContext, PaginationSettings paginationSettings, SectionPaginationSettings sectionPaginationSettings) { m_reportSection = reportSection; m_pageContext = pageContext; m_pageSettings = paginationSettings; m_sectionPageSettings = sectionPaginationSettings; }
internal GaugePanel(Microsoft.ReportingServices.OnDemandReportRendering.GaugePanel source, PageContext pageContext) : base(source) { Microsoft.ReportingServices.OnDemandReportRendering.GaugePanel gaugePanel = (Microsoft.ReportingServices.OnDemandReportRendering.GaugePanel)m_source; m_pageBreakProperties = PageBreakProperties.Create(gaugePanel.PageBreak, this, pageContext); if (!pageContext.IgnorePageBreaks) { m_pageName = gaugePanel.Instance.PageName; } else if (pageContext.Common.DiagnosticsEnabled && gaugePanel.PageBreak.BreakLocation != 0) { pageContext.Common.TracePageBreakIgnored(this, pageContext.IgnorePageBreaksReason); } }
private Stream LoadDynamicImage(out ActionInfoWithDynamicImageMapCollection actionImageMaps, PageContext pageContext) { IDynamicImageInstance dynamicImageInstance = (IDynamicImageInstance)m_source.Instance; dynamicImageInstance.SetDpi(pageContext.DynamicImageDpiX, pageContext.DynamicImageDpiY); if (pageContext.IsInSelectiveRendering) { dynamicImageInstance.SetSize(pageContext.Common.Pagination.PhysicalPageWidth, pageContext.Common.Pagination.PhysicalPageHeight); } return(dynamicImageInstance.GetImage(pageContext.EMFDynamicImages ? DynamicImageInstance.ImageType.EMF : DynamicImageInstance.ImageType.PNG, out actionImageMaps)); }
internal static void CreatePaddingsStyle(PageContext pageContext, ReportItem source, out double padVertical, out double padHorizontal, out double padTop) { padVertical = 0.0; padHorizontal = 0.0; padTop = 0.0; PaddingsStyle paddingsStyle = null; bool shared = true; double num = 0.0; ReportSize styleValue = GetStyleValue(StyleAttributeNames.PaddingTop, ref shared, source); if (styleValue != null) { num = styleValue.ToMillimeters(); if (shared) { if (paddingsStyle == null) { paddingsStyle = new PaddingsStyle(); } paddingsStyle.PadVertical += num; paddingsStyle.PadTop = num; paddingsStyle.State |= PaddingState.Top; } padTop = num; padVertical += num; } shared = true; styleValue = GetStyleValue(StyleAttributeNames.PaddingBottom, ref shared, source); if (styleValue != null) { num = styleValue.ToMillimeters(); if (shared) { if (paddingsStyle == null) { paddingsStyle = new PaddingsStyle(); } paddingsStyle.PadVertical += num; paddingsStyle.State |= PaddingState.Bottom; } padVertical += num; } shared = true; styleValue = GetStyleValue(StyleAttributeNames.PaddingLeft, ref shared, source); if (styleValue != null) { num = styleValue.ToMillimeters(); if (shared) { if (paddingsStyle == null) { paddingsStyle = new PaddingsStyle(); } paddingsStyle.PadHorizontal += num; paddingsStyle.State |= PaddingState.Left; } padHorizontal += num; } shared = true; styleValue = GetStyleValue(StyleAttributeNames.PaddingRight, ref shared, source); if (styleValue != null) { num = styleValue.ToMillimeters(); if (shared) { if (paddingsStyle == null) { paddingsStyle = new PaddingsStyle(); } paddingsStyle.PadHorizontal += num; paddingsStyle.State |= PaddingState.Right; } padHorizontal += num; } if (paddingsStyle != null) { if (pageContext.ItemPaddingsStyle == null) { pageContext.ItemPaddingsStyle = new Hashtable(); } pageContext.ItemPaddingsStyle.Add(source.ID, paddingsStyle); } }
internal override void WriteNonSharedStyleProp(RPLStyleProps rplStyleProps, Style styleDef, StyleInstance style, StyleAttributeNames styleAttribute, PageContext pageContext) { if (!SpecialBorderHandling) { base.WriteNonSharedStyleProp(rplStyleProps, styleDef, style, styleAttribute, pageContext); } else { WriteItemNonSharedStyleProps(rplStyleProps, styleDef, style, styleAttribute, pageContext); } }
internal override void WriteItemNonSharedStyleProps(RPLStyleProps styleProps, Style styleDef, StyleInstance style, StyleAttributeNames styleAtt, PageContext pageContext) { if (styleAtt == StyleAttributeNames.BackgroundColor) { WriteStyleProp(styleDef, style, styleProps, StyleAttributeNames.BackgroundColor, 34); } }
internal override void WriteItemSharedStyleProps(RPLStyleProps styleProps, Style style, PageContext pageContext) { PageItem.WriteStyleProp(style, styleProps, StyleAttributeNames.BackgroundColor, 34); }
private static int CollectTablixMembersContents(Microsoft.ReportingServices.OnDemandReportRendering.Tablix tablix, TablixMember memberParent, int rowMemberIndexCell, TablixState state, bool noRows, PageContext context, bool useForPageHFEval, Dictionary <string, List <object> > textBoxes) { TablixMemberCollection tablixMemberCollection = null; if (memberParent == null) { if (state == TablixState.RowMembers) { tablixMemberCollection = tablix.RowHierarchy.MemberCollection; } else { if (state == TablixState.ColMembers) { CollectTablixCornerContents(tablix.Corner, context, useForPageHFEval, textBoxes); } tablixMemberCollection = tablix.ColumnHierarchy.MemberCollection; } } else { tablixMemberCollection = memberParent.Children; } if (tablixMemberCollection == null) { if (state == TablixState.RowMembers) { CollectTablixMembersContents(tablix, null, memberParent.MemberCellIndex, TablixState.DetailRows, noRows, context, useForPageHFEval, textBoxes); } else { CollectDetailCellContents(tablix, memberParent.MemberCellIndex, rowMemberIndexCell, context, useForPageHFEval, textBoxes); } if (!useForPageHFEval) { return(0); } return(1); } bool flag = true; bool flag2 = true; TablixMember tablixMember = null; TablixMemberInstance tablixMemberInstance = null; TablixDynamicMemberInstance tablixDynamicMemberInstance = null; int num = 0; bool flag3 = useForPageHFEval; for (int i = 0; i < tablixMemberCollection.Count; i++) { flag3 = useForPageHFEval; tablixMember = tablixMemberCollection[i]; if (noRows && tablixMember.HideIfNoRows) { continue; } flag = true; tablixMemberInstance = tablixMember.Instance; if (tablixMember.IsStatic) { flag2 = ShouldBeCollected(tablixMember, ref flag3); } else { tablixDynamicMemberInstance = (TablixDynamicMemberInstance)tablixMemberInstance; tablixDynamicMemberInstance.ResetContext(); flag = tablixDynamicMemberInstance.MoveNext(); if (flag) { flag2 = ShouldBeCollected(tablixMember, ref flag3); } } while (flag) { if (flag2) { int num2 = CollectTablixMembersContents(tablix, tablixMember, rowMemberIndexCell, state, noRows, context, flag3, textBoxes); if (state != TablixState.DetailRows && tablixMember.TablixHeader != null && num2 > 0) { CollectTextBoxes(tablixMember.TablixHeader.CellContents.ReportItem, context, flag3, textBoxes); num++; } } if (tablixMember.IsStatic) { flag = false; continue; } flag = tablixDynamicMemberInstance.MoveNext(); if (flag) { flag3 = useForPageHFEval; flag2 = ShouldBeCollected(tablixMember, ref flag3); } } tablixMemberInstance = null; } return(num); }
protected override void DetermineVerticalSize(PageContext pageContext, double topInParentSystem, double bottomInParentSystem, List <PageItem> ancestors, ref bool anyAncestorHasKT, bool hasUnpinnedAncestors) { m_itemPageSizes.AdjustHeightTo(0.0); }
private static void CollectDetailCellContents(Microsoft.ReportingServices.OnDemandReportRendering.Tablix tablix, int colMemberIndexCell, int rowMemberIndexCell, PageContext context, bool useForPageHFEval, Dictionary <string, List <object> > textBoxes) { if (rowMemberIndexCell >= 0) { TablixCell tablixCell = tablix.Body.RowCollection[rowMemberIndexCell][colMemberIndexCell]; if (tablixCell != null && tablixCell.CellContents != null) { CollectTextBoxes(tablixCell.CellContents.ReportItem, context, useForPageHFEval, textBoxes); } } }
protected override void DetermineHorizontalSize(PageContext pageContext, double leftInParentSystem, double rightInParentSystem, List <PageItem> ancestors, bool anyAncestorHasKT, bool hasUnpinnedAncestors) { m_itemPageSizes.AdjustWidthTo(0.0); }
protected override void CreateChildren(PageContext pageContext) { CreateChildren(m_source.ReportItemCollection, pageContext); }
internal override void WriteStartItemToStream(RPLWriter rplWriter, PageContext pageContext) { }
internal override void WriteItemSharedStyleProps(BinaryWriter spbifWriter, Style style, PageContext pageContext) { WriteStyleProp(style, spbifWriter, StyleAttributeNames.BackgroundColor, 34); WriteBackgroundImage(style, writeShared: true, spbifWriter, pageContext); }
internal RPLParagraph GetRPLParagraph(PageContext pageContext, bool hideDuplicates, TextBox.TextBoxOffset startPosition, TextBox.TextBoxOffset endPosition, List <Microsoft.ReportingServices.Rendering.RichText.TextRun> richTextParaRuns) { RPLParagraph rPLParagraph = new RPLParagraph(); WriteElementProps(rPLParagraph.ElementProps as RPLParagraphProps, pageContext); int num = 0; int num2 = 0; if (endPosition == null && startPosition == null) { foreach (TextRun textRun2 in m_textRuns) { num = num2; num2 += textRun2.SplitIndices.Count + 1; RPLTextRun rPLTextRun = textRun2.GetRPLTextRun(pageContext, hideDuplicates, null, null, num, richTextParaRuns); rPLParagraph.AddTextRun(rPLTextRun); } return(rPLParagraph); } int count = m_textRuns.Count; int num3 = -1; if (startPosition != null) { num3 = startPosition.TextRunIndex; } int num4 = -1; if (endPosition != null) { num4 = endPosition.TextRunIndex; } for (int i = 0; i < count; i++) { TextRun textRun = m_textRuns[i]; num = num2; num2 += textRun.SplitIndices.Count + 1; if (num3 >= num2) { continue; } if (endPosition == null) { rPLParagraph.AddTextRun(textRun.GetRPLTextRun(pageContext, hideDuplicates, startPosition, null, num, richTextParaRuns)); continue; } if (num2 < num4) { rPLParagraph.AddTextRun(textRun.GetRPLTextRun(pageContext, hideDuplicates, startPosition, null, num, richTextParaRuns)); continue; } if (num2 == num4) { rPLParagraph.AddTextRun(textRun.GetRPLTextRun(pageContext, hideDuplicates, startPosition, null, num, richTextParaRuns)); if (endPosition.CharacterIndex <= 0) { break; } continue; } rPLParagraph.AddTextRun(textRun.GetRPLTextRun(pageContext, hideDuplicates, startPosition, endPosition, num, richTextParaRuns)); break; } return(rPLParagraph); }
internal override void WriteItemNonSharedStyleProps(RPLStyleProps rplStyleProps, Style styleDef, StyleInstance style, StyleAttributeNames styleAtt, PageContext pageContext) { switch (styleAtt) { case StyleAttributeNames.BackgroundColor: WriteStyleProp(styleDef, style, rplStyleProps, StyleAttributeNames.BackgroundColor, 34); break; case StyleAttributeNames.BackgroundImage: WriteBackgroundImage(styleDef, writeShared: false, rplStyleProps, pageContext); break; } }
internal override void WriteCustomNonSharedItemProps(BinaryWriter spbifWriter, PageContext pageContext) { ActionInfoWithDynamicImageMapCollection actionImageMaps = null; Stream stream = LoadDynamicImage(out actionImageMaps, pageContext); if (stream != null) { spbifWriter.Write((byte)39); spbifWriter.Write((int)stream.Length); byte[] array = new byte[4096]; stream.Position = 0L; for (int num = stream.Read(array, 0, array.Length); num != 0; num = stream.Read(array, 0, array.Length)) { spbifWriter.Write(array, 0, num); } } }