You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2015/12/22 23:36:33 UTC

svn commit: r1721469 - /poi/trunk/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java

Author: centic
Date: Tue Dec 22 22:36:33 2015
New Revision: 1721469

URL: http://svn.apache.org/viewvc?rev=1721469&view=rev
Log:
fix commandline option in PPTX2PNG from quite to quiet

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java?rev=1721469&r1=1721468&r2=1721469&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java Tue Dec 22 22:36:33 2015
@@ -38,7 +38,7 @@ import org.apache.poi.sl.usermodel.Slide
 import org.apache.poi.util.JvmBugs;
 
 /**
- * An utulity to convert slides of a .pptx slide show to a PNG image
+ * An utility to convert slides of a .pptx slide show to a PNG image
  *
  * @author Yegor Kozlov
  */
@@ -53,7 +53,7 @@ public class PPTX2PNG {
             "    -slide <integer> 1-based index of a slide to render\n" +
             "    -format <type>   png,gif,jpg (,null for testing)" +
             "    -outdir <dir>    output directory, defaults to origin of the ppt/pptx file" +
-            "    -quite           do not write to console (for normal processing)";
+            "    -quiet           do not write to console (for normal processing)";
 
         System.out.println(msg);
         // no System.exit here, as we also run in junit tests!
@@ -70,7 +70,7 @@ public class PPTX2PNG {
         File file = null;
         String format = "png";
         File outdir = null;
-        boolean quite = false;
+        boolean quiet = false;
 
         for (int i = 0; i < args.length; i++) {
             if (args[i].startsWith("-")) {
@@ -82,8 +82,8 @@ public class PPTX2PNG {
                     format = args[++i];
                 } else if ("-outdir".equals(args[i])) {
                     outdir = new File(args[++i]);
-                } else if ("-quite".equals(args[i])) {
-                    quite = true;
+                } else if ("-quiet".equals(args[i])) {
+                    quiet = true;
                 }
             } else {
                 file = new File(args[i]);
@@ -114,7 +114,7 @@ public class PPTX2PNG {
             return;
         }
     
-        if (!quite) {
+        if (!quiet) {
             System.out.println("Processing " + file);
         }
         SlideShow<?,?> ss = SlideShowFactory.create(file, null, true);
@@ -134,7 +134,7 @@ public class PPTX2PNG {
         for(Slide<?,?> slide : slides) {
             if (slidenum == -1 || slideNo == slidenum) {
                 String title = slide.getTitle();
-                if (!quite) {
+                if (!quiet) {
                     System.out.println("Rendering slide " + slideNo + (title == null ? "" : ": " + title));
                 }
 
@@ -164,9 +164,11 @@ public class PPTX2PNG {
             slideNo++;
         }
         
-        if (!quite) {
+        if (!quiet) {
             System.out.println("Done");
         }
+        
+        ss.close();
     }
 
     @SuppressWarnings("unchecked")



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