Problem with table cell borders


#1

I have a row with two cells.
The first cell has the show lines set to true for the RIGHT border, and the color is red
The second cell has the show lines set to false to the LEFT border.

I expect the output to show a red RIGHT border for the first cell, and the left border ignored for the second cell.

But the RIGHT border, for the first cell, does not show.


Is there something wrong in the code below?

        Shapes shapes = slide.getShapes();
        Table t = shapes.addTable(115, 678, 5499, 3429, 2, 2);

        Cell c00 = t.getCell(0,0);
        LineFormat lineFormat = c00.getBorderRight().getLineFormat();
        lineFormat.setShowLines(true);
        lineFormat.setStyle(LineStyle.SINGLE);
        lineFormat.setWidth(0.4);
        lineFormat.setForeColor(Color.red);

        Cell c10 = t.getCell(1,0);
        lineFormat = c10.getBorderLeft().getLineFormat();
        lineFormat.setShowLines(false);

#2

Why left border should be ignored?
In you case 2 cells have common border so
getBorderRight() and getBorderLeft functions return the same border.


#3

Thanks, I verified that Power Point does the same thing with common borders.