aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/area/AreaTreeModel.java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-01-28 15:04:39 +0000
committerJeremias Maerki <jeremias@apache.org>2008-01-28 15:04:39 +0000
commit1ea8b13df56f773fc3d28a9a4b69ed1ed8b97cf4 (patch)
treeaa175e32ee1cee808287fee13ff980747cfcc262 /src/java/org/apache/fop/area/AreaTreeModel.java
parent74b2adc7ebb1c898d17bc5778de412522512d4c8 (diff)
downloadxmlgraphics-fop-1ea8b13df56f773fc3d28a9a4b69ed1ed8b97cf4.tar.gz
xmlgraphics-fop-1ea8b13df56f773fc3d28a9a4b69ed1ed8b97cf4.zip
Added support for the natural language indentifier ("Lang" in the document catalog) for PDF documents based on the language/country values on fo:page-sequence. This required a few changes in the AreaTreeModel and the Renderer interface because it didn't support passing through the PageSequence object, only its title. Now, we can put other values on the PageSequence and transport them to the renderers.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@615906 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/area/AreaTreeModel.java')
-rw-r--r--src/java/org/apache/fop/area/AreaTreeModel.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/area/AreaTreeModel.java b/src/java/org/apache/fop/area/AreaTreeModel.java
index bdbb88f2a..c43db31bb 100644
--- a/src/java/org/apache/fop/area/AreaTreeModel.java
+++ b/src/java/org/apache/fop/area/AreaTreeModel.java
@@ -22,10 +22,8 @@ package org.apache.fop.area;
// Java
import java.util.List;
-// XML
import org.xml.sax.SAXException;
-// Apache
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -55,10 +53,13 @@ public class AreaTreeModel {
/**
* Start a page sequence on this model.
- * @param title the title of the new page sequence
+ * @param pageSequence the page sequence about to start
*/
- public void startPageSequence(LineArea title) {
- currentPageSequence = new PageSequence(title);
+ public void startPageSequence(PageSequence pageSequence) {
+ if (pageSequence == null) {
+ throw new NullPointerException("pageSequence must not be null");
+ }
+ this.currentPageSequence = pageSequence;
pageSequenceList.add(currentPageSequence);
currentPageSequenceIndex = pageSequenceList.size() - 1;
}
@@ -91,6 +92,14 @@ public class AreaTreeModel {
public void endDocument() throws SAXException {};
/**
+ * Returns the currently active page-sequence.
+ * @return the currently active page-sequence
+ */
+ public PageSequence getCurrentPageSequence() {
+ return this.currentPageSequence;
+ }
+
+ /**
* Get the page sequence count.
* @return the number of page sequences in the document.
*/