aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/area/inline
diff options
context:
space:
mode:
authorSimon Pepping <spepping@apache.org>2004-11-13 20:37:17 +0000
committerSimon Pepping <spepping@apache.org>2004-11-13 20:37:17 +0000
commit29fbb7396529145c4bab73f3f441c34a1d276f7c (patch)
treee1af3996e99da9577de866b6e941e198bd4452e8 /src/java/org/apache/fop/area/inline
parent8576c6b0c72dd6dc53e44028eb4eb7b5b69c14bd (diff)
downloadxmlgraphics-fop-29fbb7396529145c4bab73f3f441c34a1d276f7c.tar.gz
xmlgraphics-fop-29fbb7396529145c4bab73f3f441c34a1d276f7c.zip
Patch 31206 by Luca Furini:
- A new interface InlineLevelLayoutManager, implemented by LeafNodeLM, InlineLM, TextLM, BasicLinkLM and ContentLM - Leaders with pattern "use-content" and "dots" now works - Better handling of preserved linefeeds - Correct calculation of the lineheight, according to the value of the property vertical-align For a few points which may need further work, see the bugzilla page. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198142 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/area/inline')
-rw-r--r--src/java/org/apache/fop/area/inline/FilledArea.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/area/inline/FilledArea.java b/src/java/org/apache/fop/area/inline/FilledArea.java
index afbcbe73f..84e905536 100644
--- a/src/java/org/apache/fop/area/inline/FilledArea.java
+++ b/src/java/org/apache/fop/area/inline/FilledArea.java
@@ -19,6 +19,7 @@
package org.apache.fop.area.inline;
import java.util.List;
+import java.util.ListIterator;
import java.util.ArrayList;
/**
@@ -40,6 +41,29 @@ public class FilledArea extends InlineParent {
}
/**
+ * Set the offset of the descendant TextAreas,
+ * instead of the offset of the FilledArea itself.
+ *
+ * @param v the offset
+ */
+ public void setOffset(int v) {
+ setChildOffset(inlines.listIterator(), v);
+ }
+
+ private void setChildOffset(ListIterator childrenIterator, int v) {
+ while (childrenIterator.hasNext()) {
+ InlineArea child = (InlineArea) childrenIterator.next();
+ if (child instanceof InlineParent) {
+ setChildOffset(((InlineParent) child).getChildAreas().listIterator(), v);
+ } else if (child instanceof org.apache.fop.area.inline.Viewport) {
+ // nothing
+ } else {
+ child.setOffset(v);
+ }
+ }
+ }
+
+ /**
* Set the unit width for the areas to fill the full width.
*
* @param w the unit width