aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2014-04-28 19:22:32 +0000
committerVincent Hennebert <vhennebert@apache.org>2014-04-28 19:22:32 +0000
commitc3ac99e58b7c66fe8fe23b32930f93d66cb59581 (patch)
tree8260ddf75125f602c3ff0e981f4fca72a941e84b /src/java
parentb37680209557f4dece0b25f5a4bf1594ab72194e (diff)
downloadxmlgraphics-fop-c3ac99e58b7c66fe8fe23b32930f93d66cb59581.tar.gz
xmlgraphics-fop-c3ac99e58b7c66fe8fe23b32930f93d66cb59581.zip
Renamed value of auto-toggle property to select-first-fitting
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_WhitespaceManagement@1590754 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/fo/Constants.java4
-rw-r--r--src/java/org/apache/fop/fo/FOPropertyMapping.java5
-rw-r--r--src/java/org/apache/fop/fo/flow/MultiSwitch.java6
-rw-r--r--src/java/org/apache/fop/layoutmgr/MultiSwitchLayoutManager.java3
4 files changed, 11 insertions, 7 deletions
diff --git a/src/java/org/apache/fop/fo/Constants.java b/src/java/org/apache/fop/fo/Constants.java
index 3fae008b5..2d53d1d46 100644
--- a/src/java/org/apache/fop/fo/Constants.java
+++ b/src/java/org/apache/fop/fo/Constants.java
@@ -1263,6 +1263,8 @@ public interface Constants {
int EN_TB_LR = 205; // for top-to-bottom, left-to-right writing mode
/** Enumeration constant -- for fo:retrieve-table-marker */
int EN_FIRST_INCLUDING_CARRYOVER = 206;
+ /** Enumeration constant -- for auto-toggle */
+ int EN_SELECT_FIRST_FITTING = 207;
/** Number of enumeration constants defined */
- int ENUM_COUNT = 206;
+ int ENUM_COUNT = 207;
}
diff --git a/src/java/org/apache/fop/fo/FOPropertyMapping.java b/src/java/org/apache/fop/fo/FOPropertyMapping.java
index 26ead3bd0..16f7ab457 100644
--- a/src/java/org/apache/fop/fo/FOPropertyMapping.java
+++ b/src/java/org/apache/fop/fo/FOPropertyMapping.java
@@ -2618,9 +2618,10 @@ public final class FOPropertyMapping implements Constants {
addPropertyMaker("fox:alt-text", m);
// fox:auto-toggle, used only in fo:multi-switch
- m = new StringProperty.Maker(PR_X_AUTO_TOGGLE);
+ m = new EnumProperty.Maker(PR_X_AUTO_TOGGLE);
m.setInherited(false);
- m.setDefault("");
+ m.addEnum("select-first-fitting", getEnumProperty(EN_SELECT_FIRST_FITTING, "SELECT_FIRST_FITTING"));
+ m.setDefault("select-first-fitting");
addPropertyMaker("fox:auto-toggle", m);
// fox:border-*-radius-*
diff --git a/src/java/org/apache/fop/fo/flow/MultiSwitch.java b/src/java/org/apache/fop/fo/flow/MultiSwitch.java
index f681f1695..1248d1ca4 100644
--- a/src/java/org/apache/fop/fo/flow/MultiSwitch.java
+++ b/src/java/org/apache/fop/fo/flow/MultiSwitch.java
@@ -38,7 +38,7 @@ public class MultiSwitch extends FObj {
// private CommonAccessibility commonAccessibility;
// End of property values
- private String autoToggle;
+ private int autoToggle;
/**
* Base constructor
@@ -53,7 +53,7 @@ public class MultiSwitch extends FObj {
@Override
public void bind(PropertyList pList) throws FOPException {
super.bind(pList);
- autoToggle = pList.get(PR_X_AUTO_TOGGLE).getString();
+ autoToggle = pList.get(PR_X_AUTO_TOGGLE).getEnum();
// autoRestore = pList.get(PR_AUTO_RESTORE);
}
@@ -95,7 +95,7 @@ public class MultiSwitch extends FObj {
return FO_MULTI_SWITCH;
}
- public String getAutoToggle() {
+ public int getAutoToggle() {
return autoToggle;
}
diff --git a/src/java/org/apache/fop/layoutmgr/MultiSwitchLayoutManager.java b/src/java/org/apache/fop/layoutmgr/MultiSwitchLayoutManager.java
index 2aff34e14..1310fb888 100644
--- a/src/java/org/apache/fop/layoutmgr/MultiSwitchLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/MultiSwitchLayoutManager.java
@@ -21,6 +21,7 @@ import java.util.LinkedList;
import java.util.List;
import org.apache.fop.area.Area;
+import org.apache.fop.fo.Constants;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.flow.MultiSwitch;
@@ -118,7 +119,7 @@ public class MultiSwitchLayoutManager extends BlockStackingLayoutManager {
public MultiSwitchLayoutManager(FObj node) {
super(node);
MultiSwitch multiSwitchNode = (MultiSwitch) node;
- if (multiSwitchNode.getAutoToggle().equals("best-fit")) {
+ if (multiSwitchNode.getAutoToggle() == Constants.EN_SELECT_FIRST_FITTING) {
knuthGen = new WhitespaceManagement();
} else {
knuthGen = new DefaultKnuthListGenerator();