String reportStyleName = report == null ? null : report.getDesign( ) .getRootStyleName( ); if ( !isEmbeddable ) { writer.openTag( HTMLTags.TAG_BODY ); if ( reportStyleName != null ) { writer.attribute( HTMLTags.ATTR_CLASS, reportStyleName ); } } else { writer.openTag( HTMLTags.TAG_DIV ); if ( reportStyleName != null ) { AttributeBuilder.buildStyle( styleBuffer, report .findStyle( reportStyleName ), this ); writer.attribute( HTMLTags.ATTR_STYLE, styleBuffer.toString( ) ); } }
	public void start( IReportContent report )	{		logger.log( Level.FINE, "[HTMLReportEmitter] Start emitter." ); //$NON-NLS-1$		this.report = report;		writer.open( out, "UTF-8" ); //$NON-NLS-1$		if ( isEmbeddable )		{			fixTransparentPNG( );			return;		}		writer.startWriter( );		writer.openTag( HTMLTags.TAG_HTML );		writer.openTag( HTMLTags.TAG_HEAD );		writer.openTag( HTMLTags.TAG_META );		writer.attribute( HTMLTags.ATTR_HTTP_EQUIV, "Content-Type" ); //$NON-NLS-1$ 		writer.attribute( HTMLTags.ATTR_CONTENT, "text/html; charset=UTF-8" ); //$NON-NLS-1$ 		writer.closeNoEndTag( );		writer.openTag( HTMLTags.TAG_STYLE );		writer.attribute( HTMLTags.ATTR_TYPE, "text/css" ); //$NON-NLS-1$		// output general styles		writer.style(				"*", "text-decoration: none; vertical-align: baseline;", true ); //$NON-NLS-1$ //$NON-NLS-2$ 		writer.style(				"table", "border-collapse: collapse; empty-cells: show;", true ); //$NON-NLS-1$ //$NON-NLS-2$ 		writer.style( ":link, :visited", "text-decoration: underline;", true ); //$NON-NLS-1$ //$NON-NLS-2$ 		IStyle style;		StringBuffer styleBuffer = new StringBuffer( );		if ( report == null )		{			logger.log( Level.WARNING,					"[HTMLReportEmitter] Report object is null." ); //$NON-NLS-1$		}		else		{			Report reportDesign = report.getDesign( );			Iterator itor = reportDesign.getStyleSet( ).iterator( );			if ( itor != null )			{				while ( itor.hasNext( ) )				{					styleBuffer.delete( 0, styleBuffer.capacity( ) );					Entry entry = (Entry) itor.next( );					style = (IStyle) entry.getValue( );					AttributeBuilder.buildStyle( styleBuffer, style, this );					writer.style( entry.getKey( ).toString( ), styleBuffer							.toString( ), false );				}			}		}		writer.closeTag( HTMLTags.TAG_STYLE );		fixTransparentPNG( );		writer.closeTag( HTMLTags.TAG_HEAD );	}