POI-60342: handle missing sdtcontentcell in an sdtcell

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1768054 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Tim Allison 2016-11-04 15:21:51 +00:00
parent d769a03fda
commit abe0740d3a

View File

@ -45,6 +45,10 @@ public class XWPFSDTContentCell implements ISDTContent {
public XWPFSDTContentCell(CTSdtContentCell sdtContentCell, public XWPFSDTContentCell(CTSdtContentCell sdtContentCell,
XWPFTableRow xwpfTableRow, IBody part) { XWPFTableRow xwpfTableRow, IBody part) {
super(); super();
//sdtContentCell is allowed to be null: minOccurs="0" maxOccurs="1"
if (sdtContentCell == null) {
return;
}
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
XmlCursor cursor = sdtContentCell.newCursor(); XmlCursor cursor = sdtContentCell.newCursor();