Browse Source
Merge pull request #137 from tincann/tincann-patch-1
Styles.xml: fix default patternType when attribute is missing
master^2
Savorboard
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
src/NPOI.OpenXmlFormats/Spreadsheet/Styles/CT_PatternFill.cs
|
|
@ -50,7 +50,9 @@ namespace NPOI.OpenXmlFormats.Spreadsheet |
|
|
|
if (node == null) |
|
|
|
return null; |
|
|
|
CT_PatternFill ctObj = new CT_PatternFill(); |
|
|
|
if (node.Attributes["patternType"] != null) |
|
|
|
if (node.Attributes["patternType"] == null) |
|
|
|
ctObj.patternType = ST_PatternType.solid; |
|
|
|
else |
|
|
|
ctObj.patternType = (ST_PatternType)Enum.Parse(typeof(ST_PatternType), node.Attributes["patternType"].Value); |
|
|
|
foreach (XmlNode childNode in node.ChildNodes) |
|
|
|
{ |
|
|
|