Bug 198221 Different master page when export report current page to different format.[05]
Description: Different master page when export report current page to different format. Build number:2.2.1.v200707270630 Steps to reproduce: 1. Preview attached report in Web Viewer. (the report uses multiple master page) 2. Jump to the third page. 3. Export report, select current page, select different formats. Expected result: All formats apply the same master page for the third page. Actual result: In pdf/ps, Master page content is page number in page header. In word/ppt, Master page content is current date in page footer. Error log:n/a
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/presentation/ReportDocumentBuilder.java
import org.eclipse.birt.report.engine.layout.CompositeLayoutPageHandler;
import org.eclipse.birt.report.engine.layout.ILayoutPageHandler;
import org.eclipse.birt.report.engine.layout.IReportLayoutEngine;
import org.eclipse.birt.report.engine.layout.LayoutEngineFactory;
import org.eclipse.birt.report.engine.layout.html.HTMLLayoutContext;
import org.eclipse.birt.report.engine.toc.TOCTree;
/**
 * Used in run task. To builder the report document.
 * 
 * In builder, will call IReportLayoutEngine to lay out the report and create
 * the document. This means write page hint, page contents and all body contents
 * to the document. And in each page closing, we will call page handler's
 * onPage() to do some sepcial process, like write the current page's page hint,
 * evaluate the OnpageBreak script, reset the page row count to be 0 in layout
 * engine.
 * 
 * Here are several main fields used in this class: CompositeContentEmitter,
 * composite two emitters: PageEmitter: used to write the the master page
 * content OnPageBreakHandler.PageContentEmitter: used to collect the page mode
 * which is used to call onPageBreak. CompositeLayoutPageHandler, composite
 * three page handler: LayoutPageHandler: used to write the page hint, created
 * by the handler. OnPageBreakLayoutPageHandle: used to call the onPageBreak
 * script, collected by its PageContentEmitter. ContextPageBreakHandler: used to
 * call the onPageBreak of IPageBreakListener to reset the page row count.
 * IContentEmitter: ContentEmitter: used to write the content stream.
 * IPageHandler: used to recevie the document page events, mostly implemented by
 * user.
 * 
 */
public class ReportDocumentBuilder