using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml; namespace OfficeOpenXml.Style.Dxf { public class ExcelDxfBorderBase : DxfStyleBase { internal ExcelDxfBorderBase(ExcelStyles styles) : base(styles) { Left=new ExcelDxfBorderItem(_styles); Right = new ExcelDxfBorderItem(_styles); Top = new ExcelDxfBorderItem(_styles); Bottom = new ExcelDxfBorderItem(_styles); } /// /// Left border style /// public ExcelDxfBorderItem Left { get; internal set; } /// /// Right border style /// public ExcelDxfBorderItem Right { get; internal set; } /// /// Top border style /// public ExcelDxfBorderItem Top { get; internal set; } /// /// Bottom border style /// public ExcelDxfBorderItem Bottom { get; internal set; } ///// ///// Diagonal border style ///// //public ExcelDxfBorderItem Diagonal //{ // get; // private set; //} ///// ///// A diagonal from the bottom left to top right of the cell ///// //public bool DiagonalUp //{ // get; // set; //} ///// ///// A diagonal from the top left to bottom right of the cell ///// //public bool DiagonalDown //{ // get; // set; //} protected internal override string Id { get { return Top.Id + Bottom.Id + Left.Id + Right.Id/* + Diagonal.Id + GetAsString(DiagonalUp) + GetAsString(DiagonalDown)*/; } } protected internal override void CreateNodes(XmlHelper helper, string path) { Left.CreateNodes(helper, path + "/d:left"); Right.CreateNodes(helper, path + "/d:right"); Top.CreateNodes(helper, path + "/d:top"); Bottom.CreateNodes(helper, path + "/d:bottom"); } protected internal override bool HasValue { get { return Left.HasValue || Right.HasValue || Top.HasValue || Bottom.HasValue; } } protected internal override ExcelDxfBorderBase Clone() { return new ExcelDxfBorderBase(_styles) { Bottom = Bottom.Clone(), Top=Top.Clone(), Left=Left.Clone(), Right=Right.Clone() }; } } }