[FOray-commit] SF.net SVN: foray: [8429] trunk/foray/foray-fotree/src/java/org/foray/ fotree
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-10-26 20:04:36
|
Revision: 8429
http://svn.sourceforge.net/foray/?rev=8429&view=rev
Author: victormote
Date: 2006-10-26 13:04:29 -0700 (Thu, 26 Oct 2006)
Log Message:
-----------
Make checking of keywords the first part of the standard parsing routine.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontSize.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java 2006-10-24 01:44:10 UTC (rev 8428)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java 2006-10-26 20:04:29 UTC (rev 8429)
@@ -166,8 +166,11 @@
protected PropertyValue standardParse(final PropertyList propertyList,
final String rawPropertyValue, final boolean integerOnly,
final boolean percentsAsLengths) throws PropertyException {
- final PropertyValue pv = PropertyParser.parse(propertyList,
- rawPropertyValue);
+ PropertyValue pv = checkKeywords(rawPropertyValue);
+ if (pv != null) {
+ return pv;
+ }
+ pv = PropertyParser.parse(propertyList, rawPropertyValue);
if (integerOnly) {
if (pv instanceof DtNumber) {
// Only integers wanted, so convert to one here.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontSize.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontSize.java 2006-10-24 01:44:10 UTC (rev 8428)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontSize.java 2006-10-26 20:04:29 UTC (rev 8429)
@@ -98,14 +98,12 @@
private PropertyValue createPropertyValue(final PropertyList propertyList,
final String value) throws PropertyException {
- PropertyValue pv = checkKeywords(value);
- if (pv != null) {
+ final PropertyValue pv = standardParse(propertyList, value, false,
+ false);
+ if (pv instanceof DtPercentage
+ || pv instanceof PropertyKeyword) {
return pv;
}
- pv = standardParse(propertyList, value, false, false);
- if (pv instanceof DtPercentage) {
- return pv;
- }
if (pv instanceof Expr) {
if (((Expr) pv).canEvalUnitPower1()) {
return pv;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|