diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2012-05-29 09:48:03 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2012-05-29 09:48:03 +0000 |
commit | 9e1c3f381c661eff5ebb45f3d442b0dc871dd865 (patch) | |
tree | 46b3a2df2d61c5003cfa36ba6acf8c6ef511e4b3 /src/java/org/apache/fop/fo/flow | |
parent | d48e0e1f467c58a22c4d1b19591d4fa9d22aa8c6 (diff) | |
download | xmlgraphics-fop-9e1c3f381c661eff5ebb45f3d442b0dc871dd865.tar.gz xmlgraphics-fop-9e1c3f381c661eff5ebb45f3d442b0dc871dd865.zip |
Added possibility to treat some content as artifact.
If any fo:static-content or fo:wrapper element has their 'role' property set to 'artifact', then they and their descendants will be treated as artifacts.
Suggested by Martin Koegler as part of Bugzilla #50852
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1343632 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/flow')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/Wrapper.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/fo/flow/Wrapper.java b/src/java/org/apache/fop/fo/flow/Wrapper.java index 1302e3134..0aec7ce16 100644 --- a/src/java/org/apache/fop/fo/flow/Wrapper.java +++ b/src/java/org/apache/fop/fo/flow/Wrapper.java @@ -26,7 +26,10 @@ import org.apache.fop.fo.Constants; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOText; import org.apache.fop.fo.FObjMixed; +import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.ValidationException; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAccessibilityHolder; /** * Class modelling the <a href=http://www.w3.org/TR/xsl/#fo_wrapper"> @@ -34,13 +37,13 @@ import org.apache.fop.fo.ValidationException; * The <code>fo:wrapper</code> object serves as a property holder for * its child node objects. */ -public class Wrapper extends FObjMixed { - // The value of properties relevant for fo:wrapper. - // End of property values +public class Wrapper extends FObjMixed implements CommonAccessibilityHolder { // used for FO validation private boolean blockOrInlineItemFound = false; + private CommonAccessibility commonAccessibility; + /** * Create a Wrapper instance that is a child of the * given {@link FONode} @@ -52,6 +55,12 @@ public class Wrapper extends FObjMixed { } @Override + public void bind(PropertyList pList) throws FOPException { + super.bind(pList); + commonAccessibility = CommonAccessibility.getInstance(pList); + } + + @Override protected void startOfNode() throws FOPException { super.startOfNode(); getFOEventHandler().startWrapper(this); @@ -136,6 +145,10 @@ public class Wrapper extends FObjMixed { return FO_WRAPPER; } + public CommonAccessibility getCommonAccessibility() { + return commonAccessibility; + } + @Override public boolean isDelimitedTextRangeBoundary ( int boundary ) { return false; |