You are viewing a plain text version of this content. The canonical link for it is here.
Posted to doxia-commits@maven.apache.org by lt...@apache.org on 2009/04/02 15:55:04 UTC
svn commit: r761296 -
/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java
Author: ltheussl
Date: Thu Apr 2 13:55:04 2009
New Revision: 761296
URL: http://svn.apache.org/viewvc?rev=761296&view=rev
Log:
[MPDF-2] Allow table of contents to break across pages
Modified:
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java
Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.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/FoAggregateSink.java?rev=761296&r1=761295&r2=761296&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java Thu Apr 2 13:55:04 2009
@@ -24,6 +24,7 @@
import java.util.Calendar;
import java.util.Iterator;
+import javax.swing.text.MutableAttributeSet;
import javax.swing.text.html.HTML.Tag;
import org.apache.maven.doxia.document.DocumentMeta;
@@ -690,15 +691,16 @@
String ref = getIdName( tocItem.getRef() );
- writeStartTag( TABLE_ROW_TAG, "keep-with-next", "always" );
+ writeStartTag( TABLE_ROW_TAG, "keep-with-next", "auto" );
writeStartTag( TABLE_CELL_TAG, "toc.cell" );
writeStartTag( BLOCK_TAG, "toc.number.style" );
write( Integer.toString( count ) );
writeEndTag( BLOCK_TAG );
writeEndTag( TABLE_CELL_TAG );
writeStartTag( TABLE_CELL_TAG, "number-columns-spanned", "3", "toc.cell" );
- // TODO: writeStartTag( BLOCK_TAG, "text-align-last", "justify", "toc.h1.style" );
- writeStartTag( BLOCK_TAG, "toc.h1.style" );
+ MutableAttributeSet atts = getFoConfiguration().getAttributeSet( "toc.h1.style" );
+ atts.addAttribute( "text-align-last", "justify" );
+ writeStartTag( BLOCK_TAG, atts );
writeStartTag( BASIC_LINK_TAG, "internal-destination", ref );
write( tocItem.getName() );
writeEndTag( BASIC_LINK_TAG );