[FOray-commit] SF.net SVN: foray:[12256] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2021-12-21 17:08:44
|
Revision: 12256
http://sourceforge.net/p/foray/code/12256
Author: victormote
Date: 2021-12-21 17:08:41 +0000 (Tue, 21 Dec 2021)
Log Message:
-----------
Conform to aXSL change: Moved the default value for dimension from Fo to a new constants utility class in common.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRowContainer.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObjScaled.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractAbsoluteDimension.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractRelativeDimension.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRowContainer.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRowContainer.java 2021-12-21 15:22:02 UTC (rev 12255)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRowContainer.java 2021-12-21 17:08:41 UTC (rev 12256)
@@ -32,8 +32,8 @@
import org.axsl.area.AreaTreeException;
import org.axsl.common.value.BackgroundRepeat;
+import org.axsl.common.value.FoPropertyConstants;
import org.axsl.common.value.RelativeAxis;
-import org.axsl.fotree.Fo;
import org.axsl.fotree.fo.GraftingPoint;
import org.axsl.fotree.fo.TableCell;
import org.axsl.fotree.fo.TableRow;
@@ -94,7 +94,7 @@
/* Non-standard initialization of progression dimension. */
int startingPD = generatedBy.traitBpDimensionMin(newRow);
- if (startingPD == Fo.DIMENSION_AUTO) {
+ if (startingPD == FoPropertyConstants.DIMENSION_AUTO) {
startingPD = 0;
}
newRow.setProgressionDimension(startingPD);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObjScaled.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObjScaled.java 2021-12-21 15:22:02 UTC (rev 12255)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObjScaled.java 2021-12-21 17:08:41 UTC (rev 12256)
@@ -30,6 +30,7 @@
import org.foray.common.WellKnownConstants;
+import org.axsl.common.value.FoPropertyConstants;
import org.axsl.fotree.FoContext;
/**
@@ -74,7 +75,7 @@
/* See XSL-FO Standard 1.0, Section 6.6.5 and 6.6.6, Subsection
* "Constraints", first paragraph, for explanation of logic. */
final int viewportIPD = this.traitIpDimensionOpt(context);
- if (viewportIPD != FoObj.DIMENSION_AUTO) {
+ if (viewportIPD != FoPropertyConstants.DIMENSION_AUTO) {
return viewportIPD;
}
@@ -128,7 +129,7 @@
*/
private boolean isViewportIpdDependent(final FoContext context) {
final int viewportIPD = this.traitIpDimensionOpt(context);
- if (viewportIPD != FoObj.DIMENSION_AUTO) {
+ if (viewportIPD != FoPropertyConstants.DIMENSION_AUTO) {
return false;
}
if (this.isContentWidthDependentOnPd(context)) {
@@ -142,7 +143,7 @@
/* See XSL-FO Standard 1.0, Section 6.6.5 and 6.6.6, Subsection
* "Constraints", first paragraph, for explanation of logic. */
final int viewportBPD = this.traitBpDimensionOpt(context);
- if (viewportBPD != FoObj.DIMENSION_AUTO) {
+ if (viewportBPD != FoPropertyConstants.DIMENSION_AUTO) {
return viewportBPD;
}
@@ -196,7 +197,7 @@
*/
private boolean isViewportBpdDependent(final FoContext context) {
final int viewportBPD = this.traitBpDimensionOpt(context);
- if (viewportBPD != FoObj.DIMENSION_AUTO) {
+ if (viewportBPD != FoPropertyConstants.DIMENSION_AUTO) {
return false;
}
if (this.isContentHeightDependentOnPd(context)) {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java 2021-12-21 15:22:02 UTC (rev 12255)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java 2021-12-21 17:08:41 UTC (rev 12256)
@@ -34,6 +34,7 @@
import org.foray.fotree.Namespace;
import org.foray.fotree.PropertyList;
+import org.axsl.common.value.FoPropertyConstants;
import org.axsl.fotree.FoContext;
import org.axsl.fotree.FoLineNonText;
import org.axsl.fotree.FoTreeException;
@@ -134,7 +135,7 @@
@Override
public int intrinsicContentWidth(final FoContext context) {
if (getGraphic(context) == null) {
- return FoObj.DIMENSION_AUTO;
+ return FoPropertyConstants.DIMENSION_AUTO;
}
try {
if (getGraphic(context).absoluteWidth(this.pixelsPerInch) > 0) {
@@ -143,7 +144,7 @@
return pixelsToMillipoints(getGraphic(context).pixelWidth(),
this.pixelsPerInch);
} catch (final GraphicException e) {
- return FoObj.DIMENSION_AUTO;
+ return FoPropertyConstants.DIMENSION_AUTO;
}
}
@@ -150,7 +151,7 @@
@Override
public int intrinsicContentHeight(final FoContext context) {
if (getGraphic(context) == null) {
- return FoObj.DIMENSION_AUTO;
+ return FoPropertyConstants.DIMENSION_AUTO;
}
try {
if (getGraphic(context).absoluteHeight(this.pixelsPerInch) > 0) {
@@ -159,7 +160,7 @@
return pixelsToMillipoints(getGraphic(context).pixelHeight(),
this.pixelsPerInch);
} catch (final GraphicException e) {
- return FoObj.DIMENSION_AUTO;
+ return FoPropertyConstants.DIMENSION_AUTO;
}
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractAbsoluteDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractAbsoluteDimension.java 2021-12-21 15:22:02 UTC (rev 12255)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractAbsoluteDimension.java 2021-12-21 17:08:41 UTC (rev 12256)
@@ -37,6 +37,7 @@
import org.foray.fotree.value.PropertyValue;
import org.axsl.common.value.AbsoluteAxis;
+import org.axsl.common.value.FoPropertyConstants;
import org.axsl.common.value.RelativeAxis;
import org.axsl.fotree.FoContext;
@@ -130,7 +131,7 @@
final FoValue keyword = this.convertValueToFoValue(value());
switch (keyword) {
case AUTO: {
- return FoObj.DIMENSION_AUTO;
+ return FoPropertyConstants.DIMENSION_AUTO;
}
case INHERIT: {
return getInheritValue(context, relativeAxis, fobj);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractRelativeDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractRelativeDimension.java 2021-12-21 15:22:02 UTC (rev 12255)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractRelativeDimension.java 2021-12-21 17:08:41 UTC (rev 12256)
@@ -40,6 +40,7 @@
import org.foray.fotree.value.DtLengthRange;
import org.foray.fotree.value.PropertyValue;
+import org.axsl.common.value.FoPropertyConstants;
import org.axsl.common.value.RelativeAxis;
import org.axsl.fotree.FoContext;
@@ -123,11 +124,11 @@
break;
}
default: {
- return FoObj.DIMENSION_AUTO;
+ return FoPropertyConstants.DIMENSION_AUTO;
}
}
if (length == null) {
- return FoObj.DIMENSION_AUTO;
+ return FoPropertyConstants.DIMENSION_AUTO;
}
return length.evalLength(fobj.traitFontSize(context));
}
@@ -140,7 +141,7 @@
base = context.ipdAncestorBlockOrRa();
}
if (base < 0) {
- return FoObj.DIMENSION_AUTO;
+ return FoPropertyConstants.DIMENSION_AUTO;
}
final float percentage = value().evalPercentage();
return Math.round(percentage * base
@@ -152,7 +153,7 @@
if (value().canEvalKeyword()) {
final FoValue foValue = this.convertValueToFoValue(value());
if (foValue == FoValue.AUTO) {
- return FoObj.DIMENSION_AUTO;
+ return FoPropertyConstants.DIMENSION_AUTO;
}
if (foValue == FoValue.INHERIT) {
switch (subProperty) {
@@ -188,7 +189,7 @@
* @return The initial value for this property.
*/
public static int getValueNoInstance() {
- return FoObj.DIMENSION_AUTO;
+ return FoPropertyConstants.DIMENSION_AUTO;
}
@Override
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|