+4
-15
lines changedFilter options
+4
-15
lines changed Original file line number Diff line number Diff line change
@@ -1818,7 +1818,6 @@ private void LoadCell(SharedStringItem[] sharedStrings, Stylesheet s, NumberingF
1818
1818
1819
1819
// Unified code to load value. Value can be empty and only type specified (e.g. when formula doesn't save values)
1820
1820
// String type is only for formulas, while shared string/inline string/date is only for pure cell values.
1821
-
1822
1821
var cellHasValue = reader.IsStartElement("v");
1823
1822
if (cellHasValue)
1824
1823
{
@@ -1842,7 +1841,7 @@ private void LoadCell(SharedStringItem[] sharedStrings, Stylesheet s, NumberingF
1842
1841
formula.IsDirty = true;
1843
1842
}
1844
1843
1845
-
// Ignore inline string element,
1844
+
// Inline text is dealt separately, because it is in a separate element.
1846
1845
var cellHasInlineString = reader.IsStartElement("is");
1847
1846
if (cellHasInlineString)
1848
1847
{
@@ -2271,8 +2270,8 @@ private void LoadRow(Stylesheet s, NumberingFormats numberingFormats, Fills fill
2271
2270
if (dyDescent is not null)
2272
2271
xlRow.DyDescent = dyDescent.Value;
2273
2272
2274
-
var hiddenAttr = attributes.GetBoolAttribute("hidden", false);
2275
-
if (hiddenAttr)
2273
+
var hidden = attributes.GetBoolAttribute("hidden", false);
2274
+
if (hidden)
2276
2275
xlRow.Hide();
2277
2276
2278
2277
var collapsed = attributes.GetBoolAttribute("collapsed", false);
@@ -3554,11 +3553,6 @@ private static Boolean GetBoolean(BooleanPropertyType property)
3554
3553
return false;
3555
3554
}
3556
3555
3557
-
private static Exception UnexpectedStreamEnd()
3558
-
{
3559
-
throw new InvalidOperationException("The stream should have contain more XML elements, but has ended instead.");
3560
-
}
3561
-
3562
3556
private static Exception MissingRequiredAttr(string attributeName)
3563
3557
{
3564
3558
throw new InvalidOperationException($"XML doesn't contain required attribute '{attributeName}'.");
Original file line number Diff line number Diff line change
@@ -14,15 +14,10 @@ internal static bool IsStartElement(this OpenXmlPartReader reader, string localN
14
14
return reader.LocalName == localName && reader.NamespaceUri == OpenXmlConst.Main2006SsNs && reader.IsStartElement;
15
15
}
16
16
17
-
internal static bool IsEndElement(this OpenXmlPartReader reader, string localName)
18
-
{
19
-
return reader.LocalName == localName && reader.NamespaceUri == OpenXmlConst.Main2006SsNs && reader.IsEndElement;
20
-
}
21
-
22
17
internal static void MoveAhead(this OpenXmlPartReader reader)
23
18
{
24
19
if (!reader.Read())
25
-
throw new InvalidOperationException("Unexpected end of stream");
20
+
throw new InvalidOperationException("Unexpected end of stream.");
26
21
}
27
22
28
23
internal static string? GetAttribute(this ReadOnlyCollection<OpenXmlAttribute> attributes, string name)
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4