aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/fo')
-rw-r--r--src/java/org/apache/fop/fo/FObj.java2
-rw-r--r--src/java/org/apache/fop/fo/expr/BodyStartFunction.java13
-rw-r--r--src/java/org/apache/fop/fo/expr/LabelEndFunction.java14
-rw-r--r--src/java/org/apache/fop/fo/flow/Character.java7
-rw-r--r--src/java/org/apache/fop/fo/flow/ExternalGraphic.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/InstreamForeignObject.java6
-rw-r--r--src/java/org/apache/fop/fo/flow/TableCell.java6
-rw-r--r--src/java/org/apache/fop/fo/pagination/ColorProfile.java12
-rw-r--r--src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/PageSequence.java4
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionBA.java8
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionSE.java4
-rw-r--r--src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/SimplePageMaster.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java2
-rw-r--r--src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java12
16 files changed, 33 insertions, 65 deletions
diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java
index d81d61123..54b585133 100644
--- a/src/java/org/apache/fop/fo/FObj.java
+++ b/src/java/org/apache/fop/fo/FObj.java
@@ -316,7 +316,7 @@ public class FObj extends FONode implements Constants {
* @param marker Marker to add.
*/
protected void addMarker(Marker marker) {
- String mcname = marker.getPropString(PR_MARKER_CLASS_NAME);
+ String mcname = marker.getMarkerClassName();
if (childNodes != null) {
// check for empty childNodes
for (Iterator iter = childNodes.iterator(); iter.hasNext();) {
diff --git a/src/java/org/apache/fop/fo/expr/BodyStartFunction.java b/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
index f58b17718..d064ee998 100644
--- a/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
+++ b/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
@@ -20,7 +20,7 @@ package org.apache.fop.fo.expr;
import org.apache.fop.datatypes.Numeric;
import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.flow.ListItem;
import org.apache.fop.fo.properties.Property;
@@ -49,16 +49,15 @@ public class BodyStartFunction extends FunctionBase {
Numeric distance =
pInfo.getPropertyList().get(Constants.PR_PROVISIONAL_DISTANCE_BETWEEN_STARTS).getNumeric();
- FONode item = pInfo.getFO();
- while (item != null && !(item instanceof ListItem)) {
- item = item.getParent();
+ PropertyList pList = pInfo.getPropertyList();
+ while (pList != null && !(pList.getFObj() instanceof ListItem)) {
+ pList = pList.getParentPropertyList();
}
- if (item == null) {
+ if (pList == null) {
throw new PropertyException("body-start() called from outside an fo:list-item");
}
- Numeric startIndent =
- ((ListItem)item).getProperty(Constants.PR_START_INDENT).getNumeric();
+ Numeric startIndent = pList.get(Constants.PR_START_INDENT).getNumeric();
return (Property) NumericOp.addition(distance, startIndent);
}
diff --git a/src/java/org/apache/fop/fo/expr/LabelEndFunction.java b/src/java/org/apache/fop/fo/expr/LabelEndFunction.java
index 5e88418e2..5b74fb41b 100644
--- a/src/java/org/apache/fop/fo/expr/LabelEndFunction.java
+++ b/src/java/org/apache/fop/fo/expr/LabelEndFunction.java
@@ -22,7 +22,7 @@ import org.apache.fop.datatypes.Numeric;
import org.apache.fop.datatypes.Length;
import org.apache.fop.datatypes.LengthBase;
import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.flow.ListItem;
import org.apache.fop.fo.properties.PercentLength;
import org.apache.fop.fo.properties.Property;
@@ -56,17 +56,17 @@ public class LabelEndFunction extends FunctionBase {
Length separation =
pInfo.getPropertyList().getNearestSpecified(Constants.PR_PROVISIONAL_LABEL_SEPARATION).getLength();
- FONode item = pInfo.getFO();
- while (item != null && !(item instanceof ListItem)) {
- item = item.getParent();
+ PropertyList pList = pInfo.getPropertyList();
+ while (pList != null && !(pList.getFObj() instanceof ListItem)) {
+ pList = pList.getParentPropertyList();
}
- if (item == null) {
+ if (pList == null) {
throw new PropertyException("label-end() called from outside an fo:list-item");
}
- Length startIndent = ((ListItem)item).getProperty(Constants.PR_START_INDENT).getLength();
+ Length startIndent = pList.get(Constants.PR_START_INDENT).getLength();
// Should be CONTAINING_REFAREA but that doesn't work
- LengthBase base = new LengthBase((ListItem)item, pInfo.getPropertyList(),
+ LengthBase base = new LengthBase(pList.getFObj(), pInfo.getPropertyList(),
LengthBase.CONTAINING_BOX);
PercentLength refWidth = new PercentLength(1.0, base);
diff --git a/src/java/org/apache/fop/fo/flow/Character.java b/src/java/org/apache/fop/fo/flow/Character.java
index 464ae434a..959a60036 100644
--- a/src/java/org/apache/fop/fo/flow/Character.java
+++ b/src/java/org/apache/fop/fo/flow/Character.java
@@ -229,11 +229,8 @@ public class Character extends FObj {
* @see org.apache.fop.fo.FONode#addLayoutManager(List)
*/
public void addLayoutManager(List list) {
- String str = getPropString(PR_CHARACTER);
- if (str.length() == 1) {
- CharacterLayoutManager lm = new CharacterLayoutManager(this);
- list.add(lm);
- }
+ CharacterLayoutManager lm = new CharacterLayoutManager(this);
+ list.add(lm);
}
/**
diff --git a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
index 344886140..20ee6d03f 100644
--- a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
+++ b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
@@ -245,7 +245,7 @@ public class ExternalGraphic extends FObj {
* @see org.apache.fop.fo.FONode#addLayoutManager(List)
*/
public void addLayoutManager(List list) {
- if (getPropString(PR_SRC) != null) {
+ if (!src.equals("")) {
ExternalGraphicLayoutManager lm = new ExternalGraphicLayoutManager(this);
list.add(lm);
}
diff --git a/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java b/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java
index debf9b9a5..f33ea4087 100644
--- a/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java
+++ b/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java
@@ -150,8 +150,7 @@ public class InstreamForeignObject extends FObj {
public int computeXOffset (int ipd, int cwidth) {
int xoffset = 0;
- int ta = getPropEnum(PR_TEXT_ALIGN);
- switch (ta) {
+ switch (textAlign) {
case TextAlign.CENTER:
xoffset = (ipd - cwidth) / 2;
break;
@@ -169,8 +168,7 @@ public class InstreamForeignObject extends FObj {
public int computeYOffset(int bpd, int cheight) {
int yoffset = 0;
- int da = getPropEnum(PR_DISPLAY_ALIGN);
- switch (da) {
+ switch (displayAlign) {
case DisplayAlign.BEFORE:
break;
case DisplayAlign.AFTER:
diff --git a/src/java/org/apache/fop/fo/flow/TableCell.java b/src/java/org/apache/fop/fo/flow/TableCell.java
index e8c92613d..2c86fc948 100644
--- a/src/java/org/apache/fop/fo/flow/TableCell.java
+++ b/src/java/org/apache/fop/fo/flow/TableCell.java
@@ -202,8 +202,7 @@ public class TableCell extends FObj {
* border-separate should only be specified on the table object,
* but it inherits.
*/
- int iSep = getPropLength(PR_BORDER_SEPARATION |
- CP_INLINE_PROGRESSION_DIRECTION);
+ int iSep = borderSeparation.getIPD().getLength().getValue();
this.startAdjust = iSep / 2 + bp.getBorderStartWidth(false)
+ bp.getPaddingStart(false);
@@ -212,8 +211,7 @@ public class TableCell extends FObj {
+ bp.getPaddingEnd(false);
// Offset of content rectangle in the block-progression direction
- int bSep = getPropLength(PR_BORDER_SEPARATION |
- CP_BLOCK_PROGRESSION_DIRECTION);
+ int bSep = borderSeparation.getBPD().getLength().getValue();
this.beforeOffset = bSep / 2
+ bp.getBorderBeforeWidth(false)
+ bp.getPaddingBefore(false);
diff --git a/src/java/org/apache/fop/fo/pagination/ColorProfile.java b/src/java/org/apache/fop/fo/pagination/ColorProfile.java
index ba99cdb38..3ada5b3b4 100644
--- a/src/java/org/apache/fop/fo/pagination/ColorProfile.java
+++ b/src/java/org/apache/fop/fo/pagination/ColorProfile.java
@@ -67,18 +67,6 @@ public class ColorProfile extends FObj {
}
/**
- * Special processing for the end of parsing an ColorProfile object.
- * Extract instance variables from the collection of properties for this
- * object.
- */
- protected void endOfNode() throws SAXParseException {
- src = getPropString(PR_SRC);
- profileName = getPropString(PR_COLOR_PROFILE_NAME);
- intent = getPropEnum(PR_RENDERING_INTENT);
- this.propertyList = null;
- }
-
- /**
* @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
XSL 1.0/FOP: EMPTY (no child nodes permitted)
*/
diff --git a/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java b/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java
index 40073f761..d765b943d 100644
--- a/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java
+++ b/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java
@@ -145,7 +145,7 @@ public class LayoutMasterSet extends FObj {
throws SAXParseException {
// check for duplication of master-name
- String masterName = sPM.getPropString(PR_MASTER_NAME);
+ String masterName = sPM.getMasterName();
if (existsName(masterName)) {
throw new SAXParseException("'master-name' ("
+ masterName
diff --git a/src/java/org/apache/fop/fo/pagination/PageSequence.java b/src/java/org/apache/fop/fo/pagination/PageSequence.java
index 939b8eb83..8478cfcff 100644
--- a/src/java/org/apache/fop/fo/pagination/PageSequence.java
+++ b/src/java/org/apache/fop/fo/pagination/PageSequence.java
@@ -251,7 +251,7 @@ public class PageSequence extends FObj {
super.addChildNode(child); // For getChildren
} else if (childId == FO_STATIC_CONTENT) {
addFlow((StaticContent) child);
- String flowName = ((StaticContent) child).getPropString(PR_FLOW_NAME);
+ String flowName = ((StaticContent) child).getFlowName();
flowMap.put(flowName, child);
startStructuredPageSequence();
}
@@ -264,7 +264,7 @@ public class PageSequence extends FObj {
* used to generate that page.
*/
private void addFlow(Flow flow) throws SAXParseException {
- String flowName = flow.getPropString(PR_FLOW_NAME);
+ String flowName = flow.getFlowName();
if (hasFlowName(flowName)) {
throw new SAXParseException ("duplicate flow-name \""
diff --git a/src/java/org/apache/fop/fo/pagination/RegionBA.java b/src/java/org/apache/fop/fo/pagination/RegionBA.java
index 34fba9c91..5b9df542d 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionBA.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionBA.java
@@ -79,14 +79,14 @@ public abstract class RegionBA extends Region {
*/
protected void adjustIPD(Rectangle vpRefRect, int wm) {
int offset = 0;
- Region start = getSiblingRegion(FO_REGION_START);
+ RegionStart start = (RegionStart) getSiblingRegion(FO_REGION_START);
if (start != null) {
- offset = start.getPropLength(PR_EXTENT);
+ offset = start.getExtent().getValue();
vpRefRect.translate(offset, 0); // move (x, y) units
}
- Region end = getSiblingRegion(FO_REGION_END);
+ RegionEnd end = (RegionEnd) getSiblingRegion(FO_REGION_END);
if (end != null) {
- offset += end.getPropLength(PR_EXTENT);
+ offset += end.getExtent().getValue();
}
if (offset > 0) {
if (wm == WritingMode.LR_TB || wm == WritingMode.RL_TB) {
diff --git a/src/java/org/apache/fop/fo/pagination/RegionSE.java b/src/java/org/apache/fop/fo/pagination/RegionSE.java
index dc8839c6d..584a5996d 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionSE.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionSE.java
@@ -73,12 +73,12 @@ public abstract class RegionSE extends Region {
int offset = 0;
RegionBefore before = (RegionBefore) getSiblingRegion(FO_REGION_BEFORE);
if (before != null && before.getPrecedence() == TRUE) {
- offset = before.getPropLength(PR_EXTENT);
+ offset = before.getExtent().getValue();
vpRefRect.translate(0, offset);
}
RegionAfter after = (RegionAfter) getSiblingRegion(FO_REGION_AFTER);
if (after != null && after.getPrecedence() == TRUE) {
- offset += after.getPropLength(PR_EXTENT);
+ offset += after.getExtent().getValue();
}
if (offset > 0) {
if (wm == WritingMode.LR_TB || wm == WritingMode.RL_TB) {
diff --git a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java
index 1b66cbea2..21b6af66d 100644
--- a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java
+++ b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java
@@ -96,7 +96,7 @@ public class RepeatablePageMasterReference extends FObj
return null;
}
}
- return getPropString(PR_MASTER_REFERENCE);
+ return masterReference;
}
/**
diff --git a/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java b/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java
index 8f39e759c..0bb663e84 100644
--- a/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java
+++ b/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java
@@ -237,7 +237,7 @@ public class SimplePageMaster extends FObj {
* Return "master-name" property.
*/
public String getMasterName() {
- return getPropString(PR_MASTER_NAME);
+ return masterName;
}
/**
diff --git a/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java b/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java
index faa61c0aa..7507a5233 100644
--- a/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java
+++ b/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java
@@ -88,7 +88,7 @@ public class SinglePageMasterReference extends FObj
boolean isEmptyPage) {
if (this.state == FIRST) {
this.state = DONE;
- return getPropString(PR_MASTER_REFERENCE);
+ return masterReference;
} else {
return null;
}
diff --git a/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java b/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java
index 7a12e0bdc..b1c3ae563 100644
--- a/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java
+++ b/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java
@@ -92,16 +92,4 @@ public class LineHeightPropertyMaker extends SpaceProperty.Maker {
}
return super.convertProperty(p, propertyList, fo);
}
-
- /*
- protected Property convertPropertyDatatype(Property p,
- PropertyList propertyList,
- FObj fo) {
- Number numval = p.getNumber();
- if (numval != null) {
- return new PercentLength(numval.doubleValue(), getPercentBase(fo,propertyList));
- }
- return super.convertPropertyDatatype(p, propertyList, fo);
- }
- */
}