aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/extensions
diff options
context:
space:
mode:
authorWilliam Victor Mote <vmote@apache.org>2003-09-02 13:56:40 +0000
committerWilliam Victor Mote <vmote@apache.org>2003-09-02 13:56:40 +0000
commit37f1c80b0f0f99b96fc06a560aaeb41c7b409dfe (patch)
treecc7251dc30ea6938784d3be7c93f5602a24fcf4c /src/java/org/apache/fop/fo/extensions
parentb35e94b1df6972593ec2b0ac2fabb560feaddb35 (diff)
downloadxmlgraphics-fop-37f1c80b0f0f99b96fc06a560aaeb41c7b409dfe.tar.gz
xmlgraphics-fop-37f1c80b0f0f99b96fc06a560aaeb41c7b409dfe.zip
Remove storage of apps/FOUserAgent from fo/FONode in favor of storing it once in a higher level class (currently Driver), and accessing it from there. Cleaner design, uses less memory, at the expense of some additional processing time to come up the tree to find the information.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196888 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/extensions')
-rw-r--r--src/java/org/apache/fop/fo/extensions/svg/SVGElement.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/fo/extensions/svg/SVGElement.java b/src/java/org/apache/fop/fo/extensions/svg/SVGElement.java
index 893a72041..44d61c800 100644
--- a/src/java/org/apache/fop/fo/extensions/svg/SVGElement.java
+++ b/src/java/org/apache/fop/fo/extensions/svg/SVGElement.java
@@ -114,7 +114,7 @@ public class SVGElement extends SVGObj {
/* if width and height are zero, get the bounds of the content. */
try {
- String baseDir = userAgent.getBaseURL();
+ String baseDir = getUserAgent().getBaseURL();
if (baseDir != null) {
((SVGOMDocument)doc).setURLObject(new URL(baseDir));
}
@@ -123,7 +123,7 @@ public class SVGElement extends SVGObj {
}
Element e = ((SVGDocument)doc).getRootElement();
- final float ptmm = userAgent.getPixelUnitToMillimeter();
+ final float ptmm = getUserAgent().getPixelUnitToMillimeter();
// temporary svg context
SVGContext dc = new SVGContext() {
public float getPixelToMM() {
@@ -179,7 +179,7 @@ public class SVGElement extends SVGObj {
SVGDOMImplementation.SVG_NAMESPACE_URI);
//}
int fontSize = 12;
- Point2D p2d = getSize(fontSize, svgRoot, userAgent.getPixelUnitToMillimeter());
+ Point2D p2d = getSize(fontSize, svgRoot, getUserAgent().getPixelUnitToMillimeter());
((SVGOMElement)e).setSVGContext(null);
return p2d;