Per JavaDoc and tallison, XWPFTableCell#getVerticalAlignment() should return null if valign is not set. Patch from prasad-babu. This closes #30 on GitHub.

https://github.com/apache/poi/pull/30#issuecomment-186224438

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1782130 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2017-02-08 09:23:04 +00:00
parent bee2efd2f5
commit 453a868b41

View File

@ -236,11 +236,6 @@ public class XWPFTableCell implements IBody, ICell {
CTVerticalJc va = tcpr.getVAlign();
if(va != null) {
vAlign = stVertAlignTypeMap.get(va.getVal().intValue());
} else {
vAlign = XWPFVertAlign.TOP;
}
if (va != null && va.getVal() != null) {
vAlign = stVertAlignTypeMap.get(va.getVal().intValue());
}
}
return vAlign;