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
private String getChartFormats()
	{
		IRenderOption renderOption = context.getRenderOption( );
		String formats = renderOption.getSupportedImageFormats( );
		if ( formats != null )
		{
			return formats;
		}
		return "PNG;GIF;JPG;BMP;"; 
	}
	private String getImageCacheID( IContent content )
	{
		StringBuffer buffer = new StringBuffer( );
		buffer.append( content.getInstanceID( ).toUniqueString( ) );
		buffer.append( getChartResolution( ) );
		buffer.append( getChartFormats( ) );
		buffer.append( locale );
		return buffer.toString( );
	}
	
	private IContent processCachedImage( IForeignContent content,
			CachedImage cachedImage )
	{
		IImageContent imageObj = getReportContent( ).createImageContent(
				content );
		imageObj.setParent( content.getParent( ) );
		
		imageObj.setImageSource( IImageContent.IMAGE_FILE );
		imageObj.setURI( cachedImage.getURL( ) );
		imageObj.setMIMEType( cachedImage.getMIMEType( ) );