maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r772591 - /maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java
Date Thu, 07 May 2009 10:29:48 GMT
Author: vsiveton
Date: Thu May  7 10:29:47 2009
New Revision: 772591

URL: http://svn.apache.org/viewvc?rev=772591&view=rev
Log:
MPDF-1: Ability to use pom properties in pdf.xml

o removed the pdf extension

Modified:
    maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java

Modified: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java?rev=772591&r1=772590&r2=772591&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java
(original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java
Thu May  7 10:29:47 2009
@@ -23,6 +23,7 @@
 import java.io.IOException;
 import java.io.Writer;
 import java.util.Iterator;
+import java.util.Locale;
 import java.util.Map;
 
 import javax.xml.transform.TransformerException;
@@ -97,9 +98,12 @@
 
             documentModel.setOutputName( "target" );
         }
-        else if ( outputName.lastIndexOf( "." ) != -1 )
+
+        outputName = outputName.trim();
+        if ( outputName.toLowerCase( Locale.ENGLISH ).endsWith( ".pdf" ) )
         {
-            documentModel.setOutputName( outputName.substring( 0, outputName.lastIndexOf(
"." ) ) );
+            documentModel.setOutputName( outputName.substring( 0, outputName.toLowerCase(
Locale.ENGLISH )
+                                                                            .lastIndexOf(
".pdf" ) ) );
         }
 
         outputName = documentModel.getOutputName();



Mime
View raw message