Browse Source

Bugzilla #51484: Don't write final /sect suffix in RTF if section is last section.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1330296 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-1_1rc1old
Glenn Adams 12 years ago
parent
commit
c3bc9e8b04
2 changed files with 9 additions and 1 deletions
  1. 6
    1
      src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java
  2. 3
    0
      status.xml

+ 6
- 1
src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java View File

@@ -28,6 +28,7 @@ package org.apache.fop.render.rtf.rtflib.rtfdoc;

import java.io.IOException;
import java.io.Writer;
import java.util.List;

/**
* <p>Models a section in an RTF document</p>
@@ -192,7 +193,11 @@ implements
* @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 {

+ 3
- 0
status.xml View File

@@ -63,6 +63,9 @@
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>

Loading…
Cancel
Save