From 0b3428e8c5a32fc9360fc373036b906fbffe87f6 Mon Sep 17 00:00:00 2001 From: Christian Geisert Date: Sun, 17 Feb 2002 23:14:10 +0000 Subject: [PATCH] Merged two bugfixes from main branch: fix in makePDFICCStream (Tore Engvig) fix to prevent fop hanging with animated gifs Submitted by: "Beer, Christian" git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain@194645 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/image/FopImageConsumer.java | 6 ++++-- src/org/apache/fop/pdf/PDFDocument.java | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/org/apache/fop/image/FopImageConsumer.java b/src/org/apache/fop/image/FopImageConsumer.java index 696f1bdd1..972db183d 100644 --- a/src/org/apache/fop/image/FopImageConsumer.java +++ b/src/org/apache/fop/image/FopImageConsumer.java @@ -57,7 +57,8 @@ public class FopImageConsumer implements ImageConsumer { */ synchronized (this.imageStatus) { // Need to stop status if image done - if (this.imageStatus.intValue() != ImageConsumer.STATICIMAGEDONE) + if (imageStatus.intValue() != ImageConsumer.STATICIMAGEDONE + && imageStatus.intValue() != ImageConsumer.SINGLEFRAMEDONE) this.imageStatus = new Integer(status); } } @@ -96,7 +97,8 @@ public class FopImageConsumer implements ImageConsumer { if (this.imageStatus.intValue() == ImageConsumer.IMAGEERROR) throw new Exception("Image error"); - if (this.imageStatus.intValue() == ImageConsumer.STATICIMAGEDONE) + if (imageStatus.intValue() == ImageConsumer.STATICIMAGEDONE + || imageStatus.intValue() == ImageConsumer.SINGLEFRAMEDONE) return true; return false; diff --git a/src/org/apache/fop/pdf/PDFDocument.java b/src/org/apache/fop/pdf/PDFDocument.java index 3d4393f0a..380ab3b01 100644 --- a/src/org/apache/fop/pdf/PDFDocument.java +++ b/src/org/apache/fop/pdf/PDFDocument.java @@ -763,7 +763,7 @@ public class PDFDocument { public PDFICCStream makePDFICCStream() { PDFICCStream iccStream = new PDFICCStream(++this.objectcount); - this.objects.addElement(iccStream); + this.objects.add(iccStream); return iccStream; } -- 2.39.5