private RPLActionInfo WriteActionInstance(ActionInstance actionInst, PageContext pageContext) { if (actionInst == null) { return(null); } RPLActionInfo rPLActionInfo = new RPLActionInfo(1); RPLAction rPLAction = null; rPLAction = ((actionInst.Label == null) ? new RPLAction() : new RPLAction(actionInst.Label)); if (actionInst.Hyperlink != null) { ReportUrl hyperlink = actionInst.Hyperlink; if (hyperlink != null) { Uri uri = hyperlink.ToUri(); if ((Uri)null != uri) { rPLAction.Hyperlink = uri.AbsoluteUri; } } } else if (actionInst.BookmarkLink != null) { rPLAction.BookmarkLink = actionInst.BookmarkLink; } rPLActionInfo.Actions[0] = rPLAction; return(rPLActionInfo); }
internal bool ProcessActions(GdiContext context, string uniqueName, RPLActionInfo actionInfo, RectangleF position) { if (actionInfo != null && actionInfo.Actions != null && actionInfo.Actions.Length != 0) { RPLAction rPLAction = actionInfo.Actions[0]; if (!string.IsNullOrEmpty(rPLAction.Hyperlink)) { RegisterAction(context, new HyperLinkAction(uniqueName, rPLAction.Label, position, rPLAction.Hyperlink)); } else if (!string.IsNullOrEmpty(rPLAction.DrillthroughId)) { RegisterAction(context, new DrillthroughAction(uniqueName, rPLAction.Label, position, rPLAction.DrillthroughId)); } else if (!string.IsNullOrEmpty(rPLAction.BookmarkLink)) { RegisterAction(context, new BookmarkLinkAction(uniqueName, rPLAction.Label, position, rPLAction.BookmarkLink)); } return(true); } return(false); }
public void DrawTextRun(TextRun run, Paragraph paragraph, Win32DCSafeHandle hdc, float dpiX, FontCache fontCache, int x, int y, int baselineY, int lineHeight, Rectangle layoutRectangle) { TypeCode typeCode = ((RPLTextBoxPropsDef)this.m_source.Definition).SharedTypeCode; if (typeCode == TypeCode.Object) { typeCode = this.m_source.TypeCode; } ReportTextRun reportTextRun = run.TextRunProperties as ReportTextRun; if (reportTextRun != null && reportTextRun.ActionInfo != null && reportTextRun.ActionInfo.Actions.Length > 0) { RPLActionInfo actionInfo = reportTextRun.ActionInfo; RectangleF position = default(RectangleF); if (this.WritingMode == RPLFormat.WritingModes.Horizontal) { position.Width = SharedRenderer.ConvertToMillimeters(run.GetWidth(hdc, fontCache), fontCache.Dpi); position.Height = SharedRenderer.ConvertToMillimeters(run.GetHeight(hdc, fontCache), fontCache.Dpi); position.X = SharedRenderer.ConvertToMillimeters(layoutRectangle.X, fontCache.Dpi) + SharedRenderer.ConvertToMillimeters(x, fontCache.Dpi); position.Y = SharedRenderer.ConvertToMillimeters(layoutRectangle.Y, fontCache.Dpi) + (SharedRenderer.ConvertToMillimeters(y, fontCache.Dpi) - position.Height); } else { position.Width = SharedRenderer.ConvertToMillimeters(run.GetHeight(hdc, fontCache), fontCache.Dpi); position.Height = SharedRenderer.ConvertToMillimeters(run.GetWidth(hdc, fontCache), fontCache.Dpi); if (this.WritingMode == RPLFormat.WritingModes.Vertical) { position.X = SharedRenderer.ConvertToMillimeters(layoutRectangle.Right, fontCache.Dpi) - SharedRenderer.ConvertToMillimeters(y, fontCache.Dpi); position.Y = SharedRenderer.ConvertToMillimeters(layoutRectangle.Y, fontCache.Dpi) + SharedRenderer.ConvertToMillimeters(x, fontCache.Dpi); } else { position.X = SharedRenderer.ConvertToMillimeters(layoutRectangle.X, fontCache.Dpi) + SharedRenderer.ConvertToMillimeters(y, fontCache.Dpi) - position.Width; position.Y = SharedRenderer.ConvertToMillimeters(layoutRectangle.Bottom, fontCache.Dpi) - SharedRenderer.ConvertToMillimeters(x, fontCache.Dpi) - position.Height; } } this.m_writer.ProcessAction(reportTextRun.UniqueName, actionInfo, position); } this.m_writer.DrawTextRun(hdc, fontCache, this, run, typeCode, paragraph.ParagraphProps.Alignment, this.VerticalAlignment, this.WritingMode, this.Direction, new Point(x, y), layoutRectangle, lineHeight, baselineY); }
public virtual void ProcessAction(string uniqueName, RPLActionInfo actionInfo, RectangleF position) { }
internal ReportTextRun(RPLElementStyle sourceStyle, string uniqueName, RPLActionInfo sourceActionInfo, Dictionary <string, float> cachedReportSizes, Dictionary <string, Color> cachedReportColors) : this(sourceStyle, cachedReportSizes, cachedReportColors) { m_uniqueName = uniqueName; m_actionInfo = sourceActionInfo; }