From: Javen O'Neal Date: Wed, 8 Feb 2017 09:23:04 +0000 (+0000) Subject: Per JavaDoc and tallison, XWPFTableCell#getVerticalAlignment() should return null... X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=453a868b4152aaad51809576a2c1883e2b86e0d1;p=poi.git 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 --- diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java index a20fe5220a..27f2c43ad7 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java @@ -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;