aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
index 985094edd..085174fae 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
@@ -422,18 +422,6 @@ public class InlineLayoutManager extends InlineStackingLayoutManager {
setChildContext(new LayoutContext(context)); // Store current value
- // If this LM has fence, make a new leading space specifier.
- if (hasLeadingFence(areaCreated)) {
- getContext().setLeadingSpace(new SpaceSpecifier(false));
- getContext().setFlags(LayoutContext.RESOLVE_LEADING_SPACE, true);
- } else {
- getContext().setFlags(LayoutContext.RESOLVE_LEADING_SPACE, false);
- }
-
- if (getSpaceStart() != null) {
- context.getLeadingSpace().addSpace(new SpaceVal(getSpaceStart(), this));
- }
-
// "Unwrap" the NonLeafPositions stored in parentIter and put
// them in a new list. Set lastLM to be the LayoutManager
// which created the last Position: if the LAST_AREA flag is
@@ -447,12 +435,32 @@ public class InlineLayoutManager extends InlineStackingLayoutManager {
while (parentIter.hasNext()) {
pos = parentIter.next();
if (pos != null && pos.getPosition() != null) {
+ if (isFirst(pos)) {
+ /*
+ * If this element is a descendant of a table-header/footer,
+ * its content may be repeated over pages, so the generation
+ * of its areas may be restarted.
+ */
+ areaCreated = false;
+ }
positionList.add(pos.getPosition());
lastLM = pos.getPosition().getLM();
lastPos = pos;
}
}
+ // If this LM has fence, make a new leading space specifier.
+ if (hasLeadingFence(areaCreated)) {
+ getContext().setLeadingSpace(new SpaceSpecifier(false));
+ getContext().setFlags(LayoutContext.RESOLVE_LEADING_SPACE, true);
+ } else {
+ getContext().setFlags(LayoutContext.RESOLVE_LEADING_SPACE, false);
+ }
+
+ if (getSpaceStart() != null) {
+ context.getLeadingSpace().addSpace(new SpaceVal(getSpaceStart(), this));
+ }
+
addMarkersToPage(
true,
!areaCreated,