From a00a96986a4aa5d2e904431cb35d98cea4e653f7 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Tue, 5 Nov 2013 12:08:10 +0000 Subject: [PATCH] FOP-1749: Fix offset of footnote when it has a margin-top Patch by Alexey Neyman, applied with minor modifications git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1538961 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/area/Footnote.java | 2 +- .../standard-testcases/footnote_jira1749.xml | 56 +++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 test/layoutengine/standard-testcases/footnote_jira1749.xml diff --git a/src/java/org/apache/fop/area/Footnote.java b/src/java/org/apache/fop/area/Footnote.java index bc9f27b24..28f3ee523 100644 --- a/src/java/org/apache/fop/area/Footnote.java +++ b/src/java/org/apache/fop/area/Footnote.java @@ -83,7 +83,7 @@ public class Footnote extends BlockParent { @Override public void addBlock(Block child) { addChildArea(child); - this.setBPD(this.getBPD() + child.getBPD()); + setBPD(getBPD() + child.getAllocBPD()); } } diff --git a/test/layoutengine/standard-testcases/footnote_jira1749.xml b/test/layoutengine/standard-testcases/footnote_jira1749.xml new file mode 100644 index 000000000..6e73d39fd --- /dev/null +++ b/test/layoutengine/standard-testcases/footnote_jira1749.xml @@ -0,0 +1,56 @@ + + + + + +

+ FOP-1749: footnotes with margin-top="..." that do not fit on the current + page, but would've fit without top margin cause FOP to hang (instead of + being pushed to the next page). Also, verify the top-offset for the + footnote is calculated properly with margin-top. +

+
+ + + + + + + + + + No footnote + Footnote call + * + + The footnote + + + + + + + + + + + + + + +
-- 2.39.5