Skip to content

Commit 0950eff

Browse files
committed
EPPlus version 5.7.0
1 parent 152827c commit 0950eff

File tree

6 files changed

+26
-12
lines changed

6 files changed

+26
-12
lines changed

src/EPPlus/Core/Worksheet/WorksheetCopyHelper.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ private static void CopyThreadedComments(ExcelWorksheet copy, ExcelWorksheet add
732732
//First copy the drawing XML
733733
string xml = copy.ThreadedComments.ThreadedCommentsXml.InnerXml;
734734
var ix = added.SheetId;
735-
var tcUri = UriHelper.ResolvePartUri(added.WorksheetUri, XmlHelper.GetNewUri(added._package.ZipPackage, "/xl/threadedComments/threadedcomment{0}.xml", ref ix));
735+
var tcUri = UriHelper.ResolvePartUri(added.WorksheetUri, XmlHelper.GetNewUri(added._package.ZipPackage, "/xl/threadedComments/threadedComment{0}.xml", ref ix));
736736

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

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

746+
added.LoadThreadedComments();
746747
foreach (var t in added.ThreadedComments._threads)
747748
{
748749
for (int i = 0; i < t.Comments.Count; i++)
@@ -767,7 +768,6 @@ private static void CopyThreadedComments(ExcelWorksheet copy, ExcelWorksheet add
767768
wbDest.ThreadedCommentPersons.Add(p.DisplayName, p.UserId, p.ProviderId, p.Id);
768769
}
769770
}
770-
added.LoadThreadedComments();
771771
}
772772
private static void CopyHeaderFooterPictures(ExcelWorksheet Copy, ExcelWorksheet added)
773773
{

src/EPPlus/EPPlus.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
This applies to EPPlus version 5 and later. Previous versions are still licensed LGPL.
2727

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

174174
Version history
175-
5.7.0 20210615 Exteral reference. Better sorting support. Pivot table ShowAs See https://epplussoftware.com/Developers/MinorFeaturesAndIssues
175+
5.7.0 20210617 Exteral links. Better sorting support. Pivot table ShowAs See https://epplussoftware.com/Developers/MinorFeaturesAndIssues
176176
5.6.4 20210512 Minor bug fixes.
177177
5.6.3 20210416 Minor bug fixes.
178178
5.6.2 20210407 Minor bug fixes.

src/EPPlus/ExcelRangeBase.cs

+7-3
Original file line numberDiff line numberDiff line change
@@ -2292,8 +2292,9 @@ internal void Sort(SortOptionsBase options, ExcelTable table)
22922292
/// Sort the range by value. Supports top-down and left to right sort.
22932293
/// </summary>
22942294
/// <param name="configuration">An action of <see cref="RangeSortOptions"/> where sort parameters can be set.</param>
2295-
/// <example>
2296-
/// // 1. ort rows (top-down)
2295+
/// <example>
2296+
/// <code>
2297+
/// // 1. Sort rows (top-down)
22972298
///
22982299
/// // The Column function takes the zero based column index in the range
22992300
/// worksheet.Cells["A1:D15"].Sort(x => x.SortBy.Column(0).ThenSortBy.Column(1, eSortOrder.Descending));
@@ -2305,6 +2306,7 @@ internal void Sort(SortOptionsBase options, ExcelTable table)
23052306
/// // 3. Sort using a custom list
23062307
/// worksheet.Cells["A1:D15"].Sort(x => x.SortBy.Column(0).UsingCustomList("S", "M", "L", "XL"));
23072308
/// worksheet.Cells["A1:D15"].Sort(x => x.SortLeftToRightBy.Row(0).UsingCustomList("S", "M", "L", "XL"));
2309+
/// </code>
23082310
/// </example>
23092311
public void Sort(Action<RangeSortOptions> configuration)
23102312
{
@@ -2318,12 +2320,14 @@ public void Sort(Action<RangeSortOptions> configuration)
23182320
/// use the <see cref="RangeSortOptions.SortBy"/> or <see cref="RangeSortOptions.SortLeftToRightBy"/> properties to build up your sort parameters.
23192321
/// </summary>
23202322
/// <param name="options"><see cref="RangeSortOptions">Options</see> for the sort</param>
2321-
/// <example>
2323+
/// <example>
2324+
/// <code>
23222325
/// var options = RangeSortOptions.Create();
23232326
/// var builder = options.SortBy.Column(0);
23242327
/// builder.ThenSortBy.Column(2).UsingCustomList("S", "M", "L", "XL");
23252328
/// builder.ThenSortBy.Column(3);
23262329
/// worksheet.Cells["A1:D15"].Sort(options);
2330+
/// </code>
23272331
/// </example>
23282332
public void Sort(RangeSortOptions options)
23292333
{

src/EPPlus/Style/Dxf/ExcelDxfFont.cs

+7-2
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,18 @@ public override void Clear()
216216
}
217217
protected internal override void CreateNodes(XmlHelper helper, string path)
218218
{
219-
base.CreateNodes(helper, path);
219+
helper.CreateNode(path);
220+
SetValueBool(helper, path + "/d:b/@val", Bold);
221+
SetValueBool(helper, path + "/d:i/@val", Italic);
222+
SetValueBool(helper, path + "/d:strike/@val", Strike);
223+
SetValue(helper, path + "/d:u/@val", Underline == null ? null : Underline.ToEnumString());
220224
SetValueBool(helper, path + "/d:condense/@val", Condense);
221225
SetValueBool(helper, path + "/d:extend/@val", Extend);
222226
SetValueBool(helper, path + "/d:outline/@val", Outline);
223227
SetValueBool(helper, path + "/d:shadow/@val", Shadow);
224-
SetValue(helper, path + "/d:name/@val", Name);
225228
SetValue(helper, path + "/d:sz/@val", Size);
229+
SetValueColor(helper, path + "/d:color", Color);
230+
SetValue(helper, path + "/d:name/@val", Name);
226231
SetValue(helper, path + "/d:family/@val", Family);
227232
SetValue(helper, path + "/d:vertAlign/@val", VerticalAlign==ExcelVerticalAlignmentFont.None ? null : VerticalAlign.ToEnumString());
228233
}

src/EPPlus/Table/ExcelTable.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1069,9 +1069,11 @@ internal void SetTableSortState(int[] columns, bool[] descending, CompareOptions
10691069
/// Sorts the data in the table according to the supplied <see cref="RangeSortOptions"/>
10701070
/// </summary>
10711071
/// <param name="options"></param>
1072-
/// <example>
1072+
/// <example>
1073+
/// <code>
10731074
/// var options = new SortOptions();
10741075
/// options.SortBy.Column(0).ThenSortBy.Column(1, eSortDirection.Descending);
1076+
/// </code>
10751077
/// </example>
10761078
public void Sort(TableSortOptions options)
10771079
{
@@ -1081,8 +1083,10 @@ public void Sort(TableSortOptions options)
10811083
/// <summary>
10821084
/// Sorts the data in the table according to the supplied action of <see cref="RangeSortOptions"/>
10831085
/// </summary>
1084-
/// <example>
1086+
/// <example>
1087+
/// <code>
10851088
/// table.Sort(x =&gt; x.SortBy.Column(0).ThenSortBy.Column(1, eSortDirection.Descending);
1089+
/// </code>
10861090
/// </example>
10871091
/// <param name="configuration">An action with parameters for sorting</param>
10881092
public void Sort(Action<TableSortOptions> configuration)

src/EPPlus/ThreadedComments/ExcelWorksheetThreadedComments.cs

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ internal ExcelWorksheetThreadedComments(ExcelThreadedCommentPersonCollection per
3232
Persons = persons;
3333
_worksheet = worksheet;
3434
_package = worksheet._package;
35+
_worksheet._threadedCommentsStore = new Core.CellStore.CellStore<int>();
3536
LoadThreads();
3637
}
3738

0 commit comments

Comments
 (0)