Author: vsiveton Date: Wed Jun 3 13:31:27 2009 New Revision: 781366 URL: http://svn.apache.org/viewvc?rev=781366&view=rev Log: DOXIA-330: reserve - incorrect column/size when parsing fml files
o removed table in definition() and definitionTerm() Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextSink.java Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextSink.java URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextSink.java?rev=781366&r1=781365&r2=781366&view=diff ============================================================================== --- maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextSink.java (original) +++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextSink.java Wed Jun 3 13:31:27 2009 @@ -808,26 +808,30 @@ /** {...@inheritdoc} */ public void definitionList() { + lineBreak(); + actionContext.setAction( SinkActionContext.DEFINITION_LIST ); } /** {...@inheritdoc} */ public void definedTerm_() { - writeEndElement(); // ElementTags.CELL - - writeEndElement(); // ElementTags.ROW - - writeEndElement(); // ElementTags.TABLE + font.setSize( ITextFont.DEFAULT_FONT_SIZE ); + bold_(); writeEndElement(); // ElementTags.CHUNK actionContext.release(); + + lineBreak(); } /** {...@inheritdoc} */ public void definedTerm() { + font.setSize( ITextFont.DEFAULT_FONT_SIZE + 2 ); + bold(); + writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); @@ -836,38 +840,12 @@ writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); - writeStartElement( ElementTags.TABLE ); - writeAddAttribute( ElementTags.COLUMNS, "1" ); - writeAddAttribute( ElementTags.LEFT, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.RIGHT, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.TOP, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.BOTTOM, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.ALIGN, ElementTags.ALIGN_CENTER ); - writeAddAttribute( ElementTags.WIDTH, "100%" ); - // writeAddAttribute( ElementTags.TABLEFITSPAGE, Boolean.TRUE.toString() ); - // writeAddAttribute( ElementTags.CELLSFITPAGE, Boolean.TRUE.toString() ); - writeAddAttribute( ElementTags.CELLPADDING, "0" ); - - writeStartElement( ElementTags.ROW ); - - writeStartElement( ElementTags.CELL ); - writeAddAttribute( ElementTags.LEFT, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.RIGHT, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.TOP, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.BOTTOM, Boolean.FALSE.toString() ); - actionContext.setAction( SinkActionContext.DEFINED_TERM ); } /** {...@inheritdoc} */ public void definition_() { - writeEndElement(); // ElementTags.CELL - - writeEndElement(); // ElementTags.ROW - - writeEndElement(); // ElementTags.TABLE - writeEndElement(); // ElementTags.CHUNK actionContext.release(); @@ -884,52 +862,18 @@ writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); - writeStartElement( ElementTags.TABLE ); - writeAddAttribute( ElementTags.COLUMNS, "2" ); - writeAddAttribute( ElementTags.LEFT, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.RIGHT, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.TOP, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.BOTTOM, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.ALIGN, ElementTags.ALIGN_CENTER ); - writeAddAttribute( ElementTags.WIDTH, "100%" ); - writeAddAttribute( ElementTags.WIDTHS, "20.0;80.0" ); - // writeAddAttribute( ElementTags.TABLEFITSPAGE, Boolean.TRUE.toString() ); - writeAddAttribute( ElementTags.CELLSFITPAGE, Boolean.TRUE.toString() ); - writeAddAttribute( ElementTags.CELLPADDING, "5" ); - - writeStartElement( ElementTags.ROW ); - - writeStartElement( ElementTags.CELL ); - writeAddAttribute( ElementTags.LEFT, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.RIGHT, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.TOP, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.BOTTOM, Boolean.FALSE.toString() ); - - write( "" ); - - writeEndElement(); // ElementTags.CELL - - writeStartElement( ElementTags.CELL ); - writeAddAttribute( ElementTags.LEFT, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.RIGHT, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.TOP, Boolean.FALSE.toString() ); - writeAddAttribute( ElementTags.BOTTOM, Boolean.FALSE.toString() ); - actionContext.setAction( SinkActionContext.DEFINITION ); } /** {...@inheritdoc} */ public void definitionListItem_() { - // nop actionContext.release(); } /** {...@inheritdoc} */ public void definitionListItem() { - // nop - actionContext.setAction( SinkActionContext.DEFINITION_LIST_ITEM ); } @@ -1369,6 +1313,9 @@ writeStartElement( ElementTags.ANCHOR ); writeAddAttribute( ElementTags.NAME, id ); + writeAddAttribute( ElementTags.FONT, font.getFontName() ); + writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); + writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); actionContext.setAction( SinkActionContext.ANCHOR ); }