You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Andreas Beeker <ki...@apache.org> on 2021/01/18 22:55:18 UTC

Regression in POI 5.0.0

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);
         }
     }
}


Re: Regression in POI 5.0.0

Posted by Dominik Stadler <do...@gmx.at>.
Hi,

+1 for releasing with a "known issue" and following up with a 5.0.1

the charting work from Alain will also be a nice addition and we may find
other glitches as well.

Regards... Dominik.

On Mon, Jan 18, 2021 at 11:59 PM PJ Fanning <fa...@yahoo.com.invalid>
wrote:

> If we log an issue and include a Known Issues section in the release
> notes, then maybe that's enough.
> We can follow up with a v5.0.1 in the coming weeks. There could be another
> issue or 2 that turn up.
>
>
>
>
>
>
> On Monday 18 January 2021, 22:55:23 GMT, Andreas Beeker <
> kiwiwings@apache.org> wrote:
>
>
>
>
>
> 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);
>         }
>     }
> }
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
>

Re: Regression in POI 5.0.0

Posted by PJ Fanning <fa...@yahoo.com.INVALID>.
If we log an issue and include a Known Issues section in the release notes, then maybe that's enough.
We can follow up with a v5.0.1 in the coming weeks. There could be another issue or 2 that turn up. 






On Monday 18 January 2021, 22:55:23 GMT, Andreas Beeker <ki...@apache.org> wrote: 





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);
        }
    }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org