Bug 340767 Fail to generate concurrent reports containing CRLF and <BR>
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/nLayout/area/impl/TextCompositor.java
return -1;
		}
		int last = 0;
		int current = 0;
		for ( int i = startIndex + 1; i < hyphenation.length( ); i++ )
		{
			last = current;
			String pre = hyphenation.getHyphenText( startIndex, i );
			current = (int) ( fi.getWordWidth( pre ) * PDFConstants.LAYOUT_TO_PDF_RATIO )
					+ textStyle.getLetterSpacing( ) * pre.length( );
			if ( width > last && width <= current )
			{
				return i - 1;
			}
		}
		return hyphenation.length( ) - 1;
	}
	private int getTextWidth( FontInfo fontInfo, String text )
	{
		return (int) ( fontInfo.getWordWidth( text ) * PDFConstants.LAYOUT_TO_PDF_RATIO );
	}
	private int getWordWidth( FontInfo fontInfo, Word word )
	{
		return getTextWidth( fontInfo, word.getValue( ) );
	}
	private void addWord( TextArea textArea, int textLength, int wordWidth )
	{
		textArea.addWord( textLength, wordWidth );
	}
}