Skip to content

Commit

Permalink
EPPlus version 5.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JanKallman committed Jun 17, 2021
1 parent 152827c commit 0950eff
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/EPPlus/Core/Worksheet/WorksheetCopyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ private static void CopyThreadedComments(ExcelWorksheet copy, ExcelWorksheet add
//First copy the drawing XML
string xml = copy.ThreadedComments.ThreadedCommentsXml.InnerXml;
var ix = added.SheetId;
var tcUri = UriHelper.ResolvePartUri(added.WorksheetUri, XmlHelper.GetNewUri(added._package.ZipPackage, "/xl/threadedComments/threadedcomment{0}.xml", ref ix));
var tcUri = UriHelper.ResolvePartUri(added.WorksheetUri, XmlHelper.GetNewUri(added._package.ZipPackage, "/xl/threadedComments/threadedComment{0}.xml", ref ix));

var part = added._package.ZipPackage.CreatePart(tcUri, "application/vnd.ms-excel.threadedcomments+xml", added._package.Compression);

Expand All @@ -743,6 +743,7 @@ private static void CopyThreadedComments(ExcelWorksheet copy, ExcelWorksheet add
//Add the relationship ID to the worksheet xml.
added.Part.CreateRelationship(tcUri, Packaging.TargetMode.Internal, ExcelPackage.schemaThreadedComment);

added.LoadThreadedComments();
foreach (var t in added.ThreadedComments._threads)
{
for (int i = 0; i < t.Comments.Count; i++)
Expand All @@ -767,7 +768,6 @@ private static void CopyThreadedComments(ExcelWorksheet copy, ExcelWorksheet add
wbDest.ThreadedCommentPersons.Add(p.DisplayName, p.UserId, p.ProviderId, p.Id);
}
}
added.LoadThreadedComments();
}
private static void CopyHeaderFooterPictures(ExcelWorksheet Copy, ExcelWorksheet added)
{
Expand Down
6 changes: 3 additions & 3 deletions src/EPPlus/EPPlus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
This applies to EPPlus version 5 and later. Previous versions are still licensed LGPL.

## Version 5.7.0
* External reference
* Better sorting support
* External links
* Enhanced sorting
* Table and auto filter sort state.
* Horizontal sorting
* Pivot table auto sort
Expand Down Expand Up @@ -172,7 +172,7 @@
A list of fixed issues can be found here https://epplussoftware.com/docs/5.6/articles/fixedissues.html

Version history
5.7.0 20210615 Exteral reference. Better sorting support. Pivot table ShowAs See https://epplussoftware.com/Developers/MinorFeaturesAndIssues
5.7.0 20210617 Exteral links. Better sorting support. Pivot table ShowAs See https://epplussoftware.com/Developers/MinorFeaturesAndIssues
5.6.4 20210512 Minor bug fixes.
5.6.3 20210416 Minor bug fixes.
5.6.2 20210407 Minor bug fixes.
Expand Down
10 changes: 7 additions & 3 deletions src/EPPlus/ExcelRangeBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2292,8 +2292,9 @@ internal void Sort(SortOptionsBase options, ExcelTable table)
/// Sort the range by value. Supports top-down and left to right sort.
/// </summary>
/// <param name="configuration">An action of <see cref="RangeSortOptions"/> where sort parameters can be set.</param>
/// <example>
/// // 1. ort rows (top-down)
/// <example>
/// <code>
/// // 1. Sort rows (top-down)
///
/// // The Column function takes the zero based column index in the range
/// worksheet.Cells["A1:D15"].Sort(x => x.SortBy.Column(0).ThenSortBy.Column(1, eSortOrder.Descending));
Expand All @@ -2305,6 +2306,7 @@ internal void Sort(SortOptionsBase options, ExcelTable table)
/// // 3. Sort using a custom list
/// worksheet.Cells["A1:D15"].Sort(x => x.SortBy.Column(0).UsingCustomList("S", "M", "L", "XL"));
/// worksheet.Cells["A1:D15"].Sort(x => x.SortLeftToRightBy.Row(0).UsingCustomList("S", "M", "L", "XL"));
/// </code>
/// </example>
public void Sort(Action<RangeSortOptions> configuration)
{
Expand All @@ -2318,12 +2320,14 @@ public void Sort(Action<RangeSortOptions> configuration)
/// use the <see cref="RangeSortOptions.SortBy"/> or <see cref="RangeSortOptions.SortLeftToRightBy"/> properties to build up your sort parameters.
/// </summary>
/// <param name="options"><see cref="RangeSortOptions">Options</see> for the sort</param>
/// <example>
/// <example>
/// <code>
/// var options = RangeSortOptions.Create();
/// var builder = options.SortBy.Column(0);
/// builder.ThenSortBy.Column(2).UsingCustomList("S", "M", "L", "XL");
/// builder.ThenSortBy.Column(3);
/// worksheet.Cells["A1:D15"].Sort(options);
/// </code>
/// </example>
public void Sort(RangeSortOptions options)
{
Expand Down
9 changes: 7 additions & 2 deletions src/EPPlus/Style/Dxf/ExcelDxfFont.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,18 @@ public override void Clear()
}
protected internal override void CreateNodes(XmlHelper helper, string path)
{
base.CreateNodes(helper, path);
helper.CreateNode(path);
SetValueBool(helper, path + "/d:b/@val", Bold);
SetValueBool(helper, path + "/d:i/@val", Italic);
SetValueBool(helper, path + "/d:strike/@val", Strike);
SetValue(helper, path + "/d:u/@val", Underline == null ? null : Underline.ToEnumString());
SetValueBool(helper, path + "/d:condense/@val", Condense);
SetValueBool(helper, path + "/d:extend/@val", Extend);
SetValueBool(helper, path + "/d:outline/@val", Outline);
SetValueBool(helper, path + "/d:shadow/@val", Shadow);
SetValue(helper, path + "/d:name/@val", Name);
SetValue(helper, path + "/d:sz/@val", Size);
SetValueColor(helper, path + "/d:color", Color);
SetValue(helper, path + "/d:name/@val", Name);
SetValue(helper, path + "/d:family/@val", Family);
SetValue(helper, path + "/d:vertAlign/@val", VerticalAlign==ExcelVerticalAlignmentFont.None ? null : VerticalAlign.ToEnumString());
}
Expand Down
8 changes: 6 additions & 2 deletions src/EPPlus/Table/ExcelTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1069,9 +1069,11 @@ internal void SetTableSortState(int[] columns, bool[] descending, CompareOptions
/// Sorts the data in the table according to the supplied <see cref="RangeSortOptions"/>
/// </summary>
/// <param name="options"></param>
/// <example>
/// <example>
/// <code>
/// var options = new SortOptions();
/// options.SortBy.Column(0).ThenSortBy.Column(1, eSortDirection.Descending);
/// </code>
/// </example>
public void Sort(TableSortOptions options)
{
Expand All @@ -1081,8 +1083,10 @@ public void Sort(TableSortOptions options)
/// <summary>
/// Sorts the data in the table according to the supplied action of <see cref="RangeSortOptions"/>
/// </summary>
/// <example>
/// <example>
/// <code>
/// table.Sort(x =&gt; x.SortBy.Column(0).ThenSortBy.Column(1, eSortDirection.Descending);
/// </code>
/// </example>
/// <param name="configuration">An action with parameters for sorting</param>
public void Sort(Action<TableSortOptions> configuration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ internal ExcelWorksheetThreadedComments(ExcelThreadedCommentPersonCollection per
Persons = persons;
_worksheet = worksheet;
_package = worksheet._package;
_worksheet._threadedCommentsStore = new Core.CellStore.CellStore<int>();
LoadThreads();
}

Expand Down

0 comments on commit 0950eff

Please sign in to comment.