Author: abearez Date: Fri Mar 27 03:13:43 2020 New Revision: 1875748 URL: http://svn.apache.org/viewvc?rev=1875748&view=rev Log: Access table cell border style as line properties
Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java?rev=1875748&r1=1875747&r2=1875748&view=diff ============================================================================== --- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java Fri Mar 27 03:13:43 2020 @@ -90,11 +90,10 @@ public class XSLFTable extends XSLFGraph @Override public XSLFTableCell getCell(int row, int col) { - List<XSLFTableRow> rows = getRows(); - if (row < 0 || rows.size() <= row) { + if (row < 0 || _rows.size() <= row) { return null; } - XSLFTableRow r = rows.get(row); + XSLFTableRow r = _rows.get(row); if (r == null) { // empty row return null; Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java?rev=1875748&r1=1875747&r2=1875748&view=diff ============================================================================== --- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java Fri Mar 27 03:13:43 2020 @@ -33,6 +33,7 @@ import org.apache.poi.sl.usermodel.Strok import org.apache.poi.sl.usermodel.TableCell; import org.apache.poi.sl.usermodel.VerticalAlignment; import org.apache.poi.util.Units; +import org.apache.poi.xddf.usermodel.XDDFLineProperties; import org.apache.poi.xddf.usermodel.text.XDDFTextBody; import org.apache.poi.xslf.usermodel.XSLFPropertiesDelegate.XSLFFillProperties; import org.apache.poi.xslf.usermodel.XSLFTableStyle.TablePartStyle; @@ -139,6 +140,18 @@ public class XSLFTableCell extends XSLFT } } + public XDDFLineProperties getBorderProperties(BorderEdge edge) { + CTLineProperties props = getCTLine(edge, false); + return (props == null) ? null : new XDDFLineProperties(props); + } + + public void setBorderProperties(BorderEdge edge, XDDFLineProperties properties) { + CTLineProperties props = getCTLine(edge, true); + if (props != null) { + props.set(properties.getXmlObject().copy()); + } + } + @Override public void removeBorder(BorderEdge edge) { CTTableCellProperties pr = getCellProperties(false); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org For additional commands, e-mail: commits-h...@poi.apache.org