Bug 191696 WordUtil is getScreenResolution()-dependent
WordUtil class, in org.eclipse.birt.report.engine.emitter.wpml package, makes the following call to the getScreenResolution() method: public final static double INCH_PX = java.awt.Toolkit.getDefaultToolkit ( ).getScreenResolution ( ); which makes it dependent on Java runtime being non-headless. When run on JVM with -Djava.awt.headless=true, an java.awt.HeadlessException is thrown. It makes impossible to use BIRT on non-X Linux environment. Maybe there should be a default value of INCH_PX variable?
engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/WordUtil.java
if (DimensionType.UNITS_PERCENTAGE
				.equalsIgnoreCase ( value.getUnits ( ) ))
		{
			return (int) (prefValue * value.getMeasure ( ) / 100);
		}
		return (int) convertTo ( value );
	}
	public static double convertTo ( DimensionType value )
	{
		if (value == null
				|| DimensionType.UNITS_PERCENTAGE.equalsIgnoreCase ( value
						.getUnits ( ) ))
		{
			return -1;
		}
		if (DimensionType.UNITS_PX.equalsIgnoreCase ( value.getUnits ( ) ))
		{
			return value.getMeasure ( ) * PX_TWIPS;
		}
		double val = value.convertTo ( DimensionType.UNITS_IN );
		return  val * INCH_TWIPS;
	}
	
	public static int getWidth(int cw, IStyle style)
	{
		float left = WordUtil.getPadding ( style.getPaddingLeft ( ));
		float right = WordUtil.getPadding ( style.getPaddingRight ( ));
		
		if(left > cw)
		{