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: [email protected]
For additional commands, e-mail: [email protected]