From 28fc4cf264fb73e6aec0f5a2f373845e685a8955 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Fri, 2 Nov 2012 20:47:32 +0000 Subject: Bugzilla #54081: properly tag hyphenated words in PDF output when accessibility is enabled git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1405158 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/area/inline/TextArea.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/java/org/apache/fop/area') diff --git a/src/java/org/apache/fop/area/inline/TextArea.java b/src/java/org/apache/fop/area/inline/TextArea.java index 1d27827f7..66854f7f2 100644 --- a/src/java/org/apache/fop/area/inline/TextArea.java +++ b/src/java/org/apache/fop/area/inline/TextArea.java @@ -30,6 +30,8 @@ public class TextArea extends AbstractTextArea { private static final long serialVersionUID = 7315900267242540809L; + private boolean isHyphenated; + /** * Create a text inline area */ @@ -116,6 +118,20 @@ public class TextArea extends AbstractTextArea { updateLevel(level); } + /** + * Records that the last word in this text area is hyphenated. + */ + public void setHyphenated() { + this.isHyphenated = true; + } + + /** + * Returns {@code true} if the last word in this area is hyphenated. + */ + public boolean isHyphenated() { + return isHyphenated; + } + /** * Get the whole text string. * Renderers whose space adjustment handling is not affected -- cgit v1.2.3