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
String memberName, boolean cdata, boolean withoutName )
	{
		StructureDefn structDefn = (StructureDefn) struct.getDefn( );
		assert structDefn != null;
		StructPropertyDefn propDefn = (StructPropertyDefn) structDefn
				.getMember( memberName );
		assert propDefn != null;
		Object value = struct.getLocalProperty( getModule( ), propDefn );
		if ( value == null )
			return;
		String xml = propDefn.getXmlValue( getModule( ), value );
		if ( xml == null )
			return;
		if ( propDefn.isEncryptable( ) )
		{
			IEncryptionHelper helper = MetaDataDictionary.getInstance( )
					.getEncryptionHelper( );
			xml = helper.encrypt( xml );
		}
		if ( tag == null )
			tag = getTagByPropertyType( propDefn );
		if ( propDefn.getTypeCode( ) == PropertyType.SCRIPT_TYPE )
			cdata = true;
		if ( withoutName )
			writeEntry( tag, null, xml, cdata );
		else
			writeEntry( tag, memberName, xml, cdata );
	}
	/**
	 * Writes the resource key entry.