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:
parent
bee2efd2f5
commit
453a868b41
@ -236,11 +236,6 @@ public class XWPFTableCell implements IBody, ICell {
|
|||||||
CTVerticalJc va = tcpr.getVAlign();
|
CTVerticalJc va = tcpr.getVAlign();
|
||||||
if(va != null) {
|
if(va != null) {
|
||||||
vAlign = stVertAlignTypeMap.get(va.getVal().intValue());
|
vAlign = stVertAlignTypeMap.get(va.getVal().intValue());
|
||||||
} else {
|
|
||||||
vAlign = XWPFVertAlign.TOP;
|
|
||||||
}
|
|
||||||
if (va != null && va.getVal() != null) {
|
|
||||||
vAlign = stVertAlignTypeMap.get(va.getVal().intValue());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return vAlign;
|
return vAlign;
|
||||||
|
Loading…
Reference in New Issue
Block a user