[FOray-commit] SF.net SVN: foray: [9926] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-07-05 20:36:41
|
Revision: 9926
http://svn.sourceforge.net/foray/?rev=9926&view=rev
Author: victormote
Date: 2007-07-05 13:36:42 -0700 (Thu, 05 Jul 2007)
Log Message:
-----------
Conform to axsl changes rolling up method parameter into already-existing FoContext method.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LastLineEndIndent.java
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLastLineEndIndent.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-05 20:23:49 UTC (rev 9925)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-05 20:36:42 UTC (rev 9926)
@@ -881,10 +881,7 @@
if (! this.isLastLineAreaInBlock()) {
return 0;
}
- final Area ancestorBlockAreaNotALineArea
- = this.ancestorBlockAreaNotALineArea();
- final int percentBase = ancestorBlockAreaNotALineArea.crIpd();
- return traitGeneratedBy().traitLastLineEndIndent(this, percentBase);
+ return traitGeneratedBy().traitLastLineEndIndent(this);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-05 20:23:49 UTC (rev 9925)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-05 20:36:42 UTC (rev 9926)
@@ -2216,10 +2216,8 @@
/**
* {@inheritDoc}
*/
- public int traitLastLineEndIndent(final FoContext context,
- final int ipdAncestorBANotLA) {
- return propertyList.traitLastLineEndIndent(this, context,
- ipdAncestorBANotLA);
+ public int traitLastLineEndIndent(final FoContext context) {
+ return propertyList.traitLastLineEndIndent(this, context);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-07-05 20:23:49 UTC (rev 9925)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-07-05 20:36:42 UTC (rev 9926)
@@ -3495,19 +3495,16 @@
* @param fobj The FObj to which the property belongs.
* @param context An object that knows how to resolve FO Tree context
* issues.
- * @param ipdAncestorBANotLA The IPD of the nearest ancestor normal block
- * area.
* @return The last-line-end-indent property.
*/
- public int traitLastLineEndIndent(final FObj fobj, final FoContext context,
- final int ipdAncestorBANotLA) {
+ public int traitLastLineEndIndent(final FObj fobj,
+ final FoContext context) {
final LastLineEndIndent property = (LastLineEndIndent)
getProperty(FoProperty.LAST_LINE_END_INDENT);
if (property == null) {
- return LastLineEndIndent.getValueNoInstance(context, fobj,
- ipdAncestorBANotLA);
+ return LastLineEndIndent.getValueNoInstance(context, fobj);
}
- return property.getValue(context, fobj, ipdAncestorBANotLA);
+ return property.getValue(context, fobj);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LastLineEndIndent.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LastLineEndIndent.java 2007-07-05 20:23:49 UTC (rev 9925)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LastLineEndIndent.java 2007-07-05 20:36:42 UTC (rev 9926)
@@ -93,16 +93,14 @@
* Returns the value of this property.
* @param context An object that knows how to resolve FO context issues.
* @param fobj The FO for which this value is needed.
- * @param ipdAncestorBANotLA The inline-progression-dimension of the nearest
- * ancestor area that is a block-area but not a line-area.
* @return The value of this property.
*/
- public int getValue(final FoContext context, final FObj fobj,
- final int ipdAncestorBANotLA) {
+ public int getValue(final FoContext context, final FObj fobj) {
if (value().canEvalPercentage()) {
+ final int base = context.ipdAncestorBlockArea();
final DtPercentage percentageDT = (DtPercentage) value();
final float percentage = percentageDT.getValue();
- return Math.round(percentage * ipdAncestorBANotLA /
+ return Math.round(percentage * base /
WKConstants.PERCENT_CONVERSION);
}
if (value().canEvalLength()) {
@@ -110,8 +108,7 @@
}
if (value().canEvalKeyword()) {
/* "inherit" is the only keyword. */
- return LastLineEndIndent.getValueNoInstance(context, fobj,
- ipdAncestorBANotLA);
+ return LastLineEndIndent.getValueNoInstance(context, fobj);
}
throw this.unexpectedRetrieval();
}
@@ -120,17 +117,15 @@
* Returns the default (initial) value for this property.
* @param context An object that knows how to resolve FO context issues.
* @param fobj The FO for which this value is needed.
- * @param ipdAncestorBANotLA The inline-progression-dimension of the nearest
- * ancestor area that is a block-area but not a line-area.
* @return The initial value for this property.
*/
public static int getValueNoInstance(final FoContext context,
- final FObj fobj, final int ipdAncestorBANotLA) {
+ final FObj fobj) {
final FObj parent = fobj.effectiveParent(context);
if (parent == null) {
return 0;
}
- return parent.traitLastLineEndIndent(context, ipdAncestorBANotLA);
+ return parent.traitLastLineEndIndent(context);
}
/**
Modified: trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLastLineEndIndent.java
===================================================================
--- trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLastLineEndIndent.java 2007-07-05 20:23:49 UTC (rev 9925)
+++ trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLastLineEndIndent.java 2007-07-05 20:36:42 UTC (rev 9926)
@@ -56,8 +56,7 @@
*/
private int getPropertyValue(final LastLineEndIndent property,
final FObj testFobj) {
- final int testLength = property.getValue(STD_FO_CONTEXT, testFobj,
- 72000);
+ final int testLength = property.getValue(STD_FO_CONTEXT, testFobj);
return testLength;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|