diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2016-06-05 10:18:14 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2016-06-05 10:18:14 +0000 |
commit | 9ec68c82d423d64d3983ca6ff2be54a8566329c2 (patch) | |
tree | 18d28cfed5bf7d93fbce97e20dffd947d45954e1 | |
parent | 891827cc04243f0aefdea9596fa61dea1bb30f63 (diff) | |
download | poi-9ec68c82d423d64d3983ca6ff2be54a8566329c2.tar.gz poi-9ec68c82d423d64d3983ca6ff2be54a8566329c2.zip |
PPTX2PNG - don't complain about missing output dir, when in testing mode
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1746893 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java | 12 |
1 files changed, 6 insertions, 6 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 83d944bf22..76d1b59006 100644 --- a/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java +++ b/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java @@ -94,11 +94,16 @@ public class PPTX2PNG { return;
}
+ if (format == null || !format.matches("^(png|gif|jpg|null)$")) {
+ usage("Invalid format given");
+ return;
+ }
+
if (outdir == null) {
outdir = file.getParentFile();
}
- if (outdir == null || !outdir.exists() || !outdir.isDirectory()) {
+ if (!"null".equals(format) && (outdir == null || !outdir.exists() || !outdir.isDirectory())) {
usage("Output directory doesn't exist");
return;
}
@@ -108,11 +113,6 @@ public class PPTX2PNG { return;
}
- if (format == null || !format.matches("^(png|gif|jpg|null)$")) {
- usage("Invalid format given");
- return;
- }
-
if (!quiet) {
System.out.println("Processing " + file);
}
|