poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1737466 - in /poi/trunk: src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSimpleShape.java test-data/slideshow/aascu.org_workarea_downloadasset.aspx_id=5864.pptx
Date Sat, 02 Apr 2016 06:38:39 GMT
Author: centic
Date: Sat Apr  2 06:38:39 2016
New Revision: 1737466

URL: http://svn.apache.org/viewvc?rev=1737466&view=rev
Log:
Regression: Add unit-test which triggers more code deep inside XSLF to have some missing pieces
included in the reduced ooxml-schema-jar

Added:
    poi/trunk/test-data/slideshow/aascu.org_workarea_downloadasset.aspx_id=5864.pptx   (with
props)
Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSimpleShape.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSimpleShape.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSimpleShape.java?rev=1737466&r1=1737465&r2=1737466&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSimpleShape.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSimpleShape.java Sat
Apr  2 06:38:39 2016
@@ -23,12 +23,15 @@ import static org.junit.Assert.assertNul
 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();
+    }
 }
\ No newline at end of file

Added: poi/trunk/test-data/slideshow/aascu.org_workarea_downloadasset.aspx_id=5864.pptx
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/slideshow/aascu.org_workarea_downloadasset.aspx_id%3D5864.pptx?rev=1737466&view=auto
==============================================================================
Binary files poi/trunk/test-data/slideshow/aascu.org_workarea_downloadasset.aspx_id=5864.pptx
(added) and poi/trunk/test-data/slideshow/aascu.org_workarea_downloadasset.aspx_id=5864.pptx
Sat Apr  2 06:38:39 2016 differ

Propchange: poi/trunk/test-data/slideshow/aascu.org_workarea_downloadasset.aspx_id=5864.pptx
------------------------------------------------------------------------------
    svn:executable = *



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


Mime
View raw message