aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2011-03-09 20:16:09 +0000
committerVincent Hennebert <vhennebert@apache.org>2011-03-09 20:16:09 +0000
commit038c3f30bac88242d6878ad341c83368d92eed5c (patch)
tree394aa260a823568f3873f7d039c5011841dac25c /src/java/org/apache/fop
parent19b162b1065255d25eab8a89f36755c52fbd435a (diff)
downloadxmlgraphics-fop-038c3f30bac88242d6878ad341c83368d92eed5c.tar.gz
xmlgraphics-fop-038c3f30bac88242d6878ad341c83368d92eed5c.zip
Bugzilla #50196: padding-start ignored when table-header/footer is repeated.
Patch submitted by Matthias Reischenbacher git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1079969 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-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,