Bug 192796 In pdf xtab move to next page with a label before it.[1102]
Description: In pdf xtab move to next page with a label before it. Build number:2.2.0.v20070615 Steps to reproduce: 1. Open attached xtab report. 2. Preview in pdf. 3. Remove the label item and preview in pdf again. Expected result: A label before the xtab will not cause the whole xtab moving to the second page. Actual result: In step2, xtab displays in the second page. In step3, xtab displays in the first page. Error log:n/a
engine/org.eclipse.birt.report.engine.tests/test/org/eclipse/birt/report/engine/layout/pdf/PDFTableLMTest.java
{
		String designFile = "org/eclipse/birt/report/engine/layout/pdf/176794.xml";
		IReportRunnable report = openReportDesign( designFile );
		List pageAreas = getPageAreas( report );
		
		
		PageArea page = (PageArea)pageAreas.get( 0 );
		Iterator children = page.getBody( ).getChildren( );
		TableArea table1 = (TableArea)children.next( );
		TableArea table2 = (TableArea)children.next( );
		assertEquals( 17847, table1.getHeight( ) );
		assertEquals( 17847, table2.getY( ) );
	}
	
	
	private void validateColumnWidth(TableArea table, int[] cols)
	{
		assertTrue(table!=null);
		assertTrue(table.getChildrenCount( )>0);
		RowArea row = (RowArea)table.getChildren( ).next( );
		Iterator iter = row.getChildren( );
		for(int i=0; i<cols.length; i++)
		{
			CellArea cell = (CellArea)iter.next();
			assertEquals(new Integer(cols[i]), new Integer((cell.getWidth()+499)/1000));
		}
			
	}
	
}