git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1330838 13f79535-47bb-0310-9956-ffa450edef68tags/fop-1_1rc1old
@@ -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"); | |||
} | |||
} |