aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-01-14 00:00:38 +0000
committerGlen Mazza <gmazza@apache.org>2004-01-14 00:00:38 +0000
commit8eebf16fad2dd677255adb054cc4cab17dc3d7af (patch)
tree13f8627ec8be327e3dd45e307ff85ecf46c8d1c2 /src/java/org/apache/fop/fo/pagination
parent3c5e2946bb93e544ce909bb9a91250ea28927a59 (diff)
downloadxmlgraphics-fop-8eebf16fad2dd677255adb054cc4cab17dc3d7af.tar.gz
xmlgraphics-fop-8eebf16fad2dd677255adb054cc4cab17dc3d7af.zip
More String->Int conversions (ones I've missed previously.) Appears I've finally
converted all of them. From Finn Bock's patch. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197159 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/pagination')
-rw-r--r--src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java4
-rw-r--r--src/java/org/apache/fop/fo/pagination/Flow.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/PageMasterReference.java4
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionBody.java11
-rw-r--r--src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java2
6 files changed, 12 insertions, 13 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java b/src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java
index 210193d7e..e1a74743e 100644
--- a/src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java
+++ b/src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java
@@ -92,8 +92,8 @@ public class ConditionalPageMasterReference extends FObj {
*/
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
- if (getProperty("master-reference") != null) {
- setMasterName(getProperty("master-reference").getString());
+ if (getProperty(PR_MASTER_REFERENCE) != null) {
+ setMasterName(getProperty(PR_MASTER_REFERENCE).getString());
}
validateParent(parent);
diff --git a/src/java/org/apache/fop/fo/pagination/Flow.java b/src/java/org/apache/fop/fo/pagination/Flow.java
index 4f89ec739..981b7066b 100644
--- a/src/java/org/apache/fop/fo/pagination/Flow.java
+++ b/src/java/org/apache/fop/fo/pagination/Flow.java
@@ -122,7 +122,7 @@ public class Flow extends FObj {
}
}
*/
- setFlowName(getProperty("flow-name").getString());
+ setFlowName(getProperty(PR_FLOW_NAME).getString());
// Now done in addChild of page-sequence
//pageSequence.addFlow(this);
diff --git a/src/java/org/apache/fop/fo/pagination/PageMasterReference.java b/src/java/org/apache/fop/fo/pagination/PageMasterReference.java
index aa12108cf..892d93000 100644
--- a/src/java/org/apache/fop/fo/pagination/PageMasterReference.java
+++ b/src/java/org/apache/fop/fo/pagination/PageMasterReference.java
@@ -80,8 +80,8 @@ public abstract class PageMasterReference extends FObj
*/
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
- if (getProperty("master-reference") != null) {
- this.masterName = getProperty("master-reference").getString();
+ if (getProperty(PR_MASTER_REFERENCE) != null) {
+ this.masterName = getProperty(PR_MASTER_REFERENCE).getString();
}
validateParent(parent);
}
diff --git a/src/java/org/apache/fop/fo/pagination/RegionBody.java b/src/java/org/apache/fop/fo/pagination/RegionBody.java
index 38b0f8cd0..4d10a6df8 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionBody.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionBody.java
@@ -89,18 +89,18 @@ public class RegionBody extends Region {
* set but indent is explicitly set, it will return that.
*/
CommonMarginBlock mProps = propMgr.getMarginProps();
- int start = getRelMargin(PropertyList.START, "start-indent");
+ int start = getRelMargin(PropertyList.START, PR_START_INDENT);
Rectangle vpRect;
if (this.wm == WritingMode.LR_TB || this.wm == WritingMode.RL_TB) {
vpRect = new Rectangle(start, mProps.spaceBefore,
reldims.ipd - start
- - getRelMargin(PropertyList.END, "end-indent"),
+ - getRelMargin(PropertyList.END, PR_END_INDENT),
reldims.bpd - mProps.spaceBefore - mProps.spaceAfter);
} else {
vpRect = new Rectangle(start, mProps.spaceBefore,
reldims.bpd - mProps.spaceBefore - mProps.spaceAfter,
reldims.ipd - start
- - getRelMargin(PropertyList.END, "end-indent"));
+ - getRelMargin(PropertyList.END, PR_END_INDENT));
}
return vpRect;
}
@@ -109,15 +109,14 @@ public class RegionBody extends Region {
* Get the relative margin using parent's writing mode, not own
* writing mode.
*/
- private int getRelMargin(int reldir, String sRelPropName) {
+ private int getRelMargin(int reldir, int relPropId) {
FObj parent = (FObj) getParent();
String sPropName = "margin-"
+ parent.propertyList.wmRelToAbs(reldir);
int propId = FOPropertyMapping.getPropertyId(sPropName);
Property prop = propertyList.getExplicitBaseProp(propId);
if (prop == null) {
- propId = FOPropertyMapping.getPropertyId(sRelPropName);
- prop = propertyList.getExplicitBaseProp(propId);
+ prop = propertyList.getExplicitBaseProp(relPropId);
}
return ((prop != null) ? prop.getLength().getValue() : 0);
}
diff --git a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
index dfd3f8b6f..8bd054e87 100644
--- a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
+++ b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
@@ -106,7 +106,7 @@ public class RepeatablePageMasterAlternatives extends FObj
+ parent.getName());
}
- String mr = getProperty("maximum-repeats").getString();
+ String mr = getProperty(PR_MAXIMUM_REPEATS).getString();
if (mr.equals("no-limit")) {
this.maximumRepeats = INFINITE;
} else {
diff --git a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java
index 48ab82c88..b7b9fa15c 100644
--- a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java
+++ b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java
@@ -86,7 +86,7 @@ public class RepeatablePageMasterReference extends PageMasterReference
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
- String mr = getProperty("maximum-repeats").getString();
+ String mr = getProperty(PR_MAXIMUM_REPEATS).getString();
if (mr.equals("no-limit")) {
this.maximumRepeats = INFINITE;
} else {