cellFilled = true;
	public void startForeign( IForeignContent foreign )	{		IStyle mergedStyle = foreign.getStyle( );		if ( peek( mergedStyle ) )		{			return;		}		logger.log( Level.FINE, "[HTMLReportEmitter] Start foreign" ); //$NON-NLS-1$		resizeTemplateElement( foreign);				StringBuffer styleBuffer = new StringBuffer( );		DimensionType x = foreign.getX( );		DimensionType y = foreign.getY( );		DimensionType width = foreign.getWidth( );		DimensionType height = foreign.getHeight( );		int display;		display = checkElementType( x, y, width, height, mergedStyle,				styleBuffer );		// create default bookmark if we need output metadata		if ( foreign.getGenerateBy( ) instanceof TemplateDesign )		{			//FIXME: actually, it should be birt-template-design			String bookmark = foreign.getBookmark( );			if ( bookmark == null )			{				bookmark = idGenerator.generateUniqueID( );				foreign.setBookmark( bookmark );			}		}		// action		String tagName;		String url = validate( foreign.getHyperlinkAction( ) );		boolean metadataOutput = false;		if ( url != null )		{			if ( enableMetadata )			{				metadataOutput = metadataEmitter.startForeign( foreign,						HTMLTags.TAG_SPAN );			}			tagName = HTMLTags.TAG_A;			outputAction( foreign.getHyperlinkAction( ), url );			setDisplayProperty( display, DISPLAY_BLOCK | DISPLAY_INLINE_BLOCK,					styleBuffer );			AttributeBuilder.checkHyperlinkTextDecoration( mergedStyle,					styleBuffer );		}		else		{			if ( enableMetadata )			{				metadataOutput = metadataEmitter.startForeign( foreign, HTMLEmitterUtil.getTagByType(						display, DISPLAY_FLAG_ALL ) );			}			tagName = openTagByType( display, DISPLAY_FLAG_ALL );			setDisplayProperty( display, DISPLAY_INLINE_BLOCK, styleBuffer );		}		setStyleName( foreign.getStyleClass( ) );		// bookmark		if ( !metadataOutput )		{			outputBookmark( foreign, tagName );		}		// title		writer.attribute( HTMLTags.ATTR_TITLE, foreign.getHelpText( ) );								if( isTalbeTemplateElement( foreign ) )		{			//set lines to dotted lines			mergedStyle.setProperty( IStyle.STYLE_BORDER_TOP_STYLE, IStyle.DOTTED_VALUE );			mergedStyle.setProperty( IStyle.STYLE_BORDER_BOTTOM_STYLE, IStyle.DOTTED_VALUE );			mergedStyle.setProperty( IStyle.STYLE_BORDER_LEFT_STYLE, IStyle.DOTTED_VALUE );			mergedStyle.setProperty( IStyle.STYLE_BORDER_RIGHT_STYLE, IStyle.DOTTED_VALUE );			mergedStyle.setProperty( IStyle.STYLE_FONT_FAMILY, IStyle.SANS_SERIF_VALUE );		}		String textAlign = foreign.getComputedStyle( ).getTextAlign( );		if ( textAlign != null )		{			styleBuffer.append( " text-align:" );			styleBuffer.append( textAlign );			styleBuffer.append( ";" );		}		// check 'can-shrink' property		handleShrink( display, mergedStyle, height, width, styleBuffer );		handleStyle( foreign, styleBuffer, false );		String rawType = foreign.getRawType( );		boolean isHtml = IForeignContent.HTML_TYPE.equalsIgnoreCase( rawType );		if ( isHtml )		{			String verticalAlign = mergedStyle.getVerticalAlign( );			if ( !"baseline".equals( verticalAlign ) && height != null )			{				// implement vertical align.				writer.openTag( HTMLTags.TAG_TABLE );				writer.attribute( HTMLTags.ATTR_STYLE, " width:100%; height:100%;" );				writer.openTag( HTMLTags.TAG_TR );				writer.openTag( HTMLTags.TAG_TD );				StringBuffer textStyleBuffer = new StringBuffer( );				textStyleBuffer.append( " vertical-align:" );				textStyleBuffer.append( verticalAlign );				textStyleBuffer.append( ";" );				writer.attribute( HTMLTags.ATTR_STYLE, textStyleBuffer );				outputHtmlText(foreign);				writer.closeTag( HTMLTags.TAG_TD );				writer.closeTag( HTMLTags.TAG_TR );				writer.closeTag( HTMLTags.TAG_TABLE );			}			else			{				outputHtmlText( foreign);			}		}		// writer.text( text, !isHtml, !isHtml );		writer.closeTag( tagName );		if ( enableMetadata )		{			metadataEmitter.endForeign( foreign );		}	}