private void SetShading(IHaveABorderAndShading shadingHolder, string shading) { if (!shading.Equals("Transparent")) { string text2 = shadingHolder.BackgroundColor = WordOpenXmlUtils.RgbColor(new RPLReportColor(shading).ToColor()); } }
public void WriteCellDiagonal(int cellIndex, RPLFormat.BorderStyles style, string width, string color, bool slantUp) { OpenXmlTableCellModel currentCell = this._document.TableContext.CurrentCell; OpenXmlBorderPropertiesModel openXmlBorderPropertiesModel = slantUp ? currentCell.CellProperties.BorderDiagonalUp : currentCell.CellProperties.BorderDiagonalDown; openXmlBorderPropertiesModel.Color = WordOpenXmlUtils.RgbColor(new RPLReportColor(color).ToColor()); openXmlBorderPropertiesModel.Style = this.RPLFormatToBorderStyle(style); openXmlBorderPropertiesModel.WidthInEighthPoints = (int)Math.Floor(new RPLReportSize(width).ToPoints() * 8.0); }
private void SetBorderColor(IHaveABorderAndShading borderHolder, string color, TableData.Positions side) { switch (side) { case TableData.Positions.Top: borderHolder.BorderTop.Color = WordOpenXmlUtils.RgbColor(new RPLReportColor(color).ToColor()); break; case TableData.Positions.Bottom: borderHolder.BorderBottom.Color = WordOpenXmlUtils.RgbColor(new RPLReportColor(color).ToColor()); break; case TableData.Positions.Left: borderHolder.BorderLeft.Color = WordOpenXmlUtils.RgbColor(new RPLReportColor(color).ToColor()); break; case TableData.Positions.Right: borderHolder.BorderRight.Color = WordOpenXmlUtils.RgbColor(new RPLReportColor(color).ToColor()); break; } }