diff options
Diffstat (limited to 'src/org/apache/fop/fo/FOText.java')
-rw-r--r-- | src/org/apache/fop/fo/FOText.java | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/org/apache/fop/fo/FOText.java b/src/org/apache/fop/fo/FOText.java index debc06e14..6fc253fa5 100644 --- a/src/org/apache/fop/fo/FOText.java +++ b/src/org/apache/fop/fo/FOText.java @@ -56,6 +56,7 @@ import org.apache.fop.layout.Area; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.layout.BlockArea; import org.apache.fop.layout.FontState; +import org.apache.fop.layout.TextState; import org.apache.fop.datatypes.*; import org.apache.fop.fo.properties.*; import org.apache.fop.apps.FOPException; @@ -81,6 +82,8 @@ public class FOText extends FONode { protected boolean overlined = false; protected boolean lineThrough = false; + TextState ts; + public FOText(char[] chars, int s, int e, FObj parent) { super(parent); @@ -95,6 +98,15 @@ public class FOText extends FONode { this.underlined = ul; } + public void setOverlined(boolean ol) { + this.overlined = ol; + } + + public void setLineThrough(boolean lt) { + this.lineThrough = lt; + } + + public boolean willCreateArea() { this.whiteSpaceCollapse = this.parent.properties.get( @@ -143,14 +155,18 @@ public class FOText extends FONode { this.wrapOption = this.parent.properties.get("wrap-option").getEnum(); this.whiteSpaceCollapse = this.parent.properties.get( - "white-space-collapse").getEnum(); + "white-space-collapse").getEnum(); + this.ts = new TextState(); + ts.setUnderlined(underlined); + ts.setOverlined(overlined); + ts.setLineThrough(lineThrough); this.marker = this.start; } int orig_start = this.marker; this.marker = ((BlockArea) area).addText(fs, red, green, blue, wrapOption, this.getLinkSet(), whiteSpaceCollapse, ca, - this.marker, length, underlined); + this.marker, length, ts); if (this.marker == -1) { |