Return-Path: Delivered-To: apmail-xmlgraphics-fop-commits-archive@www.apache.org Received: (qmail 28815 invoked from network); 26 Oct 2007 18:22:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2007 18:22:59 -0000 Received: (qmail 1106 invoked by uid 500); 26 Oct 2007 18:17:12 -0000 Delivered-To: apmail-xmlgraphics-fop-commits-archive@xmlgraphics.apache.org Received: (qmail 1085 invoked by uid 500); 26 Oct 2007 18:17:12 -0000 Mailing-List: contact fop-commits-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: fop-dev@xmlgraphics.apache.org Delivered-To: mailing list fop-commits@xmlgraphics.apache.org Received: (qmail 1074 invoked by uid 99); 26 Oct 2007 18:17:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2007 11:17:12 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2007 18:17:25 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 828DD1A983A; Fri, 26 Oct 2007 11:17:01 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r588733 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/render/ps/PSRenderer.java test/layoutengine/standard-testcases/ps-extension_2.xml Date: Fri, 26 Oct 2007 18:17:01 -0000 To: fop-commits@xmlgraphics.apache.org From: acumiskey@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071026181701.828DD1A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: acumiskey Date: Fri Oct 26 11:17:00 2007 New Revision: 588733 URL: http://svn.apache.org/viewvc?rev=588733&view=rev Log: Applying [PATCH] 43587 - Multiple ps:comment-? within fo:declarations causes ClassCastException Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/ps-extension_2.xml Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java?rev=588733&r1=588732&r2=588733&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java Fri Oct 26 11:17:00 2007 @@ -830,6 +830,7 @@ PSExtensionAttachment comment = (PSExtensionAttachment)iter.next(); gen.commentln("%" + comment.getContent()); } + footerComments.clear(); } gen.writeDSCComment(DSCConstants.PAGES, new Integer(this.currentPageNumber)); gen.getResourceTracker().writeResources(false, gen); @@ -840,7 +841,12 @@ IOUtils.closeQuietly(gen.getOutputStream()); rewritePostScriptFile(); } - this.pageDeviceDictionary.clear(); + if (footerComments != null) { + headerComments.clear(); + } + if (pageDeviceDictionary != null) { + pageDeviceDictionary.clear(); + } } /** @@ -910,12 +916,12 @@ } } else if (attachment instanceof PSCommentBefore) { if (headerComments == null) { - headerComments = new java.util.TreeSet(); + headerComments = new java.util.ArrayList(); } headerComments.add(attachment); } else if (attachment instanceof PSCommentAfter) { if (footerComments == null) { - footerComments = new java.util.TreeSet(); + footerComments = new java.util.ArrayList(); } footerComments.add(attachment); } Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/ps-extension_2.xml URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/ps-extension_2.xml?rev=588733&r1=588732&r2=588733&view=diff ============================================================================== --- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/ps-extension_2.xml (original) +++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/ps-extension_2.xml Fri Oct 26 11:17:00 2007 @@ -34,8 +34,10 @@ > ]]> - A4a before page - A4a after page + A4a before page 1 + A4a after page 1 + A4a before page 2 + A4a after page 2 @@ -46,8 +48,10 @@ > ]]> - header comment - footer comment + header comment 1 + footer comment 1 + header comment 2 + footer comment 2 @@ -64,20 +68,24 @@ - + - - + + + + - + - - + + + + --------------------------------------------------------------------- To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org