From 1694a359b2d7cbdfcc22854472b0a4ca847fde2b Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Tue, 22 Dec 2015 22:36:33 +0000 Subject: [PATCH] fix commandline option in PPTX2PNG from quite to quiet git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1721469 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/xslf/util/PPTX2PNG.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java b/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java index 2f97426935..2ec85f5ac7 100644 --- a/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java +++ b/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java @@ -38,7 +38,7 @@ import org.apache.poi.sl.usermodel.SlideShowFactory; 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 1-based index of a slide to render\n" + " -format png,gif,jpg (,null for testing)" + " -outdir 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") -- 2.39.5