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 ga...@apache.org on 2012/04/26 15:18:53 UTC

svn commit: r1330838 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java

Author: gadams
Date: Thu Apr 26 13:18:53 2012
New Revision: 1330838

URL: http://svn.apache.org/viewvc?rev=1330838&view=rev
Log:
Bugzilla #51484: Improve test for last section.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java?rev=1330838&r1=1330837&r2=1330838&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java Thu Apr 26 13:18:53 2012
@@ -193,9 +193,9 @@ implements
      * @throws IOException for I/O problems
      */
     protected void writeRtfSuffix() throws IOException {
-        List siblings = parent.getChildren();
         // write suffix /sect only if this section is not last section (see bug #51484)
-        if ( siblings.listIterator ( siblings.indexOf ( this ) ) .hasNext() ) {
+        List siblings = parent.getChildren();
+        if ( ( siblings.indexOf ( this ) + 1 ) < siblings.size() ) {
             writeControlWord("sect");
         }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org