diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2011-10-24 16:29:56 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2011-10-24 16:29:56 +0000 |
commit | b073a605e44760bcb7add72968a3a2f78cf06d97 (patch) | |
tree | 50501d5167416c5a5a31f2319102efee829a8bd8 /src/java/org/apache/fop/fo/FOTreeBuilder.java | |
parent | 29ecb2d96c4c4b75785e160a55c7dc436cfef860 (diff) | |
download | xmlgraphics-fop-b073a605e44760bcb7add72968a3a2f78cf06d97.tar.gz xmlgraphics-fop-b073a605e44760bcb7add72968a3a2f78cf06d97.zip |
Removed the FO document pre-processing step that was adding ptr and creating a reduced FO tree.
* Removed addPtr.xsl and reduceFOTree.xsl
* Implemented Common Accessibility properties on objects that support them
* Added a special implementation of FOEventHandler to build the structure tree
* Added mockito library and its dependencies
* Added mocks for some FO nodes and properties
* Removed FOTreeUnitTester and converted it into a re-usable FODocumentParser class
* Re-worked table FO test cases accordingly
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ImproveAccessibility@1188205 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/FOTreeBuilder.java')
-rw-r--r-- | src/java/org/apache/fop/fo/FOTreeBuilder.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/fo/FOTreeBuilder.java b/src/java/org/apache/fop/fo/FOTreeBuilder.java index 451481eb8..890138e5c 100644 --- a/src/java/org/apache/fop/fo/FOTreeBuilder.java +++ b/src/java/org/apache/fop/fo/FOTreeBuilder.java @@ -33,6 +33,8 @@ import org.apache.commons.logging.LogFactory; import org.apache.xmlgraphics.util.QName; +import org.apache.fop.accessibility.StructureTree; +import org.apache.fop.accessibility.StructureTreeBuildingFOEventHandler; import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.FormattingResults; @@ -104,6 +106,11 @@ public class FOTreeBuilder extends DefaultHandler { //one of the RTF-, MIF- etc. Handlers. foEventHandler = foUserAgent.getRendererFactory().createFOEventHandler( foUserAgent, outputFormat, stream); + if (userAgent.isAccessibilityEnabled()) { + StructureTree structureTree = new StructureTree(); + foEventHandler = new StructureTreeBuildingFOEventHandler(structureTree, foEventHandler); + userAgent.setStructureTree(structureTree); + } builderContext = new FOTreeBuilderContext(); builderContext.setPropertyListMaker(new PropertyListMaker() { public PropertyList make(FObj fobj, PropertyList parentPropertyList) { |