try to fix issue with missing classes in poi-ooxml-schemas

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879507 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2020-07-04 23:02:18 +00:00
parent 2de45b8c1c
commit 1c5ba18ac0
2 changed files with 7 additions and 3 deletions

View File

@ -88,7 +88,7 @@ public class XDDFErrorBars {
}
public ErrorBarType getErrorBarType() {
return ErrorBarType.valueOf(bars.getErrBarType().getVal());
return bars.getErrBarType() == null ? null : ErrorBarType.valueOf(bars.getErrBarType().getVal());
}
public void setErrorBarType(ErrorBarType barType) {
@ -96,7 +96,7 @@ public class XDDFErrorBars {
}
public ErrorValueType getErrorValueType() {
return ErrorValueType.valueOf(bars.getErrValType().getVal());
return bars.getErrValType() == null ? null : ErrorValueType.valueOf(bars.getErrValType().getVal());
}
public void setErrorValueType(ErrorValueType valueType) {

View File

@ -166,7 +166,11 @@ public class TestNecessaryOOXMLClasses {
Assert.assertNotNull(ErrorBarType.BOTH);
Assert.assertNotNull(ErrorValueType.CUSTOM);
Assert.assertNotNull(ErrorDirection.X);
Assert.assertNotNull(new XDDFErrorBars());
XDDFErrorBars xeb = new XDDFErrorBars();
Assert.assertNotNull(xeb);
Assert.assertNull(xeb.getErrorBarType());
Assert.assertNull(xeb.getErrorDirection());
Assert.assertNull(xeb.getErrorValueType());
STErrBarType.Enum e9 = STErrBarType.Enum.forString("both");
Assert.assertNotNull(e9);
STErrValType.Enum e10 = STErrValType.Enum.forString("percentage");