aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorGlenn Adams <gadams@apache.org>2012-04-26 13:18:53 +0000
committerGlenn Adams <gadams@apache.org>2012-04-26 13:18:53 +0000
commitc40d6029737141c4d86f3b6bde38ce444f8b3bb7 (patch)
treec40ab157129174978dd5285a99bdfb52730cd4ce /src/java
parent65ff8fa968cfbea583a779444ded2b343c498ee7 (diff)
downloadxmlgraphics-fop-c40d6029737141c4d86f3b6bde38ce444f8b3bb7.tar.gz
xmlgraphics-fop-c40d6029737141c4d86f3b6bde38ce444f8b3bb7.zip
Bugzilla #51484: Improve test for last section.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1330838 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java
index 2074d3bab..150a46986 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java
@@ -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");
}
}