Author: vhennebert
Date: Thu May 14 10:40:28 2009
New Revision: 774724
URL: http://svn.apache.org/viewvc?rev=774724&view=rev
Log:
Changed meaning of '-v' option to 'verbose', which will print FOP's version and
proceed. Added a '-version' option to simply print the version then exit,
following Java practices.
Change made as per user demand, see thread here:
http://markmail.org/thread/e7juy7wvj7ujkltx
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
xmlgraphics/fop/trunk/status.xml
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java?rev=774724&r1=774723&r2=774724&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
Thu May 14 10:40:28 2009
@@ -30,10 +30,9 @@
import javax.swing.UIManager;
-import org.xml.sax.SAXException;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.xml.sax.SAXException;
import org.apache.fop.Version;
import org.apache.fop.apps.FOPException;
@@ -333,8 +332,8 @@
} else if (args[i].equals("-if")) {
i = i + parseIntermediateFormatOption(args, i);
} else if (args[i].equals("-v")) {
+ /* Currently just print the version */
printVersion();
- return false;
} else if (args[i].equals("-param")) {
if (i + 2 < args.length) {
String name = args[++i];
@@ -357,6 +356,9 @@
getPDFEncryptionParams().setAllowEditContent(false);
} else if (args[i].equals("-noannotations")) {
getPDFEncryptionParams().setAllowEditAnnotations(false);
+ } else if (args[i].equals("-version")) {
+ printVersion();
+ return false;
} else if (!isOption(args[i])) {
i = i + parseUnknownOption(args, i);
} else {
@@ -1119,6 +1121,7 @@
"\nUSAGE\nfop [options] [-fo|-xml] infile [-xsl file] "
+ "[-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl|-ps|-txt|-at
[mime]|-print] <outfile>\n"
+ " [OPTIONS] \n"
+ + " -version print FOP version and exit\n"
+ " -d debug mode \n"
+ " -x dump configuration settings \n"
+ " -q quiet mode \n"
@@ -1127,7 +1130,7 @@
+ " -r relaxed/less strict validation (where
available)\n"
+ " -dpi xxx target resolution in dots per inch (dpi)
where xxx is a number\n"
+ " -s for area tree XML, down to block areas
only\n"
- + " -v to show FOP version being used\n\n"
+ + " -v run in verbose mode (currently simply print
FOP version and continue)\n\n"
+ " -o [password] PDF file will be encrypted with option
owner password\n"
+ " -u [password] PDF file will be encrypted with option user
password\n"
+ " -noprint PDF file will be encrypted without printing
permission\n"
@@ -1136,8 +1139,8 @@
+ " -noannotations PDF file will be encrypted without edit
annotation permission\n"
+ " -pdfprofile prof PDF file will be generated with the
specified profile\n"
+ " (Examples for prof: PDF/A-1b or
PDF/X-3:2003)\n\n"
- + " -conserve Enable memory-conservation policy (trades
memory-consumption for disk I/O)"
- + " (Note: currently only influences whether
the area tree is serialized.)"
+ + " -conserve Enable memory-conservation policy (trades
memory-consumption for disk I/O)\n"
+ + " (Note: currently only influences whether
the area tree is serialized.)\n\n"
+ " [INPUT] \n"
+ " infile xsl:fo input file (the same as the next) \n"
+ " (use '-' for infile to pipe input from
stdin)\n"
Modified: xmlgraphics/fop/trunk/status.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=774724&r1=774723&r2=774724&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Thu May 14 10:40:28 2009
@@ -58,6 +58,10 @@
documents. Example: the fix of marks layering will be such a case when
it's done.
-->
<release version="FOP Trunk" date="TBD">
+ <action context="Code" dev="VH" type="fix">
+ Changed meaning of â-vâ option to âverboseâ, which will print
FOPâs version and proceed.
+ Added a â-versionâ option to simply print the version then exit,
following Java practices.
+ </action>
<action context="Layout" dev="VH" type="fix" fixes-bug="47101">
Bugfix: The cells of a table inside a marker were duplicated at every
marker retrieval.
</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]