[OFBiz] SVN: r7004 - trunk/applications/content/src/org/ofbiz/content/openoffice
byersa@svn.ofbiz.org
byersa at svn.ofbiz.org
Thu Mar 16 13:37:15 CST 2006
Author: byersa
Date: 2006-03-16 13:37:13 -0600 (Thu, 16 Mar 2006)
New Revision: 7004
Modified:
trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeServices.java
Log:
A fix to make sure "reader" has a value.
Modified: trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeServices.java
===================================================================
--- trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeServices.java 2006-03-16 15:40:40 UTC (rev 7003)
+++ trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeServices.java 2006-03-16 19:37:13 UTC (rev 7004)
@@ -496,12 +496,14 @@
//TODO: Write a PDF that says that OO is not available?
}
}
- int n = reader.getNumberOfPages();
- for (int i=0; i < n; i++) {
- PdfImportedPage pg = writer.getImportedPage(reader, i + 1);
- //cb.addTemplate(pg, left, height * pgCnt);
- writer.addPage(pg);
- pgCnt++;
+ if (reader != null) {
+ int n = reader.getNumberOfPages();
+ for (int i=0; i < n; i++) {
+ PdfImportedPage pg = writer.getImportedPage(reader, i + 1);
+ //cb.addTemplate(pg, left, height * pgCnt);
+ writer.addPage(pg);
+ pgCnt++;
+ }
}
}
document.close();
More information about the Svn
mailing list