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 jv...@apache.org on 2007/03/17 15:48:01 UTC

svn commit: r519331 [2/4] - in /maven/doxia/trunk/doxia-modules/doxia-module-rtf: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/maven/ src/main/java/org/apache/maven/doxia/ src/main/java/org/apac...

Added: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java?view=auto&rev=519331
==============================================================================
--- maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java (added)
+++ maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java Sat Mar 17 07:47:59 2007
@@ -0,0 +1,1930 @@
+package org.apache.maven.doxia.module.rtf;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  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.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.doxia.module.apt.AptParser;
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.sink.SinkAdapter;
+
+import java.awt.*;
+import java.io.BufferedOutputStream;
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.util.Hashtable;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+/**
+ * @plexus.component role="org.apache.maven.doxia.sink.Sink"
+ * role-hint="rtf"
+ */
+public class RtfSink
+    extends SinkAdapter
+{
+    private static final String EOL = System.getProperty( "line.separator" );
+
+    public static final double DEFAULT_PAPER_WIDTH = 21.;   /*cm*/
+
+    public static final double DEFAULT_PAPER_HEIGHT = 29.7; /*cm*/
+
+    public static final double DEFAULT_TOP_MARGIN = 2.;    /*cm*/
+
+    public static final double DEFAULT_BOTTOM_MARGIN = 2.; /*cm*/
+
+    public static final double DEFAULT_LEFT_MARGIN = 2.;   /*cm*/
+
+    public static final double DEFAULT_RIGHT_MARGIN = 2.;  /*cm*/
+
+    public static final int DEFAULT_FONT_SIZE = 10; /*pts*/
+
+    public static final int DEFAULT_SPACING = 10;   /*pts*/
+
+    public static final int DEFAULT_RESOLUTION = 72; /*dpi*/
+
+    public static final String DEFAULT_IMAGE_FORMAT = "bmp";
+
+    public static final String DEFAULT_IMAGE_TYPE = "palette";
+
+    public static final String DEFAULT_DATA_FORMAT = "ascii";
+
+    public static final int DEFAULT_CODE_PAGE = 1252;
+
+    public static final int DEFAULT_CHAR_SET = 0;
+
+    public static final String IMG_FORMAT_BMP = "bmp";
+
+    public static final String IMG_FORMAT_WMF = "wmf";
+
+    public static final String IMG_TYPE_PALETTE = "palette";
+
+    public static final String IMG_TYPE_RGB = "rgb";
+
+    public static final String IMG_DATA_ASCII = "ascii";
+
+    public static final String IMG_DATA_RAW = "raw";
+
+    public static final int STYLE_ROMAN = 0;
+
+    public static final int STYLE_ITALIC = 1;
+
+    public static final int STYLE_BOLD = 2;
+
+    public static final int STYLE_TYPEWRITER = 3;
+
+    private static final int CONTEXT_UNDEFINED = 0;
+
+    private static final int CONTEXT_VERBATIM = 1;
+
+    private static final int CONTEXT_TABLE = 2;
+
+    private static final int UNIT_MILLIMETER = 1;
+
+    private static final int UNIT_CENTIMETER = 2;
+
+    private static final int UNIT_INCH = 3;
+
+    private static final int UNIT_PIXEL = 4;
+
+    private static final int LIST_INDENT = 300; /*twips*/
+
+    private static final String LIST_ITEM_HEADER = "-  ";
+
+    private static final int DEFINITION_INDENT = 300; /*twips*/
+
+    private static final int CELL_HORIZONTAL_PAD = 60; /*twips*/
+
+    private static final int CELL_VERTICAL_PAD = 20;   /*twips*/
+
+    private static final int BORDER_WIDTH = 15; /*twips*/
+
+    private double paperWidth = DEFAULT_PAPER_WIDTH;
+
+    private double paperHeight = DEFAULT_PAPER_HEIGHT;
+
+    private double topMargin = DEFAULT_TOP_MARGIN;
+
+    private double bottomMargin = DEFAULT_BOTTOM_MARGIN;
+
+    private double leftMargin = DEFAULT_LEFT_MARGIN;
+
+    private double rightMargin = DEFAULT_RIGHT_MARGIN;
+
+    private int fontSize = DEFAULT_FONT_SIZE;
+
+    private int resolution = DEFAULT_RESOLUTION;
+
+    private String imageFormat = DEFAULT_IMAGE_FORMAT;
+
+    private String imageType = DEFAULT_IMAGE_TYPE;
+
+    private String imageDataFormat = DEFAULT_DATA_FORMAT;
+
+    private boolean imageCompression = true;
+
+    private int codePage = DEFAULT_CODE_PAGE;
+
+    private int charSet = DEFAULT_CHAR_SET;
+
+    private Hashtable fontTable;
+
+    private Context context;
+
+    private Paragraph paragraph;
+
+    private Indentation indentation;
+
+    private Space space;
+
+    private int listItemIndent;
+
+    private Vector numbering;
+
+    private Vector itemNumber;
+
+    private int style = STYLE_ROMAN;
+
+    private int sectionLevel;
+
+    private boolean emptyHeader;
+
+    private StringBuffer verbatim;
+
+    boolean frame;
+
+    private Table table;
+
+    private Row row;
+
+    private Cell cell;
+
+    private Line line;
+
+    protected PrintWriter writer;
+
+    protected OutputStream stream; // for raw image data
+
+    // -----------------------------------------------------------------------
+
+    public RtfSink()
+        throws IOException
+    {
+        this( System.out );
+    }
+
+    public RtfSink( OutputStream output )
+        throws IOException
+    {
+        this( output, null );
+    }
+
+    public RtfSink( OutputStream output, String encoding )
+        throws IOException
+    {
+        fontTable = new Hashtable();
+        context = new Context();
+        indentation = new Indentation( 0 );
+        space = new Space( 20 * DEFAULT_SPACING );
+        numbering = new Vector();
+        itemNumber = new Vector();
+
+        Font font = getFont( STYLE_BOLD, fontSize );
+        if ( font != null )
+        {
+            listItemIndent = textWidth( LIST_ITEM_HEADER, font );
+        }
+
+        Writer w;
+        stream = new BufferedOutputStream( output );
+        if ( encoding != null )
+        {
+            w = new OutputStreamWriter( stream, encoding );
+        }
+        else
+        {
+            w = new OutputStreamWriter( stream );
+        }
+        writer = new PrintWriter( new BufferedWriter( w ) );
+    }
+
+    public void setPaperSize( double width /*cm*/, double height /*cm*/ )
+    {
+        paperWidth = width;
+        paperHeight = height;
+    }
+
+    public void setTopMargin( double margin )
+    {
+        topMargin = margin;
+    }
+
+    public void setBottomMargin( double margin )
+    {
+        bottomMargin = margin;
+    }
+
+    public void setLeftMargin( double margin )
+    {
+        leftMargin = margin;
+    }
+
+    public void setRightMargin( double margin )
+    {
+        rightMargin = margin;
+    }
+
+    public void setFontSize( int size /*pts*/ )
+    {
+        fontSize = size;
+    }
+
+    public void setSpacing( int spacing /*pts*/ )
+    {
+        space.set( 20 * spacing );
+    }
+
+    public void setResolution( int resolution /*dpi*/ )
+    {
+        this.resolution = resolution;
+    }
+
+    public void setImageFormat( String format )
+    {
+        imageFormat = format;
+    }
+
+    public void setImageType( String type )
+    {
+        imageType = type;
+    }
+
+    public void setImageDataFormat( String format )
+    {
+        imageDataFormat = format;
+    }
+
+    public void setImageCompression( boolean compression )
+    {
+        imageCompression = compression;
+    }
+
+    public void setCodePage( int cp )
+    {
+        codePage = cp;
+    }
+
+    public void setCharSet( int cs )
+    {
+        charSet = cs;
+    }
+
+    public void head()
+    {
+        writer.println( "{\\rtf1\\ansi\\ansicpg" + codePage + "\\deff0" );
+
+        writer.println( "{\\fonttbl" );
+        writer.println( "{\\f0\\froman\\fcharset" + charSet + " Times;}" );
+        writer.println( "{\\f1\\fmodern\\fcharset" + charSet + " Courier;}" );
+        writer.println( "}" );
+
+        writer.println( "{\\stylesheet" );
+        for ( int level = 1; level <= 5; ++level )
+        {
+            writer.print( "{\\s" + styleNumber( level ) );
+            writer.print( "\\outlinelevel" + level );
+            writer.print( " Section Title " + level );
+            writer.println( ";}" );
+        }
+        writer.println( "}" );
+
+        writer.println( "\\paperw" + toTwips( paperWidth, UNIT_CENTIMETER ) );
+        writer.println( "\\paperh" + toTwips( paperHeight, UNIT_CENTIMETER ) );
+        writer.println( "\\margl" + toTwips( leftMargin, UNIT_CENTIMETER ) );
+        writer.println( "\\margr" + toTwips( rightMargin, UNIT_CENTIMETER ) );
+        writer.println( "\\margt" + toTwips( topMargin, UNIT_CENTIMETER ) );
+        writer.println( "\\margb" + toTwips( bottomMargin, UNIT_CENTIMETER ) );
+
+        space.set( space.get() / 2 );
+        space.setNext( 0 );
+
+        emptyHeader = true;
+    }
+
+    public void head_()
+    {
+        space.restore();
+        if ( emptyHeader )
+        {
+            space.setNext( 0 );
+        }
+        else
+        {
+            space.setNext( 2 * space.get() );
+        }
+    }
+
+    private int toTwips( double length, int unit )
+    {
+        double points;
+
+        switch ( unit )
+        {
+            case UNIT_MILLIMETER:
+                points = ( length / 25.4 ) * 72.;
+                break;
+            case UNIT_CENTIMETER:
+                points = ( length / 2.54 ) * 72.;
+                break;
+            case UNIT_INCH:
+                points = length * 72.;
+                break;
+            case UNIT_PIXEL:
+            default:
+                points = ( length / resolution ) * 72.;
+                break;
+        }
+
+        return (int) Math.rint( points * 20. );
+    }
+
+    public void title()
+    {
+        Paragraph paragraph = new Paragraph( STYLE_BOLD, fontSize + 6 );
+        paragraph.justification = AptParser.JUSTIFY_CENTER;
+        beginParagraph( paragraph );
+        emptyHeader = false;
+    }
+
+    public void title_()
+    {
+        endParagraph();
+    }
+
+    public void author()
+    {
+        Paragraph paragraph = new Paragraph( STYLE_ROMAN, fontSize + 2 );
+        paragraph.justification = AptParser.JUSTIFY_CENTER;
+        beginParagraph( paragraph );
+        emptyHeader = false;
+    }
+
+    public void author_()
+    {
+        endParagraph();
+    }
+
+    public void date()
+    {
+        Paragraph paragraph = new Paragraph( STYLE_ROMAN, fontSize );
+        paragraph.justification = AptParser.JUSTIFY_CENTER;
+        beginParagraph( paragraph );
+        emptyHeader = false;
+    }
+
+    public void date_()
+    {
+        endParagraph();
+    }
+
+    public void body()
+    {
+    }
+
+    public void body_()
+    {
+        writer.println( "}" );
+        writer.flush();
+    }
+
+    public void section1()
+    {
+        sectionLevel = 1;
+    }
+
+    public void section1_()
+    {
+    }
+
+    public void section2()
+    {
+        sectionLevel = 2;
+    }
+
+    public void section2_()
+    {
+    }
+
+    public void section3()
+    {
+        sectionLevel = 3;
+    }
+
+    public void section3_()
+    {
+    }
+
+    public void section4()
+    {
+        sectionLevel = 4;
+    }
+
+    public void section4_()
+    {
+    }
+
+    public void section5()
+    {
+        sectionLevel = 5;
+    }
+
+    public void section5_()
+    {
+    }
+
+    public void sectionTitle()
+    {
+        int style = STYLE_BOLD;
+        int size = fontSize;
+
+        switch ( sectionLevel )
+        {
+            case 1:
+                size = fontSize + 6;
+                break;
+            case 2:
+                size = fontSize + 4;
+                break;
+            case 3:
+                size = fontSize + 2;
+                break;
+            case 4:
+                break;
+            case 5:
+                style = STYLE_ROMAN;
+                break;
+        }
+
+        Paragraph paragraph = new Paragraph( style, size );
+        paragraph.style = styleNumber( sectionLevel );
+
+        beginParagraph( paragraph );
+    }
+
+    public void sectionTitle_()
+    {
+        endParagraph();
+    }
+
+    private int styleNumber( int level )
+    {
+        return level;
+    }
+
+    public void list()
+    {
+        indentation.add( LIST_INDENT );
+        space.set( space.get() / 2 );
+    }
+
+    public void list_()
+    {
+        indentation.restore();
+        space.restore();
+    }
+
+    public void listItem()
+    {
+        Paragraph paragraph = new Paragraph();
+        paragraph.leftIndent = indentation.get() + listItemIndent;
+        paragraph.firstLineIndent = ( -listItemIndent );
+        beginParagraph( paragraph );
+
+        beginStyle( STYLE_BOLD );
+        writer.println( LIST_ITEM_HEADER );
+        endStyle();
+
+        indentation.add( listItemIndent );
+        space.set( space.get() / 2 );
+    }
+
+    public void listItem_()
+    {
+        endParagraph();
+
+        indentation.restore();
+        space.restore();
+    }
+
+    public void numberedList( int numbering )
+    {
+        this.numbering.addElement( new Integer( numbering ) );
+        itemNumber.addElement( new Counter( 0 ) );
+
+        indentation.add( LIST_INDENT );
+        space.set( space.get() / 2 );
+    }
+
+    public void numberedList_()
+    {
+        numbering.removeElementAt( numbering.size() - 1 );
+        itemNumber.removeElementAt( itemNumber.size() - 1 );
+
+        indentation.restore();
+        space.restore();
+    }
+
+    public void numberedListItem()
+    {
+        ( (Counter) itemNumber.lastElement() ).increment();
+
+        int indent = 0;
+        String header = getItemHeader();
+        Font font = getFont( STYLE_TYPEWRITER, fontSize );
+        if ( font != null )
+        {
+            indent = textWidth( header, font );
+        }
+
+        Paragraph paragraph = new Paragraph();
+        paragraph.leftIndent = indentation.get() + indent;
+        paragraph.firstLineIndent = ( -indent );
+        beginParagraph( paragraph );
+
+        beginStyle( STYLE_TYPEWRITER );
+        writer.println( header );
+        endStyle();
+
+        indentation.add( indent );
+        space.set( space.get() / 2 );
+    }
+
+    public void numberedListItem_()
+    {
+        endParagraph();
+
+        indentation.restore();
+        space.restore();
+    }
+
+    private String getItemHeader()
+    {
+        int numbering = ( (Integer) this.numbering.lastElement() ).intValue();
+        int itemNumber = ( (Counter) this.itemNumber.lastElement() ).get();
+        StringBuffer buf = new StringBuffer();
+
+        switch ( numbering )
+        {
+            case Sink.NUMBERING_DECIMAL:
+            default:
+                buf.append( itemNumber );
+                buf.append( ". " );
+                while ( buf.length() < 4 )
+                {
+                    buf.append( ' ' );
+                }
+                break;
+
+            case Sink.NUMBERING_LOWER_ALPHA:
+                buf.append( AlphaNumerals.toString( itemNumber, true ) );
+                buf.append( ") " );
+                break;
+
+            case Sink.NUMBERING_UPPER_ALPHA:
+                buf.append( AlphaNumerals.toString( itemNumber, false ) );
+                buf.append( ". " );
+                break;
+
+            case Sink.NUMBERING_LOWER_ROMAN:
+                buf.append( RomanNumerals.toString( itemNumber, true ) );
+                buf.append( ") " );
+                while ( buf.length() < 6 )
+                {
+                    buf.append( ' ' );
+                }
+                break;
+
+            case Sink.NUMBERING_UPPER_ROMAN:
+                buf.append( RomanNumerals.toString( itemNumber, false ) );
+                buf.append( ". " );
+                while ( buf.length() < 6 )
+                {
+                    buf.append( ' ' );
+                }
+                break;
+        }
+
+        return buf.toString();
+    }
+
+    public void definitionList()
+    {
+        int next = space.getNext();
+
+        indentation.add( LIST_INDENT );
+        space.set( space.get() / 2 );
+        space.setNext( next );
+    }
+
+    public void definitionList_()
+    {
+        indentation.restore();
+        space.restore();
+    }
+
+    public void definitionListItem()
+    {
+        int next = space.getNext();
+        space.set( space.get() / 2 );
+        space.setNext( next );
+    }
+
+    public void definitionListItem_()
+    {
+        space.restore();
+    }
+
+    public void definedTerm()
+    {
+    }
+
+    public void definedTerm_()
+    {
+        endParagraph();
+    }
+
+    public void definition()
+    {
+        int next = space.getNext();
+
+        indentation.add( DEFINITION_INDENT );
+        space.set( space.get() / 2 );
+        space.setNext( next );
+    }
+
+    public void definition_()
+    {
+        endParagraph();
+
+        indentation.restore();
+        space.restore();
+    }
+
+    public void table()
+    {
+    }
+
+    public void table_()
+    {
+    }
+
+    public void tableRows( int[] justification, boolean grid )
+
+    {
+        table = new Table( justification, grid );
+        context.set( CONTEXT_TABLE );
+    }
+
+    public void tableRows_()
+    {
+        boolean bb = false;
+        boolean br = false;
+
+        int offset = ( pageWidth() - ( table.width() + indentation.get() ) ) / 2;
+        int x0 = indentation.get() + offset;
+
+        space.skip();
+
+        for ( int i = 0; i < table.rows.size(); ++i )
+        {
+            Row row = (Row) table.rows.elementAt( i );
+
+            writer.print( "\\trowd" );
+            writer.print( "\\trleft" + x0 );
+            writer.print( "\\trgaph" + CELL_HORIZONTAL_PAD );
+            writer.println( "\\trrh" + row.height() );
+
+            if ( table.grid )
+            {
+                if ( i == ( table.rows.size() - 1 ) )
+                {
+                    bb = true;
+                }
+                br = false;
+            }
+
+            for ( int j = 0, x = x0; j < table.numColumns; ++j )
+            {
+                if ( table.grid )
+                {
+                    if ( j == ( table.numColumns - 1 ) )
+                    {
+                        br = true;
+                    }
+                    setBorder( true, bb, true, br );
+                    x += BORDER_WIDTH;
+                }
+                x += table.columnWidths[j];
+                writer.println( "\\clvertalc\\cellx" + x );
+            }
+
+            for ( int j = 0; j < table.numColumns; ++j )
+            {
+                if ( j >= row.cells.size() )
+                {
+                    break;
+                }
+                Cell cell = (Cell) row.cells.elementAt( j );
+
+                writer.print( "\\pard\\intbl" );
+                setJustification( table.justification[j] );
+                writer.println( "\\plain\\f0\\fs" + ( 2 * fontSize ) );
+
+                for ( int k = 0; k < cell.lines.size(); ++k )
+                {
+                    if ( k > 0 )
+                    {
+                        writer.println( "\\line" );
+                    }
+                    Line line = (Line) cell.lines.elementAt( k );
+
+                    for ( int n = 0; n < line.items.size(); ++n )
+                    {
+                        Item item = (Item) line.items.elementAt( n );
+                        writer.print( "{" );
+                        setStyle( item.style );
+                        writer.println( escape( item.text ) );
+                        writer.println( "}" );
+                    }
+                }
+
+                writer.println( "\\cell" );
+            }
+
+            writer.println( "\\row" );
+        }
+
+        context.restore();
+    }
+
+    private int pageWidth()
+    {
+        double width = paperWidth - ( leftMargin + rightMargin );
+        return toTwips( width, UNIT_CENTIMETER );
+    }
+
+    private void setBorder( boolean bt, boolean bb, boolean bl, boolean br )
+    {
+        if ( bt )
+        {
+            writer.println( "\\clbrdrt\\brdrs\\brdrw" + BORDER_WIDTH );
+        }
+        if ( bb )
+        {
+            writer.println( "\\clbrdrb\\brdrs\\brdrw" + BORDER_WIDTH );
+        }
+        if ( bl )
+        {
+            writer.println( "\\clbrdrl\\brdrs\\brdrw" + BORDER_WIDTH );
+        }
+        if ( br )
+        {
+            writer.println( "\\clbrdrr\\brdrs\\brdrw" + BORDER_WIDTH );
+        }
+    }
+
+    private void setJustification( int justification )
+    {
+        switch ( justification )
+        {
+            case AptParser.JUSTIFY_LEFT:
+            default:
+                writer.println( "\\ql" );
+                break;
+            case AptParser.JUSTIFY_CENTER:
+                writer.println( "\\qc" );
+                break;
+            case AptParser.JUSTIFY_RIGHT:
+                writer.println( "\\qr" );
+                break;
+        }
+    }
+
+    private void setStyle( int style )
+    {
+        switch ( style )
+        {
+            case STYLE_ITALIC:
+                writer.println( "\\i" );
+                break;
+            case STYLE_BOLD:
+                writer.println( "\\b" );
+                break;
+            case STYLE_TYPEWRITER:
+                writer.println( "\\f1" );
+                break;
+            default:
+                break;
+        }
+    }
+
+    public void tableRow()
+    {
+        row = new Row();
+    }
+
+    public void tableRow_()
+    {
+        table.add( row );
+    }
+
+    public void tableCell()
+    {
+        cell = new Cell();
+        line = new Line();
+    }
+
+    public void tableCell_()
+    {
+        cell.add( line );
+        row.add( cell );
+    }
+
+    public void tableCaption()
+    {
+        Paragraph paragraph = new Paragraph();
+        paragraph.justification = AptParser.JUSTIFY_CENTER;
+        paragraph.spaceBefore /= 2;
+        beginParagraph( paragraph );
+    }
+
+    public void tableCaption_()
+    {
+        endParagraph();
+    }
+
+    public void paragraph()
+    {
+        if ( paragraph == null )
+        {
+            beginParagraph( new Paragraph() );
+        }
+    }
+
+    public void paragraph_()
+    {
+        endParagraph();
+    }
+
+    private void beginParagraph( Paragraph paragraph )
+    {
+        paragraph.begin();
+        this.paragraph = paragraph;
+        if ( style != STYLE_ROMAN )
+        {
+            beginStyle( style );
+        }
+    }
+
+    private void endParagraph()
+    {
+        if ( paragraph != null )
+        {
+            if ( style != STYLE_ROMAN )
+            {
+                endStyle();
+            }
+            paragraph.end();
+            paragraph = null;
+        }
+    }
+
+    public void verbatim( boolean boxed )
+    {
+        verbatim = new StringBuffer();
+        frame = boxed;
+
+        context.set( CONTEXT_VERBATIM );
+    }
+
+    public void verbatim_()
+    {
+        String text = verbatim.toString();
+
+        Paragraph paragraph = new Paragraph();
+        paragraph.fontStyle = STYLE_TYPEWRITER;
+        paragraph.frame = frame;
+
+        beginParagraph( paragraph );
+
+        StringTokenizer t = new StringTokenizer( text, EOL, true );
+        while ( t.hasMoreTokens() )
+        {
+            String s = t.nextToken();
+            if ( s.equals( EOL ) && t.hasMoreTokens() )
+            {
+                writer.println( "\\line" );
+            }
+            else
+            {
+                writer.println( escape( s ) );
+            }
+        }
+
+        endParagraph();
+
+        context.restore();
+    }
+
+    public void figure()
+    {
+    }
+
+    public void figure_()
+    {
+    }
+
+    public void figureGraphics( String name )
+    {
+        /*
+         * The name argument is a path name without file extension.
+         */
+        StringBuffer buf = new StringBuffer( name );
+        buf.append( ".ppm" );
+        name = buf.toString();
+
+        Paragraph paragraph = new Paragraph();
+        paragraph.justification = AptParser.JUSTIFY_CENTER;
+        beginParagraph( paragraph );
+
+        try
+        {
+            writeImage( name );
+        }
+        catch ( Exception e )
+        {
+            e.printStackTrace();
+            System.exit( 2 );
+        }
+
+        endParagraph();
+    }
+
+    private void writeImage( String source )
+        throws Exception
+    {
+        int bytesPerLine;
+        PBMReader ppm = new PBMReader( source );
+        WMFWriter.Dib dib = new WMFWriter.Dib();
+        WMFWriter wmf = new WMFWriter();
+
+        int srcWidth = ppm.width();
+        int srcHeight = ppm.height();
+
+        dib.biWidth = srcWidth;
+        dib.biHeight = srcHeight;
+        dib.biXPelsPerMeter = (int) ( resolution * 100. / 2.54 );
+        dib.biYPelsPerMeter = dib.biXPelsPerMeter;
+
+        if ( imageType.equals( IMG_TYPE_RGB ) )
+        {
+            dib.biBitCount = 24;
+            dib.biCompression = WMFWriter.Dib.BI_RGB; // no compression
+
+            bytesPerLine = 4 * ( ( 3 * srcWidth + 3 ) / 4 );
+            dib.bitmap = new byte[srcHeight * bytesPerLine];
+
+            byte[] line = new byte[3 * srcWidth];
+            for ( int i = ( srcHeight - 1 ); i >= 0; --i )
+            {
+                ppm.read( line, 0, line.length );
+                for ( int j = 0, k = ( i * bytesPerLine ); j < line.length; j += 3 )
+                {
+                    // component order = BGR
+                    dib.bitmap[k++] = line[j + 2];
+                    dib.bitmap[k++] = line[j + 1];
+                    dib.bitmap[k++] = line[j];
+                }
+            }
+        }
+
+        else
+        {
+            dib.biBitCount = 8;
+
+            bytesPerLine = 4 * ( ( srcWidth + 3 ) / 4 );
+            byte[] bitmap = new byte[srcHeight * bytesPerLine];
+
+            Vector colors = new Vector( 256 );
+            colors.addElement( Color.white );
+            colors.addElement( Color.black );
+
+            byte[] line = new byte[3 * srcWidth];
+            for ( int i = ( srcHeight - 1 ); i >= 0; --i )
+            {
+                ppm.read( line, 0, line.length );
+                for ( int j = 0, k = ( i * bytesPerLine ); j < line.length; )
+                {
+                    int r = (int) line[j++] & 0xff;
+                    int g = (int) line[j++] & 0xff;
+                    int b = (int) line[j++] & 0xff;
+                    Color color = new Color( r, g, b );
+                    int index = colors.indexOf( color );
+                    if ( index < 0 )
+                    {
+                        if ( colors.size() < colors.capacity() )
+                        {
+                            colors.addElement( color );
+                            index = colors.size() - 1;
+                        }
+                        else
+                        {
+                            index = 1;
+                        }
+                    }
+                    bitmap[k++] = (byte) index;
+                }
+            }
+
+            dib.biClrUsed = colors.size();
+            dib.biClrImportant = dib.biClrUsed;
+            dib.palette = new byte[4 * dib.biClrUsed];
+            for ( int i = 0, j = 0; i < dib.biClrUsed; ++i, ++j )
+            {
+                Color color = (Color) colors.elementAt( i );
+                dib.palette[j++] = (byte) color.getBlue();
+                dib.palette[j++] = (byte) color.getGreen();
+                dib.palette[j++] = (byte) color.getRed();
+            }
+
+            if ( imageCompression )
+            {
+                dib.biCompression = WMFWriter.Dib.BI_RLE8;
+                dib.bitmap = new byte[bitmap.length + ( 2 * ( bitmap.length / 255 + 1 ) )];
+                dib.biSizeImage = WMFWriter.Dib.rlEncode8( bitmap, 0, bitmap.length, dib.bitmap, 0 );
+            }
+            else
+            {
+                dib.biCompression = WMFWriter.Dib.BI_RGB;
+                dib.bitmap = bitmap;
+            }
+        }
+
+        if ( imageFormat.equals( IMG_FORMAT_WMF ) )
+        {
+            int[] parameters;
+            WMFWriter.Record record;
+
+            /*
+             * See the libwmf library documentation
+             * (http://www.wvware.com/wmf_doc_index.html)
+             * for a description of WMF records.
+             */
+
+            // set mapping mode to MM_TEXT (logical unit = pixel)
+            parameters = new int[1];
+            parameters[0] = 1;
+            record = new WMFWriter.Record( 0x0103, parameters );
+            wmf.add( record );
+
+            // set window origin and dimensions
+            parameters = new int[2];
+            record = new WMFWriter.Record( 0x020b, parameters );
+            wmf.add( record );
+            parameters = new int[2];
+            parameters[0] = srcHeight;
+            parameters[1] = srcWidth;
+            record = new WMFWriter.Record( 0x020c, parameters );
+            wmf.add( record );
+
+            parameters = new int[WMFWriter.DibBitBltRecord.P_COUNT];
+            // raster operation = SRCCOPY (0x00cc0020)
+            parameters[WMFWriter.DibBitBltRecord.P_ROP_H] = 0x00cc;
+            parameters[WMFWriter.DibBitBltRecord.P_ROP_L] = 0x0020;
+            parameters[WMFWriter.DibBitBltRecord.P_WIDTH] = srcWidth;
+            parameters[WMFWriter.DibBitBltRecord.P_HEIGHT] = srcHeight;
+            record = new WMFWriter.DibBitBltRecord( parameters, dib );
+            wmf.add( record );
+        }
+
+        if ( imageFormat.equals( IMG_FORMAT_WMF ) )
+        {
+            writer.print( "{\\pict\\wmetafile1" );
+            writer.println( "\\picbmp\\picbpp" + dib.biBitCount );
+        }
+        else
+        {
+            writer.print( "{\\pict\\dibitmap0\\wbmplanes1" );
+            writer.print( "\\wbmbitspixel" + dib.biBitCount );
+            writer.println( "\\wbmwidthbytes" + bytesPerLine );
+        }
+
+        writer.print( "\\picw" + srcWidth );
+        writer.print( "\\pich" + srcHeight );
+        writer.print( "\\picwgoal" + toTwips( srcWidth, UNIT_PIXEL ) );
+        writer.println( "\\pichgoal" + toTwips( srcHeight, UNIT_PIXEL ) );
+
+        if ( imageFormat.equals( IMG_FORMAT_WMF ) )
+        {
+            if ( imageDataFormat.equals( IMG_DATA_RAW ) )
+            {
+                writer.print( "\\bin" + ( 2 * wmf.size() ) + " " );
+                writer.flush();
+                wmf.write( stream );
+                stream.flush();
+            }
+            else
+            {
+                wmf.print( writer );
+            }
+        }
+
+        else
+        {
+            if ( imageDataFormat.equals( IMG_DATA_RAW ) )
+            {
+                writer.print( "\\bin" + ( 2 * dib.size() ) + " " );
+                writer.flush();
+                dib.write( stream );
+                stream.flush();
+            }
+            else
+            {
+                dib.print( writer );
+            }
+        }
+
+        writer.println( "}" );
+    }
+
+    public void figureCaption()
+    {
+        Paragraph paragraph = new Paragraph();
+        paragraph.justification = AptParser.JUSTIFY_CENTER;
+        paragraph.spaceBefore /= 2;
+        beginParagraph( paragraph );
+    }
+
+    public void figureCaption_()
+    {
+        endParagraph();
+    }
+
+    public void horizontalRule()
+    {
+        writer.print( "\\pard\\li" + indentation.get() );
+
+        int skip = space.getNext();
+        if ( skip > 0 )
+        {
+            writer.print( "\\sb" + skip );
+        }
+        space.setNext( skip );
+
+        writer.print( "\\brdrb\\brdrs\\brdrw" + BORDER_WIDTH );
+        writer.println( "\\plain\\fs1\\par" );
+    }
+
+    public void pageBreak()
+    {
+        writer.println( "\\page" );
+    }
+
+    public void anchor( String name )
+    {
+    }
+
+    public void anchor_()
+    {
+    }
+
+    public void link( String name )
+    {
+    }
+
+    public void link_()
+    {
+    }
+
+    public void italic()
+    {
+        beginStyle( STYLE_ITALIC );
+    }
+
+    public void italic_()
+    {
+        endStyle();
+    }
+
+    public void bold()
+    {
+        beginStyle( STYLE_BOLD );
+    }
+
+    public void bold_()
+    {
+        endStyle();
+    }
+
+    public void monospaced()
+    {
+        beginStyle( STYLE_TYPEWRITER );
+    }
+
+    public void monospaced_()
+    {
+        endStyle();
+    }
+
+    private void beginStyle( int style )
+    {
+        this.style = style;
+
+        switch ( context.get() )
+        {
+            case CONTEXT_TABLE:
+                break;
+            default:
+                if ( paragraph != null )
+                {
+                    switch ( style )
+                    {
+                        case STYLE_ITALIC:
+                            writer.println( "{\\i" );
+                            break;
+                        case STYLE_BOLD:
+                            writer.println( "{\\b" );
+                            break;
+                        case STYLE_TYPEWRITER:
+                            writer.println( "{\\f1" );
+                            break;
+                        default:
+                            writer.println( "{" );
+                            break;
+                    }
+                }
+                break;
+        }
+    }
+
+    private void endStyle()
+    {
+        style = STYLE_ROMAN;
+
+        switch ( context.get() )
+        {
+            case CONTEXT_TABLE:
+                break;
+            default:
+                if ( paragraph != null )
+                {
+                    writer.println( "}" );
+                }
+                break;
+        }
+    }
+
+    public void lineBreak()
+    {
+        switch ( context.get() )
+        {
+            case CONTEXT_TABLE:
+                cell.add( line );
+                line = new Line();
+                break;
+            default:
+                writer.println( "\\line" );
+                break;
+        }
+    }
+
+    public void nonBreakingSpace()
+    {
+        switch ( context.get() )
+        {
+            case CONTEXT_TABLE:
+                line.add( new Item( style, " " ) );
+                break;
+            default:
+                writer.println( "\\~" );
+                break;
+        }
+    }
+
+    public void text( String text )
+    {
+        switch ( context.get() )
+        {
+            case CONTEXT_VERBATIM:
+                verbatim.append( text );
+                break;
+
+            case CONTEXT_TABLE:
+                StringTokenizer t = new StringTokenizer( text, EOL, true );
+                while ( t.hasMoreTokens() )
+                {
+                    String token = t.nextToken();
+                    if ( token.equals( EOL ) )
+                    {
+                        cell.add( line );
+                        line = new Line();
+                    }
+                    else
+                    {
+                        line.add( new Item( style, normalize( token ) ) );
+                    }
+                }
+                break;
+
+            default:
+                if ( paragraph == null )
+                {
+                    beginParagraph( new Paragraph() );
+                }
+                writer.println( escape( normalize( text ) ) );
+        }
+    }
+
+    private static String normalize( String s )
+    {
+        int length = s.length();
+        StringBuffer buffer = new StringBuffer( length );
+
+        for ( int i = 0; i < length; ++i )
+        {
+            char c = s.charAt( i );
+
+            if ( Character.isWhitespace( c ) )
+            {
+                if ( buffer.length() == 0 || buffer.charAt( buffer.length() - 1 ) != ' ' )
+                {
+                    buffer.append( ' ' );
+                }
+            }
+
+            else
+            {
+                buffer.append( c );
+            }
+        }
+
+        return buffer.toString();
+    }
+
+    private static String escape( String s )
+    {
+        int length = s.length();
+        StringBuffer buffer = new StringBuffer( length );
+
+        for ( int i = 0; i < length; ++i )
+        {
+            char c = s.charAt( i );
+            switch ( c )
+            {
+                case '\\':
+                    buffer.append( "\\\\" );
+                    break;
+                case '{':
+                    buffer.append( "\\{" );
+                    break;
+                case '}':
+                    buffer.append( "\\}" );
+                    break;
+                default:
+                    buffer.append( c );
+            }
+        }
+
+        return buffer.toString();
+    }
+
+    private Font getFont( int style, int size )
+    {
+        Font font = null;
+
+        StringBuffer buf = new StringBuffer();
+        buf.append( style );
+        buf.append( size );
+        String key = buf.toString();
+
+        Object object = fontTable.get( key );
+        if ( object == null )
+        {
+            try
+            {
+                font = new Font( style, size );
+                fontTable.put( key, font );
+            }
+            catch ( Exception ignored )
+            {
+            }
+        }
+        else
+        {
+            font = (Font) object;
+        }
+
+        return font;
+    }
+
+    private static int textWidth( String text, Font font )
+    {
+        int width = 0;
+        StringTokenizer t = new StringTokenizer( text, EOL );
+
+        while ( t.hasMoreTokens() )
+        {
+            int w = font.textExtents( t.nextToken() ).width;
+            if ( w > width )
+            {
+                width = w;
+            }
+        }
+
+        return width;
+    }
+
+    // -----------------------------------------------------------------------
+
+    private class Counter
+    {
+
+        private int value;
+
+        Counter( int value )
+        {
+            set( value );
+        }
+
+        void set( int value )
+        {
+            this.value = value;
+        }
+
+        int get()
+        {
+            return value;
+        }
+
+        void increment()
+        {
+            increment( 1 );
+        }
+
+        void increment( int value )
+        {
+            this.value += value;
+        }
+
+    }
+
+    private class Context
+    {
+
+        private int context = CONTEXT_UNDEFINED;
+
+        private Vector stack = new Vector();
+
+        void set( int context )
+        {
+            stack.addElement( new Integer( this.context ) );
+            this.context = context;
+        }
+
+        void restore()
+        {
+            if ( !stack.isEmpty() )
+            {
+                context = ( (Integer) stack.lastElement() ).intValue();
+                stack.removeElementAt( stack.size() - 1 );
+            }
+        }
+
+        int get()
+        {
+            return context;
+        }
+
+    }
+
+    private class Paragraph
+    {
+
+        int style = 0;
+
+        int justification = AptParser.JUSTIFY_LEFT;
+
+        int leftIndent = indentation.get();
+
+        int rightIndent = 0;
+
+        int firstLineIndent = 0;
+
+        int spaceBefore = space.getNext();
+
+        int spaceAfter = 0;
+
+        boolean frame = false;
+
+        int fontStyle = STYLE_ROMAN;
+
+        int fontSize = RtfSink.this.fontSize;
+
+        Paragraph()
+        {
+        }
+
+        Paragraph( int style, int size )
+        {
+            fontStyle = style;
+            fontSize = size;
+        }
+
+        void begin()
+        {
+            writer.print( "\\pard" );
+            if ( style > 0 )
+            {
+                writer.print( "\\s" + style );
+            }
+            switch ( justification )
+            {
+                case AptParser.JUSTIFY_LEFT:
+                default:
+                    break;
+                case AptParser.JUSTIFY_CENTER:
+                    writer.print( "\\qc" );
+                    break;
+                case AptParser.JUSTIFY_RIGHT:
+                    writer.print( "\\qr" );
+                    break;
+            }
+            if ( leftIndent != 0 )
+            {
+                writer.print( "\\li" + leftIndent );
+            }
+            if ( rightIndent != 0 )
+            {
+                writer.print( "\\ri" + rightIndent );
+            }
+            if ( firstLineIndent != 0 )
+            {
+                writer.print( "\\fi" + firstLineIndent );
+            }
+            if ( spaceBefore != 0 )
+            {
+                writer.print( "\\sb" + spaceBefore );
+            }
+            if ( spaceAfter != 0 )
+            {
+                writer.print( "\\sa" + spaceAfter );
+            }
+
+            if ( frame )
+            {
+                writer.print( "\\box\\brdrs\\brdrw" + BORDER_WIDTH );
+            }
+
+            writer.print( "\\plain" );
+            switch ( fontStyle )
+            {
+                case STYLE_ROMAN:
+                default:
+                    writer.print( "\\f0" );
+                    break;
+                case STYLE_ITALIC:
+                    writer.print( "\\f0\\i" );
+                    break;
+                case STYLE_BOLD:
+                    writer.print( "\\f0\\b" );
+                    break;
+                case STYLE_TYPEWRITER:
+                    writer.print( "\\f1" );
+                    break;
+            }
+            writer.println( "\\fs" + ( 2 * fontSize ) );
+        }
+
+        void end()
+        {
+            writer.println( "\\par" );
+        }
+
+    }
+
+    private class Space
+    {
+
+        private int space;
+
+        private int next;
+
+        private Vector stack = new Vector();
+
+        Space( int space /*twips*/ )
+        {
+            this.space = space;
+            next = space;
+        }
+
+        void set( int space /*twips*/ )
+        {
+            stack.addElement( new Integer( this.space ) );
+            this.space = space;
+            next = space;
+        }
+
+        int get()
+        {
+            return space;
+        }
+
+        void restore()
+        {
+            if ( !stack.isEmpty() )
+            {
+                space = ( (Integer) stack.lastElement() ).intValue();
+                stack.removeElementAt( stack.size() - 1 );
+                next = space;
+            }
+        }
+
+        void setNext( int space /*twips*/ )
+        {
+            next = space;
+        }
+
+        int getNext()
+        {
+            int next = this.next;
+            this.next = space;
+            return next;
+        }
+
+        void skip()
+        {
+            skip( getNext() );
+        }
+
+        void skip( int space /*twips*/ )
+        {
+            writer.print( "\\pard" );
+            if ( ( space -= 10 ) > 0 )
+            {
+                writer.print( "\\sb" + space );
+            }
+            writer.println( "\\plain\\fs1\\par" );
+        }
+
+    }
+
+    private class Indentation
+    {
+
+        private int indent;
+
+        private Vector stack = new Vector();
+
+        Indentation( int indent /*twips*/ )
+        {
+            this.indent = indent;
+        }
+
+        void set( int indent /*twips*/ )
+        {
+            stack.addElement( new Integer( this.indent ) );
+            this.indent = indent;
+        }
+
+        int get()
+        {
+            return indent;
+        }
+
+        void restore()
+        {
+            if ( !stack.isEmpty() )
+            {
+                indent = ( (Integer) stack.lastElement() ).intValue();
+                stack.removeElementAt( stack.size() - 1 );
+            }
+        }
+
+        void add( int indent /*twips*/ )
+        {
+            set( this.indent + indent );
+        }
+
+    }
+
+    private class Table
+    {
+
+        int numColumns;
+
+        int[] columnWidths;
+
+        int[] justification;
+
+        boolean grid;
+
+        Vector rows;
+
+        Table( int[] justification, boolean grid )
+        {
+            numColumns = justification.length;
+            columnWidths = new int[numColumns];
+            this.justification = justification;
+            this.grid = grid;
+            rows = new Vector();
+        }
+
+        void add( Row row )
+        {
+            rows.addElement( row );
+
+            for ( int i = 0; i < numColumns; ++i )
+            {
+                if ( i >= row.cells.size() )
+                {
+                    break;
+                }
+                Cell cell = (Cell) row.cells.elementAt( i );
+                int width = cell.boundingBox().width;
+                if ( width > columnWidths[i] )
+                {
+                    columnWidths[i] = width;
+                }
+            }
+        }
+
+        int width()
+        {
+            int width = 0;
+            for ( int i = 0; i < numColumns; ++i )
+            {
+                width += columnWidths[i];
+            }
+            if ( grid )
+            {
+                width += ( numColumns + 1 ) * BORDER_WIDTH;
+            }
+            return width;
+        }
+
+    }
+
+    private class Row
+    {
+
+        Vector cells = new Vector();
+
+        void add( Cell cell )
+        {
+            cells.addElement( cell );
+        }
+
+        int height()
+        {
+            int height = 0;
+            int numCells = cells.size();
+            for ( int i = 0; i < numCells; ++i )
+            {
+                Cell cell = (Cell) cells.elementAt( i );
+                Box box = cell.boundingBox();
+                if ( box.height > height )
+                {
+                    height = box.height;
+                }
+            }
+            return height;
+        }
+
+    }
+
+    private class Cell
+    {
+
+        Vector lines = new Vector();
+
+        void add( Line line )
+        {
+            lines.addElement( line );
+        }
+
+        Box boundingBox()
+        {
+            int width = 0;
+            int height = 0;
+
+            for ( int i = 0; i < lines.size(); ++i )
+            {
+                int w = 0;
+                int h = 0;
+                Line line = (Line) lines.elementAt( i );
+
+                for ( int j = 0; j < line.items.size(); ++j )
+                {
+                    Item item = (Item) line.items.elementAt( j );
+                    Font font = getFont( item.style, fontSize );
+                    if ( font == null )
+                    {
+                        continue;
+                    }
+                    Font.TextExtents x = font.textExtents( item.text );
+                    w += x.width;
+                    if ( x.height > h )
+                    {
+                        h = x.height;
+                    }
+                }
+
+                if ( w > width )
+                {
+                    width = w;
+                }
+                height += h;
+            }
+
+            width += ( 2 * CELL_HORIZONTAL_PAD );
+            height += ( 2 * CELL_VERTICAL_PAD );
+
+            // allow one more pixel for grid outline
+            width += toTwips( 1., UNIT_PIXEL );
+
+            return new Box( width, height );
+        }
+
+    }
+
+    private class Line
+    {
+
+        Vector items = new Vector();
+
+        void add( Item item )
+        {
+            items.addElement( item );
+        }
+
+    }
+
+    private class Item
+    {
+
+        int style;
+
+        String text;
+
+        Item( int style, String text )
+        {
+            this.style = style;
+            this.text = text;
+        }
+
+    }
+
+    private class Box
+    {
+
+        int width;
+
+        int height;
+
+        Box( int width, int height )
+        {
+            this.width = width;
+            this.height = height;
+        }
+
+    }
+
+    public void flush()
+    {
+        writer.flush();
+    }
+
+    public void close()
+    {
+        writer.close();
+    }
+}

