Bug 192171 Layout still display css style from library after removing library.[01]
Description: Layout still display css style from library after removing library. Build number:2.2.0.v20070612 Steps to reproduce: 1. Add a css file in Library Explorer 2. New a library file. 3. Use css file in library default theme. 4. New a report and use the library. 5. Insert a label and apply the style from library. 6. Remove the library in report Outline. Expected result: Style effect disappears from label in Layout. Actual result: Label in Layout still displays the style effect. Error log:N/A
model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/library/LibraryThemeTest.java
public void testChangeTheme( ) throws Exception
	{
		openDesign( "LibraryThemeTest_ChangeTheme.xml" ); 
		LabelHandle labelHandle = (LabelHandle) designHandle
				.findElement( "label" );
		assertEquals( "left", labelHandle.getStyle( ).getTextAlign( ) );
		LibraryHandle libHandle = designHandle
				.getLibrary( "LibraryThemeTest_TwoTheme" );;
		ThemeHandle themeHandle = (ThemeHandle) libHandle.getThemes( ).get( 1 );
		assertEquals( "theme2", themeHandle.getName( ) );;
		
		designHandle.setTheme( themeHandle );
		assertEquals( "center", labelHandle.getStyle( ).getTextAlign( ) );
	}
	/**
	 * Tests how to resolve a style element. The path is: local custom style ->
	 * library custom style -> library selector -> selector in the module.
	 * 
	 * @throws Exception
	 */
	public void testGetProperty( ) throws Exception
	{
		openDesign( "DesignWithThemeInLibrary.xml" ); 
		LabelHandle label1 = (LabelHandle) designHandle.findElement( "label1" ); 
		LabelHandle label2 = (LabelHandle) designHandle.findElement( "label2" ); 
		LabelHandle label3 = (LabelHandle) designHandle.findElement( "label3" ); 
		ListHandle list1 = (ListHandle) designHandle.findElement( "list1" ); 
		assertEquals( ColorPropertyType.SILVER, label1
				.getProperty( Style.COLOR_PROP ) );
		assertEquals( ColorPropertyType.LIME, label2