maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r741399 - /maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
Date Fri, 06 Feb 2009 04:32:10 GMT
Author: vsiveton
Date: Fri Feb  6 04:32:10 2009
New Revision: 741399

URL: http://svn.apache.org/viewvc?rev=741399&view=rev
Log:
o fixed potential error for images

Modified:
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java?rev=741399&r1=741398&r2=741399&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
Fri Feb  6 04:32:10 2009
@@ -84,6 +84,9 @@
     /** Verbatim flag. */
     private boolean verbatim;
 
+    /** figure flag. */
+    private boolean figure;
+
     private String encoding;
 
     private String languageId;
@@ -571,6 +574,7 @@
     /** {@inheritDoc} */
     public void figure()
     {
+        this.figure = true;
         writeEOL();
         writeStartTag( BLOCK_TAG, "figure.display" );
         write( "<fo:external-graphic"
@@ -580,6 +584,7 @@
     /** {@inheritDoc} */
     public void figure_()
     {
+        this.figure = false;
         writeEndTag( BLOCK_TAG );
         writeEOL();
     }
@@ -587,6 +592,12 @@
     /** {@inheritDoc} */
     public void figureGraphics( String name )
     {
+        if ( !figure )
+        {
+            write( "<fo:external-graphic"
+                   + config.getAttributeString( "figure.graphics" ) );
+        }
+        // TODO name should be relative to site!
         writeln( " src=\"" + name + "\"/>" );
     }
 



Mime
View raw message