aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop
diff options
context:
space:
mode:
authorGlenn Adams <gadams@apache.org>2012-04-17 21:34:52 +0000
committerGlenn Adams <gadams@apache.org>2012-04-17 21:34:52 +0000
commite533832b11cea16e8599c549f015cab12c653f66 (patch)
tree67a85d1eb13c94b0439cd7307d4ca34442386afa /src/java/org/apache/fop
parentf397b576a8c874150e2e3efc2970de0fc1ce3e9f (diff)
downloadxmlgraphics-fop-e533832b11cea16e8599c549f015cab12c653f66.tar.gz
xmlgraphics-fop-e533832b11cea16e8599c549f015cab12c653f66.zip
Bugzilla #53086: Ensure that table footer and header are included in bididirectional resolution.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1327291 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r--src/java/org/apache/fop/fo/flow/table/Table.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/fo/flow/table/Table.java b/src/java/org/apache/fop/fo/flow/table/Table.java
index 304996f1c..a574723b1 100644
--- a/src/java/org/apache/fop/fo/flow/table/Table.java
+++ b/src/java/org/apache/fop/fo/flow/table/Table.java
@@ -20,11 +20,14 @@
package org.apache.fop.fo.flow.table;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
+import java.util.Stack;
import org.xml.sax.Locator;
import org.apache.fop.apps.FOPException;
+import org.apache.fop.complexscripts.bidi.DelimitedTextRange;
import org.apache.fop.datatypes.Length;
import org.apache.fop.datatypes.ValidationPercentBaseContext;
import org.apache.fop.fo.FONode;
@@ -597,4 +600,24 @@ public class Table extends TableFObj implements ColumnNumberManagerHolder, Break
RowGroupBuilder getRowGroupBuilder() {
return rowGroupBuilder;
}
+
+ @Override
+ protected Stack collectDelimitedTextRanges ( Stack ranges, DelimitedTextRange currentRange ) {
+ // header sub-tree
+ TableHeader header = getTableHeader();
+ if ( header != null ) {
+ ranges = header.collectDelimitedTextRanges ( ranges );
+ }
+ // footer sub-tree
+ TableFooter footer = getTableFooter();
+ if ( footer != null ) {
+ ranges = footer.collectDelimitedTextRanges ( ranges );
+ }
+ // body sub-tree
+ for ( Iterator it = getChildNodes(); ( it != null ) && it.hasNext();) {
+ ranges = ( (FONode) it.next() ).collectDelimitedTextRanges ( ranges );
+ }
+ return ranges;
+ }
+
}