Propchange: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerif.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerif.java?view=auto&rev=519331
==============================================================================
--- maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerif.java (added)
+++ maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerif.java Sat Mar 17 07:47:59 2007
@@ -0,0 +1,161 @@
+package org.apache.maven.doxia.module.rtf;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  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.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+class SansSerif
+    extends FontMetrics
+{
+
+    public static final CharMetrics[] metrics = {new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 90, 0, 187, 718 ), new CharMetrics( 355, 0, 70, 463, 285, 718 ),
+        new CharMetrics( 556, 0, 28, 0, 529, 688 ), new CharMetrics( 556, 0, 32, -115, 520, 775 ),
+        new CharMetrics( 889, 0, 39, -19, 850, 703 ), new CharMetrics( 667, 0, 44, -15, 645, 718 ),
+        new CharMetrics( 222, 0, 53, 463, 157, 718 ), new CharMetrics( 333, 0, 68, -207, 299, 733 ),
+        new CharMetrics( 333, 0, 34, -207, 265, 733 ), new CharMetrics( 389, 0, 39, 431, 349, 718 ),
+        new CharMetrics( 584, 0, 39, 0, 545, 505 ), new CharMetrics( 278, 0, 87, -147, 191, 106 ),
+        new CharMetrics( 333, 0, 44, 232, 289, 322 ), new CharMetrics( 278, 0, 87, 0, 191, 106 ),
+        new CharMetrics( 278, 0, -17, -19, 295, 737 ), new CharMetrics( 556, 0, 37, -19, 519, 703 ),
+        new CharMetrics( 556, 0, 101, 0, 359, 703 ), new CharMetrics( 556, 0, 26, 0, 507, 703 ),
+        new CharMetrics( 556, 0, 34, -19, 522, 703 ), new CharMetrics( 556, 0, 25, 0, 523, 703 ),
+        new CharMetrics( 556, 0, 32, -19, 514, 688 ), new CharMetrics( 556, 0, 38, -19, 518, 703 ),
+        new CharMetrics( 556, 0, 37, 0, 523, 688 ), new CharMetrics( 556, 0, 38, -19, 517, 703 ),
+        new CharMetrics( 556, 0, 42, -19, 514, 703 ), new CharMetrics( 278, 0, 87, 0, 191, 516 ),
+        new CharMetrics( 278, 0, 87, -147, 191, 516 ), new CharMetrics( 584, 0, 48, 11, 536, 495 ),
+        new CharMetrics( 584, 0, 39, 115, 545, 390 ), new CharMetrics( 584, 0, 48, 11, 536, 495 ),
+        new CharMetrics( 556, 0, 56, 0, 492, 727 ), new CharMetrics( 1015, 0, 147, -19, 868, 737 ),
+        new CharMetrics( 667, 0, 14, 0, 654, 718 ), new CharMetrics( 667, 0, 74, 0, 627, 718 ),
+        new CharMetrics( 722, 0, 44, -19, 681, 737 ), new CharMetrics( 722, 0, 81, 0, 674, 718 ),
+        new CharMetrics( 667, 0, 86, 0, 616, 718 ), new CharMetrics( 611, 0, 86, 0, 583, 718 ),
+        new CharMetrics( 778, 0, 48, -19, 704, 737 ), new CharMetrics( 722, 0, 77, 0, 646, 718 ),
+        new CharMetrics( 278, 0, 91, 0, 188, 718 ), new CharMetrics( 500, 0, 17, -19, 428, 718 ),
+        new CharMetrics( 667, 0, 76, 0, 663, 718 ), new CharMetrics( 556, 0, 76, 0, 537, 718 ),
+        new CharMetrics( 833, 0, 73, 0, 761, 718 ), new CharMetrics( 722, 0, 76, 0, 646, 718 ),
+        new CharMetrics( 778, 0, 39, -19, 739, 737 ), new CharMetrics( 667, 0, 86, 0, 622, 718 ),
+        new CharMetrics( 778, 0, 39, -56, 739, 737 ), new CharMetrics( 722, 0, 88, 0, 684, 718 ),
+        new CharMetrics( 667, 0, 49, -19, 620, 737 ), new CharMetrics( 611, 0, 14, 0, 597, 718 ),
+        new CharMetrics( 722, 0, 79, -19, 644, 718 ), new CharMetrics( 667, 0, 20, 0, 647, 718 ),
+        new CharMetrics( 944, 0, 16, 0, 928, 718 ), new CharMetrics( 667, 0, 19, 0, 648, 718 ),
+        new CharMetrics( 667, 0, 14, 0, 653, 718 ), new CharMetrics( 611, 0, 23, 0, 588, 718 ),
+        new CharMetrics( 278, 0, 63, -196, 250, 722 ), new CharMetrics( 278, 0, -17, -19, 295, 737 ),
+        new CharMetrics( 278, 0, 28, -196, 215, 722 ), new CharMetrics( 469, 0, -14, 264, 483, 688 ),
+        new CharMetrics( 556, 0, 0, -125, 556, -75 ), new CharMetrics( 222, 0, 65, 470, 169, 725 ),
+        new CharMetrics( 556, 0, 36, -15, 530, 538 ), new CharMetrics( 556, 0, 58, -15, 517, 718 ),
+        new CharMetrics( 500, 0, 30, -15, 477, 538 ), new CharMetrics( 556, 0, 35, -15, 499, 718 ),
+        new CharMetrics( 556, 0, 40, -15, 516, 538 ), new CharMetrics( 278, 0, 14, 0, 262, 728 ),
+        new CharMetrics( 556, 0, 40, -220, 499, 538 ), new CharMetrics( 556, 0, 65, 0, 491, 718 ),
+        new CharMetrics( 222, 0, 67, 0, 155, 718 ), new CharMetrics( 222, 0, -16, -210, 155, 718 ),
+        new CharMetrics( 500, 0, 67, 0, 501, 718 ), new CharMetrics( 222, 0, 67, 0, 155, 718 ),
+        new CharMetrics( 833, 0, 65, 0, 769, 538 ), new CharMetrics( 556, 0, 65, 0, 491, 538 ),
+        new CharMetrics( 556, 0, 35, -14, 521, 538 ), new CharMetrics( 556, 0, 58, -207, 517, 538 ),
+        new CharMetrics( 556, 0, 35, -207, 494, 538 ), new CharMetrics( 333, 0, 77, 0, 332, 538 ),
+        new CharMetrics( 500, 0, 32, -15, 464, 538 ), new CharMetrics( 278, 0, 14, -7, 257, 669 ),
+        new CharMetrics( 556, 0, 68, -15, 489, 523 ), new CharMetrics( 500, 0, 8, 0, 492, 523 ),
+        new CharMetrics( 722, 0, 14, 0, 709, 523 ), new CharMetrics( 500, 0, 11, 0, 490, 523 ),
+        new CharMetrics( 500, 0, 11, -214, 489, 523 ), new CharMetrics( 500, 0, 31, 0, 469, 523 ),
+        new CharMetrics( 334, 0, 42, -196, 292, 722 ), new CharMetrics( 260, 0, 94, -19, 167, 737 ),
+        new CharMetrics( 334, 0, 42, -196, 292, 722 ), new CharMetrics( 584, 0, 61, 180, 523, 326 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 95, 0, 183, 523 ),
+        new CharMetrics( 333, 0, 14, 593, 211, 734 ), new CharMetrics( 333, 0, 122, 593, 319, 734 ),
+        new CharMetrics( 333, 0, 21, 593, 312, 734 ), new CharMetrics( 333, 0, -4, 606, 337, 722 ),
+        new CharMetrics( 333, 0, 10, 627, 323, 684 ), new CharMetrics( 333, 0, 13, 595, 321, 731 ),
+        new CharMetrics( 333, 0, 121, 604, 212, 706 ), new CharMetrics( 333, 0, 40, 604, 293, 706 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 75, 572, 259, 756 ),
+        new CharMetrics( 333, 0, 45, -225, 259, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 333, 0, 31, 593, 409, 734 ), new CharMetrics( 333, 0, 73, -225, 287, 0 ),
+        new CharMetrics( 333, 0, 21, 593, 312, 734 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 333, 0, 118, -195, 215, 523 ), new CharMetrics( 556, 0, 51, -115, 513, 623 ),
+        new CharMetrics( 556, 0, 33, -16, 539, 718 ), new CharMetrics( 556, 0, 28, 99, 528, 603 ),
+        new CharMetrics( 556, 0, 3, 0, 553, 688 ), new CharMetrics( 260, 0, 94, -19, 167, 737 ),
+        new CharMetrics( 556, 0, 43, -191, 512, 737 ), new CharMetrics( 333, 0, 40, 604, 293, 706 ),
+        new CharMetrics( 737, 0, -14, -19, 752, 737 ), new CharMetrics( 370, 0, 24, 304, 346, 737 ),
+        new CharMetrics( 556, 0, 97, 108, 459, 446 ), new CharMetrics( 584, 0, 39, 108, 545, 390 ),
+        new CharMetrics( 333, 0, 44, 232, 289, 322 ), new CharMetrics( 737, 0, -14, -19, 752, 737 ),
+        new CharMetrics( 333, 0, 10, 627, 323, 684 ), new CharMetrics( 400, 0, 54, 411, 346, 703 ),
+        new CharMetrics( 584, 0, 39, 0, 545, 506 ), new CharMetrics( 333, 0, 4, 281, 323, 703 ),
+        new CharMetrics( 333, 0, 5, 270, 325, 703 ), new CharMetrics( 333, 0, 122, 593, 319, 734 ),
+        new CharMetrics( 556, 0, 68, -207, 489, 523 ), new CharMetrics( 537, 0, 18, -173, 497, 718 ),
+        new CharMetrics( 278, 0, 77, 190, 202, 315 ), new CharMetrics( 333, 0, 45, -225, 259, 0 ),
+        new CharMetrics( 333, 0, 43, 281, 222, 703 ), new CharMetrics( 365, 0, 25, 304, 341, 737 ),
+        new CharMetrics( 556, 0, 97, 108, 459, 446 ), new CharMetrics( 834, 0, 73, -19, 756, 703 ),
+        new CharMetrics( 834, 0, 43, -19, 773, 703 ), new CharMetrics( 834, 0, 45, -19, 810, 703 ),
+        new CharMetrics( 611, 0, 91, -201, 527, 525 ), new CharMetrics( 667, 0, 14, 0, 654, 929 ),
+        new CharMetrics( 667, 0, 14, 0, 654, 929 ), new CharMetrics( 667, 0, 14, 0, 654, 929 ),
+        new CharMetrics( 667, 0, 14, 0, 654, 917 ), new CharMetrics( 667, 0, 14, 0, 654, 901 ),
+        new CharMetrics( 667, 0, 14, 0, 654, 931 ), new CharMetrics( 1000, 0, 8, 0, 951, 718 ),
+        new CharMetrics( 722, 0, 44, -225, 681, 737 ), new CharMetrics( 667, 0, 86, 0, 616, 929 ),
+        new CharMetrics( 667, 0, 86, 0, 616, 929 ), new CharMetrics( 667, 0, 86, 0, 616, 929 ),
+        new CharMetrics( 667, 0, 86, 0, 616, 901 ), new CharMetrics( 278, 0, -13, 0, 188, 929 ),
+        new CharMetrics( 278, 0, 91, 0, 292, 929 ), new CharMetrics( 278, 0, -6, 0, 285, 929 ),
+        new CharMetrics( 278, 0, 13, 0, 266, 901 ), new CharMetrics( 722, 0, 0, 0, 674, 718 ),
+        new CharMetrics( 722, 0, 76, 0, 646, 917 ), new CharMetrics( 778, 0, 39, -19, 739, 929 ),
+        new CharMetrics( 778, 0, 39, -19, 739, 929 ), new CharMetrics( 778, 0, 39, -19, 739, 929 ),
+        new CharMetrics( 778, 0, 39, -19, 739, 917 ), new CharMetrics( 778, 0, 39, -19, 739, 901 ),
+        new CharMetrics( 584, 0, 39, 0, 545, 506 ), new CharMetrics( 778, 0, 39, -19, 740, 737 ),
+        new CharMetrics( 722, 0, 79, -19, 644, 929 ), new CharMetrics( 722, 0, 79, -19, 644, 929 ),
+        new CharMetrics( 722, 0, 79, -19, 644, 929 ), new CharMetrics( 722, 0, 79, -19, 644, 901 ),
+        new CharMetrics( 667, 0, 14, 0, 653, 929 ), new CharMetrics( 667, 0, 86, 0, 622, 718 ),
+        new CharMetrics( 611, 0, 67, -15, 571, 728 ), new CharMetrics( 556, 0, 36, -15, 530, 734 ),
+        new CharMetrics( 556, 0, 36, -15, 530, 734 ), new CharMetrics( 556, 0, 36, -15, 530, 734 ),
+        new CharMetrics( 556, 0, 36, -15, 530, 722 ), new CharMetrics( 556, 0, 36, -15, 530, 706 ),
+        new CharMetrics( 556, 0, 36, -15, 530, 756 ), new CharMetrics( 889, 0, 36, -15, 847, 538 ),
+        new CharMetrics( 500, 0, 30, -225, 477, 538 ), new CharMetrics( 556, 0, 40, -15, 516, 734 ),
+        new CharMetrics( 556, 0, 40, -15, 516, 734 ), new CharMetrics( 556, 0, 40, -15, 516, 734 ),
+        new CharMetrics( 556, 0, 40, -15, 516, 706 ), new CharMetrics( 278, 0, -13, 0, 184, 734 ),
+        new CharMetrics( 278, 0, 95, 0, 292, 734 ), new CharMetrics( 278, 0, -6, 0, 285, 734 ),
+        new CharMetrics( 278, 0, 13, 0, 266, 706 ), new CharMetrics( 556, 0, 35, -15, 522, 737 ),
+        new CharMetrics( 556, 0, 65, 0, 491, 722 ), new CharMetrics( 556, 0, 35, -14, 521, 734 ),
+        new CharMetrics( 556, 0, 35, -14, 521, 734 ), new CharMetrics( 556, 0, 35, -14, 521, 734 ),
+        new CharMetrics( 556, 0, 35, -14, 521, 722 ), new CharMetrics( 556, 0, 35, -14, 521, 706 ),
+        new CharMetrics( 584, 0, 39, -19, 545, 524 ), new CharMetrics( 611, 0, 28, -22, 537, 545 ),
+        new CharMetrics( 556, 0, 68, -15, 489, 734 ), new CharMetrics( 556, 0, 68, -15, 489, 734 ),
+        new CharMetrics( 556, 0, 68, -15, 489, 734 ), new CharMetrics( 556, 0, 68, -15, 489, 706 ),
+        new CharMetrics( 500, 0, 11, -214, 489, 734 ), new CharMetrics( 556, 0, 58, -207, 517, 718 ),
+        new CharMetrics( 500, 0, 11, -214, 489, 706 )};
+
+    public SansSerif()
+    {
+        super( false, 718, -207, new CharMetrics( 0, 0, -166, -225, 1000, 931 ), metrics );
+    }
+
+}

