예제 #1
0
 protected void saveAndClose(
     OfficeResourceProvider ooResourceProvider,
     XComponent xComponent,
     ReportOutputType outputType,
     OutputStream outputStream)
     throws IOException {
   OfficeOutputStream ooos = new OfficeOutputStream(outputStream);
   String filterName;
   if (ReportOutputType.pdf.equals(outputType)) {
     filterName = PDF_OUTPUT_FILE;
   } else {
     filterName = MS_WORD_OUTPUT_FILE;
   }
   ooResourceProvider.saveXComponent(xComponent, ooos, filterName);
   ooResourceProvider.closeXComponent(xComponent);
 }
예제 #2
0
 protected void loadDocument(OfficeResourceProvider ooResourceProvider)
     throws com.sun.star.lang.IllegalArgumentException, IOException {
   xComponent = ooResourceProvider.loadXComponent(reportTemplate.getDocumentContent());
   officeComponent = new OfficeComponent(ooResourceProvider, xComponent);
 }