You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2009/02/16 11:10:39 UTC
svn commit: r744874 - in
/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src:
java/org/apache/fop/render/afp/ java/org/apache/fop/render/bitmap/
java/org/apache/fop/render/intermediate/ java/org/apache/fop/render/pcl/
java/org/apache/fop/render/pdf/ j...
Author: jeremias
Date: Mon Feb 16 10:10:38 2009
New Revision: 744874
URL: http://svn.apache.org/viewvc?rev=744874&view=rev
Log:
Fixed copy/paste mistakes.
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandler.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractBinaryWritingIFDocumentHandler.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializer.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSDocumentHandler.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java?rev=744874&r1=744873&r2=744874&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java Mon Feb 16 10:10:38 2009
@@ -128,14 +128,8 @@
/** {@inheritDoc} */
public void startDocument() throws IFException {
+ super.startDocument();
try {
- if (getUserAgent() == null) {
- throw new IllegalStateException(
- "User agent must be set before starting PostScript generation");
- }
- if (this.outputStream == null) {
- throw new IllegalStateException("OutputStream hasn't been set through setResult()");
- }
paintingState.setColor(Color.WHITE);
this.dataStream = resourceManager.createDataStream(paintingState, outputStream);
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandler.java?rev=744874&r1=744873&r2=744874&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandler.java Mon Feb 16 10:10:38 2009
@@ -111,15 +111,8 @@
/** {@inheritDoc} */
public void startDocument() throws IFException {
+ super.startDocument();
try {
- if (getUserAgent() == null) {
- throw new IllegalStateException(
- "User agent must be set before starting PDF generation");
- }
- if (this.outputStream == null) {
- throw new IllegalStateException("OutputStream hasn't been set through setResult()");
- }
-
// Creates writer
this.imageWriter = ImageWriterRegistry.getInstance().getWriterFor(getMimeType());
if (this.imageWriter == null) {
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractBinaryWritingIFDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractBinaryWritingIFDocumentHandler.java?rev=744874&r1=744873&r2=744874&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractBinaryWritingIFDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractBinaryWritingIFDocumentHandler.java Mon Feb 16 10:10:38 2009
@@ -107,6 +107,14 @@
}
/** {@inheritDoc} */
+ public void startDocument() throws IFException {
+ super.startDocument();
+ if (this.outputStream == null) {
+ throw new IllegalStateException("OutputStream hasn't been set through setResult()");
+ }
+ }
+
+ /** {@inheritDoc} */
public void endDocument() throws IFException {
if (this.ownOutputStream) {
IOUtils.closeQuietly(this.outputStream);
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java?rev=744874&r1=744873&r2=744874&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java Mon Feb 16 10:10:38 2009
@@ -64,6 +64,14 @@
}
/** {@inheritDoc} */
+ public void startDocument() throws IFException {
+ if (getUserAgent() == null) {
+ throw new IllegalStateException(
+ "User agent must be set before starting document generation");
+ }
+ }
+
+ /** {@inheritDoc} */
public void startDocumentHeader() throws IFException {
//nop
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializer.java?rev=744874&r1=744873&r2=744874&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializer.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializer.java Mon Feb 16 10:10:38 2009
@@ -143,6 +143,7 @@
/** {@inheritDoc} */
public void startDocument() throws IFException {
+ super.startDocument();
try {
handler.startDocument();
handler.startPrefixMapping("", NAMESPACE);
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java?rev=744874&r1=744873&r2=744874&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java Mon Feb 16 10:10:38 2009
@@ -125,15 +125,8 @@
/** {@inheritDoc} */
public void startDocument() throws IFException {
+ super.startDocument();
try {
- if (getUserAgent() == null) {
- throw new IllegalStateException(
- "User agent must be set before starting PDF generation");
- }
- if (this.outputStream == null) {
- throw new IllegalStateException("OutputStream hasn't been set through setResult()");
- }
- log.debug("Rendering areas to PCL...");
this.gen = new PCLGenerator(this.outputStream, getResolution());
if (!pclUtil.isPJLDisabled()) {
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java?rev=744874&r1=744873&r2=744874&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java Mon Feb 16 10:10:38 2009
@@ -120,14 +120,8 @@
/** {@inheritDoc} */
public void startDocument() throws IFException {
+ super.startDocument();
try {
- if (getUserAgent() == null) {
- throw new IllegalStateException(
- "User agent must be set before starting PDF generation");
- }
- if (this.outputStream == null) {
- throw new IllegalStateException("OutputStream hasn't been set through setResult()");
- }
this.pdfDoc = pdfUtil.setupPDFDocument(this.outputStream);
} catch (IOException e) {
throw new IFException("I/O error in startDocument()", e);
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSDocumentHandler.java?rev=744874&r1=744873&r2=744874&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSDocumentHandler.java Mon Feb 16 10:10:38 2009
@@ -138,14 +138,8 @@
/** {@inheritDoc} */
public void startDocument() throws IFException {
+ super.startDocument();
try {
- if (getUserAgent() == null) {
- throw new IllegalStateException(
- "User agent must be set before starting PostScript generation");
- }
- if (this.outputStream == null) {
- throw new IllegalStateException("OutputStream hasn't been set through setResult()");
- }
OutputStream out;
if (psUtil.isOptimizeResources()) {
this.tempFile = File.createTempFile("fop", null);
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java?rev=744874&r1=744873&r2=744874&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java Mon Feb 16 10:10:38 2009
@@ -98,6 +98,7 @@
/** {@inheritDoc} */
public void startDocument() throws IFException {
+ super.startDocument();
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
builderFactory.setNamespaceAware(true);
builderFactory.setValidating(false);
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java?rev=744874&r1=744873&r2=744874&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java Mon Feb 16 10:10:38 2009
@@ -65,6 +65,7 @@
/** {@inheritDoc} */
public void startDocument() throws IFException {
+ super.startDocument();
try {
handler.startDocument();
handler.startPrefixMapping("", NAMESPACE);
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org