aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination/bookmarks
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2011-10-24 16:29:56 +0000
committerVincent Hennebert <vhennebert@apache.org>2011-10-24 16:29:56 +0000
commitb073a605e44760bcb7add72968a3a2f78cf06d97 (patch)
tree50501d5167416c5a5a31f2319102efee829a8bd8 /src/java/org/apache/fop/fo/pagination/bookmarks
parent29ecb2d96c4c4b75785e160a55c7dc436cfef860 (diff)
downloadxmlgraphics-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/pagination/bookmarks')
-rw-r--r--src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java13
-rw-r--r--src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTitle.java18
2 files changed, 28 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java b/src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java
index 5969729d4..5348e88e3 100644
--- a/src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java
+++ b/src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java
@@ -22,11 +22,14 @@ package org.apache.fop.fo.pagination.bookmarks;
import java.util.ArrayList;
import org.xml.sax.Locator;
+
import org.apache.fop.apps.FOPException;
-import org.apache.fop.fo.FObj;
import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FObj;
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;
/**
@@ -34,11 +37,12 @@ import org.apache.fop.fo.ValidationException;
* <code>fo:bookmark</code></a> object, first introduced in the
* XSL 1.1 WD.
*/
-public class Bookmark extends FObj {
+public class Bookmark extends FObj implements CommonAccessibilityHolder {
private BookmarkTitle bookmarkTitle;
private ArrayList childBookmarks = new ArrayList();
// The value of properties relevant for this FO
+ private CommonAccessibility commonAccessibility;
private String internalDestination;
private String externalDestination;
private boolean bShow = true; // from starting-state property
@@ -59,6 +63,7 @@ public class Bookmark extends FObj {
/** {@inheritDoc} */
public void bind(PropertyList pList) throws FOPException {
+ commonAccessibility = CommonAccessibility.getInstance(pList);
externalDestination = pList.get(PR_EXTERNAL_DESTINATION).getString();
internalDestination = pList.get(PR_INTERNAL_DESTINATION).getString();
bShow = (pList.get(PR_STARTING_STATE).getEnum() == EN_SHOW);
@@ -112,6 +117,10 @@ public class Bookmark extends FObj {
}
}
+ public CommonAccessibility getCommonAccessibility() {
+ return commonAccessibility;
+ }
+
/**
* Get the bookmark title for this bookmark
*
diff --git a/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTitle.java b/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTitle.java
index 028cdc7df..f4441934d 100644
--- a/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTitle.java
+++ b/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTitle.java
@@ -21,17 +21,23 @@ package org.apache.fop.fo.pagination.bookmarks;
import org.xml.sax.Locator;
+import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
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_bookmark-title">
* <code>fo:bookmark-title</code></a> object, first introduced in the
* XSL 1.1 WD.
*/
-public class BookmarkTitle extends FObj {
+public class BookmarkTitle extends FObj implements CommonAccessibilityHolder {
+
+ private CommonAccessibility commonAccessibility;
+
private String title = "";
/**
@@ -44,6 +50,12 @@ public class BookmarkTitle extends FObj {
super(parent);
}
+ @Override
+ public void bind(PropertyList pList) throws FOPException {
+ super.bind(pList);
+ commonAccessibility = CommonAccessibility.getInstance(pList);
+ }
+
/**
* Add the characters to this BookmarkTitle.
* The text data inside the BookmarkTitle xml element
@@ -72,6 +84,10 @@ public class BookmarkTitle extends FObj {
}
}
+ public CommonAccessibility getCommonAccessibility() {
+ return commonAccessibility;
+ }
+
/**
* Get the title for this BookmarkTitle.
*