package org.eclipse.birt.report.engine.emitter.excel.layout;

import org.eclipse.birt.report.engine.emitter.excel.StyleEntry;


public class XlsTable extends XlsContainer
{
	private int[] columns;
	
	public XlsTable(StyleEntry entry, Rule rule)
	{
		super(entry, rule);
	}
	
	public XlsTable(TableInfo table, StyleEntry entry, Rule rule)
	{
		this(entry, rule);
		this.columns = LayoutUtil.getColumnWidth( table, rule.getWidth( ) );
	}
	
	public XlsTable(TableInfo table, XlsContainer container)
	{
		this(table, container.getStyle( ), container.getRule( ));
	}
	
	public boolean isEmpty()
	{
		return false;
	}
	
	public Rule getColumnRule(int column, int span)
	{
		int sp = getRule().getStart( );
		
		for(int i = 0; i < column; i++)
		{
			sp += columns[i];
		}	
		
		int sw = 0;
		
		for(int i = column; i < column + span; i++)
		{
			sw += columns[i];
		}	
		
		return new Rule(sp, sw);
	}	
}

@@ -561,58 +561,8 @@
 %7D%0A%09%0A
-%09public boolean isEmpty()%0A%09%7B%0A%09%09return false;%0A%09%7D%0A%09%0A
 %09pub

Fix Bug 204238 Can process a special case that a table content is empty and it doesn't have any row or cell.