namespace com.azkoss.excellite { using System; using System.ComponentModel; using System.Drawing; /// ///Base class for classes representing one or more excel cells. /// public abstract class AbstractRange { // Methods /// ///Internal. /// /// [EditorBrowsable(EditorBrowsableState.Never)] protected AbstractRange(ExcelWorksheet parent) { this.parent = parent; } internal void CheckMultiline(object val) { string text1 = val as string; if ((text1 != null) && (text1.IndexOf('\n') != -1)) { this.Style.WrapText = true; } } /// ///Sets borders on one or more excel cells, taking cell position into account. /// ///Borders to set. ///Line color. ///Line style. public abstract void SetBorders(MultipleBorders multipleBorders, Color lineColor, LineStyle lineStyle); // Properties /// ///Gets or sets formula string. /// public abstract string Formula { get; set; } /// ///Returns true if all cells in AbstractRange have default ///cell style; otherwise, false. /// public abstract bool IsStyleDefault { get; } internal ExcelWorksheet Parent { get { return this.parent; } } /// ///Gets or sets cell style (CellStyle) on one or more excel cells. /// public abstract CellStyle Style { get; set; } /// ///Gets or sets cell value on one or more excel cells. /// public abstract object Value { get; set; } // Fields private ExcelWorksheet parent; } }