xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r675604 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/tools/anttasks/Fop.java
Date Thu, 10 Jul 2008 15:02:16 GMT
Author: jeremias
Date: Thu Jul 10 08:02:15 2008
New Revision: 675604

URL: http://svn.apache.org/viewvc?rev=675604&view=rev
Log:
Beware! An evil tab character! But it's been eliminated. ;-)

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/tools/anttasks/Fop.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/tools/anttasks/Fop.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/tools/anttasks/Fop.java?rev=675604&r1=675603&r2=675604&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/tools/anttasks/Fop.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/tools/anttasks/Fop.java Thu Jul 10 08:02:15
2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -54,7 +54,7 @@
  * <li>format -> MIME type of the format to generate ex. "application/pdf"</li>
  * <li>outfile -> output filename</li>
  * <li>baseDir -> directory to work from</li>
- * <li>relativebase -> (true | false) control whether to use each FO's 
+ * <li>relativebase -> (true | false) control whether to use each FO's
  *      directory as base directory. false uses the baseDir parameter.</li>
  * <li>userconfig -> file with user configuration (same as the "-c" command
  *      line option)</li>
@@ -137,7 +137,7 @@
     public void setRelativebase(boolean relbase) {
         this.relativebase = relbase;
     }
-    
+
     /**
      * Gets the relative base attribute
      * @return the relative base attribute
@@ -294,7 +294,7 @@
     public boolean getLogFiles() {
         return this.logFiles;
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -330,7 +330,7 @@
 
     // configure fopFactory as desired
     private FopFactory fopFactory = FopFactory.newInstance();
-    
+
     private Fop task;
     private String baseURL = null;
 
@@ -411,13 +411,13 @@
         {MimeConstants.MIME_AFP_ALT,         ".afp"},
         {MimeConstants.MIME_XSL_FO,          ".fo"}
     };
-    
+
     private String determineExtension(String outputFormat) {
         for (int i = 0; i < EXTENSIONS.length; i++) {
             if (EXTENSIONS[i][0].equals(outputFormat)) {
                 String ext = EXTENSIONS[i][1];
                 if (ext == null) {
-                    throw new RuntimeException("Output format '" 
+                    throw new RuntimeException("Output format '"
                             + outputFormat + "' does not produce a file.");
                 } else {
                     return ext;
@@ -467,7 +467,7 @@
         // actioncount = # of fofiles actually processed through FOP
         int actioncount = 0;
         // skippedcount = # of fofiles which haven't changed (force = "false")
-        int skippedcount = 0; 
+        int skippedcount = 0;
 
         // deal with single source file
         if (task.getFofile() != null) {
@@ -479,14 +479,14 @@
                 if (task.getOutdir() != null) {
                     outf = new File(task.getOutdir(), outf.getName());
                 }
-                // Render if "force" flag is set OR 
+                // Render if "force" flag is set OR
                 // OR output file doesn't exist OR
                 // output file is older than input file
-                if (task.getForce() || !outf.exists() 
+                if (task.getForce() || !outf.exists()
                     || (task.getFofile().lastModified() > outf.lastModified() )) {
                     render(task.getFofile(), outf, outputFormat);
                     actioncount++;
-                } else if (outf.exists() 
+                } else if (outf.exists()
                         && (task.getFofile().lastModified() <= outf.lastModified()
)) {
                     skippedcount++;
                 }
@@ -531,10 +531,10 @@
                     task.log("Error setting base URL", Project.MSG_DEBUG);
                 }
 
-                // Render if "force" flag is set OR 
+                // Render if "force" flag is set OR
                 // OR output file doesn't exist OR
                 // output file is older than input file
-                if (task.getForce() || !outf.exists() 
+                if (task.getForce() || !outf.exists()
                     || (f.lastModified() > outf.lastModified() )) {
                     render(f, outf, outputFormat);
                     actioncount++;
@@ -543,11 +543,11 @@
                 }
             }
         }
-        
+
         if (actioncount + skippedcount == 0) {
             task.log("No files processed. No files were selected by the filesets "
                 + "and no fofile was set." , Project.MSG_WARN);
-        } else if (skippedcount > 0) {  
+        } else if (skippedcount > 0) {
             task.log(skippedcount + " xslfo file(s) skipped (no change found"
                 + " since last generation; set force=\"true\" to override)."
                 , Project.MSG_INFO);
@@ -579,7 +579,7 @@
         } catch (Exception ex) {
             if (task.getThrowexceptions()) {
                 throw new BuildException(ex);
-	    }
+            }
             logger.error("Error rendering fo file: " + foFile, ex);
         } finally {
             try {



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


Mime
View raw message