aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/flow
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/fo/flow')
-rw-r--r--src/java/org/apache/fop/fo/flow/BasicLink.java4
-rw-r--r--src/java/org/apache/fop/fo/flow/ExternalGraphic.java22
-rw-r--r--src/java/org/apache/fop/fo/flow/InstreamForeignObject.java4
-rw-r--r--src/java/org/apache/fop/fo/flow/Leader.java10
-rw-r--r--src/java/org/apache/fop/fo/flow/ListBlock.java16
-rw-r--r--src/java/org/apache/fop/fo/flow/ListItem.java10
-rw-r--r--src/java/org/apache/fop/fo/flow/PageNumber.java4
-rw-r--r--src/java/org/apache/fop/fo/flow/PageNumberCitation.java6
-rw-r--r--src/java/org/apache/fop/fo/flow/RetrieveMarker.java6
-rw-r--r--src/java/org/apache/fop/fo/flow/Table.java20
-rw-r--r--src/java/org/apache/fop/fo/flow/TableBody.java6
-rw-r--r--src/java/org/apache/fop/fo/flow/TableCell.java20
-rw-r--r--src/java/org/apache/fop/fo/flow/TableColumn.java10
13 files changed, 69 insertions, 69 deletions
diff --git a/src/java/org/apache/fop/fo/flow/BasicLink.java b/src/java/org/apache/fop/fo/flow/BasicLink.java
index abff1d3f4..4d237ebcd 100644
--- a/src/java/org/apache/fop/fo/flow/BasicLink.java
+++ b/src/java/org/apache/fop/fo/flow/BasicLink.java
@@ -102,10 +102,10 @@ public class BasicLink extends Inline {
// this.propertyList.get("baseline-shift");
// this.propertyList.get("destination-place-offset");
// this.propertyList.get("dominant-baseline");
- String ext = propertyList.get("external-destination").getString();
+ String ext = propertyList.get(PR_EXTERNAL_DESTINATION).getString();
setupID();
// this.propertyList.get("indicate-destination");
- String internal = propertyList.get("internal-destination").getString();
+ String internal = propertyList.get(PR_INTERNAL_DESTINATION).getString();
if (ext.length() > 0) {
link = ext;
external = true;
diff --git a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
index dc0632516..82dec643b 100644
--- a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
+++ b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
@@ -102,27 +102,27 @@ public class ExternalGraphic extends FObj {
* This gets the sizes for the image and the dimensions and clipping.
*/
public void setup() {
- url = this.propertyList.get("src").getString();
+ url = this.propertyList.get(PR_SRC).getString();
if (url == null) {
return;
}
url = ImageFactory.getURL(url);
// assume lr-tb for now
- Length ipd = propertyList.get("inline-progression-dimension.optimum").getLength();
+ Length ipd = propertyList.get(PR_INLINE_PROGRESSION_DIMENSION).getLength();
if (!ipd.isAuto()) {
viewWidth = ipd.getValue();
} else {
- ipd = propertyList.get("width").getLength();
+ ipd = propertyList.get(PR_WIDTH).getLength();
if (!ipd.isAuto()) {
viewWidth = ipd.getValue();
}
}
- Length bpd = propertyList.get("block-progression-dimension.optimum").getLength();
+ Length bpd = propertyList.get(PR_BLOCK_PROGRESSION_DIMENSION | CP_OPTIMUM).getLength();
if (!bpd.isAuto()) {
viewHeight = bpd.getValue();
} else {
- bpd = propertyList.get("height").getLength();
+ bpd = propertyList.get(PR_HEIGHT).getLength();
if (!bpd.isAuto()) {
viewHeight = bpd.getValue();
}
@@ -133,7 +133,7 @@ public class ExternalGraphic extends FObj {
int cwidth = -1;
int cheight = -1;
- Length ch = propertyList.get("content-height").getLength();
+ Length ch = propertyList.get(PR_CONTENT_HEIGHT).getLength();
if (!ch.isAuto()) {
/*if (ch.scaleToFit()) {
if (viewHeight != -1) {
@@ -142,7 +142,7 @@ public class ExternalGraphic extends FObj {
} else {*/
cheight = ch.getValue();
}
- Length cw = propertyList.get("content-width").getLength();
+ Length cw = propertyList.get(PR_CONTENT_WIDTH).getLength();
if (!cw.isAuto()) {
/*if (cw.scaleToFit()) {
if (viewWidth != -1) {
@@ -152,7 +152,7 @@ public class ExternalGraphic extends FObj {
cwidth = cw.getValue();
}
- int scaling = propertyList.get("scaling").getEnum();
+ int scaling = propertyList.get(PR_SCALING).getEnum();
if ((scaling == Scaling.UNIFORM) || (cwidth == -1) || cheight == -1) {
ImageFactory fact = ImageFactory.getInstance();
fopimage = fact.getImage(url, getUserAgent());
@@ -195,7 +195,7 @@ public class ExternalGraphic extends FObj {
}
if (cwidth > viewWidth || cheight > viewHeight) {
- int overflow = propertyList.get("overflow").getEnum();
+ int overflow = propertyList.get(PR_OVERFLOW).getEnum();
if (overflow == Overflow.HIDDEN) {
clip = true;
} else if (overflow == Overflow.ERROR_IF_OVERFLOW) {
@@ -207,7 +207,7 @@ public class ExternalGraphic extends FObj {
int xoffset = 0;
int yoffset = 0;
- int da = propertyList.get("display-align").getEnum();
+ int da = propertyList.get(PR_DISPLAY_ALIGN).getEnum();
switch(da) {
case DisplayAlign.BEFORE:
break;
@@ -222,7 +222,7 @@ public class ExternalGraphic extends FObj {
break;
}
- int ta = propertyList.get("text-align").getEnum();
+ int ta = propertyList.get(PR_TEXT_ALIGN).getEnum();
switch(ta) {
case TextAlign.CENTER:
xoffset = (viewWidth - cwidth) / 2;
diff --git a/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java b/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java
index 0eaa19d16..1987dec13 100644
--- a/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java
+++ b/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java
@@ -74,7 +74,7 @@ public class InstreamForeignObject extends FObj {
public int computeXOffset (int ipd, int cwidth) {
int xoffset = 0;
- int ta = propertyList.get("text-align").getEnum();
+ int ta = propertyList.get(PR_TEXT_ALIGN).getEnum();
switch (ta) {
case TextAlign.CENTER:
xoffset = (ipd - cwidth) / 2;
@@ -93,7 +93,7 @@ public class InstreamForeignObject extends FObj {
public int computeYOffset(int bpd, int cheight) {
int yoffset = 0;
- int da = propertyList.get("display-align").getEnum();
+ int da = propertyList.get(PR_DISPLAY_ALIGN).getEnum();
switch (da) {
case DisplayAlign.BEFORE:
break;
diff --git a/src/java/org/apache/fop/fo/flow/Leader.java b/src/java/org/apache/fop/fo/flow/Leader.java
index d1691a3e5..538cea7b1 100644
--- a/src/java/org/apache/fop/fo/flow/Leader.java
+++ b/src/java/org/apache/fop/fo/flow/Leader.java
@@ -130,14 +130,14 @@ public class Leader extends FObjMixed {
// this.propertyList.get("z-index");
// color properties
- ColorType c = this.propertyList.get("color").getColorType();
+ ColorType c = this.propertyList.get(PR_COLOR).getColorType();
float red = c.getRed();
float green = c.getGreen();
float blue = c.getBlue();
// fo:leader specific properties
// determines the pattern of leader; allowed values: space, rule,dots, use-content
- leaderPattern = this.propertyList.get("leader-pattern").getEnum();
+ leaderPattern = this.propertyList.get(PR_LEADER_PATTERN).getEnum();
switch(leaderPattern) {
case LeaderPattern.SPACE:
// use Space
@@ -146,8 +146,8 @@ public class Leader extends FObjMixed {
// the following properties only apply
// for leader-pattern = "rule"
ruleThickness =
- propertyList.get("rule-thickness").getLength().getValue();
- ruleStyle = propertyList.get("rule-style").getEnum();
+ propertyList.get(PR_RULE_THICKNESS).getLength().getValue();
+ ruleStyle = propertyList.get(PR_RULE_STYLE).getEnum();
break;
case LeaderPattern.DOTS:
break;
@@ -159,7 +159,7 @@ public class Leader extends FObjMixed {
// if leaderPatternWidth = 0 = default = use-font-metric
patternWidth =
- this.propertyList.get("leader-pattern-width").getLength().getValue();
+ this.propertyList.get(PR_LEADER_PATTERN_WIDTH).getLength().getValue();
}
diff --git a/src/java/org/apache/fop/fo/flow/ListBlock.java b/src/java/org/apache/fop/fo/flow/ListBlock.java
index 4088d38e1..73794c4a5 100644
--- a/src/java/org/apache/fop/fo/flow/ListBlock.java
+++ b/src/java/org/apache/fop/fo/flow/ListBlock.java
@@ -118,21 +118,21 @@ public class ListBlock extends FObj {
// this.propertyList.get("provisional-distance-between-starts");
// this.propertyList.get("provisional-label-separation");
- this.align = this.propertyList.get("text-align").getEnum();
- this.alignLast = this.propertyList.get("text-align-last").getEnum();
+ this.align = this.propertyList.get(PR_TEXT_ALIGN).getEnum();
+ this.alignLast = this.propertyList.get(PR_TEXT_ALIGN_LAST).getEnum();
this.lineHeight =
- this.propertyList.get("line-height").getLength().getValue();
+ this.propertyList.get(PR_LINE_HEIGHT).getLength().getValue();
this.startIndent =
- this.propertyList.get("start-indent").getLength().getValue();
+ this.propertyList.get(PR_START_INDENT).getLength().getValue();
this.endIndent =
- this.propertyList.get("end-indent").getLength().getValue();
+ this.propertyList.get(PR_END_INDENT).getLength().getValue();
this.spaceBefore =
- this.propertyList.get("space-before.optimum").getLength().getValue();
+ this.propertyList.get(PR_SPACE_BEFORE | CP_OPTIMUM).getLength().getValue();
this.spaceAfter =
- this.propertyList.get("space-after.optimum").getLength().getValue();
+ this.propertyList.get(PR_SPACE_AFTER | CP_OPTIMUM).getLength().getValue();
this.spaceBetweenListRows = 0; // not used at present
this.backgroundColor =
- this.propertyList.get("background-color").getColorType();
+ this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
}
diff --git a/src/java/org/apache/fop/fo/flow/ListItem.java b/src/java/org/apache/fop/fo/flow/ListItem.java
index efef19ec8..4928ccb53 100644
--- a/src/java/org/apache/fop/fo/flow/ListItem.java
+++ b/src/java/org/apache/fop/fo/flow/ListItem.java
@@ -117,14 +117,14 @@ public class ListItem extends FObj {
// this.propertyList.get("keep-with-previous");
// this.propertyList.get("relative-align");
- this.align = this.propertyList.get("text-align").getEnum();
- this.alignLast = this.propertyList.get("text-align-last").getEnum();
+ this.align = this.propertyList.get(PR_TEXT_ALIGN).getEnum();
+ this.alignLast = this.propertyList.get(PR_TEXT_ALIGN_LAST).getEnum();
this.lineHeight =
- this.propertyList.get("line-height").getLength().getValue();
+ this.propertyList.get(PR_LINE_HEIGHT).getLength().getValue();
this.spaceBefore =
- this.propertyList.get("space-before.optimum").getLength().getValue();
+ this.propertyList.get(PR_SPACE_BEFORE | CP_OPTIMUM).getLength().getValue();
this.spaceAfter =
- this.propertyList.get("space-after.optimum").getLength().getValue();
+ this.propertyList.get(PR_SPACE_AFTER | CP_OPTIMUM).getLength().getValue();
}
diff --git a/src/java/org/apache/fop/fo/flow/PageNumber.java b/src/java/org/apache/fop/fo/flow/PageNumber.java
index 00efde644..edc9b5ead 100644
--- a/src/java/org/apache/fop/fo/flow/PageNumber.java
+++ b/src/java/org/apache/fop/fo/flow/PageNumber.java
@@ -125,12 +125,12 @@ public class PageNumber extends FObj {
// this.propertyList.get("text-transform");
// this.propertyList.get("word-spacing");
- ColorType c = this.propertyList.get("color").getColorType();
+ ColorType c = this.propertyList.get(PR_COLOR).getColorType();
this.red = c.getRed();
this.green = c.getGreen();
this.blue = c.getBlue();
- this.wrapOption = this.propertyList.get("wrap-option").getEnum();
+ this.wrapOption = this.propertyList.get(PR_WRAP_OPTION).getEnum();
}
diff --git a/src/java/org/apache/fop/fo/flow/PageNumberCitation.java b/src/java/org/apache/fop/fo/flow/PageNumberCitation.java
index 8fb8ba0de..1ef021d59 100644
--- a/src/java/org/apache/fop/fo/flow/PageNumberCitation.java
+++ b/src/java/org/apache/fop/fo/flow/PageNumberCitation.java
@@ -140,13 +140,13 @@ public class PageNumberCitation extends FObj {
// this.propertyList.get("text-transform");
// this.propertyList.get("word-spacing");
- ColorType c = this.propertyList.get("color").getColorType();
+ ColorType c = this.propertyList.get(PR_COLOR).getColorType();
this.red = c.getRed();
this.green = c.getGreen();
this.blue = c.getBlue();
- this.wrapOption = this.propertyList.get("wrap-option").getEnum();
- this.refId = this.propertyList.get("ref-id").getString();
+ this.wrapOption = this.propertyList.get(PR_WRAP_OPTION).getEnum();
+ this.refId = this.propertyList.get(PR_REF_ID).getString();
if (this.refId.equals("")) {
//throw new FOPException("page-number-citation must contain \"ref-id\"");
diff --git a/src/java/org/apache/fop/fo/flow/RetrieveMarker.java b/src/java/org/apache/fop/fo/flow/RetrieveMarker.java
index 768c0c889..41d0eb92c 100644
--- a/src/java/org/apache/fop/fo/flow/RetrieveMarker.java
+++ b/src/java/org/apache/fop/fo/flow/RetrieveMarker.java
@@ -85,11 +85,11 @@ public class RetrieveMarker extends FObjMixed {
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
this.retrieveClassName =
- this.propertyList.get("retrieve-class-name").getString();
+ this.propertyList.get(PR_RETRIEVE_CLASS_NAME).getString();
this.retrievePosition =
- this.propertyList.get("retrieve-position").getEnum();
+ this.propertyList.get(PR_RETRIEVE_POSITION).getEnum();
this.retrieveBoundary =
- this.propertyList.get("retrieve-boundary").getEnum();
+ this.propertyList.get(PR_RETRIEVE_BOUNDARY).getEnum();
}
public String getRetrieveClassName() {
diff --git a/src/java/org/apache/fop/fo/flow/Table.java b/src/java/org/apache/fop/fo/flow/Table.java
index 1a9a9530c..c9da18dac 100644
--- a/src/java/org/apache/fop/fo/flow/Table.java
+++ b/src/java/org/apache/fop/fo/flow/Table.java
@@ -169,25 +169,25 @@ public class Table extends FObj {
// this.propertyList.get("width");
// this.propertyList.get("writing-mode");
- this.breakBefore = this.propertyList.get("break-before").getEnum();
- this.breakAfter = this.propertyList.get("break-after").getEnum();
+ this.breakBefore = this.propertyList.get(PR_BREAK_BEFORE).getEnum();
+ this.breakAfter = this.propertyList.get(PR_BREAK_AFTER).getEnum();
this.spaceBefore = this.propertyList.get(
- "space-before.optimum").getLength().getValue();
+ PR_SPACE_BEFORE | CP_OPTIMUM).getLength().getValue();
this.spaceAfter = this.propertyList.get(
- "space-after.optimum").getLength().getValue();
+ PR_SPACE_AFTER | CP_OPTIMUM).getLength().getValue();
this.backgroundColor =
- this.propertyList.get("background-color").getColorType();
+ this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
this.ipd = this.propertyList.get(
- "inline-progression-dimension").getLengthRange();
- this.height = this.propertyList.get("height").getLength().getValue();
+ PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
+ this.height = this.propertyList.get(PR_HEIGHT).getLength().getValue();
this.bAutoLayout = (this.propertyList.get(
- "table-layout").getEnum() == TableLayout.AUTO);
+ PR_TABLE_LAYOUT).getEnum() == TableLayout.AUTO);
this.omitHeaderAtBreak = this.propertyList.get(
- "table-omit-header-at-break").getEnum()
+ PR_TABLE_OMIT_HEADER_AT_BREAK).getEnum()
== TableOmitHeaderAtBreak.TRUE;
this.omitFooterAtBreak = this.propertyList.get(
- "table-omit-footer-at-break").getEnum()
+ PR_TABLE_OMIT_FOOTER_AT_BREAK).getEnum()
== TableOmitFooterAtBreak.TRUE;
}
diff --git a/src/java/org/apache/fop/fo/flow/TableBody.java b/src/java/org/apache/fop/fo/flow/TableBody.java
index 6ced2d9e0..d997ec0c1 100644
--- a/src/java/org/apache/fop/fo/flow/TableBody.java
+++ b/src/java/org/apache/fop/fo/flow/TableBody.java
@@ -101,11 +101,11 @@ public class TableBody extends FObj {
setupID();
this.spaceBefore = this.propertyList.get(
- "space-before.optimum").getLength().getValue();
+ PR_SPACE_BEFORE | CP_OPTIMUM).getLength().getValue();
this.spaceAfter = this.propertyList.get(
- "space-after.optimum").getLength().getValue();
+ PR_SPACE_AFTER | CP_OPTIMUM).getLength().getValue();
this.backgroundColor =
- this.propertyList.get("background-color").getColorType();
+ this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
}
diff --git a/src/java/org/apache/fop/fo/flow/TableCell.java b/src/java/org/apache/fop/fo/flow/TableCell.java
index 4c7ffc765..461f755c2 100644
--- a/src/java/org/apache/fop/fo/flow/TableCell.java
+++ b/src/java/org/apache/fop/fo/flow/TableCell.java
@@ -233,41 +233,41 @@ public class TableCell extends FObj {
// this.propertyList.get("width");
this.iColNumber =
- propertyList.get("column-number").getNumber().intValue();
+ propertyList.get(PR_COLUMN_NUMBER).getNumber().intValue();
if (iColNumber < 0) {
iColNumber = 0;
}
this.numColumnsSpanned =
- this.propertyList.get("number-columns-spanned").getNumber().intValue();
+ this.propertyList.get(PR_NUMBER_COLUMNS_SPANNED).getNumber().intValue();
if (numColumnsSpanned < 1) {
numColumnsSpanned = 1;
}
this.numRowsSpanned =
- this.propertyList.get("number-rows-spanned").getNumber().intValue();
+ this.propertyList.get(PR_NUMBER_ROWS_SPANNED).getNumber().intValue();
if (numRowsSpanned < 1) {
numRowsSpanned = 1;
}
this.backgroundColor =
- this.propertyList.get("background-color").getColorType();
+ this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
- bSepBorders = (this.propertyList.get("border-collapse").getEnum()
+ bSepBorders = (this.propertyList.get(PR_BORDER_COLLAPSE).getEnum()
== BorderCollapse.SEPARATE);
calcBorders(propMgr.getBorderAndPadding());
// Vertical cell alignment
- verticalAlign = this.propertyList.get("display-align").getEnum();
+ verticalAlign = this.propertyList.get(PR_DISPLAY_ALIGN).getEnum();
if (verticalAlign == DisplayAlign.AUTO) {
// Depends on all cells starting in row
bRelativeAlign = true;
- verticalAlign = this.propertyList.get("relative-align").getEnum();
+ verticalAlign = this.propertyList.get(PR_RELATIVE_ALIGN).getEnum();
} else {
bRelativeAlign = false; // Align on a per-cell basis
}
this.minCellHeight =
- this.propertyList.get("height").getLength().getValue();
+ this.propertyList.get(PR_HEIGHT).getLength().getValue();
}
/**
@@ -285,7 +285,7 @@ public class TableCell extends FObj {
* but it inherits.
*/
int iSep = propertyList.get(
- "border-separation.inline-progression-direction").getLength().getValue();
+ PR_BORDER_SEPARATION | CP_INLINE_PROGRESSION_DIRECTION).getLength().getValue();
this.startAdjust = iSep / 2 + bp.getBorderStartWidth(false)
+ bp.getPaddingStart(false);
@@ -295,7 +295,7 @@ public class TableCell extends FObj {
// Offset of content rectangle in the block-progression direction
borderSeparation = propertyList.get(
- "border-separation.block-progression-direction").getLength().getValue();
+ PR_BORDER_SEPARATION | CP_BLOCK_PROGRESSION_DIRECTION).getLength().getValue();
this.beforeOffset = borderSeparation / 2
+ bp.getBorderBeforeWidth(false)
+ bp.getPaddingBefore(false);
diff --git a/src/java/org/apache/fop/fo/flow/TableColumn.java b/src/java/org/apache/fop/fo/flow/TableColumn.java
index 4670a12b4..4d6eb7a78 100644
--- a/src/java/org/apache/fop/fo/flow/TableColumn.java
+++ b/src/java/org/apache/fop/fo/flow/TableColumn.java
@@ -138,17 +138,17 @@ public class TableColumn extends FObj {
// this.propertyList.get("number-columns-spanned");
// this.propertyList.get("visibility");
- iColumnNumber = propertyList.get("column-number").getNumber().intValue();
+ iColumnNumber = propertyList.get(PR_COLUMN_NUMBER).getNumber().intValue();
numColumnsRepeated =
- propertyList.get("number-columns-repeated").getNumber().intValue();
+ propertyList.get(PR_NUMBER_COLUMNS_REPEATED).getNumber().intValue();
this.backgroundColor =
- this.propertyList.get("background-color").getColorType();
+ this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
- Property prop = this.propertyList.get("column-width");
+ Property prop = this.propertyList.get(PR_COLUMN_WIDTH);
if (prop != null) {
- columnWidthPropVal = propertyList.get("column-width").getLength();
+ columnWidthPropVal = propertyList.get(PR_COLUMN_WIDTH).getLength();
// This won't include resolved table-units or % values yet.
columnWidth = columnWidthPropVal.getValue();