Bug 189813 After modify a wrong preview report, when preview in Web viewer it can not process the document file[1102]
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/ReportDocumentWriter.java
import org.eclipse.birt.report.model.api.ReportDesignHandle;
import org.eclipse.birt.report.model.api.util.DocumentUtil;
/**
 * 
 */
public class ReportDocumentWriter implements ReportDocumentConstants
{
	static private Logger logger = Logger.getLogger( ReportDocumentWriter.class
			.getName( ) );
	
	protected IReportEngine engine;
	private IDocArchiveWriter archive;
	private String designName;
	private HashMap paramters = new HashMap( );
	private HashMap globalVariables = new HashMap( );
	private int checkpoint = CHECKPOINT_INIT;
	private long pageCount = PAGECOUNT_INIT;
	
	private HashMap bookmarks = new HashMap( );
	private TOCTree tocTree = null;
	private HashMap idToOffset = new HashMap( );
	private HashMap bookmarkToOffset = new HashMap( );
	public ReportDocumentWriter( IReportEngine engine, IDocArchiveWriter archive )
	{
		this.engine = engine;
		this.archive = archive;
		try
		{
			archive.initialize( );
			Object lock = archive.lock( CORE_STREAM );