Hi Devs,

I was just about to announce POI 5.0.0, but I've used a simple test to verify 
artifact availability.

The below test generates invalid XSLF tables.

Should I announce 5.0.0, because the other stuff probably works, or should we 
silently provide 5.0.1?

I haven't yet figured out how to fix it, but it's generating/adding grid 
columns with every added row.

Andi



package poijartest;

import org.apache.poi.sl.draw.DrawTableShape;
import org.apache.poi.sl.usermodel.ShapeType;
import org.apache.poi.sl.usermodel.StrokeStyle;
import org.apache.poi.sl.usermodel.TextParagraph;
import org.apache.poi.xslf.usermodel.*;

import java.awt.*;
import java.awt.geom.Rectangle2D;
import java.io.FileOutputStream;

public class XslfTest {
    public static void main(String[] args)throws Exception {
        try (XMLSlideShow slideshow =new XMLSlideShow();
             FileOutputStream fos =new FileOutputStream("bla.pptx")) {
            XSLFSlide slide = slideshow.createSlide();
// XSLFAutoShape as = slide.createAutoShape(); // as.setAnchor(new 
Rectangle2D.Double(100,100,300,300)); // as.setShapeType(ShapeType.BENT_ARROW); 
// as.setFillColor(Color.RED); XSLFTable newTable = slide.createTable(3,3);
            newTable.setAnchor(new Rectangle(100,100,100,100));

            /* XSLFTableRow tableRow = newTable.addRow(); XSLFTableCell cell = 
tableRow.addCell(); XSLFTextParagraph textparagraph = cell.addNewTextParagraph(); 
XSLFTextRun textrun = textparagraph.addNewTextRun(); textrun.setText("Any 
Text"); textrun.setFontColor(Color.BLUE); 
textparagraph.setTextAlign(TextParagraph.TextAlign.CENTER); tableRow.addCell(); 
tableRow.addCell(); tableRow.mergeCells(0, 1); new 
DrawTableShape(newTable).setAllBorders(3., StrokeStyle.LineDash.LG_DASH_DOT, Color.BLUE); 
*/ slideshow.write(fos);
        }
    }
}

Reply via email to