if (Thread.interrupted())
{
throw new JRException("Current thread interrupted.");
}
JRPrintPage page = (JRPrintPage)pages.get(pageIndex);
createSheet(getSheetName(null));
// we need to count all sheets generated for all exported documents
sheetIndex++;
sheetNamesIndex++;
/* */
exportPage(page, /*xCuts*/null, /*startRow*/0);
}
}
else
{
// Create the sheet before looping.
createSheet(getSheetName(jasperPrint.getName()));
// we need to count all sheets generated for all exported documents
sheetIndex++;
sheetNamesIndex++;
/*
* Make a pass and calculate the X cuts for all pages on this sheet.
* The Y cuts can be calculated as each page is exported.
*/
CutsInfo xCuts =
JRGridLayout.calculateXCuts(
getNature(), pages, startPageIndex, endPageIndex,
jasperPrint.getPageWidth(), globalOffsetX
);
//clear the filter's internal cache that might have built up
if (filter instanceof ResetableExporterFilter)
{
((ResetableExporterFilter)filter).reset();
}
int startRow = 0;
for(pageIndex = startPageIndex; pageIndex <= endPageIndex; pageIndex++)
{
if (Thread.interrupted())
{
throw new JRException("Current thread interrupted.");
}
JRPrintPage page = (JRPrintPage)pages.get(pageIndex);
startRow = exportPage(page, xCuts, startRow);
}
if (isRemoveEmptySpaceBetweenColumns)
{