You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ad...@apache.org on 2006/08/24 23:25:03 UTC
svn commit: r434528 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthRangeProperty.java
Author: adelmelle
Date: Thu Aug 24 14:25:02 2006
New Revision: 434528
URL: http://svn.apache.org/viewvc?rev=434528&view=rev
Log:
Forgot FOTree tests after r434497 => re-enabled and rectified...
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthRangeProperty.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthRangeProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthRangeProperty.java?rev=434528&r1=434527&r2=434528&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthRangeProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthRangeProperty.java Thu Aug 24 14:25:02 2006
@@ -74,9 +74,9 @@
|| this.propId == PR_INLINE_PROGRESSION_DIMENSION) {
Length len = p.getLength();
if (len != null) {
- if ((len instanceof FixedLength && len.getValue() < 0)
- || (len instanceof PercentLength
- && ((PercentLength) len).getPercentage() < 0)) {
+ if ((len instanceof PercentLength
+ && ((PercentLength) len).getPercentage() < 0)
+ || len.getValue() < 0) {
log.warn("Replaced negative value for " + getName()
+ " with 0mpt");
p = new FixedLength(0);
@@ -97,12 +97,16 @@
if (this.propId == PR_BLOCK_PROGRESSION_DIMENSION
|| this.propId == PR_INLINE_PROGRESSION_DIMENSION) {
Length len = subproperty.getLength();
- if (len != null && len.getValue() < 0) {
- log.warn("Replaced negative value for " + getName()
- + " with 0mpt");
- val.setComponent(subpropertyId,
- new FixedLength(0), false);
- return baseProperty;
+ if (len != null)
+ if ((len instanceof PercentLength
+ && ((PercentLength) len).getPercentage() < 0)
+ || len.getValue() < 0) {
+ log.warn("Replaced negative value for " + getName()
+ + " with 0mpt");
+ val.setComponent(subpropertyId,
+ new FixedLength(0), false);
+ return baseProperty;
+ }
}
}
val.setComponent(subpropertyId, subproperty, false);
@@ -287,7 +291,7 @@
/**
* @return this.lengthRange cast as an Object
*/
- public Object getObject() {
+ protected Object getObject() {
return this;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org