Skip to content

Commit e5143bd

Browse files
Refactoring rc.2
1 parent 9e81147 commit e5143bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1681
-1384
lines changed

Docs.IndexGenerator/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static int Main(string[] args)
2525
string rootConfigPath = "../Docs.IndexGenerator/Config/root-config.json";
2626
string metaPackageConfigPath = "../Docs.IndexGenerator/Config/meta-package-config.json";
2727
string pluginConfigPath = "../Docs.IndexGenerator/Config/plugin-config.json";
28-
string outDir = Path.Combine("..","Docs.IndexGenerator", "Output");
28+
string outDir = Path.Combine("..", "Docs.IndexGenerator", "Output");
2929

3030
for (int i = 0; i < args.Length; i++)
3131
{

MigrationGuide.md

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,24 @@ The following guide lists all necessary changes, as well as changed behaviors of
6464
| `MIN_ZOOM_FACTOR` | `MinZoomFactor` |
6565
| `MAX_ZOOM_FACTOR` | `MaxZoomFactor` |
6666

67+
---
68+
69+
### Cell
70+
71+
- The enum values of `Cell.CellType` were renamed, according to the following overview:
72+
73+
| Old Enum Value | New Enum Value | Remarks |
74+
|---------------------|------------------------|----------|
75+
| `CellType.STRING` | `CellType.String` | |
76+
| `CellType.NUMBER` | `CellType.Number` | |
77+
| `CellType.DATE` | `CellType.Date` | |
78+
| `CellType.TIME` | `CellType.Time` | |
79+
| `CellType.BOOL` | `CellType.Bool` | |
80+
| `CellType.FORMULA` | `CellType.Formula` | |
81+
| `CellType.EMPTY` | `CellType.Empty` | |
82+
| `CellType.DEFAULT` | `CellType.Default` | |
83+
84+
6785
---
6886

6987
### Address (struct)
@@ -105,6 +123,32 @@ Furthermore, a lot of constants were renamed to follow the C# naming conventions
105123
| `DEFAULT_FONT_FAMILY` | `DefaultFontSize` | The type was changed from `int` to the enum `Font.FontFamilyValue` |
106124
| `DEFAULT_VERTICAL_ALIGN` | `DefaultVerticalAlign` | The type was changed from enum `Font.VerticalAlignValue` to `Font.VerticalTextAlignValue` |
107125

126+
- The enum values of `Font.SchemeValue` were renamed, according to the following overview:
127+
128+
| Old Enum Value | New Enum Value | Remarks |
129+
| ----------------------------- | --------------------------- | ------- |
130+
| `SchemeValue.major` | `SchemeValue.Major` | |
131+
| `SchemeValue.minor` | `SchemeValue.Minor` | |
132+
| `SchemeValue.none` | `SchemeValue.None` | |
133+
134+
- The enum values of `Font.VerticalTextAlignValue` were renamed, according to the following overview:
135+
136+
| Old Enum Value | New Enum Value | Remarks |
137+
| ----------------------------------- | --------------------------- | ------- |
138+
| `VerticalTextAlignValue.subscript` | `VerticalTextAlignValue.Subscript` | |
139+
| `VerticalTextAlignValue.superscript`| `VerticalTextAlignValue.Superscript` | |
140+
| `VerticalTextAlignValue.none` | `VerticalTextAlignValue.None` | |
141+
142+
- The enum values of `Font.UnderlineValue` were renamed, according to the following overview:
143+
144+
| Old Enum Value | New Enum Value | Remarks |
145+
| ----------------------------------- | --------------------------- | ------- |
146+
| `UnderlineValue.u_single` | `UnderlineValue.Single` | |
147+
| `UnderlineValue.u_double_` | `UnderlineValue.Double` | |
148+
| `UnderlineValue.singleAccounting` | `UnderlineValue.SingleAccounting` | |
149+
| `UnderlineValue.doubleAccounting` | `UnderlineValue.DoubleAccounting` | |
150+
| `UnderlineValue.none` | `UnderlineValue.None` | |
151+
108152
- The property `Font.Family` was changed from type `string` to the enum `Font.FontFamilyValue`.The value has to be replaced by one of the following available values:
109153
```cs
110154
NotApplicable, Roman, Swiss, Modern, Script, Decorative, Reserved1, Reserved2, Reserved3, Reserved4, Reserved5, Reserved6, Reserved7, Reserved8, Reserved9
@@ -130,6 +174,24 @@ ApplicationDefined, ANSI, Default, Symbols, Mac, ShiftJIS, Hangul, Johab, GBK, B
130174
| `DEFAULT_BORDER_STYLE` | `DefaultBorderStyle` | |
131175
| `DEFAULT_COLOR` | `DefaultBorderColor` | |
132176

177+
- The enum values of `Border.StyleValue` were renamed, according to the following overview:
178+
179+
| Old Enum Value | New Enum Value | Remarks |
180+
| ----------------------------- | --------------------------- | ------- |
181+
| `StyleValue.hair` | `CellType.Hair` | |
182+
| `StyleValue.dotted` | `CellType.Dotted` | |
183+
| `StyleValue.dashDotDot` | `CellType.DashDotDot` | |
184+
| `StyleValue.dashDot` | `CellType.DashDot` | |
185+
| `StyleValue.dashed` | `CellType.Dashed` | |
186+
| `StyleValue.thin` | `CellType.Thin` | |
187+
| `StyleValue.mediumDashDotDot` | `CellType.MediumDashDotDot` | |
188+
| `StyleValue.slantDashDot` | `CellType.SlantDashDot` | |
189+
| `StyleValue.mediumDashDot` | `CellType.MediumDashDot` | |
190+
| `StyleValue.mediumDashed` | `CellType.MediumDashed` | |
191+
| `StyleValue.medium` | `CellType.Medium` | |
192+
| `StyleValue.thick` | `CellType.Thick` | |
193+
| `StyleValue.s_double` | `CellType.Double` | |
194+
133195
#### Fill
134196

135197
- The public constant values of the `Fill` class were renamed, according to the following overview:
@@ -140,6 +202,25 @@ ApplicationDefined, ANSI, Default, Symbols, Mac, ShiftJIS, Hangul, Johab, GBK, B
140202
| `DEFAULT_INDEXED_COLOR` | `DefaultIndexedColor` | |
141203
| `DEFAULT_PATTERN_FILL` | `DefaultPatternFill` | |
142204

205+
- The enum values of `Fill.FillType` were renamed, according to the following overview:
206+
207+
| Old Enum Value | New Enum Value | Remarks |
208+
| ----------------------- | --------------------------- | ------- |
209+
| `FillType.patternColor` | `FillType.PatternColor` | |
210+
| `FillType.fillColor` | `FillType.FillColor` | |
211+
212+
- The enum values of `Fill.PatternValue` were renamed, according to the following overview:
213+
214+
| Old Enum Value | New Enum Value | Remarks |
215+
| ------------------------ | -------------------------- | ------- |
216+
| `PatternValue.solid` | `PatternValue.Solid` | |
217+
| `PatternValue.darkGray` | `PatternValue.DarkGray` | |
218+
| `PatternValue.mediumGray`| `PatternValue.MediumGray` | |
219+
| `PatternValue.lightGray` | `PatternValue.LightGray` | |
220+
| `PatternValue.gray0625` | `PatternValue.Gray0625` | |
221+
| `PatternValue.gray125` | `PatternValue.Gray125` | |
222+
| `PatternValue.none` | `PatternValue.None` | |
223+
143224
- The static method `Fill.ValidateColr(string,bool, bool)` was moved to the utils class `Validators.ValidateColr(string,bool, bool)` in namespace `NanoXLSX.Utils`. The class has to be changed in the code, but the method signature remains unchanged.
144225

145226
#### CellXf
@@ -153,6 +234,46 @@ ApplicationDefined, ANSI, Default, Symbols, Mac, ShiftJIS, Hangul, Johab, GBK, B
153234
| `DEFAULT_TEXT_DIRECTION` | `DefaultTextDirection` | |
154235
| `DEFAULT_VERTICAL_ALIGNMENT` | `DefaultVerticalAlignment` | |
155236

237+
- The enum values of `CellXf.HorizontalAlignValue` were renamed, according to the following overview:
238+
239+
| Old Enum Value | New Enum Value | Remarks |
240+
| ------------------------------- | --------------------------- | ------- |
241+
| `HorizontalAlignValue.left` | `HorizontalAlignValue.Left` | |
242+
| `HorizontalAlignValue.center` | `HorizontalAlignValue.Center` | |
243+
| `HorizontalAlignValue.right` | `HorizontalAlignValue.Right` | |
244+
| `HorizontalAlignValue.fill` | `HorizontalAlignValue.Fill` | |
245+
| `HorizontalAlignValue.justify` | `HorizontalAlignValue.Justify` | |
246+
| `HorizontalAlignValue.general` | `HorizontalAlignValue.General` | |
247+
| `HorizontalAlignValue.centerContinuous` | `HorizontalAlignValue.CenterContinuous` | |
248+
| `HorizontalAlignValue.distributed` | `HorizontalAlignValue.Distributed` | |
249+
| `HorizontalAlignValue.none` | `HorizontalAlignValue.None` | |
250+
251+
- The enum values of `CellXf.TextBreakValue` were renamed, according to the following overview:
252+
253+
| Old Enum Value | New Enum Value | Remarks |
254+
| ----------------------------- | --------------------------- | ------- |
255+
| `TextBreakValue.wrapText` | `TextBreakValue.WrapText` | |
256+
| `TextBreakValue.shrinkToFit` | `TextBreakValue.ShrinkToFit`| |
257+
| `TextBreakValue.none` | `TextBreakValue.None` | |
258+
259+
- The enum values of `CellXf.TextDirectionValue` were renamed, according to the following overview:
260+
261+
| Old Enum Value | New Enum Value | Remarks |
262+
| ------------------------------- | --------------------------- | ------- |
263+
| `TextDirectionValue.horizontal` | `TextDirectionValue.Horizontal` | |
264+
| `TextDirectionValue.vertical` | `TextDirectionValue.Vertical` | |
265+
266+
- The enum values of `CellXf.VerticalAlignValue` were renamed, according to the following overview:
267+
268+
| Old Enum Value | New Enum Value | Remarks |
269+
| ------------------------------- | --------------------------- | ------- |
270+
| `VerticalAlignValue.bottom` | `VerticalAlignValue.Horizontal` | |
271+
| `VerticalAlignValue.top` | `VerticalAlignValue.Vertical` | |
272+
| `VerticalAlignValue.center` | `VerticalAlignValue.Horizontal` | |
273+
| `VerticalAlignValue.justify` | `VerticalAlignValue.Justify` | |
274+
| `VerticalAlignValue.distributed`| `VerticalAlignValue.Distributed`| |
275+
| `VerticalAlignValue.none` | `VerticalAlignValue.None` | |
276+
156277
#### NumberFormat
157278

158279
- The public constant values of the `NumberFormat` class were renamed, according to the following overview:
@@ -171,6 +292,44 @@ ApplicationDefined, ANSI, Default, Symbols, Mac, ShiftJIS, Hangul, Johab, GBK, B
171292
| `FormatRange.invalied` | `FormatRange.Inavlid` | |
172293
| `FormatRange.undefined` | `FormatRange.Undefined`| |
173294

295+
- The enum values of `NumberFormat.NumberFormat` were renamed, according to the following overview:
296+
297+
| Old Enum Value | New Enum Value | Remarks |
298+
| ------------------------ | ----------------------- | ------------------------- |
299+
| `NumberFormat.format_1` | `NumberFormat.Format1` | |
300+
| `NumberFormat.format_2` | `NumberFormat.Format2` | |
301+
| `NumberFormat.format_3` | `NumberFormat.Format3` | |
302+
| `NumberFormat.format_4` | `NumberFormat.Format4` | |
303+
| `NumberFormat.format_5` | `NumberFormat.Format5` | |
304+
| `NumberFormat.format_6` | `NumberFormat.Format6` | |
305+
| `NumberFormat.format_7` | `NumberFormat.Format7` | |
306+
| `NumberFormat.format_8` | `NumberFormat.Format8` | |
307+
| `NumberFormat.format_9` | `NumberFormat.Format9` | |
308+
| `NumberFormat.format_10` | `NumberFormat.Format10` | |
309+
| `NumberFormat.format_11` | `NumberFormat.Format11` | |
310+
| `NumberFormat.format_12` | `NumberFormat.Format12` | |
311+
| `NumberFormat.format_13` | `NumberFormat.Format13` | |
312+
| `NumberFormat.format_14` | `NumberFormat.Format14` | |
313+
| `NumberFormat.format_15` | `NumberFormat.Format15` | |
314+
| `NumberFormat.format_16` | `NumberFormat.Format16` | |
315+
| `NumberFormat.format_17` | `NumberFormat.Format17` | |
316+
| `NumberFormat.format_18` | `NumberFormat.Format18` | |
317+
| `NumberFormat.format_19` | `NumberFormat.Format19` | |
318+
| `NumberFormat.format_20` | `NumberFormat.Format20` | |
319+
| `NumberFormat.format_21` | `NumberFormat.Format21` | |
320+
| `NumberFormat.format_22` | `NumberFormat.Format22` | |
321+
| `NumberFormat.format_37` | `NumberFormat.Format37` | |
322+
| `NumberFormat.format_38` | `NumberFormat.Format38` | |
323+
| `NumberFormat.format_39` | `NumberFormat.Format39` | |
324+
| `NumberFormat.format_40` | `NumberFormat.Format40` | |
325+
| `NumberFormat.format_45` | `NumberFormat.Format45` | |
326+
| `NumberFormat.format_46` | `NumberFormat.Format46` | |
327+
| `NumberFormat.format_47` | `NumberFormat.Format47` | |
328+
| `NumberFormat.format_48` | `NumberFormat.Format48` | |
329+
| `NumberFormat.format_49` | `NumberFormat.Format49` | |
330+
| `NumberFormat.custom` | `NumberFormat.Custom` | Custom formats (ID ≥ 164) |
331+
| `NumberFormat.none` | `NumberFormat.None` | |
332+
174333
---
175334

176335
### Theme

NanoXLSX.Core/BasicFormulas.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ private static Cell GetVLookup(Worksheet queryTarget, Address address, object nu
285285
if (exactMatch)
286286
{ arg4 = "TRUE"; }
287287
else { arg4 = "FALSE"; }
288-
return new Cell("VLOOKUP(" + arg1 + "," + arg2 + "," + arg3 + "," + arg4 + ")", Cell.CellType.FORMULA);
288+
return new Cell("VLOOKUP(" + arg1 + "," + arg2 + "," + arg3 + "," + arg4 + ")", Cell.CellType.Formula);
289289
}
290290

291291

@@ -311,7 +311,7 @@ private static Cell GetBasicFormula(Worksheet target, Range range, string functi
311311
if (range.StartAddress.Equals(range.EndAddress))
312312
{ arg1 = prefix + range.StartAddress; }
313313
else { arg1 = prefix + range; }
314-
return new Cell(functionName + "(" + arg1 + arg2 + ")", Cell.CellType.FORMULA);
314+
return new Cell(functionName + "(" + arg1 + arg2 + ")", Cell.CellType.Formula);
315315
}
316316
}
317317

0 commit comments

Comments
 (0)