Propchange: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerif.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerif.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerifBold.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerifBold.java?view=auto&rev=519331
==============================================================================
--- maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerifBold.java (added)
+++ maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerifBold.java Sat Mar 17 07:47:59 2007
@@ -0,0 +1,161 @@
+package org.apache.maven.doxia.module.rtf;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  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.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+class SansSerifBold
+    extends FontMetrics
+{
+
+    public static final CharMetrics[] metrics = {new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 333, 0, 90, 0, 244, 718 ), new CharMetrics( 474, 0, 98, 447, 376, 718 ),
+        new CharMetrics( 556, 0, 18, 0, 538, 698 ), new CharMetrics( 556, 0, 30, -115, 523, 775 ),
+        new CharMetrics( 889, 0, 28, -19, 861, 710 ), new CharMetrics( 722, 0, 54, -19, 701, 718 ),
+        new CharMetrics( 278, 0, 69, 445, 209, 718 ), new CharMetrics( 333, 0, 35, -208, 314, 734 ),
+        new CharMetrics( 333, 0, 19, -208, 298, 734 ), new CharMetrics( 389, 0, 27, 387, 362, 718 ),
+        new CharMetrics( 584, 0, 40, 0, 544, 506 ), new CharMetrics( 278, 0, 64, -168, 214, 146 ),
+        new CharMetrics( 333, 0, 27, 215, 306, 345 ), new CharMetrics( 278, 0, 64, 0, 214, 146 ),
+        new CharMetrics( 278, 0, -33, -19, 311, 737 ), new CharMetrics( 556, 0, 32, -19, 524, 710 ),
+        new CharMetrics( 556, 0, 69, 0, 378, 710 ), new CharMetrics( 556, 0, 26, 0, 511, 710 ),
+        new CharMetrics( 556, 0, 27, -19, 516, 710 ), new CharMetrics( 556, 0, 27, 0, 526, 710 ),
+        new CharMetrics( 556, 0, 27, -19, 516, 698 ), new CharMetrics( 556, 0, 31, -19, 520, 710 ),
+        new CharMetrics( 556, 0, 25, 0, 528, 698 ), new CharMetrics( 556, 0, 32, -19, 524, 710 ),
+        new CharMetrics( 556, 0, 30, -19, 522, 710 ), new CharMetrics( 333, 0, 92, 0, 242, 512 ),
+        new CharMetrics( 333, 0, 92, -168, 242, 512 ), new CharMetrics( 584, 0, 38, -8, 546, 514 ),
+        new CharMetrics( 584, 0, 40, 87, 544, 419 ), new CharMetrics( 584, 0, 38, -8, 546, 514 ),
+        new CharMetrics( 611, 0, 60, 0, 556, 727 ), new CharMetrics( 975, 0, 118, -19, 856, 737 ),
+        new CharMetrics( 722, 0, 20, 0, 702, 718 ), new CharMetrics( 722, 0, 76, 0, 669, 718 ),
+        new CharMetrics( 722, 0, 44, -19, 684, 737 ), new CharMetrics( 722, 0, 76, 0, 685, 718 ),
+        new CharMetrics( 667, 0, 76, 0, 621, 718 ), new CharMetrics( 611, 0, 76, 0, 587, 718 ),
+        new CharMetrics( 778, 0, 44, -19, 713, 737 ), new CharMetrics( 722, 0, 71, 0, 651, 718 ),
+        new CharMetrics( 278, 0, 64, 0, 214, 718 ), new CharMetrics( 556, 0, 22, -18, 484, 718 ),
+        new CharMetrics( 722, 0, 87, 0, 722, 718 ), new CharMetrics( 611, 0, 76, 0, 583, 718 ),
+        new CharMetrics( 833, 0, 69, 0, 765, 718 ), new CharMetrics( 722, 0, 69, 0, 654, 718 ),
+        new CharMetrics( 778, 0, 44, -19, 734, 737 ), new CharMetrics( 667, 0, 76, 0, 627, 718 ),
+        new CharMetrics( 778, 0, 44, -52, 737, 737 ), new CharMetrics( 722, 0, 76, 0, 677, 718 ),
+        new CharMetrics( 667, 0, 39, -19, 629, 737 ), new CharMetrics( 611, 0, 14, 0, 598, 718 ),
+        new CharMetrics( 722, 0, 72, -19, 651, 718 ), new CharMetrics( 667, 0, 19, 0, 648, 718 ),
+        new CharMetrics( 944, 0, 16, 0, 929, 718 ), new CharMetrics( 667, 0, 14, 0, 653, 718 ),
+        new CharMetrics( 667, 0, 15, 0, 653, 718 ), new CharMetrics( 611, 0, 25, 0, 586, 718 ),
+        new CharMetrics( 333, 0, 63, -196, 309, 722 ), new CharMetrics( 278, 0, -33, -19, 311, 737 ),
+        new CharMetrics( 333, 0, 24, -196, 270, 722 ), new CharMetrics( 584, 0, 62, 323, 522, 698 ),
+        new CharMetrics( 556, 0, 0, -125, 556, -75 ), new CharMetrics( 278, 0, 69, 454, 209, 727 ),
+        new CharMetrics( 556, 0, 29, -14, 527, 546 ), new CharMetrics( 611, 0, 61, -14, 578, 718 ),
+        new CharMetrics( 556, 0, 34, -14, 524, 546 ), new CharMetrics( 611, 0, 34, -14, 551, 718 ),
+        new CharMetrics( 556, 0, 23, -14, 528, 546 ), new CharMetrics( 333, 0, 10, 0, 318, 727 ),
+        new CharMetrics( 611, 0, 40, -217, 553, 546 ), new CharMetrics( 611, 0, 65, 0, 546, 718 ),
+        new CharMetrics( 278, 0, 69, 0, 209, 725 ), new CharMetrics( 278, 0, 3, -214, 209, 725 ),
+        new CharMetrics( 556, 0, 69, 0, 562, 718 ), new CharMetrics( 278, 0, 69, 0, 209, 718 ),
+        new CharMetrics( 889, 0, 64, 0, 826, 546 ), new CharMetrics( 611, 0, 65, 0, 546, 546 ),
+        new CharMetrics( 611, 0, 34, -14, 578, 546 ), new CharMetrics( 611, 0, 62, -207, 578, 546 ),
+        new CharMetrics( 611, 0, 34, -207, 552, 546 ), new CharMetrics( 389, 0, 64, 0, 373, 546 ),
+        new CharMetrics( 556, 0, 30, -14, 519, 546 ), new CharMetrics( 333, 0, 10, -6, 309, 676 ),
+        new CharMetrics( 611, 0, 66, -14, 545, 532 ), new CharMetrics( 556, 0, 13, 0, 543, 532 ),
+        new CharMetrics( 778, 0, 10, 0, 769, 532 ), new CharMetrics( 556, 0, 15, 0, 541, 532 ),
+        new CharMetrics( 556, 0, 10, -214, 539, 532 ), new CharMetrics( 500, 0, 20, 0, 480, 532 ),
+        new CharMetrics( 389, 0, 48, -196, 365, 722 ), new CharMetrics( 280, 0, 84, -19, 196, 737 ),
+        new CharMetrics( 389, 0, 24, -196, 341, 722 ), new CharMetrics( 584, 0, 61, 163, 523, 343 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 69, 0, 209, 532 ),
+        new CharMetrics( 333, 0, -23, 604, 225, 750 ), new CharMetrics( 333, 0, 108, 604, 356, 750 ),
+        new CharMetrics( 333, 0, -10, 604, 343, 750 ), new CharMetrics( 333, 0, -17, 610, 350, 737 ),
+        new CharMetrics( 333, 0, -6, 604, 339, 678 ), new CharMetrics( 333, 0, -2, 604, 335, 750 ),
+        new CharMetrics( 333, 0, 104, 614, 230, 729 ), new CharMetrics( 333, 0, 6, 614, 327, 729 ),
+        new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 59, 568, 275, 776 ),
+        new CharMetrics( 333, 0, 6, -228, 245, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 333, 0, 9, 604, 486, 750 ), new CharMetrics( 333, 0, 71, -228, 304, 0 ),
+        new CharMetrics( 333, 0, -10, 604, 343, 750 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ),
+        new CharMetrics( 333, 0, 90, -186, 244, 532 ), new CharMetrics( 556, 0, 34, -118, 524, 628 ),
+        new CharMetrics( 556, 0, 28, -16, 541, 718 ), new CharMetrics( 556, 0, -3, 76, 559, 636 ),
+        new CharMetrics( 556, 0, -9, 0, 565, 698 ), new CharMetrics( 280, 0, 84, -19, 196, 737 ),
+        new CharMetrics( 556, 0, 34, -184, 522, 727 ), new CharMetrics( 333, 0, 6, 614, 327, 729 ),
+        new CharMetrics( 737, 0, -11, -19, 749, 737 ), new CharMetrics( 370, 0, 22, 276, 347, 737 ),
+        new CharMetrics( 556, 0, 88, 76, 468, 484 ), new CharMetrics( 584, 0, 40, 108, 544, 419 ),
+        new CharMetrics( 333, 0, 27, 215, 306, 345 ), new CharMetrics( 737, 0, -11, -19, 748, 737 ),
+        new CharMetrics( 333, 0, -6, 604, 339, 678 ), new CharMetrics( 400, 0, 57, 426, 343, 712 ),
+        new CharMetrics( 584, 0, 40, 0, 544, 506 ), new CharMetrics( 333, 0, 9, 283, 324, 710 ),
+        new CharMetrics( 333, 0, 8, 271, 326, 710 ), new CharMetrics( 333, 0, 108, 604, 356, 750 ),
+        new CharMetrics( 611, 0, 66, -207, 545, 532 ), new CharMetrics( 556, 0, -8, -191, 539, 700 ),
+        new CharMetrics( 278, 0, 58, 172, 220, 334 ), new CharMetrics( 333, 0, 6, -228, 245, 0 ),
+        new CharMetrics( 333, 0, 26, 283, 237, 710 ), new CharMetrics( 365, 0, 6, 276, 360, 737 ),
+        new CharMetrics( 556, 0, 88, 76, 468, 484 ), new CharMetrics( 834, 0, 26, -19, 766, 710 ),
+        new CharMetrics( 834, 0, 26, -19, 794, 710 ), new CharMetrics( 834, 0, 16, -19, 799, 710 ),
+        new CharMetrics( 611, 0, 55, -195, 551, 532 ), new CharMetrics( 722, 0, 20, 0, 702, 936 ),
+        new CharMetrics( 722, 0, 20, 0, 702, 936 ), new CharMetrics( 722, 0, 20, 0, 702, 936 ),
+        new CharMetrics( 722, 0, 20, 0, 702, 923 ), new CharMetrics( 722, 0, 20, 0, 702, 915 ),
+        new CharMetrics( 722, 0, 20, 0, 702, 962 ), new CharMetrics( 1000, 0, 5, 0, 954, 718 ),
+        new CharMetrics( 722, 0, 44, -228, 684, 737 ), new CharMetrics( 667, 0, 76, 0, 621, 936 ),
+        new CharMetrics( 667, 0, 76, 0, 621, 936 ), new CharMetrics( 667, 0, 76, 0, 621, 936 ),
+        new CharMetrics( 667, 0, 76, 0, 621, 915 ), new CharMetrics( 278, 0, -50, 0, 214, 936 ),
+        new CharMetrics( 278, 0, 64, 0, 329, 936 ), new CharMetrics( 278, 0, -37, 0, 316, 936 ),
+        new CharMetrics( 278, 0, -21, 0, 300, 915 ), new CharMetrics( 722, 0, -5, 0, 685, 718 ),
+        new CharMetrics( 722, 0, 69, 0, 654, 923 ), new CharMetrics( 778, 0, 44, -19, 734, 936 ),
+        new CharMetrics( 778, 0, 44, -19, 734, 936 ), new CharMetrics( 778, 0, 44, -19, 734, 936 ),
+        new CharMetrics( 778, 0, 44, -19, 734, 923 ), new CharMetrics( 778, 0, 44, -19, 734, 915 ),
+        new CharMetrics( 584, 0, 40, 1, 545, 505 ), new CharMetrics( 778, 0, 33, -27, 744, 745 ),
+        new CharMetrics( 722, 0, 72, -19, 651, 936 ), new CharMetrics( 722, 0, 72, -19, 651, 936 ),
+        new CharMetrics( 722, 0, 72, -19, 651, 936 ), new CharMetrics( 722, 0, 72, -19, 651, 915 ),
+        new CharMetrics( 667, 0, 15, 0, 653, 936 ), new CharMetrics( 667, 0, 76, 0, 627, 718 ),
+        new CharMetrics( 611, 0, 69, -14, 579, 731 ), new CharMetrics( 556, 0, 29, -14, 527, 750 ),
+        new CharMetrics( 556, 0, 29, -14, 527, 750 ), new CharMetrics( 556, 0, 29, -14, 527, 750 ),
+        new CharMetrics( 556, 0, 29, -14, 527, 737 ), new CharMetrics( 556, 0, 29, -14, 527, 729 ),
+        new CharMetrics( 556, 0, 29, -14, 527, 776 ), new CharMetrics( 889, 0, 29, -14, 858, 546 ),
+        new CharMetrics( 556, 0, 34, -228, 524, 546 ), new CharMetrics( 556, 0, 23, -14, 528, 750 ),
+        new CharMetrics( 556, 0, 23, -14, 528, 750 ), new CharMetrics( 556, 0, 23, -14, 528, 750 ),
+        new CharMetrics( 556, 0, 23, -14, 528, 729 ), new CharMetrics( 278, 0, -50, 0, 209, 750 ),
+        new CharMetrics( 278, 0, 69, 0, 329, 750 ), new CharMetrics( 278, 0, -37, 0, 316, 750 ),
+        new CharMetrics( 278, 0, -21, 0, 300, 729 ), new CharMetrics( 611, 0, 34, -14, 578, 737 ),
+        new CharMetrics( 611, 0, 65, 0, 546, 737 ), new CharMetrics( 611, 0, 34, -14, 578, 750 ),
+        new CharMetrics( 611, 0, 34, -14, 578, 750 ), new CharMetrics( 611, 0, 34, -14, 578, 750 ),
+        new CharMetrics( 611, 0, 34, -14, 578, 737 ), new CharMetrics( 611, 0, 34, -14, 578, 729 ),
+        new CharMetrics( 584, 0, 40, -42, 544, 548 ), new CharMetrics( 611, 0, 22, -29, 589, 560 ),
+        new CharMetrics( 611, 0, 66, -14, 545, 750 ), new CharMetrics( 611, 0, 66, -14, 545, 750 ),
+        new CharMetrics( 611, 0, 66, -14, 545, 750 ), new CharMetrics( 611, 0, 66, -14, 545, 729 ),
+        new CharMetrics( 556, 0, 10, -214, 539, 750 ), new CharMetrics( 611, 0, 62, -208, 578, 718 ),
+        new CharMetrics( 556, 0, 10, -214, 539, 729 )};
+
+    public SansSerifBold()
+    {
+        super( false, 718, -207, new CharMetrics( 0, 0, -170, -228, 1003, 962 ), metrics );
+    }
+
+}

Propchange: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerifBold.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerifBold.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"