aboutsummaryrefslogtreecommitdiffstats
path: root/fop-core/src
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2023-12-15 14:45:37 +0000
committerSimon Steiner <ssteiner@apache.org>2023-12-15 14:45:37 +0000
commit01e520466cb43fb5e152c2faed5a47adac0c8f9c (patch)
treef6d347e568b601f83aa7605153c4401abc0bed52 /fop-core/src
parent23e173b7e6e095c15ac2384e462abbc4281f3e32 (diff)
downloadxmlgraphics-fop-01e520466cb43fb5e152c2faed5a47adac0c8f9c.tar.gz
xmlgraphics-fop-01e520466cb43fb5e152c2faed5a47adac0c8f9c.zip
FOP-2764: footnote-body ignores rl-tb writing mode by João André Gonçalves
Diffstat (limited to 'fop-core/src')
-rw-r--r--fop-core/src/main/java/org/apache/fop/fo/flow/Footnote.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/fop-core/src/main/java/org/apache/fop/fo/flow/Footnote.java b/fop-core/src/main/java/org/apache/fop/fo/flow/Footnote.java
index 521e8b081..aec57cf86 100644
--- a/fop-core/src/main/java/org/apache/fop/fo/flow/Footnote.java
+++ b/fop-core/src/main/java/org/apache/fop/fo/flow/Footnote.java
@@ -19,9 +19,13 @@
package org.apache.fop.fo.flow;
+import java.util.Iterator;
+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.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.PropertyList;
@@ -148,5 +152,24 @@ public class Footnote extends FObj implements CommonAccessibilityHolder {
public int getNameId() {
return FO_FOOTNOTE;
}
+
+ @Override
+ protected Stack<DelimitedTextRange> collectDelimitedTextRanges(Stack<DelimitedTextRange> ranges,
+ DelimitedTextRange currentRange) {
+ FootnoteBody body = getFootnoteBody();
+ if (body != null) {
+ ranges = body.collectDelimitedTextRanges(ranges);
+ }
+
+ Inline inline = getFootnoteCitation();
+ if (inline != null) {
+ ranges = inline.collectDelimitedTextRanges(ranges);
+ }
+
+ for (Iterator it = getChildNodes(); (it != null) && it.hasNext();) {
+ ranges = ((FONode) it.next()).collectDelimitedTextRanges(ranges);
+ }
+ return ranges;
+ }
}