Bug 212109 [Automation][Acceptance]NPE is thrown out when previewing report
Description: NPE is thrown out when preview Test Date: 20071206 Test Build: BIRT2.3.0 Daily Build: v20071206-1112 Step to reproduce: 1. Use the report attached 2. Preview it
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/presentation/LocalizedContentVisitor.java
dataContent.setValue( rawValue );
			processData( dataContent );
			return dataContent;
		}
		return foreignContent;
	}
	/**
	 * localzie the text.
	 * 
	 * @param key
	 *            text key
	 * @param text
	 *            default text
	 * @return localized text.
	 */
	private String localize( IContent content, String key, String text )
	{
		assert ( content != null );
		if ( content.getGenerateBy( ) != null )
		{
			DesignElementHandle element = ( (ReportItemDesign) content
					.getGenerateBy( ) ).getHandle( );
			if ( key != null && element != null )
			{
				String t = ModuleUtil.getExternalizedValue( element, key, text,
						ULocale.forLocale( locale ) );
				if ( t != null )
				{
					return t;
				}