mirror of https://github.com/apache/poi.git
Access table cell border style as line properties
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1875748 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a639808c2c
commit
456dc4d368
|
@ -90,11 +90,10 @@ public class XSLFTable extends XSLFGraphicFrame implements Iterable<XSLFTableRow
|
|||
|
||||
@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;
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.apache.poi.sl.usermodel.StrokeStyle.LineDash;
|
|||
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 XSLFTextShape implements TableCell<XSLFShape,
|
|||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue