*/
protected LayoutController processContent(final ReportTarget target)
throws DataSourceException, ReportProcessingException,
ReportDataFactoryException
{
final OfficeReport or = (OfficeReport) getElement();
switch (state)
{
case OfficeReportLayoutController.STATE_NOT_STARTED:
{
return delegateToTemplates(OfficeReportLayoutController.STATE_TEMPLATES);
}
case OfficeReportLayoutController.STATE_TEMPLATES:
{
return delegateSection(or.getPageHeader(),
OfficeReportLayoutController.STATE_PAGE_HEADER_DONE);
}
case OfficeReportLayoutController.STATE_PAGE_HEADER_DONE:
{
return delegateSpreadsheetSection(or.getPageHeader(),
OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_HEADER_DONE);
}
case OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_HEADER_DONE:
{
return delegateSection(or.getPageFooter(),
OfficeReportLayoutController.STATE_PAGE_FOOTER_DONE);
}
case OfficeReportLayoutController.STATE_PAGE_FOOTER_DONE:
{
return delegateSection(or.getColumnHeader(),
OfficeReportLayoutController.STATE_COLUMN_HEADER_DONE);
}
case OfficeReportLayoutController.STATE_COLUMN_HEADER_DONE:
{
return delegateSection(or.getColumnFooter(),
OfficeReportLayoutController.STATE_COLUMN_FOOTER_DONE);
}
case OfficeReportLayoutController.STATE_COLUMN_FOOTER_DONE:
{
return delegateSection(new VariablesDeclarationSection(),
OfficeReportLayoutController.STATE_INITIAL_VARIABLES_DONE);
}
case OfficeReportLayoutController.STATE_INITIAL_VARIABLES_DONE:
{
return delegateSection(or.getReportHeader(),
OfficeReportLayoutController.STATE_REPORT_HEADER_DONE);
}
case OfficeReportLayoutController.STATE_REPORT_HEADER_DONE:
{
return delegateSection(or.getBodySection(),
OfficeReportLayoutController.STATE_REPORT_BODY_DONE);
}
case OfficeReportLayoutController.STATE_REPORT_BODY_DONE:
{
return delegateSection(new VariablesDeclarationSection(),
OfficeReportLayoutController.STATE_REPORT_FOOTER_VARIABLES);
}
case OfficeReportLayoutController.STATE_REPORT_FOOTER_VARIABLES:
{
return delegateSection(or.getReportFooter(),
OfficeReportLayoutController.STATE_REPORT_FOOTER_DONE);
}
case OfficeReportLayoutController.STATE_REPORT_FOOTER_DONE:
{
return delegateSpreadsheetSection(or.getPageFooter(),
OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_FOOTER_DONE);
}
case OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_FOOTER_DONE:
{
final OfficeReportLayoutController olc = (OfficeReportLayoutController) clone();