Regression: Add unit-test which triggers more code deep inside XSLF to have some missing pieces included in the reduced ooxml-schema-jar
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1737466 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
29c2e05b58
commit
1985e23f59
@ -23,12 +23,15 @@ import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.poi.sl.draw.DrawFactory;
|
||||
import org.apache.poi.sl.draw.geom.TestPresetGeometries;
|
||||
import org.apache.poi.sl.usermodel.Placeholder;
|
||||
import org.apache.poi.sl.usermodel.Slide;
|
||||
import org.apache.poi.sl.usermodel.StrokeStyle.LineCap;
|
||||
import org.apache.poi.sl.usermodel.StrokeStyle.LineDash;
|
||||
import org.apache.poi.util.Units;
|
||||
@ -345,4 +348,32 @@ public class TestXSLFSimpleShape {
|
||||
|
||||
ppt.close();
|
||||
}
|
||||
|
||||
@SuppressWarnings("Duplicates")
|
||||
@Test
|
||||
public void testArrayStoreException() throws IOException {
|
||||
XMLSlideShow ppt = XSLFTestDataSamples.openSampleDocument("aascu.org_workarea_downloadasset.aspx_id=5864.pptx");
|
||||
Dimension pgsize = ppt.getPageSize();
|
||||
|
||||
for (Slide<?,?> s : ppt.getSlides()) {
|
||||
//System.out.println("Slide: " + s);
|
||||
|
||||
BufferedImage img = new BufferedImage(pgsize.width, pgsize.height, BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics2D graphics = img.createGraphics();
|
||||
DrawFactory.getInstance(graphics).fixFonts(graphics);
|
||||
|
||||
// default rendering options
|
||||
graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
graphics.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
|
||||
graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
|
||||
graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
|
||||
|
||||
// draw stuff
|
||||
s.draw(graphics);
|
||||
|
||||
graphics.dispose();
|
||||
img.flush();
|
||||
}
|
||||
ppt.close();
|
||||
}
|
||||
}
|
BIN
test-data/slideshow/aascu.org_workarea_downloadasset.aspx_id=5864.pptx
Executable file
BIN
test-data/slideshow/aascu.org_workarea_downloadasset.aspx_id=5864.pptx
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user