poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r797735 - /poi/trunk/src/java/org/apache/poi/hssf/dev/BiffViewer.java
Date Sat, 25 Jul 2009 10:21:28 GMT
Author: yegor
Date: Sat Jul 25 10:21:28 2009
New Revision: 797735

URL: http://svn.apache.org/viewvc?rev=797735&view=rev
Log:
added a cmd option to turn on deserialization of escher records

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/dev/BiffViewer.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/dev/BiffViewer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/dev/BiffViewer.java?rev=797735&r1=797734&r2=797735&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/dev/BiffViewer.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/dev/BiffViewer.java Sat Jul 25 10:21:28 2009
@@ -48,7 +48,7 @@
 public final class BiffViewer {
 	static final char[] NEW_LINE_CHARS = System.getProperty("line.separator").toCharArray();
 
-	private BiffViewer() {
+    private BiffViewer() {
 		// no instances of this class
 	}
 
@@ -294,8 +294,10 @@
 						noint = true;
 					} else if ("--out".equals(arg)) {
 						out = true;
-					} else if ("--rawhex".equals(arg)) {
-						rawhex = true;
+					} else if ("--escher".equals(arg)) {
+						System.setProperty("poi.deserialize.escher", "true");
+                    } else if ("--rawhex".equals(arg)) {
+                        rawhex = true;
 					} else {
 						throw new CommandParseException("Unexpected option '" + arg + "'");
 					}
@@ -342,7 +344,7 @@
 	 *
 	 * <b>Usage</b>:<br/>
 	 *
-	 * BiffViewer [--biffhex] [--noint] [--out] &lt;fileName&gt; <br/>
+	 * BiffViewer [--biffhex] [--noint] [--noescher] [--out] &lt;fileName&gt; <br/>
 	 * BiffViewer --rawhex  [--out] &lt;fileName&gt; <br/>
 	 * <br/>
 	 *
@@ -351,11 +353,9 @@
 	 * <tr><td>--noint</td><td>do not output interpretation of BIFF
records</td></tr>
 	 * <tr><td>--out</td><td>send output to &lt;fileName&gt;.out</td></tr>
 	 * <tr><td>--rawhex</td><td>output raw hex dump of whole workbook
stream</td></tr>
+     * <tr><td>--escher</td><td>turn on deserialization of escher
records (default is off)</td></tr>
 	 * </table>
 	 *
-	 * Define the system property <code>poi.deserialize.escher</code> to turn on
-	 * deserialization of escher records.
-	 *
 	 */
 	public static void main(String[] args) {
 
@@ -367,9 +367,6 @@
 			return;
 		}
 
-		System.setProperty("poi.deserialize.escher", "true");
-
-
 		try {
 
 			PrintStream ps;



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


Mime
View raw message