jeremias 2005/02/19 02:40:07
Modified: src/java/org/apache/fop/fo/properties
CommonTextDecoration.java
TextDecorationProperty.java
Log:
Restored JDK 1.5 compatibility.
Bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=33645
Submitted by: Oskar Berggren <d99beo.at.dtek.chalmers.se>
Revision Changes Path
1.3 +11 -11
xml-fop/src/java/org/apache/fop/fo/properties/CommonTextDecoration.java
Index: CommonTextDecoration.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/CommonTextDecoration.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CommonTextDecoration.java 25 Jan 2005 12:53:29 -0000 1.2
+++ CommonTextDecoration.java 19 Feb 2005 10:40:07 -0000 1.3
@@ -72,51 +72,51 @@
Iterator i = list.iterator();
while (i.hasNext()) {
Property prop = (Property)i.next();
- int enum = prop.getEnum();
- if (enum == Constants.EN_NONE) {
+ int prop_enum = prop.getEnum();
+ if (prop_enum == Constants.EN_NONE) {
if (deco != null) {
deco.decoration = 0;
}
return deco;
- } else if (enum == Constants.EN_UNDERLINE) {
+ } else if (prop_enum == Constants.EN_UNDERLINE) {
if (deco == null) {
deco = new CommonTextDecoration();
}
deco.decoration |= UNDERLINE;
deco.underColor =
pList.get(Constants.PR_COLOR).getColorType();
- } else if (enum == Constants.EN_NO_UNDERLINE) {
+ } else if (prop_enum == Constants.EN_NO_UNDERLINE) {
if (deco != null) {
deco.decoration &= OVERLINE | LINE_THROUGH | BLINK;
deco.underColor =
pList.get(Constants.PR_COLOR).getColorType();
}
- } else if (enum == Constants.EN_OVERLINE) {
+ } else if (prop_enum == Constants.EN_OVERLINE) {
if (deco == null) {
deco = new CommonTextDecoration();
}
deco.decoration |= OVERLINE;
deco.overColor =
pList.get(Constants.PR_COLOR).getColorType();
- } else if (enum == Constants.EN_NO_OVERLINE) {
+ } else if (prop_enum == Constants.EN_NO_OVERLINE) {
if (deco != null) {
deco.decoration &= UNDERLINE | LINE_THROUGH | BLINK;
deco.overColor =
pList.get(Constants.PR_COLOR).getColorType();
}
- } else if (enum == Constants.EN_LINE_THROUGH) {
+ } else if (prop_enum == Constants.EN_LINE_THROUGH) {
if (deco == null) {
deco = new CommonTextDecoration();
}
deco.decoration |= LINE_THROUGH;
deco.throughColor =
pList.get(Constants.PR_COLOR).getColorType();
- } else if (enum == Constants.EN_NO_LINE_THROUGH) {
+ } else if (prop_enum == Constants.EN_NO_LINE_THROUGH) {
if (deco != null) {
deco.decoration &= UNDERLINE | OVERLINE | BLINK;
deco.throughColor =
pList.get(Constants.PR_COLOR).getColorType();
}
- } else if (enum == Constants.EN_BLINK) {
+ } else if (prop_enum == Constants.EN_BLINK) {
if (deco == null) {
deco = new CommonTextDecoration();
}
deco.decoration |= BLINK;
- } else if (enum == Constants.EN_NO_BLINK) {
+ } else if (prop_enum == Constants.EN_NO_BLINK) {
if (deco != null) {
deco.decoration &= UNDERLINE | OVERLINE | LINE_THROUGH;
}
1.2 +3 -3
xml-fop/src/java/org/apache/fop/fo/properties/TextDecorationProperty.java
Index: TextDecorationProperty.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/TextDecorationProperty.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TextDecorationProperty.java 25 Jan 2005 10:55:46 -0000 1.1
+++ TextDecorationProperty.java 19 Feb 2005 10:40:07 -0000 1.2
@@ -71,11 +71,11 @@
if (prop instanceof EnumProperty) {
//skip
} else if (prop instanceof NCnameProperty) {
- Property enum =
checkEnumValues(((NCnameProperty)prop).getString());
- if (enum == null) {
+ Property prop_enum =
checkEnumValues(((NCnameProperty)prop).getString());
+ if (prop_enum == null) {
throw new PropertyException("Illegal enum value: " +
prop.getString());
}
- l.set(i, enum);
+ l.set(i, prop_enum);
} else {
throw new PropertyException("Invalid content for
text-decoration "
+ "property: " + prop);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]