Bug 198356 Width of report item does not take effect in Layout [03]
Description: Width of report item does not take effect in Layout. Build number: 2.2.1.v20070731-0928 Steps to reproduce: 1. New a report with a label. 2. Add all borders for the label, set Width and Height both to 3 in. Expected result: Both width and height settings take effect. Actual result: Only height setting takes effect. Error log: N/A
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/schematic/figures/LabelFigure.java
private static int getMinimumFontSize( Font ft )
	{
		if ( ft != null && ft.getFontData( ).length > 0 )
		{
			return ft.getFontData( )[0].getHeight( );
		}
		return 0;
	}
	/**
	 * Since Eclipse TextFlow figure ignore the trailing /r/n for calculating
	 * the client size, we must append the extra size ourselves.
	 * 
	 * @return dimension for the client area used by the editor.
	 */
	public Rectangle getEditorArea() {
		Rectangle rect = getClientArea().getCopy();
		String s = getText();
		int count = 0;
		if (s != null && s.length() > 1) {
			for (int i = s.length() - 2; i >= 0; i -= 2) {
				if ("\r\n".equals(s.substring(i, i + 2))) 
				{
					count++;
				} else {
					break;
				}
			}
		}
		int hh = getMinimumFontSize(getFont());
		rect.height += count * hh + ((count == 0) ? 0 : (hh / 2));