diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2012-05-25 15:15:28 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2012-05-25 15:15:28 +0000 |
commit | 89b98e43e014d7045a548b7f88be265c2621a328 (patch) | |
tree | 2fd521a451fb8be4e28a2c54706f62740028e16e /test | |
parent | f227dce56c9bed87a8cd0daec86267e43d2b2ae1 (diff) | |
download | xmlgraphics-fop-89b98e43e014d7045a548b7f88be265c2621a328.tar.gz xmlgraphics-fop-89b98e43e014d7045a548b7f88be265c2621a328.zip |
Added support for the role property on fo:page-sequence, fo:flow and fo:static-content.
This allows to change the mapping of those FOs to PDF structure types when enabling accessibility.
Suggested by Martin Koegler as part of Bugzilla #50852
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1342680 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/java/org/apache/fop/render/intermediate/IFStructureTreeBuilderTestCase.java | 6 | ||||
-rw-r--r-- | test/pdf/accessibility/role.fo | 13 |
2 files changed, 12 insertions, 7 deletions
diff --git a/test/java/org/apache/fop/render/intermediate/IFStructureTreeBuilderTestCase.java b/test/java/org/apache/fop/render/intermediate/IFStructureTreeBuilderTestCase.java index 65c6b25a6..6819fed79 100644 --- a/test/java/org/apache/fop/render/intermediate/IFStructureTreeBuilderTestCase.java +++ b/test/java/org/apache/fop/render/intermediate/IFStructureTreeBuilderTestCase.java @@ -61,7 +61,7 @@ public class IFStructureTreeBuilderTestCase { // Expected } - sut.startPageSequence(null); + sut.startPageSequence(null, null); sut.endPageSequence(); sut.replayEventsForPageSequence(handler, 0); @@ -89,7 +89,7 @@ public class IFStructureTreeBuilderTestCase { final String nodeName = "block"; final ContentHandler handler = mock(ContentHandler.class); - sut.startPageSequence(null); + sut.startPageSequence(null, null); sut.startNode(nodeName, createSimpleAttributes(attributes)); sut.endPageSequence(); @@ -105,7 +105,7 @@ public class IFStructureTreeBuilderTestCase { final String nodeName = "block"; final ContentHandler handler = mock(ContentHandler.class); - sut.startPageSequence(null); + sut.startPageSequence(null, null); sut.endNode(nodeName); sut.endPageSequence(); diff --git a/test/pdf/accessibility/role.fo b/test/pdf/accessibility/role.fo index ced8a4d44..885638592 100644 --- a/test/pdf/accessibility/role.fo +++ b/test/pdf/accessibility/role.fo @@ -19,12 +19,17 @@ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" country="GB"> <fo:layout-master-set> <fo:simple-page-master master-name="page" - page-height="220pt" page-width="320pt" margin="10pt"> - <fo:region-body/> + page-height="240pt" page-width="320pt" margin="10pt" margin-bottom="8pt"> + <fo:region-body margin-bottom="20pt"/> + <fo:region-after extent="10pt"/> </fo:simple-page-master> </fo:layout-master-set> - <fo:page-sequence master-reference="page"> - <fo:flow flow-name="xsl-region-body" hyphenate="true" font-family="sans-serif"> + <fo:page-sequence master-reference="page" role="Art"> + <fo:static-content flow-name="xsl-region-after" role="NonStruct" font-size="8pt"> + <fo:block text-align="center"><fo:page-number/></fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body" role="NonStruct" hyphenate="true" + font-family="sans-serif"> <fo:block role="H1" font-weight="bold" font-size="150%" space-before.minimum="1.5em" space-before.optimum="2em" |