Bug 148747 Design become invalid when I extend a masterpage from Library
The attachment contains a report file and a library file. Reproduce: 1. Deploy the library("lib"), and open the report. 2. Drag Masterpage("page1") from "lib" to report. 3. Reopen the report, it become invalid.
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/ModuleWriter.java
private void writeFile( )
	{
		boundColumnsMgr = new BoundColumnsWriterMgr( getModule( )
				.getVersionManager( ).getVersion( ) );
		writer.literal( "<!-- Written by Eclipse BIRT 2.0 -->\r\n" ); 
		getModule( ).apply( this );
		getModule( ).getVersionManager( ).setVersion(
				DesignSchemaConstants.REPORT_VERSION );
	}
	/**
	 * Write an XML attribute from an element property.
	 * 
	 * @param obj
	 *            the element that has the property
	 * @param attr
	 *            the XML attribute name
	 * @param propName
	 *            the name of the property to write
	 */
	protected void attribute( DesignElement obj, String attr, String propName )
	{
		ElementPropertyDefn prop = obj.getPropertyDefn( propName );
		assert prop != null;
		Object value = obj.getLocalProperty( getModule( ), prop );
		if ( value == null )
			return;
		String xml = prop.getXmlValue( getModule( ), value );
		if ( xml == null )
			return;
		writer.attribute( attr, xml );