import java.io.IOException;
import java.io.Writer;
+import java.util.List;
/**
* <p>Models a section in an RTF document</p>
* @throws IOException for I/O problems
*/
protected void writeRtfSuffix() throws IOException {
- writeControlWord("sect");
+ 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() ) {
+ writeControlWord("sect");
+ }
}
private void closeCurrentTable() throws IOException {
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
+ <action context="Fonts" dev="GA" type="fix" fixes-bug="51484" due-to="Benjamin Riefenstahl">
+ Don't write final /sect suffix in RTF if section is last section.
+ </action>
<action context="Fonts" dev="GA" type="fix" fixes-bug="53143">
Ensure fonts are not loaded twice (redundantly).
</action>