StringBuffer styleBuffer = new StringBuffer( ); String reportStyleName = report == null ? null : report.getDesign( ) .getRootStyleName( );
writer.openTag( HTMLTags.TAG_DIV );
	public void startPage( IPageContent page )	{		StringBuffer styleBuffer = new StringBuffer( );		String reportStyleName = report == null ? null : report.getDesign( )				.getRootStyleName( );		IStyle contentStyle = page == null ? null : page.getContentStyle( );		if ( !isEmbeddable )		{			writer.openTag( HTMLTags.TAG_BODY );			if ( reportStyleName != null )			{				writer.attribute( HTMLTags.ATTR_CLASS, reportStyleName );			}			if ( contentStyle != null )			{				AttributeBuilder.buildStyle( styleBuffer, contentStyle, this );				writer.attribute( HTMLTags.ATTR_STYLE, styleBuffer.toString( ) );			}		}		else		{			writer.openTag( HTMLTags.TAG_DIV );			if ( reportStyleName != null )			{				AttributeBuilder.buildStyle( styleBuffer, report						.findStyle( reportStyleName ), this );				writer.attribute( HTMLTags.ATTR_STYLE, styleBuffer.toString( ) );			}			writer.openTag( HTMLTags.TAG_DIV );			if ( contentStyle != null )			{				// clear the buffer				styleBuffer.setLength( 0 );				AttributeBuilder.buildStyle( styleBuffer, contentStyle, this );				writer.attribute( HTMLTags.ATTR_STYLE, styleBuffer.toString( ) );			}		}		if ( page != null )		{			contentVisitor.visitList( page.getHeader( ), null );		}	}