internal override void ProcessRenderingElementContent(RPLElement rplElement, GdiContext context, RectangleF bounds) { if (m_textRuns == null) { m_textRuns = new List <RenderingTextRun>(); } if (m_isSimple) { RPLTextBox rplElement2 = rplElement as RPLTextBox; RenderingTextRun renderingTextRun = new RenderingTextRun(); renderingTextRun.Initialize(rplElement2, bounds, m_textRuns.Count); renderingTextRun.ProcessRenderingElementContent(rplElement2, context, bounds); m_textRuns.Add(renderingTextRun); return; } RPLParagraph rPLParagraph = rplElement as RPLParagraph; for (RPLTextRun nextTextRun = rPLParagraph.GetNextTextRun(); nextTextRun != null; nextTextRun = rPLParagraph.GetNextTextRun()) { RenderingTextRun renderingTextRun2 = new RenderingTextRun(); renderingTextRun2.Initialize(nextTextRun, bounds, m_textRuns.Count); renderingTextRun2.ProcessRenderingElementContent(nextTextRun, context, bounds); m_textRuns.Add(renderingTextRun2); } }
public override RPLElement CreateRPLElement(RPLElementProps props, PageContext pageContext) { RPLElement rPLElement = this.CreateRPLElement(); base.WriteElementProps(rPLElement.ElementProps, pageContext); return(rPLElement); }
public void RenderReportItem(RPLElement reportItem, RPLItemMeasurement measurement, StyleContext styleContext, ref int borderContext, bool renderId, bool treatAsTopLevel) { RPLElementProps elementProps = reportItem.ElementProps; RPLElementPropsDef definition = elementProps.Definition; this.RenderLine((RPLLine)reportItem, elementProps, (RPLLinePropsDef)definition, measurement, renderId, styleContext); }
public void RenderReportItem(RPLElement reportItem, RPLItemMeasurement measurement, StyleContext styleContext, ref int borderContext, bool renderId, bool treatAsTopLevel) { RPLElementProps elementProps = reportItem.ElementProps; RPLElementPropsDef definition = elementProps.Definition; RenderRectangle((RPLContainer)reportItem, elementProps, definition, measurement, ref borderContext, renderId, styleContext, treatAsTopLevel); }
internal override void ProcessRenderingElementContent(RPLElement rplElement, GdiContext context, RectangleF bounds) { ImagePositionPX = new RectangleF(0f, 0f, context.GdiWriter.ConvertToPixels(base.Position.Width), context.GdiWriter.ConvertToPixels(base.Position.Height)); RPLDynamicImageProps rPLDynamicImageProps = (RPLDynamicImageProps)InstanceProperties; Stream stream = rPLDynamicImageProps.DynamicImageContent; if (stream != null) { stream.Position = 0L; } else if (rPLDynamicImageProps.DynamicImageContentOffset >= 0) { byte[] image = context.RplReport.GetImage(rPLDynamicImageProps.DynamicImageContentOffset); if (image == null) { return; } stream = new MemoryStream(image); } if (stream != null) { Image = Image.FromStream(stream); ImagePosition = new RectangleF(base.Position.Location, base.Position.Size); GdiContext.CalculateUsableReportItemRectangle(InstanceProperties, ref ImagePosition); if (!(ImagePosition.Width <= 0f) && !(ImagePosition.Height <= 0f)) { ProcessImageMap(context); } } }
internal override void ProcessRenderingElementContent(RPLElement rplElement, GdiContext context, RectangleF bounds) { RPLTextBox rPLTextBox = rplElement as RPLTextBox; RPLTextBoxPropsDef rPLTextBoxPropsDef = DefinitionProperties as RPLTextBoxPropsDef; RPLTextBoxProps rPLTextBoxProps = InstanceProperties as RPLTextBoxProps; m_textPosition = new RectangleF(base.Position.X, base.Position.Y, base.Position.Width, base.Position.Height); GdiContext.CalculateUsableReportItemRectangle(InstanceProperties, ref m_textPosition); if (TextPosition.Width <= 0f || TextPosition.Height <= 0f) { return; } m_richTextBox = new TextBox(this); if (m_paragraphs == null) { m_paragraphs = new List <RenderingParagraph>(); } if (rPLTextBoxPropsDef.IsSimple) { RenderingParagraph renderingParagraph = new RenderingParagraph(); renderingParagraph.Initialize(rPLTextBox, TextPosition); renderingParagraph.ProcessRenderingElementContent(rPLTextBox, context, TextPosition); m_paragraphs.Add(renderingParagraph); } else { for (RPLParagraph nextParagraph = rPLTextBox.GetNextParagraph(); nextParagraph != null; nextParagraph = rPLTextBox.GetNextParagraph()) { RenderingParagraph renderingParagraph2 = new RenderingParagraph(); renderingParagraph2.Initialize(nextParagraph, TextPosition); renderingParagraph2.ProcessRenderingElementContent(nextParagraph, context, TextPosition); m_paragraphs.Add(renderingParagraph2); } } if (rPLTextBoxProps.IsToggleParent) { GetToggleImage(context.GdiWriter, out Bitmap _); m_textPosition.X += m_toggleRectangleMM.Width + 2.2f; m_textPosition.Width -= m_toggleRectangleMM.Width + 2.2f; Action action = new ToggleAction(InstanceProperties.UniqueName, rPLTextBoxProps.Label, m_toggleRectangleMM, rPLTextBoxProps.ToggleState); RegisterAction(context, action); } if (rPLTextBoxPropsDef.CanSort) { GetSortImage(context.GdiWriter, out Bitmap _, out SortOrder nextOrder); m_textPosition.Width -= m_sortRectangleMM.Width + 2.2f; if (m_sortRectangleMM.Width > 0f) { Action action2 = new SortAction(InstanceProperties.UniqueName, rPLTextBoxProps.Label, m_sortRectangleMM, nextOrder); RegisterAction(context, action2); } } ProcessActions(context, InstanceProperties.UniqueName, ((RPLTextBoxProps)InstanceProperties).ActionInfo, TextPosition); }
public void RenderReportItem(RPLElement reportItem, RPLItemMeasurement measurement, StyleContext styleContext, ref int borderContext, bool renderId, bool treatAsTopLevel) { RPLSubReport rPLSubReport = (RPLSubReport)reportItem; RPLElementProps elementProps = reportItem.ElementProps; RPLElementPropsDef definition = elementProps.Definition; using (html5Renderer.m_reportContext.EnterSubreport(definition)) { if (!styleContext.InTablix || renderId) { styleContext.RenderMeasurements = false; html5Renderer.WriteStream(HTMLElements.m_openDiv); html5Renderer.RenderReportItemStyle(rPLSubReport, elementProps, definition, measurement, styleContext, ref borderContext, definition.ID); if (renderId) { html5Renderer.RenderReportItemId(elementProps.UniqueName); } html5Renderer.WriteStreamCR(HTMLElements.m_closeBracket); } RPLItemMeasurement[] children = rPLSubReport.Children; int num = 0; int num2 = borderContext; bool usePercentWidth = children.Length != 0; int num3 = children.Length; for (int i = 0; i < num3; i++) { if (i == 0 && num3 > 1 && (borderContext & 8) > 0) { num2 &= -9; } else if (i == 1 && (borderContext & 4) > 0) { num2 &= -5; } if (i > 0 && i == num3 - 1 && (borderContext & 8) > 0) { num2 |= 8; } num = num2; RPLItemMeasurement rPLItemMeasurement = children[i]; RPLContainer rPLContainer = (RPLContainer)rPLItemMeasurement.Element; RPLElementProps elementProps2 = rPLContainer.ElementProps; RPLElementPropsDef definition2 = elementProps2.Definition; html5Renderer.m_isBody = true; html5Renderer.m_usePercentWidth = usePercentWidth; new RectangleRenderer(html5Renderer).RenderReportItem(rPLContainer, rPLItemMeasurement, new StyleContext(), ref num, renderId: false, treatAsTopLevel); } if (!styleContext.InTablix || renderId) { html5Renderer.WriteStreamCR(HTMLElements.m_closeDiv); } } }
internal override void ProcessRenderingElementContent(RPLElement rplElement, GdiContext context, RectangleF bounds) { Color = GdiContext.GetStylePropertyValueColor(InstanceProperties, 0); Width = GdiContext.GetStylePropertyValueSizeMM(InstanceProperties, 10); switch ((RPLFormat.BorderStyles)SharedRenderer.GetStylePropertyValueObject(InstanceProperties, 5)) { case RPLFormat.BorderStyles.Dotted: Style = DashStyle.Dot; break; case RPLFormat.BorderStyles.Dashed: Style = DashStyle.Dash; break; default: Style = DashStyle.Solid; break; } }
internal override void ProcessRenderingElementContent(RPLElement rplElement, GdiContext context, RectangleF bounds) { Image = RenderingItem.GetImage(context, ((RPLImageProps)InstanceProperties).Image); if (Image == null) { Image = GdiContext.ImageResources["InvalidImage"]; Sizing = RPLFormat.Sizings.Clip; } else { Sizing = ((RPLImagePropsDef)DefinitionProperties).Sizing; } ImagePosition = new RectangleF(base.Position.Location, base.Position.Size); GdiContext.CalculateUsableReportItemRectangle(InstanceProperties, ref ImagePosition); if (!(ImagePosition.Width <= 0f)) { _ = ImagePosition.Height; _ = 0f; } }
internal override void ProcessRenderingElementContent(RPLElement rplElement, GdiContext context, RectangleF bounds) { RPLContainer rPLContainer = (RPLContainer)rplElement; if (rPLContainer.Children == null) { return; } if (rPLContainer.Children.Length == 1) { RenderingItem renderingItem = RenderingItem.CreateRenderingItem(context, rPLContainer.Children[0], bounds); if (renderingItem != null) { base.Children.Add(renderingItem); } rPLContainer.Children = null; return; } List <RPLItemMeasurement> list = new List <RPLItemMeasurement>(rPLContainer.Children.Length); for (int i = 0; i < rPLContainer.Children.Length; i++) { list.Add(rPLContainer.Children[i]); } rPLContainer.Children = null; RectangleF bounds2 = bounds; for (int j = 0; j < list.Count; j++) { RPLItemMeasurement rPLItemMeasurement = list[j]; rPLItemMeasurement.Width = bounds.Width; bounds2.Height = rPLItemMeasurement.Height; RenderingItem renderingItem2 = RenderingItem.CreateRenderingItem(context, rPLItemMeasurement, bounds2); if (renderingItem2 != null) { base.Children.Add(renderingItem2); } bounds2.Y += rPLItemMeasurement.Height; list[j] = null; } }
internal override void ProcessRenderingElementContent(RPLElement rplElement, GdiContext context, RectangleF bounds) { RPLContainer rPLContainer = (RPLContainer)rplElement; if (rPLContainer.Children == null) { return; } if (rPLContainer.Children.Length == 1) { RenderingItem renderingItem = RenderingItem.CreateRenderingItem(context, rPLContainer.Children[0], bounds); if (renderingItem != null) { Children.Add(renderingItem); } rPLContainer.Children = null; return; } List <RPLItemMeasurement> list = new List <RPLItemMeasurement>(rPLContainer.Children.Length); for (int i = 0; i < rPLContainer.Children.Length; i++) { list.Add(rPLContainer.Children[i]); } rPLContainer.Children = null; list.Sort(new ZIndexComparer()); for (int j = 0; j < list.Count; j++) { RenderingItem renderingItem2 = RenderingItem.CreateRenderingItem(context, list[j], bounds); if (renderingItem2 != null) { Children.Add(renderingItem2); } list[j] = null; } }
internal override void ProcessRenderingElementContent(RPLElement rplElement, GdiContext context, RectangleF bounds) { RPLTablix rPLTablix = (RPLTablix)rplElement; FixedHeaderItem fixedHeaderItem = null; FixedHeaderItem fixedHeaderItem2 = null; FixedHeaderItem fixedHeaderItem3 = null; float num = 0f; float num2 = bounds.Top; float[] array = null; array = ((rPLTablix.ColumnWidths == null) ? new float[0] : new float[rPLTablix.ColumnWidths.Length]); int[] array2 = new int[array.Length]; for (int i = 0; i < array2.Length; i++) { array2[i] = int.MaxValue; } for (int j = 0; j < array.Length; j++) { if (j > 0) { array[j] = array[j - 1] + rPLTablix.ColumnWidths[j - 1]; } if (rPLTablix.FixedColumns[j]) { if (fixedHeaderItem3 == null) { fixedHeaderItem3 = new FixedHeaderItem(this, base.Position, FixedHeaderItem.LayoutType.Vertical); fixedHeaderItem3.Bounds.X += array[j]; fixedHeaderItem3.Bounds.Width = rPLTablix.ColumnWidths[j]; } else { fixedHeaderItem3.Bounds.X = Math.Min(fixedHeaderItem3.Bounds.X, base.Position.X + array[j]); fixedHeaderItem3.Bounds.Width += rPLTablix.ColumnWidths[j]; } } } if (rPLTablix.FixedRow(0)) { fixedHeaderItem = new FixedHeaderItem(this, base.Position, FixedHeaderItem.LayoutType.Horizontal); fixedHeaderItem.Bounds.Height = 0f; context.RenderingReport.FixedHeaders.Add(fixedHeaderItem); } if (fixedHeaderItem3 != null) { context.RenderingReport.FixedHeaders.Add(fixedHeaderItem3); if (rPLTablix.FixedRow(0)) { fixedHeaderItem2 = new FixedHeaderItem(this, base.Position, FixedHeaderItem.LayoutType.Corner); context.RenderingReport.FixedHeaders.Add(fixedHeaderItem2); } } int num3 = 0; int num4 = -1; RPLTablixRow nextRow; while ((nextRow = rPLTablix.GetNextRow()) != null) { if (nextRow is RPLTablixOmittedRow) { continue; } SharedRenderer.CalculateColumnZIndexes(rPLTablix, nextRow, num3, array2); if (nextRow.OmittedHeaders != null) { for (int k = 0; k < nextRow.OmittedHeaders.Count; k++) { RPLTablixMemberCell rPLTablixMemberCell = nextRow.OmittedHeaders[k]; if (!string.IsNullOrEmpty(rPLTablixMemberCell.GroupLabel)) { float x = bounds.X; if (rPLTablixMemberCell.ColIndex < array.Length) { x = array[rPLTablixMemberCell.ColIndex]; } context.RenderingReport.Labels.Add(rPLTablixMemberCell.UniqueName, new LabelPoint(x, num2)); } } } int num5 = int.MaxValue; for (int l = 0; l < nextRow.NumCells; l++) { RPLTablixCell rPLTablixCell = nextRow[l]; RPLItemMeasurement rPLItemMeasurement = new RPLItemMeasurement(); rPLItemMeasurement.Element = rPLTablixCell.Element; rPLItemMeasurement.Left = array[rPLTablixCell.ColIndex]; rPLItemMeasurement.Top = num; rPLItemMeasurement.Width = rPLTablix.GetColumnWidth(rPLTablixCell.ColIndex, rPLTablixCell.ColSpan); rPLItemMeasurement.Height = rPLTablix.GetRowHeight(rPLTablixCell.RowIndex, rPLTablixCell.RowSpan); RenderingItem renderingItem = RenderingItem.CreateRenderingItem(context, rPLItemMeasurement, bounds); if (renderingItem == null) { continue; } if (renderingItem is RenderingDynamicImage) { ((RenderingDynamicImage)renderingItem).Sizing = RPLFormat.Sizings.Fit; } RPLTablixMemberCell rPLTablixMemberCell2 = rPLTablixCell as RPLTablixMemberCell; if (rPLTablixMemberCell2 != null && !string.IsNullOrEmpty(rPLTablixMemberCell2.GroupLabel)) { context.RenderingReport.Labels.Add(rPLTablixMemberCell2.UniqueName, new LabelPoint(rPLItemMeasurement.Left, rPLItemMeasurement.Top)); } if (renderingItem.HasBorders) { renderingItem.DelayDrawBorders = true; if (num3 < rPLTablix.ColumnHeaderRows && rPLTablixCell is RPLTablixCornerCell) { m_cornerBorders.Add(new RenderingItemBorderTablix(0, 0, rPLTablixCell.RowIndex, rPLTablixCell.ColIndex, renderingItem)); } else { if (num5 == int.MaxValue) { num5 = SharedRenderer.CalculateRowZIndex(nextRow); } if (num5 == int.MaxValue) { num5 = num4; } RenderingItemBorderTablix renderingItemBorderTablix = new RenderingItemBorderTablix(num5, array2[rPLTablixCell.ColIndex], rPLTablixCell.RowIndex, rPLTablixCell.ColIndex, renderingItem); if (rPLTablixMemberCell2 != null) { if (num3 < rPLTablix.ColumnHeaderRows) { m_columnHeaderBorders.Add(renderingItemBorderTablix); } else { renderingItemBorderTablix.CompareRowFirst = false; m_rowHeaderBorders.Add(renderingItemBorderTablix); } } else { m_detailCellBorders.Add(renderingItemBorderTablix); } } } base.Children.Add(renderingItem); fixedHeaderItem?.RenderingItems.Add(renderingItem); if (rPLTablix.FixedColumns[rPLTablixCell.ColIndex]) { fixedHeaderItem3.RenderingItems.Add(renderingItem); } if (fixedHeaderItem2 != null && rPLTablixCell is RPLTablixCornerCell) { fixedHeaderItem2.RenderingItems.Add(renderingItem); fixedHeaderItem2.Bounds = renderingItem.Position; } } num4 = num5; if (fixedHeaderItem != null) { fixedHeaderItem.Bounds.Height += rPLTablix.RowHeights[num3]; if (num3 == rPLTablix.RowHeights.Length - 1 || !rPLTablix.FixedRow(num3 + 1)) { fixedHeaderItem = null; } } num += rPLTablix.RowHeights[num3]; num2 += rPLTablix.RowHeights[num3]; num3++; for (int m = 0; m < nextRow.NumCells; m++) { nextRow[m] = null; } } m_detailCellBorders.Sort(new ZIndexComparer()); m_columnHeaderBorders.Sort(new ZIndexComparer()); m_rowHeaderBorders.Sort(new ZIndexComparer()); m_cornerBorders.Sort(new ZIndexComparer()); RectangleF position = base.Position; if (array.Length != 0) { position.Width = array[array.Length - 1] + rPLTablix.ColumnWidths[rPLTablix.ColumnWidths.Length - 1]; } position.Height = num; }
public void RenderReportItem(RPLElement reportItem, RPLItemMeasurement measurement, StyleContext styleContext, ref int borderContext, bool renderId, bool treatAsTopLevel) { RPLImageProps rPLImageProps = (RPLImageProps)reportItem.ElementProps; RPLImagePropsDef rPLImagePropsDef = (RPLImagePropsDef)rPLImageProps.Definition; RPLFormat.Sizings sizing = rPLImagePropsDef.Sizing; RPLImageData image = rPLImageProps.Image; this.html5Renderer.GetInnerContainerHeightSubtractBorders(measurement, rPLImageProps.Style); float innerContainerWidthSubtractBorders = this.html5Renderer.GetInnerContainerWidthSubtractBorders(measurement, rPLImageProps.Style); string text = this.html5Renderer.GetImageUrl(true, image); string ariaLabel = null; string role = null; string tooltip = this.html5Renderer.GetTooltip(rPLImageProps); if (treatAsTopLevel) { ariaLabel = (string.IsNullOrEmpty(tooltip) ? RenderRes.AccessibleImageLabel : RenderRes.AccessibleImageNavigationGroupLabel(tooltip)); role = HTMLElements.m_navigationRole; } string altText = string.IsNullOrEmpty(tooltip) ? RenderRes.AccessibleImageLabel : tooltip; Dictionary <string, string> dictionary = new Dictionary <string, string>(); if (this.html5Renderer.m_elementExtender.ShouldApplyToElement(treatAsTopLevel)) { dictionary.Add(HTMLElements.m_reportItemDataName, this.html5Renderer.m_elementExtender.ApplyToElement()); dictionary.Add(HTMLElements.m_reportItemCustomAttrStr, this.html5Renderer.GetReportItemPath(rPLImagePropsDef.Name)); } bool flag = rPLImageProps.ActionImageMapAreas != null && rPLImageProps.ActionImageMapAreas.Length > 0; if (flag) { string s = HTMLElements.m_hashTag + this.html5Renderer.m_deviceInfo.HtmlPrefixId + HTMLElements.m_mapPrefixString + rPLImageProps.UniqueName; dictionary.Add(HTMLElements.m_useMapName, HttpUtility.HtmlAttributeEncode(s)); } if (this.html5Renderer.HasAction(rPLImageProps.ActionInfo)) { this.RenderElementHyperlink(rPLImageProps.Style, rPLImageProps.ActionInfo.Actions[0]); } if (!styleContext.InTablix) { if (sizing == RPLFormat.Sizings.AutoSize) { styleContext.RenderMeasurements = false; } this.html5Renderer.WriteStream(HTMLElements.m_openDiv); this.html5Renderer.RenderReportItemStyle(reportItem, (RPLElementProps)rPLImageProps, (RPLElementPropsDef)rPLImagePropsDef, measurement, styleContext, ref borderContext, rPLImagePropsDef.ID); this.html5Renderer.WriteStream(HTMLElements.m_closeBracket); } if (string.IsNullOrEmpty(text)) { text = "data:image/gif;base64," + Convert.ToBase64String(HTMLRendererResources.GetBytes("Blank.gif")); } HtmlElement htmlElement; switch (sizing) { case RPLFormat.Sizings.FitProportional: htmlElement = new FitProportionalImageElement(text, innerContainerWidthSubtractBorders, role, altText, ariaLabel, dictionary); break; case RPLFormat.Sizings.Fit: htmlElement = new FitImageElement(text, role, altText, ariaLabel, dictionary); break; case RPLFormat.Sizings.Clip: htmlElement = new ClipImageElement(text, role, altText, ariaLabel, dictionary); break; default: htmlElement = new OriginalSizeImageElement(text, role, altText, ariaLabel, dictionary); break; } htmlElement.Render(new Html5OutputStream(this.html5Renderer)); if (!styleContext.InTablix) { this.html5Renderer.WriteStream(HTMLElements.m_closeDiv); } if (this.html5Renderer.HasAction(rPLImageProps.ActionInfo)) { this.html5Renderer.WriteStream(HTMLElements.m_closeA); } if (flag) { this.html5Renderer.RenderImageMapAreas(rPLImageProps.ActionImageMapAreas, (double)measurement.Width, (double)measurement.Height, rPLImageProps.UniqueName, 0, 0); } }
private void FillAndFindOverlap(RPLItemMeasurement[] repItemCollection, double delta) { bool flag = false; int num = -1; int num2 = -1; int colSpans = 0; int rowSpans = 0; int num3 = 0; PageTableCell pageTableCell = null; int num4 = 0; RPLItemMeasurement rPLItemMeasurement = null; RPLElement rPLElement = null; while (num4 < repItemCollection.Length) { num = -1; num2 = -1; flag = false; rPLItemMeasurement = repItemCollection[num4]; if (SkipReportItem(rPLItemMeasurement)) { num4++; continue; } rPLElement = rPLItemMeasurement.Element; flag = FindRItemCell(rPLItemMeasurement, ref num, ref num2, delta); if (!flag && !(rPLElement is RPLLine)) { num4++; continue; } RPLLine rPLLine = rPLElement as RPLLine; if (rPLLine != null) { RPLLinePropsDef rPLLinePropsDef = rPLLine.ElementPropsDef as RPLLinePropsDef; float width = rPLItemMeasurement.Width; if ((width >= 0f && width < 0.01f) || (width < 0f && width > -0.01f)) { if (!flag) { int num5 = 0; bool flag2 = true; while (flag2 && num5 < m_nrRows) { if (m_tableGrid[num5 * m_nrCols].YValue == (float)((double)rPLItemMeasurement.Top - delta)) { num2 = num5; flag2 = false; } num5++; } num = m_nrCols - 1; if (!flag2) { AttachVerticalBorder(num, num2, rPLItemMeasurement, (RPLLine)rPLElement, leftBorder: false); } } else { AttachVerticalBorder(num, num2, rPLItemMeasurement, (RPLLine)rPLElement, leftBorder: true); } num4++; continue; } width = rPLItemMeasurement.Height; if ((width >= 0f && width < 0.01f) || (width < 0f && width > -0.01f)) { if (!flag) { int num6 = 0; bool flag3 = true; while (flag3 && num6 < m_nrCols) { if (m_tableGrid[num6].XValue == rPLItemMeasurement.Left) { num = num6; flag3 = false; } num6++; } num2 = m_nrRows - 1; AttachHorizontalBorder(num, num2, rPLItemMeasurement, (RPLLine)rPLElement, topBorder: false); } else { AttachHorizontalBorder(num, num2, rPLItemMeasurement, (RPLLine)rPLElement, topBorder: true); } num4++; continue; } } num3 = num + m_nrCols * num2; pageTableCell = m_tableGrid[num3]; if ((pageTableCell.InUse || pageTableCell.Eaten) && rPLElement is RPLLine && rPLItemMeasurement.Width != 0f && rPLItemMeasurement.Height != 0f) { num4++; continue; } ComputeColRowSpan(rPLItemMeasurement, num, num2, ref colSpans, ref rowSpans); AttachRItem(num, num2, colSpans, rowSpans, rPLItemMeasurement); num4++; } }
internal override RPLElement CreateRPLElement(RPLElementProps props, PageContext pageContext) { RPLElement rPLElement = CreateRPLElement(); WriteElementProps(rPLElement.ElementProps, pageContext); return rPLElement; }
protected override void RenderRPLContainer(RPLElement element, bool inTablix, RPLItemMeasurement measurement, int cellIndex, BorderContext borderContext, bool hasBorder) { RenderRPLContainerProperties(element, inTablix, cellIndex); RenderRPLContainerContents(element, measurement, borderContext, inTablix, hasBorder); }
private void FillAndFindOverlap(RPLItemMeasurement[] repItemCollection, double delta) { bool flag = false; int num = -1; int num2 = -1; int colSpan = 0; int rowSpan = 0; int num3 = 0; PageTableCell pageTableCell = null; int num4 = 0; RPLItemMeasurement rPLItemMeasurement = null; RPLElement rPLElement = null; while (num4 < repItemCollection.Length) { num = -1; num2 = -1; flag = false; rPLItemMeasurement = repItemCollection[num4]; if (PageTableLayout.SkipReportItem(rPLItemMeasurement)) { num4++; } else { rPLElement = rPLItemMeasurement.Element; flag = this.FindRItemCell(rPLItemMeasurement, ref num, ref num2, delta); if (!flag && !(rPLElement is RPLLine)) { num4++; } else { RPLLine rPLLine = rPLElement as RPLLine; if (rPLLine != null) { RPLElementPropsDef elementPropsDef = rPLLine.ElementPropsDef; float width = rPLItemMeasurement.Width; if (width >= 0.0 && width < 0.0099999997764825821) { goto IL_00b8; } if (width < 0.0 && width > -0.0099999997764825821) { goto IL_00b8; } width = rPLItemMeasurement.Height; if (width >= 0.0 && width < 0.0099999997764825821) { goto IL_0176; } if (width < 0.0 && width > -0.0099999997764825821) { goto IL_0176; } } num3 = num + this.m_nrCols * num2; pageTableCell = this.m_tableGrid[num3]; if ((pageTableCell.InUse || pageTableCell.Eaten) && rPLElement is RPLLine && rPLItemMeasurement.Width != 0.0 && rPLItemMeasurement.Height != 0.0) { num4++; continue; } this.ComputeColRowSpan(rPLItemMeasurement, num, num2, ref colSpan, ref rowSpan); this.AttachRItem(num, num2, colSpan, rowSpan, rPLItemMeasurement); num4++; } } continue; IL_00b8: if (!flag) { int num5 = 0; bool flag2 = true; while (flag2 && num5 < this.m_nrRows) { if (this.m_tableGrid[num5 * this.m_nrCols].YValue == (float)((double)rPLItemMeasurement.Top - delta)) { num2 = num5; flag2 = false; } num5++; } num = this.m_nrCols - 1; if (!flag2) { this.AttachVerticalBorder(num, num2, rPLItemMeasurement, (RPLLine)rPLElement, false); } } else { this.AttachVerticalBorder(num, num2, rPLItemMeasurement, (RPLLine)rPLElement, true); } num4++; continue; IL_0176: if (!flag) { int num6 = 0; bool flag3 = true; while (flag3 && num6 < this.m_nrCols) { if (this.m_tableGrid[num6].XValue == rPLItemMeasurement.Left) { num = num6; flag3 = false; } num6++; } num2 = this.m_nrRows - 1; this.AttachHorizontalBorder(num, num2, rPLItemMeasurement, (RPLLine)rPLElement, false); } else { this.AttachHorizontalBorder(num, num2, rPLItemMeasurement, (RPLLine)rPLElement, true); } num4++; } }
internal void Initialize(RPLElement rplElement, RectangleF bounds, int indexInParagraph) { Initialize(rplElement); m_indexInParagraph = indexInParagraph; m_position = GdiContext.GetMeasurementRectangle(null, bounds); }
public virtual object PreProcessReportItem(RPLElement element, RPLElementProps instanceProperties, RectangleF position, bool hasLabel) { return(null); }
protected virtual void Initialize(RPLElement rplElement) { m_instanceProperties = rplElement.ElementProps; m_definitionProperties = m_instanceProperties.Definition; }
private static void ReadMeasurement(RPLElement element, ALayout layout, int top, int left, int generationIndex, BlockOutlines blockOutlines, Dictionary <string, ToggleParent> toggleParents, bool suppressOutlines, int elementWidth, string subreportLanguage) { RPLContainer rPLContainer = element as RPLContainer; if (rPLContainer != null) { if (rPLContainer.Children != null) { bool flag = false; int num = 0; RPLSubReport rPLSubReport = element as RPLSubReport; if (rPLSubReport != null) { flag = true; if (!suppressOutlines) { toggleParents = new Dictionary <string, ToggleParent>(); } string language = ((RPLSubReportProps)rPLSubReport.ElementProps).Language; if (!string.IsNullOrEmpty(language)) { subreportLanguage = language; } } int[] array = new int[rPLContainer.Children.Length]; int[] array2 = new int[rPLContainer.Children.Length]; int[] array3 = new int[rPLContainer.Children.Length]; RPLItem[] array4 = new RPLItem[rPLContainer.Children.Length]; for (int i = 0; i < rPLContainer.Children.Length; i++) { RPLItemMeasurement rPLItemMeasurement = rPLContainer.Children[i]; if (0.0 == rPLItemMeasurement.Width && 0.0 == rPLItemMeasurement.Height) { rPLContainer.Children[i] = null; } else { if ((0.0 == rPLItemMeasurement.Width || 0.0 == rPLItemMeasurement.Height) && !(rPLItemMeasurement.Element is RPLLine)) { rPLContainer.Children[i] = null; continue; } int num2 = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Height); int num3 = 0; if (flag) { num3 = elementWidth; array2[i] = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Top) + top + num; num += num2; } else { num3 = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Width); array2[i] = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Top) + top; } array[i] = num3; array3[i] = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Left) + left; RPLItem rPLItem = array4[i] = rPLItemMeasurement.Element; byte b = default(byte); RPLItemProps itemProps = layout.RPLReport.GetItemProps(rPLItem.RPLSource, out b); if (b == 7) { RPLTextBoxPropsDef rPLTextBoxPropsDef = (RPLTextBoxPropsDef)itemProps.Definition; if (rPLTextBoxPropsDef.IsSimple) { layout.AddReportItem(rPLItem.RPLSource, array2[i], array3[i], num3, num2, generationIndex, rPLItemMeasurement.State, subreportLanguage, toggleParents); } else { layout.AddReportItem(rPLItem, array2[i], array3[i], num3, num2, generationIndex, rPLItemMeasurement.State, subreportLanguage, toggleParents); } if (!suppressOutlines && rPLTextBoxPropsDef.IsToggleParent && !toggleParents.ContainsKey(rPLTextBoxPropsDef.Name)) { toggleParents.Add(rPLTextBoxPropsDef.Name, new ToggleParent(array2[i], array3[i], num3, num2)); } } else { layout.AddReportItem(rPLItem.RPLSource, array2[i], array3[i], num3, num2, generationIndex, rPLItemMeasurement.State, subreportLanguage, toggleParents); } } } for (int j = 0; j < rPLContainer.Children.Length; j++) { if (rPLContainer.Children[j] != null) { Reader.ReadMeasurement(array4[j], layout, array2[j], array3[j], generationIndex + 1, blockOutlines, toggleParents, suppressOutlines, array[j], subreportLanguage); rPLContainer.Children[j] = null; array4[j] = null; } } rPLContainer.Children = null; } } else { Reader.ReadTablixStructure(element as RPLTablix, layout, top, left, generationIndex, blockOutlines, toggleParents, suppressOutlines, subreportLanguage); } }
public void RenderReportItem(RPLElement dynamicImage, RPLItemMeasurement measurement, StyleContext styleContext, ref int borderContext, bool renderId, bool treatAsTopLevel) { RPLElementProps elementProps = dynamicImage.ElementProps; RPLElementPropsDef definition = elementProps.Definition; RPLDynamicImageProps rPLDynamicImageProps = (RPLDynamicImageProps)elementProps; string tooltip = html5Renderer.GetTooltip(rPLDynamicImageProps); if (dynamicImage == null) { return; } bool flag = rPLDynamicImageProps.ActionImageMapAreas != null && rPLDynamicImageProps.ActionImageMapAreas.Length != 0; Rectangle rectangle = RenderDynamicImage(measurement, rPLDynamicImageProps); int xOffset = 0; int yOffset = 0; bool flag2 = !rectangle.IsEmpty; bool flag3 = !html5Renderer.m_deviceInfo.IsBrowserSafari || html5Renderer.m_deviceInfo.AllowScript || !styleContext.InTablix; if (flag3) { html5Renderer.WriteStream(HTMLElements.m_openDiv); if (flag2 && html5Renderer.m_elementExtender.ShouldApplyToElement(treatAsTopLevel)) { WriteReportItemDataName(); } html5Renderer.WriteAccesibilityTags(RenderRes.AccessibleChartLabel, rPLDynamicImageProps, treatAsTopLevel); if (treatAsTopLevel) { string accessibleAriaName = string.IsNullOrEmpty(tooltip) ? RenderRes.AccessibleChartLabel : RenderResWrapper.AccessibleChartNavigationGroupLabel(tooltip); html5Renderer.WriteAriaAccessibleTags(accessibleAriaName); } } bool flag4 = html5Renderer.m_deviceInfo.DataVisualizationFitSizing == DataVisualizationFitSizing.Exact && styleContext.InTablix; if (flag2) { RPLFormat.Sizings sizing = flag4 ? RPLFormat.Sizings.Fit : RPLFormat.Sizings.AutoSize; html5Renderer.WriteOuterConsolidation(rectangle, sizing, rPLDynamicImageProps.UniqueName); html5Renderer.RenderReportItemStyle(dynamicImage, null, ref borderContext); xOffset = rectangle.Left; yOffset = rectangle.Top; } else if (flag4 && html5Renderer.m_deviceInfo.AllowScript) { if (html5Renderer.m_imgFitDivIdsStream == null) { html5Renderer.CreateImgFitDivImageIdsStream(); } html5Renderer.WriteIdToSecondaryStream(html5Renderer.m_imgFitDivIdsStream, rPLDynamicImageProps.UniqueName + "_ifd"); html5Renderer.RenderReportItemId(rPLDynamicImageProps.UniqueName + "_ifd"); } if (flag3) { html5Renderer.WriteStream(HTMLElements.m_closeBracket); } html5Renderer.WriteStream(HTMLElements.m_img); if (html5Renderer.m_elementExtender.ShouldApplyToElement(treatAsTopLevel)) { if (!flag2) { WriteReportItemDataName(); } RPLItemPropsDef rPLItemPropsDef = (RPLItemPropsDef)definition; html5Renderer.WriteAttrEncoded(HTMLElements.m_reportItemCustomAttr, html5Renderer.GetReportItemPath(rPLItemPropsDef.Name)); } if (html5Renderer.m_browserIE) { html5Renderer.WriteStream(HTMLElements.m_imgOnError); } if (renderId) { html5Renderer.RenderReportItemId(rPLDynamicImageProps.UniqueName); } html5Renderer.WriteStream(HTMLElements.m_zeroBorder); bool flag5 = dynamicImage is RPLChart; if (flag) { html5Renderer.WriteAttrEncoded(HTMLElements.m_useMap, "#" + html5Renderer.m_deviceInfo.HtmlPrefixId + HTMLElements.m_mapPrefixString + rPLDynamicImageProps.UniqueName); if (flag4) { html5Renderer.OpenStyle(); if (html5Renderer.m_useInlineStyle && !flag2) { html5Renderer.WriteStream(HTMLElements.m_styleHeight); html5Renderer.WriteStream(HTMLElements.m_percent); html5Renderer.WriteStream(HTMLElements.m_semiColon); html5Renderer.WriteStream(HTMLElements.m_styleWidth); html5Renderer.WriteStream(HTMLElements.m_percent); html5Renderer.WriteStream(HTMLElements.m_semiColon); flag5 = false; } html5Renderer.WriteStream("border-style:none;"); } } else if (flag4 && html5Renderer.m_useInlineStyle && !flag2) { html5Renderer.PercentSizes(); flag5 = false; } StyleContext styleContext2 = new StyleContext(); if (!flag4 && (html5Renderer.m_deviceInfo.IsBrowserIE7 || html5Renderer.m_deviceInfo.IsBrowserIE6)) { styleContext2.RenderMeasurements = false; styleContext2.RenderMinMeasurements = false; } if (!flag2) { if (flag4) { html5Renderer.RenderReportItemStyle(dynamicImage, null, ref borderContext, styleContext2); } else if (flag5) { RPLElementProps elementProps2 = dynamicImage.ElementProps; StyleContext styleContext3 = new StyleContext(); styleContext3.RenderMeasurements = false; html5Renderer.OpenStyle(); html5Renderer.RenderMeasurementStyle(measurement.Height, measurement.Width); html5Renderer.RenderReportItemStyle(dynamicImage, elementProps2, definition, measurement, styleContext3, ref borderContext, definition.ID); } else { html5Renderer.RenderReportItemStyle(dynamicImage, measurement, ref borderContext, styleContext2); } } else { html5Renderer.WriteClippedDiv(rectangle); } tooltip = (string.IsNullOrEmpty(tooltip) ? RenderRes.AccessibleChartLabel : tooltip); html5Renderer.WriteToolTipAttribute(tooltip); html5Renderer.WriteStream(HTMLElements.m_src); html5Renderer.RenderDynamicImageSrc(rPLDynamicImageProps); html5Renderer.WriteStreamCR(HTMLElements.m_closeTag); if (flag) { html5Renderer.RenderImageMapAreas(rPLDynamicImageProps.ActionImageMapAreas, measurement.Width, measurement.Height, rPLDynamicImageProps.UniqueName, xOffset, yOffset); } if (flag3) { html5Renderer.WriteStream(HTMLElements.m_closeDiv); } }
internal virtual void ProcessRenderingElementContent(RPLElement rplElement, GdiContext context, RectangleF bounds) { }