diff options
author | Karen Lease <klease@apache.org> | 2002-05-10 12:24:19 +0000 |
---|---|---|
committer | Karen Lease <klease@apache.org> | 2002-05-10 12:24:19 +0000 |
commit | db755bf42556bc19d396ae22cb919fdb995fe4cf (patch) | |
tree | a43f47d55c69c1c1c17e9158a2e15140ff1daaf6 /src/org/apache/fop/fo | |
parent | 37dffb850401e486fc48240e6f6bd82db4fa7546 (diff) | |
download | xmlgraphics-fop-db755bf42556bc19d396ae22cb919fdb995fe4cf.tar.gz xmlgraphics-fop-db755bf42556bc19d396ae22cb919fdb995fe4cf.zip |
Add support for nested inlines using the BreakPoss logic.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194817 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/fo')
-rw-r--r-- | src/org/apache/fop/fo/FOText.java | 4 | ||||
-rw-r--r-- | src/org/apache/fop/fo/FObjMixed.java | 22 | ||||
-rw-r--r-- | src/org/apache/fop/fo/PropertyManager.java | 27 |
3 files changed, 23 insertions, 30 deletions
diff --git a/src/org/apache/fop/fo/FOText.java b/src/org/apache/fop/fo/FOText.java index 589bf4a11..3cf9db50d 100644 --- a/src/org/apache/fop/fo/FOText.java +++ b/src/org/apache/fop/fo/FOText.java @@ -81,9 +81,9 @@ public class FOText extends FObj { ca = new char[length]; System.arraycopy(tmp, 0, ca, 0, length); } - list.add(new TextLayoutManager(this, ca, textInfo)); + // list.add(new TextLayoutManager(this, ca, textInfo)); // TEST VARIANT USING Karen's BreakPoss scheme - // list.add(new TextBPLayoutManager(this, ca, textInfo)); + list.add(new TextBPLayoutManager(this, ca, textInfo)); } public CharIterator charIterator() { diff --git a/src/org/apache/fop/fo/FObjMixed.java b/src/org/apache/fop/fo/FObjMixed.java index 45e77dfe5..34899ff63 100644 --- a/src/org/apache/fop/fo/FObjMixed.java +++ b/src/org/apache/fop/fo/FObjMixed.java @@ -13,6 +13,8 @@ import org.apache.fop.layout.FontInfo; import org.apache.fop.apps.FOPException; import org.apache.fop.apps.StreamRenderer; import org.apache.fop.datatypes.ColorType; +import org.apache.fop.layoutmgr.InlineStackingBPLayoutManager; +import org.apache.fop.layoutmgr.LMiter; import java.util.List; @@ -33,15 +35,17 @@ public class FObjMixed extends FObj { } public void addLayoutManager(List lms) { - // set start and end properties for this element, id, etc. - int numChildren = this.children.size(); - for (int i = 0; i < numChildren; i++) { - Object o = children.get(i); - if (o instanceof FObj) { - FObj fo = (FObj) o; - fo.addLayoutManager(lms); - } - } + lms.add(new InlineStackingBPLayoutManager(this, + new LMiter(children.listIterator()))); + // set start and end properties for this element, id, etc. +// int numChildren = this.children.size(); +// for (int i = 0; i < numChildren; i++) { +// Object o = children.get(i); +// if (o instanceof FObj) { +// FObj fo = (FObj) o; +// fo.addLayoutManager(lms); +// } +// } } protected void addCharacters(char data[], int start, int length) { diff --git a/src/org/apache/fop/fo/PropertyManager.java b/src/org/apache/fop/fo/PropertyManager.java index b72a19584..7a720ff35 100644 --- a/src/org/apache/fop/fo/PropertyManager.java +++ b/src/org/apache/fop/fo/PropertyManager.java @@ -47,10 +47,10 @@ public class PropertyManager { private HyphenationProps hyphProps = null; private TextInfo textInfo = null; - private String[] saLeft; - private String[] saRight; - private String[] saTop; - private String[] saBottom; + private static String[] saBefore = new String[] {"before"}; + private static String[] saAfter = new String[] {"after"}; + private static String[] saStart = new String[] {"start"}; + private static String[] saEnd = new String[] {"end"}; private static MessageFormat msgColorFmt = new MessageFormat("border-{0}-color"); @@ -69,16 +69,6 @@ public class PropertyManager { m_fontInfo = fontInfo; } - private void initDirections() { - saLeft = new String[1]; - saRight = new String[1]; - saTop = new String[1]; - saBottom = new String[1]; - saTop[0] = properties.wmAbsToRel(PropertyList.TOP); - saBottom[0] = properties.wmAbsToRel(PropertyList.BOTTOM); - saLeft[0] = properties.wmAbsToRel(PropertyList.LEFT); - saRight[0] = properties.wmAbsToRel(PropertyList.RIGHT); - } public FontState getFontState(FontInfo fontInfo) throws FOPException { if (fontState == null) { @@ -106,12 +96,11 @@ public class PropertyManager { public BorderAndPadding getBorderAndPadding() { if (borderAndPadding == null) { this.borderAndPadding = new BorderAndPadding(); - initDirections(); - initBorderInfo(BorderAndPadding.TOP, saTop); - initBorderInfo(BorderAndPadding.BOTTOM, saBottom); - initBorderInfo(BorderAndPadding.LEFT, saLeft); - initBorderInfo(BorderAndPadding.RIGHT, saRight); + initBorderInfo(BorderAndPadding.BEFORE, saBefore); + initBorderInfo(BorderAndPadding.AFTER, saAfter); + initBorderInfo(BorderAndPadding.START, saStart); + initBorderInfo(BorderAndPadding.END, saEnd); } return borderAndPadding; } |