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-Tag: REL_3_16_FINAL~111 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=91cc13f771c81b06245a15d38f8be39a931146e5;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;