aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/area
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2009-09-18 17:10:42 +0000
committerVincent Hennebert <vhennebert@apache.org>2009-09-18 17:10:42 +0000
commit0e5a789b6b0604bb9c6cc9b782c22f490917e9f9 (patch)
tree70af78b83ebd8d83f4576c8b9329113ee34aae0f /src/java/org/apache/fop/area
parentc5d9b312e01efc7f96a30043d73945594504c7d0 (diff)
parent9b49126cd645f4377d1bb56d5078a8d4a0cd491e (diff)
downloadxmlgraphics-fop-0e5a789b6b0604bb9c6cc9b782c22f490917e9f9.tar.gz
xmlgraphics-fop-0e5a789b6b0604bb9c6cc9b782c22f490917e9f9.zip
Merged changes from Trunk up to revision 816269
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Accessibility@816718 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/area')
-rw-r--r--src/java/org/apache/fop/area/AreaTreeParser.java9
-rw-r--r--src/java/org/apache/fop/area/PageViewport.java13
2 files changed, 12 insertions, 10 deletions
diff --git a/src/java/org/apache/fop/area/AreaTreeParser.java b/src/java/org/apache/fop/area/AreaTreeParser.java
index d2af24a01..25d110086 100644
--- a/src/java/org/apache/fop/area/AreaTreeParser.java
+++ b/src/java/org/apache/fop/area/AreaTreeParser.java
@@ -20,6 +20,7 @@
package org.apache.fop.area;
import java.awt.Color;
+import java.awt.Rectangle;
import java.awt.geom.Rectangle2D;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -38,9 +39,10 @@ import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
-
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.Locator;
@@ -48,9 +50,6 @@ import org.xml.sax.SAXException;
import org.xml.sax.helpers.AttributesImpl;
import org.xml.sax.helpers.DefaultHandler;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import org.apache.xmlgraphics.image.loader.ImageException;
import org.apache.xmlgraphics.image.loader.ImageInfo;
import org.apache.xmlgraphics.image.loader.ImageManager;
@@ -404,7 +403,7 @@ public class AreaTreeParser {
if (currentPageViewport != null) {
throw new IllegalStateException("currentPageViewport must be null");
}
- Rectangle2D viewArea = XMLUtil.getAttributeAsRectangle2D(attributes, "bounds");
+ Rectangle viewArea = XMLUtil.getAttributeAsRectangle(attributes, "bounds");
int pageNumber = XMLUtil.getAttributeAsInt(attributes, "nr", -1);
String key = attributes.getValue("key");
String pageNumberString = attributes.getValue("formatted-nr");
diff --git a/src/java/org/apache/fop/area/PageViewport.java b/src/java/org/apache/fop/area/PageViewport.java
index 321ca4c03..63740386e 100644
--- a/src/java/org/apache/fop/area/PageViewport.java
+++ b/src/java/org/apache/fop/area/PageViewport.java
@@ -20,7 +20,6 @@
package org.apache.fop.area;
import java.awt.Rectangle;
-import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
@@ -48,7 +47,7 @@ import org.apache.fop.fo.pagination.SimplePageMaster;
public class PageViewport extends AreaTreeObject implements Resolvable, Cloneable {
private Page page;
- private Rectangle2D viewArea;
+ private Rectangle viewArea;
private String simplePageMasterName;
/**
@@ -100,6 +99,7 @@ public class PageViewport extends AreaTreeObject implements Resolvable, Cloneabl
public PageViewport(SimplePageMaster spm, int pageNumber, String pageStr, boolean blank) {
this.simplePageMasterName = spm.getMasterName();
setExtensionAttachments(spm.getExtensionAttachments());
+ setForeignAttributes(spm.getForeignAttributes());
this.blank = blank;
int pageWidth = spm.getPageWidth().getValue();
int pageHeight = spm.getPageHeight().getValue();
@@ -118,11 +118,14 @@ public class PageViewport extends AreaTreeObject implements Resolvable, Cloneabl
if (original.extensionAttachments != null) {
setExtensionAttachments(original.extensionAttachments);
}
+ if (original.foreignAttributes != null) {
+ setForeignAttributes(original.foreignAttributes);
+ }
this.pageIndex = original.pageIndex;
this.pageNumber = original.pageNumber;
this.pageNumberString = original.pageNumberString;
this.page = (Page)original.page.clone();
- this.viewArea = (Rectangle2D)original.viewArea.clone();
+ this.viewArea = new Rectangle(original.viewArea);
this.simplePageMasterName = original.simplePageMasterName;
this.blank = original.blank;
}
@@ -135,7 +138,7 @@ public class PageViewport extends AreaTreeObject implements Resolvable, Cloneabl
* @param simplePageMasterName name of the original simple-page-master that generated this page
* @param blank true if this is a blank page
*/
- public PageViewport(Rectangle2D viewArea, int pageNumber, String pageStr,
+ public PageViewport(Rectangle viewArea, int pageNumber, String pageStr,
String simplePageMasterName, boolean blank) {
this.viewArea = viewArea;
this.pageNumber = pageNumber;
@@ -161,7 +164,7 @@ public class PageViewport extends AreaTreeObject implements Resolvable, Cloneabl
* Get the view area rectangle of this viewport.
* @return the rectangle for this viewport
*/
- public Rectangle2D getViewArea() {
+ public Rectangle getViewArea() {
return viewArea;
}