if ( IForeignContent.HTML_TYPE.equals( rawFormat ) ) { TextItemScriptExecutor.handleOnRender( foreignContent, context ); String htmlText = (String)foreignContent.getRawValue( ); String text = localize( foreignContent, foreignContent.getRawKey( ), htmlText); foreignContent.setRawValue(  text ); return foreignContent; }
	public Object visitForeign( IForeignContent foreignContent, Object value )	{		IReportContent reportContent = getReportContent( );				String rawFormat = foreignContent.getRawType( );		Object rawValue = foreignContent.getRawValue( );		if ( IForeignContent.TEMPLATE_TYPE.equals( rawFormat ) )		{			TextItemScriptExecutor.handleOnRender( foreignContent, context );			processTemplateContent( foreignContent );			return foreignContent;		}				if ( IForeignContent.EXTERNAL_TYPE.equals( rawFormat ) )		{			return processExtendedContent( foreignContent );		}				if ( IForeignContent.IMAGE_TYPE.equals( rawFormat ) )		{			if ( rawValue instanceof IImageContent )			{				IImageContent image = (IImageContent) rawValue;				processImage( image );				return image;			}			if ( rawValue instanceof byte[] )			{				IImageContent imageContent = reportContent						.createImageContent( foreignContent );				imageContent.setImageSource( IImageContent.IMAGE_EXPRESSION );				imageContent.setData( (byte[]) rawValue );				processImage( imageContent );				return imageContent;			}		}				if ( IForeignContent.TEXT_TYPE.equals( rawFormat ) )		{			TextItemScriptExecutor.handleOnRender( foreignContent, context );			ITextContent textContent = reportContent					.createDataContent( foreignContent );			textContent.setText( rawValue == null ? "" : rawValue.toString( ) ); //$NON-NLS-1$			return textContent;		}				if ( IForeignContent.VALUE_TYPE.equals( rawFormat ) )		{			DynamicTextScriptExecutor.handleOnRender( foreignContent, context );			IDataContent dataContent = reportContent					.createDataContent( foreignContent );			dataContent.setValue( rawValue );			processData( dataContent );			return dataContent;		}		return foreignContent;	}