*/
protected void exportReportToOasisZip(OutputStream os) throws JRException, IOException
{
OasisZip oasisZip = new FileBufferedOasisZip(((JROpenDocumentExporterNature)nature).getOpenDocumentNature());
ExportZipEntry tempBodyEntry = new FileBufferedZipEntry(null);
ExportZipEntry tempStyleEntry = new FileBufferedZipEntry(null);
tempBodyWriter = tempBodyEntry.getWriter();
tempStyleWriter = tempStyleEntry.getWriter();
styleCache = new StyleCache(tempStyleWriter, fontMap, getExporterKey());
Writer stylesWriter = oasisZip.getStylesEntry().getWriter();
StyleBuilder styleBuilder = new StyleBuilder(jasperPrintList, stylesWriter);
styleBuilder.build();
stylesWriter.close();
for(reportIndex = 0; reportIndex < jasperPrintList.size(); reportIndex++)
{
setJasperPrint((JasperPrint)jasperPrintList.get(reportIndex));
List pages = jasperPrint.getPages();
if (pages != null && pages.size() > 0)
{
if (isModeBatch)
{
startPageIndex = 0;
endPageIndex = pages.size() - 1;
}
JRPrintPage page = null;
for(pageIndex = startPageIndex; pageIndex <= endPageIndex; pageIndex++)
{
if (Thread.interrupted())
{
throw new JRException("Current thread interrupted.");
}
page = (JRPrintPage)pages.get(pageIndex);
exportPage(page);
}
}
}
tempBodyWriter.flush();
tempStyleWriter.flush();
tempBodyWriter.close();
tempStyleWriter.close();
/* */
ContentBuilder contentBuilder =
new ContentBuilder(
oasisZip.getContentEntry(),
tempStyleEntry,
tempBodyEntry,
styleCache.getFontFaces(),
((JROpenDocumentExporterNature)nature).getOpenDocumentNature()
);
contentBuilder.build();
tempStyleEntry.dispose();
tempBodyEntry.dispose();
if ((imagesToProcess != null && imagesToProcess.size() > 0))
{
for(Iterator it = imagesToProcess.iterator(); it.hasNext();)