aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/accessibility
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2012-07-24 16:39:04 +0000
committerVincent Hennebert <vhennebert@apache.org>2012-07-24 16:39:04 +0000
commit6c6183d35af7ed373ac3c9613ea4e35e77ae3afc (patch)
treebd5bd0569162b8b4deef8230e3dd4888e6cfcc7d /src/java/org/apache/fop/accessibility
parent22d7da60355a19d132deb696dcdc45d8ae1f5f2d (diff)
downloadxmlgraphics-fop-6c6183d35af7ed373ac3c9613ea4e35e77ae3afc.tar.gz
xmlgraphics-fop-6c6183d35af7ed373ac3c9613ea4e35e77ae3afc.zip
Bugzilla #53596: When PDF accessibility is enabled, the structure tree must contain information about the number of columns or rows spanned by a table cell.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1365162 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/accessibility')
-rw-r--r--src/java/org/apache/fop/accessibility/fo/StructureTreeEventTrigger.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/accessibility/fo/StructureTreeEventTrigger.java b/src/java/org/apache/fop/accessibility/fo/StructureTreeEventTrigger.java
index 51f7f2bed..7e3ed0591 100644
--- a/src/java/org/apache/fop/accessibility/fo/StructureTreeEventTrigger.java
+++ b/src/java/org/apache/fop/accessibility/fo/StructureTreeEventTrigger.java
@@ -221,14 +221,17 @@ class StructureTreeEventTrigger extends FOEventHandler {
@Override
public void startCell(TableCell tc) {
AttributesImpl attributes = new AttributesImpl();
- int colSpan = tc.getNumberColumnsSpanned();
- if (colSpan > 1) {
- addNoNamespaceAttribute(attributes, "number-columns-spanned",
- Integer.toString(colSpan));
- }
+ addSpanAttribute(attributes, "number-columns-spanned", tc.getNumberColumnsSpanned());
+ addSpanAttribute(attributes, "number-rows-spanned", tc.getNumberRowsSpanned());
startElement(tc, attributes);
}
+ private void addSpanAttribute(AttributesImpl attributes, String attributeName, int span) {
+ if (span > 1) {
+ addNoNamespaceAttribute(attributes, attributeName, Integer.toString(span));
+ }
+ }
+
@Override
public void endCell(TableCell tc) {
endElement(tc);