Browse Source

Fixed copy/paste mistakes.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@744874 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-1_0
Jeremias Maerki 15 years ago
parent
commit
952af34e49

+ 1
- 7
src/java/org/apache/fop/render/afp/AFPDocumentHandler.java View File

@@ -128,14 +128,8 @@ public class AFPDocumentHandler extends AbstractBinaryWritingIFDocumentHandler

/** {@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);

+ 1
- 8
src/java/org/apache/fop/render/bitmap/TIFFDocumentHandler.java View File

@@ -111,15 +111,8 @@ public class TIFFDocumentHandler extends AbstractBinaryWritingIFDocumentHandler

/** {@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) {

+ 8
- 0
src/java/org/apache/fop/render/intermediate/AbstractBinaryWritingIFDocumentHandler.java View File

@@ -106,6 +106,14 @@ public abstract class AbstractBinaryWritingIFDocumentHandler extends AbstractIFD
setFontInfo(fi);
}

/** {@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) {

+ 8
- 0
src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java View File

@@ -63,6 +63,14 @@ public abstract class AbstractIFDocumentHandler implements IFDocumentHandler {
return null; //By default, this is not supported
}

/** {@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

+ 1
- 0
src/java/org/apache/fop/render/intermediate/IFSerializer.java View File

@@ -143,6 +143,7 @@ public class IFSerializer extends AbstractXMLWritingIFDocumentHandler

/** {@inheritDoc} */
public void startDocument() throws IFException {
super.startDocument();
try {
handler.startDocument();
handler.startPrefixMapping("", NAMESPACE);

+ 1
- 8
src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java View File

@@ -125,15 +125,8 @@ public class PCLDocumentHandler extends AbstractBinaryWritingIFDocumentHandler

/** {@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()) {

+ 1
- 7
src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java View File

@@ -120,14 +120,8 @@ public class PDFDocumentHandler extends AbstractBinaryWritingIFDocumentHandler {

/** {@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);

+ 1
- 7
src/java/org/apache/fop/render/ps/PSDocumentHandler.java View File

@@ -138,14 +138,8 @@ public class PSDocumentHandler extends AbstractBinaryWritingIFDocumentHandler {

/** {@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);

+ 1
- 0
src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java View File

@@ -98,6 +98,7 @@ public class SVGDocumentHandler extends AbstractSVGDocumentHandler {

/** {@inheritDoc} */
public void startDocument() throws IFException {
super.startDocument();
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
builderFactory.setNamespaceAware(true);
builderFactory.setValidating(false);

+ 1
- 0
src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java View File

@@ -65,6 +65,7 @@ public class SVGPrintDocumentHandler extends AbstractSVGDocumentHandler {

/** {@inheritDoc} */
public void startDocument() throws IFException {
super.startDocument();
try {
handler.startDocument();
handler.startPrefixMapping("", NAMESPACE);

Loading…
Cancel
Save