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
* 
	 * @param outputFile
	 *            output file into which to write the design
	 * 
	 * @throws IOException
	 *             if a write error occurs
	 */
	public void write( File outputFile ) throws IOException
	{
		writer = new IndentableXMLWriter( outputFile, getModule( )
				.getUTFSignature( ) );
		writeFile( );
		writer.close( );
	}
	/**
	 * Writes the report design to the output stream.
	 * 
	 * @param os
	 *            the output stream to which the design is written.
	 * @throws IOException
	 *             if a write error occurs.
	 */
	public void write( OutputStream os ) throws IOException
	{
		writer = new IndentableXMLWriter( os, getModule( ).getUTFSignature( ) );
		writeFile( );
	}
	/**
	 * Implementation method to write the file header and contents.
	 */