Bug 205593 ClassCastException in excel emitter
Build ID: 2.2.1 Steps To Reproduce: 1. export a design with a dynamic text (Ex: print: "Page "+ pageNumber) in excel format 2. 3. More information: It tries to cast a DynamicTextItemDesign into a DataItemDesign. Thanks Nicolas
engine/org.eclipse.birt.report.engine.emitter.prototype.excel/src/org/eclipse/birt/report/engine/emitter/excel/layout/ExcelLayoutEngine.java
Object value = dataContent.getValue( );
			String text = dataContent.getText( );
			
			
			if ( ( (DataItemDesign) dataContent.getGenerateBy( ) ).getMap( ) != null
					&& ( (DataItemDesign) dataContent.getGenerateBy( ) )
							.getMap( ).getRuleCount( ) > 0 )
			{
				entry.setProperty( StyleConstant.DATA_TYPE_PROP, Data.STRING );
				return new Data( text.trim(), entry, Data.STRING );
			}
			else if ( ExcelUtil.getType( value ).equals( Data.NUMBER ) )
			{
				String format = ExcelUtil.getPattern( value, entry
						.getProperty( StyleConstant.NUMBER_FORMAT_PROP ) );
				entry.setProperty( StyleConstant.NUMBER_FORMAT_PROP, format );
				entry.setProperty( StyleConstant.DATA_TYPE_PROP, Data.NUMBER );
				return new Data( value, entry, Data.NUMBER );
			}
			else if ( ExcelUtil.getType( value ).equals( Data.DATE ) )
			{
				String format = ExcelUtil.getPattern( value, entry
						.getProperty( StyleConstant.DATE_FORMAT_PROP ) );
				entry.setProperty( StyleConstant.DATE_FORMAT_PROP, format );
				entry.setProperty( StyleConstant.DATA_TYPE_PROP, Data.DATE );
				return new Data( value, entry, Data.DATE );
			}
			entry.setProperty( StyleConstant.DATA_TYPE_PROP, Data.STRING );
			return new Data( text.trim( ), entry, Data.STRING );
		}