aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWilliam Victor Mote <vmote@apache.org>2003-05-01 04:42:43 +0000
committerWilliam Victor Mote <vmote@apache.org>2003-05-01 04:42:43 +0000
commitee2b8152997a5c17e158624755c421a53301c82d (patch)
tree570a86f7c3a0db4dc91c3136696c2e5c07677886 /src
parentab3c2b259a46f506c78bcba4b50a175fabe5f5d4 (diff)
downloadxmlgraphics-fop-ee2b8152997a5c17e158624755c421a53301c82d.tar.gz
xmlgraphics-fop-ee2b8152997a5c17e158624755c421a53301c82d.zip
Refactor: Extract method FObj.getPropertiesForNamespace() from PropertyListBuilder.makeList().
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196381 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/fo/FObj.java10
-rw-r--r--src/java/org/apache/fop/fo/PropertyListBuilder.java12
2 files changed, 13 insertions, 9 deletions
diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java
index 650d8c7d8..9caf7af97 100644
--- a/src/java/org/apache/fop/fo/FObj.java
+++ b/src/java/org/apache/fop/fo/FObj.java
@@ -172,6 +172,16 @@ public class FObj extends FONode {
return (FObj)par;
}
+ public PropertyList getPropertiesForNamespace(String nameSpaceURI) {
+ if (this.properties == null) {
+ return null;
+ }
+ if (! nameSpaceURI.equals(this.properties.getNameSpace())) {
+ return null;
+ }
+ return this.properties;
+ }
+
protected PropertyManager makePropertyManager(
PropertyList propertyList) {
return new PropertyManager(propertyList);
diff --git a/src/java/org/apache/fop/fo/PropertyListBuilder.java b/src/java/org/apache/fop/fo/PropertyListBuilder.java
index e0addaed5..2c49f2e6e 100644
--- a/src/java/org/apache/fop/fo/PropertyListBuilder.java
+++ b/src/java/org/apache/fop/fo/PropertyListBuilder.java
@@ -138,18 +138,12 @@ public class PropertyListBuilder {
nameSpaceURIToUse = nameSpaceURI;
}
FObj parentFO = fo.findNearestAncestorFObj();
-
- PropertyList parentPropertyList = null;
+ PropertyList parentProperties = null;
if (parentFO != null) {
- parentPropertyList = parentFO.properties;
- }
- PropertyList par = null;
- if (parentPropertyList != null
- && nameSpaceURIToUse.equals(parentPropertyList.getNameSpace())) {
- par = parentPropertyList;
+ parentProperties = parentFO.getPropertiesForNamespace(nameSpaceURIToUse);
}
- PropertyList p = new PropertyList(par, nameSpaceURIToUse,
+ PropertyList p = new PropertyList(parentProperties, nameSpaceURIToUse,
elementName);
p.setBuilder(this);
HashMap table;