]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Merged two bugfixes from main branch:
authorChristian Geisert <chrisg@apache.org>
Sun, 17 Feb 2002 23:14:10 +0000 (23:14 +0000)
committerChristian Geisert <chrisg@apache.org>
Sun, 17 Feb 2002 23:14:10 +0000 (23:14 +0000)
fix in makePDFICCStream (Tore Engvig)
fix to prevent fop hanging with animated gifs
Submitted by: "Beer, Christian" <BEE@DIRON.de>

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
src/org/apache/fop/pdf/PDFDocument.java

index 696f1bdd101a5efe33aedca9d5cf1805c1f60042..972db183d52fb28394811e3b67ee76741be66c2b 100644 (file)
@@ -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;
index 3d4393f0a511a3860434257d113000b974bdcad4..380ab3b01ae8065b405aa9185c486b72f0b4f525 100644 (file)
@@ -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;
     }