Skip to content

Commit

Permalink
Added UnderLineType to ExcelFont.
Browse files Browse the repository at this point in the history
Documentation
  • Loading branch information
JanKallman committed Jan 30, 2012
1 parent 8773e4e commit 9bd0fbf
Show file tree
Hide file tree
Showing 25 changed files with 325 additions and 94 deletions.
24 changes: 24 additions & 0 deletions EPPlus/Drawing/Chart/ExcelChartLegend.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@

namespace OfficeOpenXml.Drawing.Chart
{
/// <summary>
/// Position of the legend
/// </summary>
public enum eLegendPosition
{
Top,
Expand All @@ -58,6 +61,9 @@ internal ExcelChartLegend(XmlNamespaceManager ns, XmlNode node, ExcelChart chart
SchemaNodeOrder = new string[] { "legendPos", "layout","overlay", "txPr", "bodyPr", "lstStyle", "spPr" };
}
const string POSITION_PATH = "c:legendPos/@val";
/// <summary>
/// Position of the Legend
/// </summary>
public eLegendPosition Position
{
get
Expand Down Expand Up @@ -100,6 +106,9 @@ public eLegendPosition Position
}
}
const string OVERLAY_PATH = "c:overlay/@val";
/// <summary>
/// If the legend overlays other objects
/// </summary>
public bool Overlay
{
get
Expand All @@ -113,6 +122,9 @@ public bool Overlay
}
}
ExcelDrawingFill _fill = null;
/// <summary>
/// Fill style
/// </summary>
public ExcelDrawingFill Fill
{
get
Expand All @@ -125,6 +137,9 @@ public ExcelDrawingFill Fill
}
}
ExcelDrawingBorder _border = null;
/// <summary>
/// Border style
/// </summary>
public ExcelDrawingBorder Border
{
get
Expand All @@ -137,6 +152,9 @@ public ExcelDrawingBorder Border
}
}
ExcelTextFont _font = null;
/// <summary>
/// Font properties
/// </summary>
public ExcelTextFont Font
{
get
Expand All @@ -153,12 +171,18 @@ public ExcelTextFont Font
return _font;
}
}
/// <summary>
/// Remove the legend
/// </summary>
public void Remove()
{
if (TopNode == null) return;
TopNode.ParentNode.RemoveChild(TopNode);
TopNode = null;
}
/// <summary>
/// Add a legend to the chart
/// </summary>
public void Add()
{
if(TopNode!=null) return;
Expand Down
3 changes: 3 additions & 0 deletions EPPlus/Drawing/Chart/ExcelChartSerieDataLabel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@

namespace OfficeOpenXml.Drawing.Chart
{
/// <summary>
/// Datalabel properties
/// </summary>
public sealed class ExcelChartSerieDataLabel : ExcelChartDataLabel
{
internal ExcelChartSerieDataLabel(XmlNamespaceManager ns, XmlNode node)
Expand Down
5 changes: 4 additions & 1 deletion EPPlus/Drawing/Chart/ExcelChartTrendline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ internal ExcelChartTrendlineCollection(ExcelChartSerie serie)
/// Add a new trendline
/// </summary>
/// <param name="Type"></param>
/// <returns></returns>
/// <returns>The trendline</returns>
public ExcelChartTrendline Add(eTrendLine Type)
{
if (_serie._chartSeries._chart.IsType3D() ||
Expand Down Expand Up @@ -102,6 +102,9 @@ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
return _list.GetEnumerator();
}
}
/// <summary>
/// A trendline object
/// </summary>
public class ExcelChartTrendline : XmlHelper
{
internal ExcelChartTrendline(XmlNamespaceManager namespaceManager, XmlNode topNode) :
Expand Down
4 changes: 2 additions & 2 deletions EPPlus/Drawing/Chart/ExcelLineChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
namespace OfficeOpenXml.Drawing.Chart
{
/// <summary>
/// A line chart
/// Provides access to line chart specific properties
/// </summary>
public class ExcelLineChart : ExcelChart
public class ExcelLineChart : ExcelChart
{
#region "Constructors"
internal ExcelLineChart(ExcelDrawings drawings, XmlNode node, Uri uriChart, PackagePart part, XmlDocument chartXml, XmlNode chartNode) :
Expand Down
2 changes: 1 addition & 1 deletion EPPlus/Drawing/Chart/ExcelOfPieChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
namespace OfficeOpenXml.Drawing.Chart
{
/// <summary>
/// Provides access to pie chart specific properties
/// Provides access to ofpie-chart specific properties
/// </summary>
public class ExcelOfPieChart : ExcelPieChart
{
Expand Down
4 changes: 3 additions & 1 deletion EPPlus/Drawing/Chart/ExcelPieChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@

namespace OfficeOpenXml.Drawing.Chart
{

/// <summary>
/// Provides access to pie chart specific properties
/// </summary>
public class ExcelPieChart : ExcelChart
{
internal ExcelPieChart(ExcelDrawings drawings, XmlNode node, eChartType type, bool isPivot) :
Expand Down
1 change: 0 additions & 1 deletion EPPlus/Drawing/ExcelView3D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public sealed class ExcelView3D : XmlHelper
internal ExcelView3D(XmlNamespaceManager ns, XmlNode node)
: base(ns,node)
{
//SchemaNodeOrder = new string[] { "rotX", "rotY", "perspective" };
SchemaNodeOrder = new string[] { "rotX", "hPercent", "rotY", "depthPercent","rAngAx", "perspective"};
}
const string perspectivePath = "c:perspective/@val";
Expand Down
6 changes: 6 additions & 0 deletions EPPlus/ExcelPrinterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ namespace OfficeOpenXml
/// </summary>
public enum eOrientation
{
/// <summary>
/// Portrait orientation
/// </summary>
Portrait,
/// <summary>
/// Landscape orientation
/// </summary>
Landscape
}
/// <summary>
Expand Down
6 changes: 6 additions & 0 deletions EPPlus/ExcelSheetProtection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ public bool AllowSort
}

private const string _allowAutoFilterPath = "d:sheetProtection/@autoFilter";
/// <summary>
/// Allow users to use autofilters
/// </summary>
public bool AllowAutoFilter
{
get
Expand All @@ -285,6 +288,9 @@ public bool AllowAutoFilter
}
}
private const string _allowPivotTablesPath = "d:sheetProtection/@pivotTables";
/// <summary>
/// Allow users to use pivottables
/// </summary>
public bool AllowPivotTables
{
get
Expand Down
7 changes: 4 additions & 3 deletions EPPlus/ExcelTextFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
namespace OfficeOpenXml
{
/// <summary>
/// Discribes a column
/// Discribes a column when reading a text using the ExcelRangeBase.LoadFromText method
/// </summary>
public enum eDataTypes
{
Expand All @@ -58,7 +58,8 @@ public enum eDataTypes
/// </summary>
DateTime,
/// <summary>
/// Try to convert it to a number and divide with 100. Removes any tailing percent sign (%). If it fails then add it as a string.
/// Try to convert it to a number and divide with 100.
/// Removes any tailing percent sign (%). If it fails then add it as a string.
/// </summary>
Percent
}
Expand Down Expand Up @@ -111,7 +112,7 @@ public ExcelTextFormat()
/// </summary>
public eDataTypes[] DataTypes { get; set; }
/// <summary>
/// Culture used when parsing.Default CultureInfo.InvariantCulture
/// Culture used when parsing. Default CultureInfo.InvariantCulture
/// </summary>
public CultureInfo Culture {get; set; }
/// <summary>
Expand Down
21 changes: 20 additions & 1 deletion EPPlus/Style/ExcelFont.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,26 @@ public bool UnderLine
}
set
{
_ChangedEvent(this, new StyleChangeEventArgs(eStyleClass.Font, eStyleProperty.Underline, value, _positionID, _address));
if (value)
{
UnderLineType = ExcelUnderLineType.Single;
}
else
{
UnderLineType = ExcelUnderLineType.None;
}
//_ChangedEvent(this, new StyleChangeEventArgs(eStyleClass.Font, eStyleProperty.UnderlineType, value, _positionID, _address));
}
}
public ExcelUnderLineType UnderLineType
{
get
{
return _styles.Fonts[Index].UnderLineType;
}
set
{
_ChangedEvent(this, new StyleChangeEventArgs(eStyleClass.Font, eStyleProperty.UnderlineType, value, _positionID, _address));
}
}
/// <summary>
Expand Down
11 changes: 11 additions & 0 deletions EPPlus/Style/StyleBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ public enum ExcelVerticalAlignmentFont
Superscript
}
/// <summary>
/// Font-Underlinestyle for
/// </summary>
public enum ExcelUnderLineType
{
None,
Single,
Double,
SingleAccounting,
DoubleAccounting
}
/// <summary>
/// Fill pattern
/// </summary>
public enum ExcelFillStyle
Expand Down
2 changes: 1 addition & 1 deletion EPPlus/Style/StyleChangeEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ internal enum eStyleProperty
GradientColor,
Family,
Scheme,
Underline,
UnderlineType,
HorizontalAlign,
VerticalAlign,
Border,
Expand Down
6 changes: 6 additions & 0 deletions EPPlus/Style/XmlAccess/ExcelBorderItemXml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ private ExcelBorderStyle GetBorderStyle(string style)

}
ExcelBorderStyle _borderStyle = ExcelBorderStyle.None;
/// <summary>
/// Cell Border style
/// </summary>
public ExcelBorderStyle Style
{
get
Expand All @@ -90,6 +93,9 @@ public ExcelBorderStyle Style
}
ExcelColorXml _color = null;
const string _colorPath = "d:color";
/// <summary>
/// Border style
/// </summary>
public ExcelColorXml Color
{
get
Expand Down
21 changes: 21 additions & 0 deletions EPPlus/Style/XmlAccess/ExcelBorderXml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ internal override string Id
}
const string leftPath = "d:left";
ExcelBorderItemXml _left = null;
/// <summary>
/// Left border style properties
/// </summary>
public ExcelBorderItemXml Left
{
get
Expand All @@ -76,6 +79,9 @@ internal set
}
const string rightPath = "d:right";
ExcelBorderItemXml _right = null;
/// <summary>
/// Right border style properties
/// </summary>
public ExcelBorderItemXml Right
{
get
Expand All @@ -89,6 +95,9 @@ internal set
}
const string topPath = "d:top";
ExcelBorderItemXml _top = null;
/// <summary>
/// Top border style properties
/// </summary>
public ExcelBorderItemXml Top
{
get
Expand All @@ -102,6 +111,9 @@ internal set
}
const string bottomPath = "d:bottom";
ExcelBorderItemXml _bottom = null;
/// <summary>
/// Bottom border style properties
/// </summary>
public ExcelBorderItemXml Bottom
{
get
Expand All @@ -115,6 +127,9 @@ internal set
}
const string diagonalPath = "d:diagonal";
ExcelBorderItemXml _diagonal = null;
/// <summary>
/// Diagonal border style properties
/// </summary>
public ExcelBorderItemXml Diagonal
{
get
Expand All @@ -128,6 +143,9 @@ internal set
}
const string diagonalUpPath = "@diagonalUp";
bool _diagonalUp = false;
/// <summary>
/// Diagonal up border
/// </summary>
public bool DiagonalUp
{
get
Expand All @@ -141,6 +159,9 @@ internal set
}
const string diagonalDownPath = "@diagonalDown";
bool _diagonalDown = false;
/// <summary>
/// Diagonal down border
/// </summary>
public bool DiagonalDown
{
get
Expand Down
12 changes: 12 additions & 0 deletions EPPlus/Style/XmlAccess/ExcelColorXml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ public bool Auto
}
}
string _theme;
/// <summary>
/// Theme color value
/// </summary>
public string Theme
{
get
Expand All @@ -102,6 +105,9 @@ public string Theme
}
}
decimal _tint;
/// <summary>
/// Tint
/// </summary>
public decimal Tint
{
get
Expand All @@ -115,6 +121,9 @@ public decimal Tint
}
}
string _rgb;
/// <summary>
/// RGB value
/// </summary>
public string Rgb
{
get
Expand All @@ -130,6 +139,9 @@ public string Rgb
}
}
int _indexed;
/// <summary>
/// Indexed color value
/// </summary>
public int Indexed
{
get
Expand Down

0 comments on commit 9bd0fbf

Please sign in to comment.