foray-commit Mailing List for FOray (Page 67)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(139) |
Apr
(98) |
May
(250) |
Jun
(394) |
Jul
(84) |
Aug
(13) |
Sep
(420) |
Oct
(186) |
Nov
(1) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(108) |
Feb
(202) |
Mar
(291) |
Apr
(247) |
May
(374) |
Jun
(227) |
Jul
(231) |
Aug
(60) |
Sep
(31) |
Oct
(45) |
Nov
(18) |
Dec
|
| 2008 |
Jan
(38) |
Feb
(71) |
Mar
(142) |
Apr
|
May
(59) |
Jun
(6) |
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(12) |
Feb
(4) |
Mar
(88) |
Apr
(121) |
May
(17) |
Jun
(30) |
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2010 |
Jan
(11) |
Feb
(76) |
Mar
(11) |
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
(44) |
Sep
(14) |
Oct
(7) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(168) |
| 2017 |
Jan
(77) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(88) |
Mar
(118) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(141) |
| 2021 |
Jan
(170) |
Feb
(20) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(62) |
Nov
(189) |
Dec
(162) |
| 2022 |
Jan
(201) |
Feb
(118) |
Mar
(8) |
Apr
|
May
(2) |
Jun
(47) |
Jul
(19) |
Aug
(14) |
Sep
(3) |
Oct
|
Nov
(28) |
Dec
(235) |
| 2023 |
Jan
(112) |
Feb
(23) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(70) |
Sep
(92) |
Oct
(20) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(14) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(10) |
Feb
(29) |
Mar
|
Apr
(162) |
May
(245) |
Jun
(83) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(4) |
Dec
|
|
From: <vic...@us...> - 2021-12-16 12:54:37
|
Revision: 12227
http://sourceforge.net/p/foray/code/12227
Author: victormote
Date: 2021-12-16 12:54:36 +0000 (Thu, 16 Dec 2021)
Log Message:
-----------
Move static text-manipulation methods to the common superclass.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoText4a.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-16 12:38:01 UTC (rev 12226)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-16 12:54:36 UTC (rev 12227)
@@ -30,13 +30,8 @@
import org.foray.common.i18n.Country4a;
import org.foray.common.i18n.Language4a;
-import org.foray.common.primitive.XmlCharacterUtils;
import org.foray.fotree.FoObj;
-import org.foray.fotree.fo.FoValue;
-import org.axsl.common.value.LinefeedTreatment;
-import org.axsl.common.value.TextTransform;
-import org.axsl.common.value.WhiteSpaceTreatment;
import org.axsl.common.value.WrapOption;
import org.axsl.font.Font;
import org.axsl.font.FontContext;
@@ -48,7 +43,6 @@
import org.axsl.fotree.fo.GraftingPoint;
import org.axsl.orthography.Orthography;
import org.axsl.text.line.LineText;
-import org.axsl.unicode.block.Basic_Latin_Block;
/**
* Abstract superclass for representations of characters.
@@ -55,9 +49,6 @@
*/
public abstract class AbstractCharacterSequence extends FoText4a implements FoTextCharacters {
- /** Constant indicating that a given character should be discarded. */
- public static final char DISCARD_CHAR = 0xFFFF;
-
/**
* Constructor.
* @param parent The parent of this.
@@ -264,413 +255,6 @@
return getNextSibling() == null;
}
- /**
- * Applies white space treatment to a character array.
- * @param charArray char array containing character to be converted.
- * @param index Index into charArray pointing to a char element that is
- * to be converted.
- * @param whiteSpaceTreatment The value of the whitespace-treatment trait.
- * @return The character to which the charArray[index] should be converted
- * for white-space-treatment purposes.
- * Returns {@link #DISCARD_CHAR} if charArray[index] should be discarded.
- * Note that {@link #DISCARD_CHAR} is not a valid Unicode codepoint, and
- * should therefore never be in the input.
- */
- public static char applyWhiteSpaceTreatment(final CharSequence charArray, final int index,
- final WhiteSpaceTreatment whiteSpaceTreatment) {
- /* The char immediately before. */
- final char before;
- if (index == 0) {
- before = DISCARD_CHAR;
- } else {
- before = charArray.charAt(index - 1);
- }
-
- /* The char we want to test. */
- final char c = charArray.charAt(index);
-
- /* The char immediately after. */
- final char after;
- if (index == charArray.length() - 1) {
- after = DISCARD_CHAR;
- } else {
- after = charArray.charAt(index + 1);
- }
-
- return applyWhiteSpaceTreatment(before, c, after, whiteSpaceTreatment);
- }
-
- /**
- * Applies white space treatment to a single character.
- * @param charBefore The char immediately before the char being tested, or -1 if there is none.
- * @param c The char being tested.
- * @param charAfter The char immediately after the char being tested, or -1 of there is none.
- * @param whiteSpaceTreatment The value of the whitespace-treatment trait.
- * @return The char at this index, or {@link #DISCARD_CHAR} if this char should be discarded.
- * Note that {@link #DISCARD_CHAR} is not a valid Unicode codepoint, and should therefore never be in the input.
- */
- public static char applyWhiteSpaceTreatment(final char charBefore, final char c, final char charAfter,
- final WhiteSpaceTreatment whiteSpaceTreatment) {
- if (! XmlCharacterUtils.isXMLWhitespace(c)) {
- /* If it is not whitespace, it cannot be changed. */
- return c;
- }
- if (c == Basic_Latin_Block.CONTROL_LINE_FEED) {
- /* If it is 0x000A (linefeed), it cannot be changed. */
- return c;
- }
- switch (whiteSpaceTreatment) {
- case IGNORE: {
- return FoTextCharacters4a.DISCARD_CHAR;
- }
- case PRESERVE: {
- return ' ';
- }
- case IGNORE_IF_BEFORE_LINEFEED: {
- /* If last element, no change needed. */
- if (charAfter == FoTextCharacters4a.DISCARD_CHAR) {
- return c;
- }
- if (charAfter != Basic_Latin_Block.CONTROL_LINE_FEED) {
- return c;
- }
- return FoTextCharacters4a.DISCARD_CHAR;
- }
- case IGNORE_IF_AFTER_LINEFEED: {
- /* If first element, no change needed. */
- if (charBefore == FoTextCharacters4a.DISCARD_CHAR) {
- return c;
- }
- if (charBefore != Basic_Latin_Block.CONTROL_LINE_FEED) {
- return c;
- }
- return FoTextCharacters4a.DISCARD_CHAR;
- }
-
- /* default handles "initial" value IGNORE_IF_SURROUNDING_LINEFEED */
- default: {
- /* If first element, only check next. */
- if (charBefore == FoTextCharacters4a.DISCARD_CHAR) {
- if (charAfter == Basic_Latin_Block.CONTROL_LINE_FEED) {
- return FoTextCharacters4a.DISCARD_CHAR;
- }
- return c;
- }
- /* If last element, only check previous. */
- if (charAfter == FoTextCharacters4a.DISCARD_CHAR) {
- if (charBefore == Basic_Latin_Block.CONTROL_LINE_FEED) {
- return FoTextCharacters4a.DISCARD_CHAR;
- }
- return c;
- }
- /* Otherwise, check both. */
- if (charBefore == Basic_Latin_Block.CONTROL_LINE_FEED
- || charAfter == Basic_Latin_Block.CONTROL_LINE_FEED) {
- return FoTextCharacters4a.DISCARD_CHAR;
- }
- return c;
- }
- }
- }
-
- /**
- * Applies white-space-treatment to an array of characters.
- * See XSL-FO Standard 1.0, Section 7.15.8.
- * @param charArray The char array whose contents should be converted.
- * @param inputWhiteSpaceTreatment The value of the white-space-treatment
- * property, one of {@link FoValue#IGNORE},
- * {@link FoValue#PRESERVE},
- * {@link FoValue#IGNORE_IF_BEFORE_LINEFEED},
- * {@link FoValue#IGNORE_IF_AFTER_LINEFEED},
- * or {@link FoValue#IGNORE_IF_SURROUNDING_LINEFEED}.
- * @return If no changes result from the application of
- * white-space-treatment, {@code charArray} is returned.
- * Otherwise, a new char array with the result is returned.
- */
- public static StringBuilder applyWhiteSpaceTreatment(final StringBuilder charArray,
- final WhiteSpaceTreatment inputWhiteSpaceTreatment) {
- WhiteSpaceTreatment whiteSpaceTreatment = inputWhiteSpaceTreatment;
- switch (whiteSpaceTreatment) {
- case IGNORE:
- case PRESERVE:
- case IGNORE_IF_BEFORE_LINEFEED:
- case IGNORE_IF_AFTER_LINEFEED:
- case IGNORE_IF_SURROUNDING_LINEFEED: {
- // These are all valid and need further processing.
- break;
- }
- default: {
- /* Invalid value. Silently convert to the default value as specified
- * in the standard . */
- whiteSpaceTreatment =
- WhiteSpaceTreatment.IGNORE_IF_SURROUNDING_LINEFEED;
- }
- }
-
- int discardElements = 0;
- int changeElements = 0;
- for (int i = 0; i < charArray.length(); i++) {
- final char c = charArray.charAt(i);
- final char conversionChar = applyWhiteSpaceTreatment(charArray, i,
- whiteSpaceTreatment);
- if (conversionChar == FoTextCharacters4a.DISCARD_CHAR) {
- discardElements ++;
- } else if (conversionChar != c) {
- changeElements ++;
- }
- }
-
- if (discardElements == 0 && changeElements == 0) {
- return charArray;
- }
-
- /* We now know that changes of some sort must be made. Create a new
- * array in which to put the results. */
- final char[] returnArray = new char[charArray.length() - discardElements];
- discardElements = 0;
-
- for (int i = 0; i < charArray.length(); i++) {
- final char conversionChar = applyWhiteSpaceTreatment(charArray,
- i, whiteSpaceTreatment);
- if (conversionChar == FoTextCharacters4a.DISCARD_CHAR) {
- discardElements ++;
- } else {
- returnArray[i - discardElements] = conversionChar;
- }
- }
- final StringBuilder newStringBuilder = new StringBuilder();
- newStringBuilder.append(returnArray);
- return newStringBuilder;
- }
-
- /**
- * Applies the linefeed treatment to a specific character.
- * @param c The character being processed, which should always be a
- * linefeed character.
- * @param linefeedTreatment The value of the linefeed-treatment trait.
- * @return The value by which the linefeed character should be replaced, or
- * the marker {@link #DISCARD_CHAR} indicating that the character should be
- * removed.
- */
- public static char applyLinefeedTreatment(final char c, final LinefeedTreatment linefeedTreatment) {
- if (c != Basic_Latin_Block.CONTROL_LINE_FEED) {
- /* This property does not apply to this char. */
- return c;
- }
- switch (linefeedTreatment) {
- case IGNORE: {
- return FoTextCharacters4a.DISCARD_CHAR;
- }
- case TREAT_AS_SPACE: {
- return ' ';
- }
- case TREAT_AS_ZERO_WIDTH_SPACE: {
- return '\u200b';
- }
- // default handles the "initial" value of "preserve"
- default: {
- return c;
- }
- }
- }
-
- /**
- * Applies linefeed-treatment to an array of characters.
- * See XSL-FO Standard 1.0, Section 7.15.7.
- * @param charArray The char array whose contents should be converted.
- * @param inputLinefeedTreatment The value of the linefeed-treatment
- * property, one of
- * {@link FoValue#IGNORE},
- * {@link FoValue#PRESERVE},
- * {@link FoValue#TREAT_AS_SPACE},
- * or {@link FoValue#TREAT_AS_ZERO_WIDTH_SPACE}.
- * @return If no changes result from the application of linefeed-treatment,
- * {@code charArray} is returned. Otherwise, a new char array with the
- * result is returned.
- */
- public static StringBuilder applyLinefeedTreatment(final StringBuilder charArray,
- final LinefeedTreatment inputLinefeedTreatment) {
- LinefeedTreatment linefeedTreatment = inputLinefeedTreatment;
- switch (linefeedTreatment) {
- case PRESERVE: {
- return charArray;
- }
- case IGNORE:
- case TREAT_AS_SPACE:
- case TREAT_AS_ZERO_WIDTH_SPACE: {
- // These need further processing.
- break;
- }
- default: {
- /* Invalid value. Silently convert to the default, as specified by
- * the standard. */
- linefeedTreatment = LinefeedTreatment.TREAT_AS_SPACE;
- }
- }
-
- int discardElements = 0;
- int changeElements = 0;
- for (int i = 0; i < charArray.length(); i++) {
- final char c = charArray.charAt(i);
- if (c == Basic_Latin_Block.CONTROL_LINE_FEED) {
- if (linefeedTreatment == LinefeedTreatment.IGNORE) {
- discardElements ++;
- } else {
- changeElements ++;
- }
- }
- }
-
- if (discardElements == 0 && changeElements == 0) {
- return charArray;
- }
-
- /* We now know that changes of some sort must be made. Create a new
- * array in which to put the results. */
- final char[] returnArray = new char[charArray.length() - discardElements];
- discardElements = 0;
- for (int i = 0; i < charArray.length(); i++) {
- final char c = charArray.charAt(i);
- if (c == Basic_Latin_Block.CONTROL_LINE_FEED) {
- final char conversionChar = applyLinefeedTreatment(c,
- linefeedTreatment);
- if (conversionChar == FoTextCharacters4a.DISCARD_CHAR) {
- discardElements ++;
- } else {
- returnArray[i - discardElements] = conversionChar;
- }
- } else {
- returnArray[i - discardElements] = c;
- }
- }
- final StringBuilder newStringBuilder = new StringBuilder();
- newStringBuilder.append(returnArray);
- return newStringBuilder;
- }
-
- /**
- * Applies text-transform to one character.
- * @param textTransform The text-transform value to use.
- * @param isFirstCharInWord Indicates whether this is the first character in a word.
- * @param c The character to be converted.
- * @return The converted character, or {@code c} if no conversion is performed.
- */
- public static char applyTextTransform(final TextTransform textTransform, final boolean isFirstCharInWord,
- final char c) {
- switch (textTransform) {
- case UPPERCASE:
- return java.lang.Character.toUpperCase(c);
- case LOWERCASE:
- return java.lang.Character.toLowerCase(c);
- case CAPITALIZE:
- if (isFirstCharInWord) {
- /* Use toTitleCase here. Apparently, some languages use a different character to represent a letter when
- * using initial caps than when all of the letters in the word are capitalized. We will try to let Java
- * handle this. */
- return java.lang.Character.toTitleCase(c);
- }
- /* The CSS spec is unclear about whether characters not at the start of the word should be converted to
- * lowercase, or whether they should be unaffected. According to this communication from Paul Grosso:
- * http://lists.w3.org/Archives/Public/xsl-editors/2005AprJun/0006.html they should be unaffected. */
- return c;
- case NONE:
- default:
- return c;
- }
- }
-
- /**
- * <p>Applies white-space-collapse to one character of charArray.</p>
- * <p>Per http://lists.w3.org/Archives/Public/xsl-editors/2002OctDec/0004,
- * elements in previous or subsequent FOs should <em>not</em> be
- * considered.</p>
- * @param charArray The char[] that is being converted.
- * @param index The 0-based index into charArray that points to the char that is being tested.
- * @return {@link #DISCARD_CHAR} if the previous character is whitespace or if the next character is a line-feed.
- * If neither of these is true, returns the original character.
- */
- public static char applyWhiteSpaceCollapse(final CharSequence charArray, final int index) {
- final char charBefore = (index == 0) ? AbstractCharacterSequence.DISCARD_CHAR : charArray.charAt(index - 1);
- final char c = charArray.charAt(index);
- final char charAfter = (index == charArray.length() - 1) ?
- AbstractCharacterSequence.DISCARD_CHAR : charArray.charAt(index + 1);
- return applyWhiteSpaceCollapse(charBefore, c, charAfter);
- }
-
- /**
- * Applies white-space-collapse to one char.
- * @param charBefore The character before c, or {@link AbstractCharacterSequence#DISCARD_CHAR} if there is none.
- * @param c The character being considered for conversion.
- * @param charAfter The character after c, or {@link AbstractCharacterSequence#DISCARD_CHAR} if there is none.
- * @return {@link #DISCARD_CHAR} if the previous character is whitespace or if the next character is a line-feed.
- * If neither of these is true, returns the original character.
- */
- public static char applyWhiteSpaceCollapse(final char charBefore, final char c, final char charAfter) {
- if (! XmlCharacterUtils.isXMLWhitespace(c)) {
- /* If it is not whitespace, nothing should change. */
- return c;
- }
- if (c == Basic_Latin_Block.CONTROL_LINE_FEED) {
- /* If it is a linefeed, nothing should change. */
- return c;
- }
- if (charBefore != AbstractCharacterSequence.DISCARD_CHAR
- && XmlCharacterUtils.isXMLWhitespace(charBefore)) {
- return FoTextCharacters4a.DISCARD_CHAR;
- }
- if (charAfter == Basic_Latin_Block.CONTROL_LINE_FEED) {
- return FoTextCharacters4a.DISCARD_CHAR;
- }
- return c;
- }
-
- /**
- * Applies white-space-collapse to an array of characters.
- * See XSL-FO Standard 1.0, Section 7.15.12.
- * <p>Per http://lists.w3.org/Archives/Public/xsl-editors/2002OctDec/0004,
- * elements in previous or subsequent FOs should <em>not</em> be
- * considered.</p>
- * @param charArray The char array whose contents should be converted.
- * @param whiteSpaceCollapse The value of the white-space-collapse property.
- * @return If no changes result from the application of
- * white-space-collapse, {@code charArray} is returned.
- * Otherwise, a new char array with the result is returned.
- */
- public static StringBuilder applyWhiteSpaceCollapse(final StringBuilder charArray,
- final boolean whiteSpaceCollapse) {
- if (! whiteSpaceCollapse) {
- return charArray;
- }
-
- int discardElements = 0;
- for (int i = 0; i < charArray.length(); i++) {
- final char convertChar = applyWhiteSpaceCollapse(charArray, i);
- if (convertChar == FoTextCharacters4a.DISCARD_CHAR) {
- discardElements ++;
- }
- }
-
- if (discardElements == 0) {
- return charArray;
- }
-
- /* We now know that changes of some sort must be made. Create a new
- * array in which to put the results. */
- final char[] returnArray = new char[charArray.length() - discardElements];
- discardElements = 0;
- for (int i = 0; i < charArray.length(); i++) {
- final char conversionChar = applyWhiteSpaceCollapse(charArray, i);
- if (conversionChar == FoTextCharacters4a.DISCARD_CHAR) {
- discardElements ++;
- } else {
- returnArray[i - discardElements] = conversionChar;
- }
- }
- final StringBuilder newStringBuilder = new StringBuilder();
- newStringBuilder.append(returnArray);
- return newStringBuilder;
- }
-
@Override
public String getSystemId() {
return this.getParent().getSystemId();
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoText4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoText4a.java 2021-12-16 12:38:01 UTC (rev 12226)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoText4a.java 2021-12-16 12:54:36 UTC (rev 12227)
@@ -27,13 +27,19 @@
*/
package org.foray.fotree.fo.obj;
+import org.foray.common.primitive.XmlCharacterUtils;
import org.foray.fotree.FoObj;
import org.foray.fotree.Namespace;
import org.foray.fotree.PropertyList;
+import org.foray.fotree.fo.FoValue;
+import org.axsl.common.value.LinefeedTreatment;
+import org.axsl.common.value.TextTransform;
+import org.axsl.common.value.WhiteSpaceTreatment;
import org.axsl.fotree.FoContext;
import org.axsl.fotree.FoTreeException;
import org.axsl.fotree.fo.FoText;
+import org.axsl.unicode.block.Basic_Latin_Block;
import java.util.List;
@@ -42,6 +48,9 @@
*/
public abstract class FoText4a extends FoObj implements FoText {
+ /** Constant indicating that a given character should be discarded. */
+ public static final char DISCARD_CHAR = 0xFFFF;
+
/**
* The resolved primary Font.
* It is very, VERY tempting to think that we don't need to cache this here, since this is inherited from the
@@ -165,4 +174,381 @@
return false;
}
+ /**
+ * Applies white space treatment to a character array.
+ * @param charArray char array containing character to be converted.
+ * @param index Index into charArray pointing to a char element that is to be converted.
+ * @param whiteSpaceTreatment The value of the whitespace-treatment trait.
+ * @return The character to which the charArray[index] should be converted for white-space-treatment purposes.
+ * Returns {@link #DISCARD_CHAR} if charArray[index] should be discarded.
+ * Note that {@link #DISCARD_CHAR} is not a valid Unicode codepoint, and should therefore never be in the input.
+ */
+ public static char applyWhiteSpaceTreatment(final CharSequence charArray, final int index,
+ final WhiteSpaceTreatment whiteSpaceTreatment) {
+ /* The char immediately before. */
+ final char before;
+ if (index == 0) {
+ before = DISCARD_CHAR;
+ } else {
+ before = charArray.charAt(index - 1);
+ }
+
+ /* The char we want to test. */
+ final char c = charArray.charAt(index);
+
+ /* The char immediately after. */
+ final char after;
+ if (index == charArray.length() - 1) {
+ after = DISCARD_CHAR;
+ } else {
+ after = charArray.charAt(index + 1);
+ }
+
+ return applyWhiteSpaceTreatment(before, c, after, whiteSpaceTreatment);
+ }
+
+ /**
+ * Applies white space treatment to a single character.
+ * @param charBefore The char immediately before the char being tested, or -1 if there is none.
+ * @param c The char being tested.
+ * @param charAfter The char immediately after the char being tested, or -1 of there is none.
+ * @param whiteSpaceTreatment The value of the whitespace-treatment trait.
+ * @return The char at this index, or {@link #DISCARD_CHAR} if this char should be discarded.
+ * Note that {@link #DISCARD_CHAR} is not a valid Unicode codepoint, and should therefore never be in the input.
+ */
+ public static char applyWhiteSpaceTreatment(final char charBefore, final char c, final char charAfter,
+ final WhiteSpaceTreatment whiteSpaceTreatment) {
+ if (! XmlCharacterUtils.isXMLWhitespace(c)) {
+ /* If it is not whitespace, it cannot be changed. */
+ return c;
+ }
+ if (c == Basic_Latin_Block.CONTROL_LINE_FEED) {
+ /* If it is 0x000A (linefeed), it cannot be changed. */
+ return c;
+ }
+ switch (whiteSpaceTreatment) {
+ case IGNORE: return FoTextCharacters4a.DISCARD_CHAR;
+ case PRESERVE: return ' ';
+ case IGNORE_IF_BEFORE_LINEFEED: {
+ /* If last element, no change needed. */
+ if (charAfter == FoTextCharacters4a.DISCARD_CHAR) {
+ return c;
+ }
+ if (charAfter != Basic_Latin_Block.CONTROL_LINE_FEED) {
+ return c;
+ }
+ return FoTextCharacters4a.DISCARD_CHAR;
+ }
+ case IGNORE_IF_AFTER_LINEFEED: {
+ /* If first element, no change needed. */
+ if (charBefore == FoTextCharacters4a.DISCARD_CHAR) {
+ return c;
+ }
+ if (charBefore != Basic_Latin_Block.CONTROL_LINE_FEED) {
+ return c;
+ }
+ return FoTextCharacters4a.DISCARD_CHAR;
+ }
+
+ /* default handles "initial" value IGNORE_IF_SURROUNDING_LINEFEED */
+ default: {
+ /* If first element, only check next. */
+ if (charBefore == FoTextCharacters4a.DISCARD_CHAR) {
+ if (charAfter == Basic_Latin_Block.CONTROL_LINE_FEED) {
+ return FoTextCharacters4a.DISCARD_CHAR;
+ }
+ return c;
+ }
+ /* If last element, only check previous. */
+ if (charAfter == FoTextCharacters4a.DISCARD_CHAR) {
+ if (charBefore == Basic_Latin_Block.CONTROL_LINE_FEED) {
+ return FoTextCharacters4a.DISCARD_CHAR;
+ }
+ return c;
+ }
+ /* Otherwise, check both. */
+ if (charBefore == Basic_Latin_Block.CONTROL_LINE_FEED
+ || charAfter == Basic_Latin_Block.CONTROL_LINE_FEED) {
+ return FoTextCharacters4a.DISCARD_CHAR;
+ }
+ return c;
+ }
+ }
+ }
+
+ /**
+ * Applies white-space-treatment to an array of characters.
+ * @param charArray The char array whose contents should be converted.
+ * @param inputWhiteSpaceTreatment The value of the white-space-treatment property, one of {@link FoValue#IGNORE},
+ * {@link FoValue#PRESERVE}, {@link FoValue#IGNORE_IF_BEFORE_LINEFEED}, {@link FoValue#IGNORE_IF_AFTER_LINEFEED},
+ * or {@link FoValue#IGNORE_IF_SURROUNDING_LINEFEED}.
+ * @return If no changes result from the application of white-space-treatment, {@code charArray} is returned.
+ * Otherwise, a new char array with the result is returned.
+ * @see "XSL-FO Recommendation 1.0, Section 7.15.8."
+ * @see "XSL-FO Recommendation 1.1, Section 7.16.8."
+ */
+ public static StringBuilder applyWhiteSpaceTreatment(final StringBuilder charArray,
+ final WhiteSpaceTreatment inputWhiteSpaceTreatment) {
+ WhiteSpaceTreatment whiteSpaceTreatment = inputWhiteSpaceTreatment;
+ switch (whiteSpaceTreatment) {
+ case IGNORE:
+ case PRESERVE:
+ case IGNORE_IF_BEFORE_LINEFEED:
+ case IGNORE_IF_AFTER_LINEFEED:
+ case IGNORE_IF_SURROUNDING_LINEFEED: {
+ // These are all valid and need further processing.
+ break;
+ }
+ default: {
+ /* Invalid value. Silently convert to the default value as specified
+ * in the standard . */
+ whiteSpaceTreatment =
+ WhiteSpaceTreatment.IGNORE_IF_SURROUNDING_LINEFEED;
+ }
+ }
+
+ int discardElements = 0;
+ int changeElements = 0;
+ for (int i = 0; i < charArray.length(); i++) {
+ final char c = charArray.charAt(i);
+ final char conversionChar = applyWhiteSpaceTreatment(charArray, i,
+ whiteSpaceTreatment);
+ if (conversionChar == FoTextCharacters4a.DISCARD_CHAR) {
+ discardElements ++;
+ } else if (conversionChar != c) {
+ changeElements ++;
+ }
+ }
+
+ if (discardElements == 0 && changeElements == 0) {
+ return charArray;
+ }
+
+ /* We now know that changes of some sort must be made. Create a new
+ * array in which to put the results. */
+ final char[] returnArray = new char[charArray.length() - discardElements];
+ discardElements = 0;
+
+ for (int i = 0; i < charArray.length(); i++) {
+ final char conversionChar = applyWhiteSpaceTreatment(charArray,
+ i, whiteSpaceTreatment);
+ if (conversionChar == FoTextCharacters4a.DISCARD_CHAR) {
+ discardElements ++;
+ } else {
+ returnArray[i - discardElements] = conversionChar;
+ }
+ }
+ final StringBuilder newStringBuilder = new StringBuilder();
+ newStringBuilder.append(returnArray);
+ return newStringBuilder;
+ }
+
+ /**
+ * Applies the linefeed treatment to a specific character.
+ * @param c The character being processed, which should always be a linefeed character.
+ * @param linefeedTreatment The value of the linefeed-treatment trait.
+ * @return The value by which the linefeed character should be replaced, or the marker {@link #DISCARD_CHAR}
+ * indicating that the character should be removed.
+ */
+ public static char applyLinefeedTreatment(final char c, final LinefeedTreatment linefeedTreatment) {
+ if (c != Basic_Latin_Block.CONTROL_LINE_FEED) {
+ /* This property does not apply to this char. */
+ return c;
+ }
+ switch (linefeedTreatment) {
+ case IGNORE: return FoTextCharacters4a.DISCARD_CHAR;
+ case TREAT_AS_SPACE: return ' ';
+ case TREAT_AS_ZERO_WIDTH_SPACE: return '\u200b';
+ // default handles the "initial" value of "preserve"
+ default: return c;
+ }
+ }
+
+ /**
+ * Applies linefeed-treatment to an array of characters.
+ * @param charArray The char array whose contents should be converted.
+ * @param inputLinefeedTreatment The value of the linefeed-treatment property, one of {@link FoValue#IGNORE},
+ * {@link FoValue#PRESERVE}, {@link FoValue#TREAT_AS_SPACE}, or {@link FoValue#TREAT_AS_ZERO_WIDTH_SPACE}.
+ * @return If no changes result from the application of linefeed-treatment, {@code charArray} is returned.
+ * Otherwise, a new char array with the result is returned.
+ * @see "XSL-FO Recommendation 1.0, Section 7.15.7."
+ * @see "XSL-FO Recommendation 1.1, Section 7.16.7."
+ */
+ public static StringBuilder applyLinefeedTreatment(final StringBuilder charArray,
+ final LinefeedTreatment inputLinefeedTreatment) {
+ LinefeedTreatment linefeedTreatment = inputLinefeedTreatment;
+ switch (linefeedTreatment) {
+ case PRESERVE: return charArray;
+ case IGNORE:
+ case TREAT_AS_SPACE:
+ case TREAT_AS_ZERO_WIDTH_SPACE: {
+ // These need further processing.
+ break;
+ }
+ default: {
+ /* Invalid value. Silently convert to the default, as specified by
+ * the standard. */
+ linefeedTreatment = LinefeedTreatment.TREAT_AS_SPACE;
+ }
+ }
+
+ int discardElements = 0;
+ int changeElements = 0;
+ for (int i = 0; i < charArray.length(); i++) {
+ final char c = charArray.charAt(i);
+ if (c == Basic_Latin_Block.CONTROL_LINE_FEED) {
+ if (linefeedTreatment == LinefeedTreatment.IGNORE) {
+ discardElements ++;
+ } else {
+ changeElements ++;
+ }
+ }
+ }
+
+ if (discardElements == 0 && changeElements == 0) {
+ return charArray;
+ }
+
+ /* We now know that changes of some sort must be made. Create a new
+ * array in which to put the results. */
+ final char[] returnArray = new char[charArray.length() - discardElements];
+ discardElements = 0;
+ for (int i = 0; i < charArray.length(); i++) {
+ final char c = charArray.charAt(i);
+ if (c == Basic_Latin_Block.CONTROL_LINE_FEED) {
+ final char conversionChar = applyLinefeedTreatment(c,
+ linefeedTreatment);
+ if (conversionChar == FoTextCharacters4a.DISCARD_CHAR) {
+ discardElements ++;
+ } else {
+ returnArray[i - discardElements] = conversionChar;
+ }
+ } else {
+ returnArray[i - discardElements] = c;
+ }
+ }
+ final StringBuilder newStringBuilder = new StringBuilder();
+ newStringBuilder.append(returnArray);
+ return newStringBuilder;
+ }
+
+ /**
+ * Applies text-transform to one character.
+ * @param textTransform The text-transform value to use.
+ * @param isFirstCharInWord Indicates whether this is the first character in a word.
+ * @param c The character to be converted.
+ * @return The converted character, or {@code c} if no conversion is performed.
+ */
+ public static char applyTextTransform(final TextTransform textTransform, final boolean isFirstCharInWord,
+ final char c) {
+ switch (textTransform) {
+ case UPPERCASE: return java.lang.Character.toUpperCase(c);
+ case LOWERCASE: return java.lang.Character.toLowerCase(c);
+ case CAPITALIZE:
+ if (isFirstCharInWord) {
+ /* Use toTitleCase here. Apparently, some languages use a different character to represent a letter when
+ * using initial caps than when all of the letters in the word are capitalized. We will try to let Java
+ * handle this. */
+ return java.lang.Character.toTitleCase(c);
+ }
+ /* The CSS spec is unclear about whether characters not at the start of the word should be converted to
+ * lowercase, or whether they should be unaffected. According to this communication from Paul Grosso:
+ * http://lists.w3.org/Archives/Public/xsl-editors/2005AprJun/0006.html they should be unaffected. */
+ return c;
+ case NONE:
+ default:
+ return c;
+ }
+ }
+
+ /**
+ * <p>Applies white-space-collapse to one character of charArray.</p>
+ * <p>Per http://lists.w3.org/Archives/Public/xsl-editors/2002OctDec/0004, elements in previous or subsequent FOs
+ * should <em>not</em> be considered.</p>
+ * @param charArray The char[] that is being converted.
+ * @param index The 0-based index into charArray that points to the char that is being tested.
+ * @return {@link #DISCARD_CHAR} if the previous character is whitespace or if the next character is a line-feed.
+ * If neither of these is true, returns the original character.
+ */
+ public static char applyWhiteSpaceCollapse(final CharSequence charArray, final int index) {
+ final char charBefore = (index == 0) ? AbstractCharacterSequence.DISCARD_CHAR : charArray.charAt(index - 1);
+ final char c = charArray.charAt(index);
+ final char charAfter = (index == charArray.length() - 1) ?
+ AbstractCharacterSequence.DISCARD_CHAR : charArray.charAt(index + 1);
+ return applyWhiteSpaceCollapse(charBefore, c, charAfter);
+ }
+
+ /**
+ * Applies white-space-collapse to one char.
+ * @param charBefore The character before c, or {@link AbstractCharacterSequence#DISCARD_CHAR} if there is none.
+ * @param c The character being considered for conversion.
+ * @param charAfter The character after c, or {@link AbstractCharacterSequence#DISCARD_CHAR} if there is none.
+ * @return {@link #DISCARD_CHAR} if the previous character is whitespace or if the next character is a line-feed.
+ * If neither of these is true, returns the original character.
+ */
+ public static char applyWhiteSpaceCollapse(final char charBefore, final char c, final char charAfter) {
+ if (! XmlCharacterUtils.isXMLWhitespace(c)) {
+ /* If it is not whitespace, nothing should change. */
+ return c;
+ }
+ if (c == Basic_Latin_Block.CONTROL_LINE_FEED) {
+ /* If it is a linefeed, nothing should change. */
+ return c;
+ }
+ if (charBefore != AbstractCharacterSequence.DISCARD_CHAR
+ && XmlCharacterUtils.isXMLWhitespace(charBefore)) {
+ return FoTextCharacters4a.DISCARD_CHAR;
+ }
+ if (charAfter == Basic_Latin_Block.CONTROL_LINE_FEED) {
+ return FoTextCharacters4a.DISCARD_CHAR;
+ }
+ return c;
+ }
+
+ /**
+ * Applies white-space-collapse to an array of characters.
+ * <p>Per http://lists.w3.org/Archives/Public/xsl-editors/2002OctDec/0004, elements in previous or subsequent FOs
+ * should <em>not</em> be considered.</p>
+ * @param charArray The char array whose contents should be converted.
+ * @param whiteSpaceCollapse The value of the white-space-collapse property.
+ * @return If no changes result from the application of white-space-collapse, {@code charArray} is returned.
+ * Otherwise, a new char array with the result is returned.
+ * @see "XSL-FO Recommendation 1.0, Section 7.15.12."
+ * @see "XSL-FO Recommendation 1.1, Section 7.16.12."
+ */
+ public static StringBuilder applyWhiteSpaceCollapse(final StringBuilder charArray,
+ final boolean whiteSpaceCollapse) {
+ if (! whiteSpaceCollapse) {
+ return charArray;
+ }
+
+ int discardElements = 0;
+ for (int i = 0; i < charArray.length(); i++) {
+ final char convertChar = applyWhiteSpaceCollapse(charArray, i);
+ if (convertChar == FoTextCharacters4a.DISCARD_CHAR) {
+ discardElements ++;
+ }
+ }
+
+ if (discardElements == 0) {
+ return charArray;
+ }
+
+ /* We now know that changes of some sort must be made. Create a new
+ * array in which to put the results. */
+ final char[] returnArray = new char[charArray.length() - discardElements];
+ discardElements = 0;
+ for (int i = 0; i < charArray.length(); i++) {
+ final char conversionChar = applyWhiteSpaceCollapse(charArray, i);
+ if (conversionChar == FoTextCharacters4a.DISCARD_CHAR) {
+ discardElements ++;
+ } else {
+ returnArray[i - discardElements] = conversionChar;
+ }
+ }
+ final StringBuilder newStringBuilder = new StringBuilder();
+ newStringBuilder.append(returnArray);
+ return newStringBuilder;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-16 12:38:04
|
Revision: 12226
http://sourceforge.net/p/foray/code/12226
Author: victormote
Date: 2021-12-16 12:38:01 +0000 (Thu, 16 Dec 2021)
Log Message:
-----------
Rename FO text classes, for clarity.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequenceContent.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Title4a.java
Added Paths:
-----------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextCharacters4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextWords4a.java
Removed Paths:
-------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-16 12:26:02 UTC (rev 12225)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-16 12:38:01 UTC (rev 12226)
@@ -44,8 +44,8 @@
import org.foray.fotree.fo.enums.ScalingMethod;
import org.foray.fotree.fo.obj.BasicLink4a;
import org.foray.fotree.fo.obj.Block4a;
-import org.foray.fotree.fo.obj.CharacterSequence4a;
import org.foray.fotree.fo.obj.Flow4a;
+import org.foray.fotree.fo.obj.FoTextCharacters4a;
import org.foray.fotree.fo.obj.Leader4a;
import org.foray.fotree.fo.obj.ListBlock4a;
import org.foray.fotree.fo.obj.ListItem4a;
@@ -3396,7 +3396,7 @@
* @return The next contiguous FOText item. If there is no subsequent FOText item with the same closest ancestor
* block, or if there is a non-text leaf between, null is returned.
*/
- protected CharacterSequence4a getNextContiguousTextInBlock() {
+ protected FoTextCharacters4a getNextContiguousTextInBlock() {
final FoObj nextLeaf = getNextLeaf();
return getContiguousTextInBlock(nextLeaf);
}
@@ -3406,7 +3406,7 @@
* @return The previous contiguous FOText item. If there is no previous FOText item with the same closest ancestor
* block, or if there is a non-text leaf between, null is returned.
*/
- protected CharacterSequence4a getPreviousContiguousTextInBlock() {
+ protected FoTextCharacters4a getPreviousContiguousTextInBlock() {
final FoObj previousLeaf = (FoObj) this.getPreviousLeaf();
return getContiguousTextInBlock(previousLeaf);
}
@@ -3419,13 +3419,13 @@
* as this.
* If any of these are not true, null is returned.
*/
- private CharacterSequence4a getContiguousTextInBlock(final FoObj leafToTest) {
+ private FoTextCharacters4a getContiguousTextInBlock(final FoObj leafToTest) {
final FoObj effectiveParent = this.getParent();
final FoContext context = null;
if (leafToTest == null) {
return null;
}
- if (! (leafToTest instanceof CharacterSequence4a)) {
+ if (! (leafToTest instanceof FoTextCharacters4a)) {
return null;
}
/* If either is within a Leader, they both need to be in the same one.
@@ -3440,7 +3440,7 @@
if (thisBlock != testBlock) {
return null;
}
- return (CharacterSequence4a) leafToTest;
+ return (FoTextCharacters4a) leafToTest;
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2021-12-16 12:26:02 UTC (rev 12225)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2021-12-16 12:38:01 UTC (rev 12226)
@@ -30,8 +30,8 @@
import org.foray.common.primitive.StringUtils;
import org.foray.common.xml.SaxParser;
-import org.foray.fotree.fo.obj.CharacterSequence4a;
-import org.foray.fotree.fo.obj.FoWordSequence;
+import org.foray.fotree.fo.obj.FoTextCharacters4a;
+import org.foray.fotree.fo.obj.FoTextWords4a;
import org.foray.fotree.fo.obj.PageSequence4a;
import org.foray.fotree.fo.obj.Root4a;
@@ -209,9 +209,9 @@
switch (this.textStrategy) {
case WORD: {
- final FoWordSequence wordSequence;
+ final FoTextWords4a wordSequence;
try {
- wordSequence = new FoWordSequence(this.currentFObj, this.textBuffer);
+ wordSequence = new FoTextWords4a(this.currentFObj, this.textBuffer);
} catch (final OrthographyException e) {
this.errorMessage(e.getMessage());
throw new SAXException(e);
@@ -221,7 +221,7 @@
}
case CHARACTER: {
final char[] charArray = this.textBuffer.toString().toCharArray();
- final CharacterSequence4a ft = new CharacterSequence4a(this.currentFObj, charArray);
+ final FoTextCharacters4a ft = new FoTextCharacters4a(this.currentFObj, charArray);
this.currentFObj.addChild(ft);
break;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java 2021-12-16 12:26:02 UTC (rev 12225)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java 2021-12-16 12:38:01 UTC (rev 12226)
@@ -36,8 +36,8 @@
import org.foray.fotree.axsl.AxslValue;
import org.foray.fotree.axsl.prop.AxslEnumerated;
import org.foray.fotree.fo.obj.AbstractCharacterSequence;
-import org.foray.fotree.fo.obj.CharacterSequence4a;
import org.foray.fotree.fo.obj.Declarations4a;
+import org.foray.fotree.fo.obj.FoTextCharacters4a;
import org.axsl.common.value.LinefeedTreatment;
import org.axsl.common.value.TextTransform;
@@ -103,7 +103,7 @@
@Override
protected void validateDescendants() throws FoTreeException {
if (this.getChildren().size() != 1
- || ! (this.formattingObjectAt(0) instanceof CharacterSequence4a)) {
+ || ! (this.formattingObjectAt(0) instanceof FoTextCharacters4a)) {
throwException("The content model for " + this.getFullName()
+ " is: (#PCDATA).");
}
@@ -145,8 +145,8 @@
@Override
public String getMetadataValue() {
/* Existence and casting verified at validateDescendants(). */
- final CharacterSequence4a text =
- (CharacterSequence4a) this.formattingObjectAt(0);
+ final FoTextCharacters4a text =
+ (FoTextCharacters4a) this.formattingObjectAt(0);
return text.getAreaTreeText(null).toString();
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-16 12:26:02 UTC (rev 12225)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-16 12:38:01 UTC (rev 12226)
@@ -321,7 +321,7 @@
}
switch (whiteSpaceTreatment) {
case IGNORE: {
- return CharacterSequence4a.DISCARD_CHAR;
+ return FoTextCharacters4a.DISCARD_CHAR;
}
case PRESERVE: {
return ' ';
@@ -328,38 +328,38 @@
}
case IGNORE_IF_BEFORE_LINEFEED: {
/* If last element, no change needed. */
- if (charAfter == CharacterSequence4a.DISCARD_CHAR) {
+ if (charAfter == FoTextCharacters4a.DISCARD_CHAR) {
return c;
}
if (charAfter != Basic_Latin_Block.CONTROL_LINE_FEED) {
return c;
}
- return CharacterSequence4a.DISCARD_CHAR;
+ return FoTextCharacters4a.DISCARD_CHAR;
}
case IGNORE_IF_AFTER_LINEFEED: {
/* If first element, no change needed. */
- if (charBefore == CharacterSequence4a.DISCARD_CHAR) {
+ if (charBefore == FoTextCharacters4a.DISCARD_CHAR) {
return c;
}
if (charBefore != Basic_Latin_Block.CONTROL_LINE_FEED) {
return c;
}
- return CharacterSequence4a.DISCARD_CHAR;
+ return FoTextCharacters4a.DISCARD_CHAR;
}
/* default handles "initial" value IGNORE_IF_SURROUNDING_LINEFEED */
default: {
/* If first element, only check next. */
- if (charBefore == CharacterSequence4a.DISCARD_CHAR) {
+ if (charBefore == FoTextCharacters4a.DISCARD_CHAR) {
if (charAfter == Basic_Latin_Block.CONTROL_LINE_FEED) {
- return CharacterSequence4a.DISCARD_CHAR;
+ return FoTextCharacters4a.DISCARD_CHAR;
}
return c;
}
/* If last element, only check previous. */
- if (charAfter == CharacterSequence4a.DISCARD_CHAR) {
+ if (charAfter == FoTextCharacters4a.DISCARD_CHAR) {
if (charBefore == Basic_Latin_Block.CONTROL_LINE_FEED) {
- return CharacterSequence4a.DISCARD_CHAR;
+ return FoTextCharacters4a.DISCARD_CHAR;
}
return c;
}
@@ -366,7 +366,7 @@
/* Otherwise, check both. */
if (charBefore == Basic_Latin_Block.CONTROL_LINE_FEED
|| charAfter == Basic_Latin_Block.CONTROL_LINE_FEED) {
- return CharacterSequence4a.DISCARD_CHAR;
+ return FoTextCharacters4a.DISCARD_CHAR;
}
return c;
}
@@ -413,7 +413,7 @@
final char c = charArray.charAt(i);
final char conversionChar = applyWhiteSpaceTreatment(charArray, i,
whiteSpaceTreatment);
- if (conversionChar == CharacterSequence4a.DISCARD_CHAR) {
+ if (conversionChar == FoTextCharacters4a.DISCARD_CHAR) {
discardElements ++;
} else if (conversionChar != c) {
changeElements ++;
@@ -432,7 +432,7 @@
for (int i = 0; i < charArray.length(); i++) {
final char conversionChar = applyWhiteSpaceTreatment(charArray,
i, whiteSpaceTreatment);
- if (conversionChar == CharacterSequence4a.DISCARD_CHAR) {
+ if (conversionChar == FoTextCharacters4a.DISCARD_CHAR) {
discardElements ++;
} else {
returnArray[i - discardElements] = conversionChar;
@@ -459,7 +459,7 @@
}
switch (linefeedTreatment) {
case IGNORE: {
- return CharacterSequence4a.DISCARD_CHAR;
+ return FoTextCharacters4a.DISCARD_CHAR;
}
case TREAT_AS_SPACE: {
return ' ';
@@ -534,7 +534,7 @@
if (c == Basic_Latin_Block.CONTROL_LINE_FEED) {
final char conversionChar = applyLinefeedTreatment(c,
linefeedTreatment);
- if (conversionChar == CharacterSequence4a.DISCARD_CHAR) {
+ if (conversionChar == FoTextCharacters4a.DISCARD_CHAR) {
discardElements ++;
} else {
returnArray[i - discardElements] = conversionChar;
@@ -616,10 +616,10 @@
}
if (charBefore != AbstractCharacterSequence.DISCARD_CHAR
&& XmlCharacterUtils.isXMLWhitespace(charBefore)) {
- return CharacterSequence4a.DISCARD_CHAR;
+ return FoTextCharacters4a.DISCARD_CHAR;
}
if (charAfter == Basic_Latin_Block.CONTROL_LINE_FEED) {
- return CharacterSequence4a.DISCARD_CHAR;
+ return FoTextCharacters4a.DISCARD_CHAR;
}
return c;
}
@@ -645,7 +645,7 @@
int discardElements = 0;
for (int i = 0; i < charArray.length(); i++) {
final char convertChar = applyWhiteSpaceCollapse(charArray, i);
- if (convertChar == CharacterSequence4a.DISCARD_CHAR) {
+ if (convertChar == FoTextCharacters4a.DISCARD_CHAR) {
discardElements ++;
}
}
@@ -660,7 +660,7 @@
discardElements = 0;
for (int i = 0; i < charArray.length(); i++) {
final char conversionChar = applyWhiteSpaceCollapse(charArray, i);
- if (conversionChar == CharacterSequence4a.DISCARD_CHAR) {
+ if (conversionChar == FoTextCharacters4a.DISCARD_CHAR) {
discardElements ++;
} else {
returnArray[i - discardElements] = conversionChar;
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java 2021-12-16 12:26:02 UTC (rev 12225)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java 2021-12-16 12:38:01 UTC (rev 12226)
@@ -94,7 +94,7 @@
* be very limited. */
final int c = traitCharacter();
final char[] chars = java.lang.Character.toChars(c);
- final CharacterSequence4a text = new CharacterSequence4a(this, chars);
+ final FoTextCharacters4a text = new FoTextCharacters4a(this, chars);
this.getChildren().add(text);
}
@@ -120,8 +120,8 @@
@Override
public CharSequence getAreaTreeText(final FoContext context) {
- final CharacterSequence4a text =
- (CharacterSequence4a) this.getChildren().get(0);
+ final FoTextCharacters4a text =
+ (FoTextCharacters4a) this.getChildren().get(0);
return text.getAreaTreeText(context);
}
Deleted: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2021-12-16 12:26:02 UTC (rev 12225)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2021-12-16 12:38:01 UTC (rev 12226)
@@ -1,473 +0,0 @@
-/*
- * Copyright 2004 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.fotree.fo.obj;
-
-import org.foray.fotree.FoObj;
-
-import org.axsl.common.value.TextTransform;
-import org.axsl.fotree.FoContext;
-import org.axsl.fotree.fo.Marker;
-
-/**
- * A text node in the formatting object tree.
- */
-public class CharacterSequence4a extends AbstractCharacterSequence {
-
- /** Constant indicating that a given character is not a word character. */
- private static final int IS_WORD_CHAR_FALSE = 0;
-
- /** Constant indicating that a given character is a word character. */
- private static final int IS_WORD_CHAR_TRUE = 1;
-
- /** Constant indicating that a given character may or may not be a word
- * character, and that the context needs to be expanded to find out for
- * sure. */
- private static final int IS_WORD_CHAR_MAYBE = 2;
-
- /** Constant indicating that the text is unprocessed. */
- private static final byte FILTER_RAW = 0;
-
- /** Constant indicating that white-space-treatment and linefeed-treatment
- * have been applied. */
- private static final byte FILTER_PRE_TRANSFORM = 30;
-
- /** Constant indicating that, in addition to processing for
- * {@link #FILTER_PRE_TRANSFORM}, text-transform has been applied. */
- private static final byte FILTER_REFINED_FO_TREE = 60;
-
- /** Constant indicating that, in addition to processing for
- * {@link #FILTER_REFINED_FO_TREE}, white-space-collapse has been applied,
- * that is, that all text processing has been completed. */
- private static final byte FILTER_AREA_TREE = 90;
-
- /** The parent of this node. */
- private FoObj parent;
-
- /** The raw text content. */
- private StringBuilder ca;
-
- /** The current status of the filtering of this text item. */
- private byte filterStatus = CharacterSequence4a.FILTER_RAW;
-
- /**
- * Constructor.
- * @param parent The FoObj parent of this text.
- * @param chars The raw text content.
- */
- public CharacterSequence4a(final FoObj parent, final char[] chars) {
- super(parent);
- this.parent = parent;
- this.ca = new StringBuilder(chars.length);
- this.ca.append(chars);
- filterContent();
- }
-
- @Override
- public FoObj getParent() {
- return this.parent;
- }
-
- /**
- * Filters the content for this text item.
- */
- private void filterContent() {
- /* If we need to preserve the raw content, no filtering should be done,
- * or if it is done, it must be done on a duplicate of the raw data. */
- if (this.getFoTree().preserveRawContent()) {
- return;
- }
- final Marker ancestorMarker = this.ancestorMarker();
- if (ancestorMarker != null) {
- /* There is an fo:marker ancestor, so we can't know what the values
- * are for white-space-treatment, linefeed-treatment,
- * text-transform, and white-space-collapse.
- * Store the text raw and process it one-the-fly. */
- return;
- }
- if (this.getParent() instanceof BookmarkTitle4a) {
- /* BookmarkTitle keeps its text raw always. */
- return;
- }
- /* Convert the text as far as possible, store it, and set the status.
- * We cannot filter text-transform yet, because we may need subsequent
- * FOText instances. */
- this.ca = this.getPreTextTransformText(null);
- this.filterStatus = CharacterSequence4a.FILTER_PRE_TRANSFORM;
- }
-
- @Override
- public boolean isAllWhiteSpace() {
- for (int i = 0; i < this.ca.length(); i++) {
- final char ch = this.ca.charAt(i);
- if (! isWhitespace(ch)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * <p>Filters the raw text as needed to present the text that should appear
- * in the "refined FO tree".
- * Specifically, this effectively filters for the following properties:</p>
- * <ul>
- * <li>white-space-treatment. See XSL-FO Standard 1.0 Section 7.15.8.</li>
- * <li>linefeed-treatment. See XSL-FO Standard 1.0 Section 7.15.7.</li>
- * <li>text-transform. See XSL-FO Standard 1.0 Section 7.16.6.</li>
- * </ul>
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- *
- * @return The text that should appear in the refined FO tree.
- */
- public StringBuilder getRefinedText(final FoContext context) {
- /* TODO: This needs to come from effectiveParent, with context. */
- final FoObj effectiveParent = this.getParent();
- if (this.filterStatus >= CharacterSequence4a.FILTER_REFINED_FO_TREE) {
- /* The stored text has already been filtered. Just return it. */
- return this.ca;
- }
-
- final StringBuilder charArray = getPreTextTransformText(context);
- // Now handle text-transform.
- final TextTransform textTransform = effectiveParent.traitTextTransform(
- context);
- if (textTransform != TextTransform.NONE) {
- for (int i = 0; i < charArray.length(); i++) {
- charArray.setCharAt(i, applyTextTransform(context, charArray, i, textTransform));
- }
- }
-
- /* Update the instance's text with the refined value, and update the
- * status. */
- this.ca = charArray;
- this.filterStatus = CharacterSequence4a.FILTER_REFINED_FO_TREE;
- return charArray;
- }
-
- /**
- * <p>Filters the raw text as needed to present the text that should appear
- * in the "refined FO tree", except that text-transform is not handled.
- * Specifically, this effectively filters for the following properties:</p>
- * <ul>
- * <li>white-space-treatment. See XSL-FO Standard 1.0 Section 7.15.8.</li>
- * <li>linefeed-treatment. See XSL-FO Standard 1.0 Section 7.15.7.</li>
- * </ul>
- * <p>This intermediate method is needed to ensure that as text-transform
- * is applied it does not create a stack overflow. This is possible because
- * text-transform looks at previous and subsequent FOText items, which must
- * inevitably look back at the original FOText instance.</p>
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- *
- * @return The text that should appear in the refined FO tree, except that
- * text-transform is not applied.
- */
- private StringBuilder getPreTextTransformText(final FoContext context) {
- final FoObj effectiveParent = this.effectiveParent(context);
- if (this.filterStatus >= CharacterSequence4a.FILTER_PRE_TRANSFORM) {
- /* The stored text has already been filtered. Just return it. */
- return this.ca;
- }
-
- /* Must handle white-space-treatment first. */
- StringBuilder workArray = applyWhiteSpaceTreatment(this.ca,
- effectiveParent.traitWhiteSpaceTreatment(context));
-
- // Now handle linefeed-treatment.
- workArray = applyLinefeedTreatment(workArray,
- effectiveParent.traitLinefeedTreatment(context));
-
- /* Update this instance's text with the filtered value and update the
- * status. */
- this.ca = workArray;
- this.filterStatus = CharacterSequence4a.FILTER_PRE_TRANSFORM;
- return workArray;
- }
-
- /**
- * Applies text-transform to one character of the array.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @param charArray The array which is being transformed.
- * @param index The 0-based index into charArray, which points to the
- * character being transformed.
- * @param textTransform The value of the text-transform enumerated property.
- * @return The transformed char.
- */
- private char applyTextTransform(final FoContext context, final CharSequence charArray, final int index,
- final TextTransform textTransform) {
- boolean isFirstCharInWord = false;
- if (textTransform == TextTransform.CAPITALIZE) {
- isFirstCharInWord = isStartOfWord(context, charArray, index);
- }
- final char c = charArray.charAt(index);
- return AbstractCharacterSequence.applyTextTransform(textTransform, isFirstCharInWord, c);
- }
-
- /**
- * Determines whether a particular location in the text array is
- * the start of a new "word". The use of "word" here is specifically for
- * the text-transform property, but may be useful for other things as
- * well, such as word-spacing. The definition of "word" is somewhat
- * ambiguous and appears to be definable by the user agent.
- * See http://lists.w3.org/Archives/Public/xsl-editors/2005AprJun/0006.html
- * for a discussion of this matter.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @param charArray The char[] being transformed.
- * @param index The 0-based index into charArray pointing to the character
- * that is being tested.
- *
- * @return True if and only if the character at this location is the start of a new
- * word.
- */
- private boolean isStartOfWord(final FoContext context,
- final CharSequence charArray, final int index) {
- final char prevChar = getRelativeCharInBlock(context, charArray,
- index, -1);
- /* All we are really concerned about here is of what type prevChar
- is. If inputChar is not part of a word, then the Java
- conversions will (we hope) simply return inputChar.
- */
- switch (isWordChar(prevChar)) {
- case CharacterSequence4a.IS_WORD_CHAR_TRUE:
- return false;
- case CharacterSequence4a.IS_WORD_CHAR_FALSE:
- return true;
- /* "MAYBE" implies that additional context is needed. An example is a
- * single-quote, either straight or closing, which might be interpreted
- * as a possessive or a contraction, or might be a closing quote.
- */
- case CharacterSequence4a.IS_WORD_CHAR_MAYBE:
- final char prevPrevChar = getRelativeCharInBlock(context, charArray,
- index, -2);
- switch (isWordChar(prevPrevChar)) {
- case CharacterSequence4a.IS_WORD_CHAR_TRUE:
- return false;
- case CharacterSequence4a.IS_WORD_CHAR_FALSE:
- return true;
- case CharacterSequence4a.IS_WORD_CHAR_MAYBE:
- return true;
- default:
- return false;
- }
- default:
- return false;
- }
- }
-
- /**
- * Determines whether the input char should be considered part of a
- * "word". This is used primarily to determine whether the character
- * immediately following starts a new word, but may have other uses.
- * We have not found a definition of "word" in the standard (1.0), so the
- * logic used here is based on the programmer's best guess.
- *
- * @param inputChar the character to be tested.
- * @return int IS_WORD_CHAR_TRUE, IS_WORD_CHAR_FALSE, or IS_WORD_CHAR_MAYBE,
- * depending on whether the character should be considered part of a word
- * or not.
- */
- private static int isWordChar(final char inputChar) {
- switch (java.lang.Character.getType(inputChar)) {
- case java.lang.Character.COMBINING_SPACING_MARK:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- case java.lang.Character.CONNECTOR_PUNCTUATION:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- case java.lang.Character.CONTROL:
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.CURRENCY_SYMBOL:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- case java.lang.Character.DASH_PUNCTUATION:
- if (inputChar == '-') {
- /* Hyphen. */
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- }
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.DECIMAL_DIGIT_NUMBER:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- case java.lang.Character.ENCLOSING_MARK:
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.END_PUNCTUATION:
- if (inputChar == '\u2019') {
- /* Apostrophe, right single quote. */
- return CharacterSequence4a.IS_WORD_CHAR_MAYBE;
- }
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.FORMAT:
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.LETTER_NUMBER:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- case java.lang.Character.LINE_SEPARATOR:
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.LOWERCASE_LETTER:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- case java.lang.Character.MATH_SYMBOL:
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.MODIFIER_LETTER:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- case java.lang.Character.MODIFIER_SYMBOL:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- case java.lang.Character.NON_SPACING_MARK:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- case java.lang.Character.OTHER_LETTER:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- case java.lang.Character.OTHER_NUMBER:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- case java.lang.Character.OTHER_PUNCTUATION:
- if (inputChar == '\'') {
- /* ASCII apostrophe */
- return CharacterSequence4a.IS_WORD_CHAR_MAYBE;
- }
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.OTHER_SYMBOL:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- case java.lang.Character.PARAGRAPH_SEPARATOR:
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.PRIVATE_USE:
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.SPACE_SEPARATOR:
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.START_PUNCTUATION:
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.SURROGATE:
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.TITLECASE_LETTER:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- case java.lang.Character.UNASSIGNED:
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- case java.lang.Character.UPPERCASE_LETTER:
- return CharacterSequence4a.IS_WORD_CHAR_TRUE;
- default:
- return CharacterSequence4a.IS_WORD_CHAR_FALSE;
- }
- }
-
- /**
- * Finds a character within the current Block that is relative in location
- * to a character in the current FOText. Treats all FOText objects within a
- * block as one unit, allowing text in adjoining FOText objects to be
- * returned if the parameters are outside of the current object.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @param charArray The charArray to be tested.
- * @param index 0-based index into charArray.
- * @param offset Signed integer with relative position within the block of
- * the character to return. To return the character immediately preceding i,
- * pass -1. To return the character immediately after i, pass 1.
- *
- * @return the character in the offset position within the block; 0x0000 if
- * the offset points to an area outside of the block.
- */
- private char getRelativeCharInBlock(final FoContext context,
- final CharSequence charArray, final int index, final int offset) {
- // The easy case is where the desired character is in the same FOText
- final int desiredIndex = index + offset;
- if (desiredIndex >= 0 && desiredIndex < charArray.length()) {
- return this.ca.charAt(desiredIndex);
- }
-
- int remainingOffset = 0;
- if (offset > 0) {
- // Look in subsequent text items.
- remainingOffset = offset - (charArray.length() - 1 - index);
- CharacterSequence4a nextFOText =
- this.getNextContiguousTextInBlock();
- while (nextFOText != null) {
- final StringBuilder nextText = nextFOText.getPreTextTransformText(context);
- if (nextText.length() >= remainingOffset) {
- return nextText.charAt(remainingOffset - 1);
- }
- remainingOffset -= nextText.length();
- nextFOText = nextFOText.getNextContiguousTextInBlock();
- }
- return 0x0000;
- }
- // Remaining case has the text in some previous FOText node
- remainingOffset = offset + index;
- CharacterSequence4a prevFOText =
- this.getPreviousContiguousTextInBlock();
- while (prevFOText != null) {
- final StringBuilder prevText = prevFOText.getPreTextTransformText(context);
- if (prevText.length() >= Math.abs(remainingOffset)) {
- return prevText.charAt(prevText.length() + remainingOffset);
- }
- remainingOffset += prevText.length();
- prevFOText = prevFOText.getPreviousContiguousTextInBlock();
- }
- return 0x0000;
- }
-
- @Override
- public CharSequence getAreaTreeText(final FoContext context) {
- final FoObj effectiveParent = this.getParent();
- if (this.filterStatus >= CharacterSequence4a.FILTER_AREA_TREE) {
- /* The stored text has already been filtered. Just return it. */
- return this.ca;
- }
-
- // Start with the refined FO Tree text
- StringBuilder returnArray = getRefinedText(context);
- // Apply white-space-collapse.
- final boolean whiteSpaceCollapse =
- effectiveParent.traitWhiteSpaceCollapse(context);
- returnArray = applyWhiteSpaceCollapse(returnArray, whiteSpaceCollapse);
-
- /* Set the instance text to the more refined value and update the
- * status. */
- this.ca = returnArray;
- this.filterStatus = CharacterSequence4a.FILTER_AREA_TREE;
- return returnArray;
- }
-
- /**
- * Returns the raw char array.
- * @return The raw char array.
- */
- public StringBuilder getRawText() {
- return this.ca;
- }
-
- @Override
- public int length() {
- return this.ca.length();
- }
-
- @Override
- public char charAt(final int index) {
- return this.ca.charAt(index);
- }
-
- @Override
- public CharSequence subSequence(final int start, final int end) {
- return this.ca.subSequence(start, end);
- }
-
-}
Copied: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextCharacters4a.java (from rev 12225, trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java)
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextCharacters4a.java (rev 0)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextCharacters4a.java 2021-12-16 12:38:01 UTC (rev 12226)
@@ -0,0 +1,473 @@
+/*
+ * Copyright 2004 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.fo.obj;
+
+import org.foray.fotree.FoObj;
+
+import org.axsl.common.value.TextTransform;
+import org.axsl.fotree.FoContext;
+import org.axsl.fotree.fo.Marker;
+
+/**
+ * A text node in the formatting object tree.
+ */
+public class FoTextCharacters4a extends AbstractCharacterSequence {
+
+ /** Constant indicating that a given character is not a word character. */
+ private static final int IS_WORD_CHAR_FALSE = 0;
+
+ /** Constant indicating that a given character is a word character. */
+ private static final int IS_WORD_CHAR_TRUE = 1;
+
+ /** Constant indicating that a given character may or may not be a word
+ * character, and that the context needs to be expanded to find out for
+ * sure. */
+ private static final int IS_WORD_CHAR_MAYBE = 2;
+
+ /** Constant indicating that the text is unprocessed. */
+ private static final byte FILTER_RAW = 0;
+
+ /** Constant indicating that white-space-treatment and linefeed-treatment
+ * have been applied. */
+ private static final byte FILTER_PRE_TRANSFORM = 30;
+
+ /** Constant indicating that, in addition to processing for
+ * {@link #FILTER_PRE_TRANSFORM}, text-transform has been applied. */
+ private static final byte FILTER_REFINED_FO_TREE = 60;
+
+ /** Constant indicating that, in addition to processing for
+ * {@link #FILTER_REFINED_FO_TREE}, white-space-collapse has been applied,
+ * that is, that all text processing has been completed. */
+ private static final byte FILTER_AREA_TREE = 90;
+
+ /** The parent of this node. */
+ private FoObj parent;
+
+ /** The raw text content. */
+ private StringBuilder ca;
+
+ /** The current status of the filtering of this text item. */
+ private byte filterStatus = FoTextCharacters4a.FILTER_RAW;
+
+ /**
+ * Constructor.
+ * @param parent The FoObj parent of this text.
+ * @param chars The raw text content.
+ */
+ public FoTextCharacters4a(final FoObj parent, final char[] chars) {
+ super(parent);
+ this.parent = parent;
+ this.ca = new StringBuilder(chars.length);
+ this.ca.append(chars);
+ filterContent();
+ }
+
+ @Override
+ public FoObj getParent() {
+ return this.parent;
+ }
+
+ /**
+ * Filters the content for this text item.
+ */
+ private void filterContent() {
+ /* If we need to preserve the raw content, no filtering should be done,
+ * or if it is done, it must be done on a duplicate of the raw data. */
+ if (this.getFoTree().preserveRawContent()) {
+ return;
+ }
+ final Marker ancestorMarker = this.ancestorMarker();
+ if (ancestorMarker != null) {
+ /* There is an fo:marker ancestor, so we can't know what the values
+ * are for white-space-treatment, linefeed-treatment,
+ * text-transform, and white-space-collapse.
+ * Store the text raw and process it one-the-fly. */
+ return;
+ }
+ if (this.getParent() instanceof BookmarkTitle4a) {
+ /* BookmarkTitle keeps its text raw always. */
+ return;
+ }
+ /* Convert the text as far as possible, store it, and set the status.
+ * We cannot filter text-transform yet, because we may need subsequent
+ * FOText instances. */
+ this.ca = this.getPreTextTransformText(null);
+ this.filterStatus = FoTextCharacters4a.FILTER_PRE_TRANSFORM;
+ }
+
+ @Override
+ public boolean isAllWhiteSpace() {
+ for (int i = 0; i < this.ca.length(); i++) {
+ final char ch = this.ca.charAt(i);
+ if (! isWhitespace(ch)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * <p>Filters the raw text as needed to present the text that should appear
+ * in the "refined FO tree".
+ * Specifically, this effectively filters for the following properties:</p>
+ * <ul>
+ * <li>white-space-treatment. See XSL-FO Standard 1.0 Section 7.15.8.</li>
+ * <li>linefeed-treatment. See XSL-FO Standard 1.0 Section 7.15.7.</li>
+ * <li>text-transform. See XSL-FO Standard 1.0 Section 7.16.6.</li>
+ * </ul>
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ *
+ * @return The text that should appear in the refined FO tree.
+ */
+ public StringBuilder getRefinedText(final FoContext context) {
+ /* TODO: This needs to come from effectiveParent, with context. */
+ final FoObj effectiveParent = this.getParent();
+ if (this.filterStatus >= FoTextCharacters4a.FILTER_REFINED_FO_TREE) {
+ /* The stored text has already been filtered. Just return it. */
+ return this.ca;
+ }
+
+ final StringBuilder charArray = getPreTextTransformText(context);
+ // Now handle text-transform.
+ final TextTransform textTransform = effectiveParent.traitTextTransform(
+ context);
+ if (textTransform != TextTransform.NONE) {
+ for (int i = 0; i < charArray.length(); i++) {
+ charArray.setCharAt(i, applyTextTransform(context, charArray, i, textTransform));
+ }
+ }
+
+ /* Update the instance's text with the refined value, and update the
+ * status. */
+ this.ca = charArray;
+ this.filterStatus = FoTextCharacters4a.FILTER_REFINED_FO_TREE;
+ return charArray;
+ }
+
+ /**
+ * <p>Filters the raw text as needed to present the text that should appear
+ * in the "refined FO tree", except that text-transform is not handled.
+ * Specifically, this effectively filters for the following properties:</p>
+ * <ul>
+ * <li>white-space-treatment. See XSL-FO Standard 1.0 Section 7.15.8.</li>
+ * <li>linefeed-treatment. See XSL-FO Standard 1.0 Section 7.15.7.</li>
+ * </ul>
+ * <p>This intermediate method is needed to ensure that as text-transform
+ * is applied it does not create a stack overflow. This is possible because
+ * text-transform looks at previous and subsequent FOText items, which must
+ * inevitably look back at the original FOText instance.</p>
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ *
+ * @return The text that should appear in the refined FO tree, except that
+ * text-transform is not applied.
+ */
+ private StringBuilder getPreTextTransformText(final FoContext context) {
+ final FoObj effectiveParent = this.effectiveParent(context);
+ if (this.filterStatus >= FoTextCharacters4a.FILTER_PRE_TRANSFORM) {
+ /* The stored text has already been filtered. Just return it. */
+ return this.ca;
+ }
+
+ /* Must handle white-space-treatment first. */
+ StringBuilder workArray = applyWhiteSpaceTreatment(this.ca,
+ effectiveParent.traitWhiteSpaceTreatment(context));
+
+ // Now handle linefeed-treatment.
+ workArray = applyLinefeedTreatment(workArray,
+ effectiveParent.traitLinefeedTreatment(context));
+
+ /* Update this instance's text with the filtered value and update the
+ * status. */
+ this.ca = workArray;
+ this.filterStatus = FoTextCharacters4a.FILTER_PRE_TRANSFORM;
+ return workArray;
+ }
+
+ /**
+ * Applies text-transform to one character of the array.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @param charArray The array which is being transformed.
+ * @param index The 0-based index into charArray, which points to the
+ * character being transformed.
+ * @param textTransform The value of the text-transform enumerated property.
+ * @return The transformed char.
+ */
+ private char applyTextTransform(final FoContext context, final CharSequence charArray, final int index,
+ final TextTransform textTransform) {
+ boolean isFirstCharInWord = false;
+ if (textTransform == TextTransform.CAPITALIZE) {
+ isFirstCharInWord = isStartOfWord(context, charArray, index);
+ }
+ final char c = charArray.charAt(index);
+ return AbstractCharacterSequence.applyTextTransform(textTransform, isFirstCharInWord, c);
+ }
+
+ /**
+ * Determines whether a particular location in the text array is
+ * the start of a new "word". The use of "word" here is specifically for
+ * the text-transform property, but may be useful for other things as
+ * well, such as word-spacing. The definition of "word" is somewhat
+ * ambiguous and appears to be definable by the user agent.
+ * See http://lists.w3.org/Archives/Public/xsl-editors/2005AprJun/0006.html
+ * for a discussion of this matter.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @param charArray The char[] being transformed.
+ * @param index The 0-based index into charArray pointing to the character
+ * that is being tested.
+ *
+ * @return True if and only if the character at this location is the start of a new
+ * word.
+ */
+ private boolean isStartOfWord(final FoContext context,
+ final CharSequence charArray, final int index) {
+ final char prevChar = getRelativeCharInBlock(context, charArray,
+ index, -1);
+ /* All we are really concerned about here is of what type prevChar
+ is. If inputChar is not part of a word, then the Java
+ conversions will (we hope) simply return inputChar.
+ */
+ switch (isWordChar(prevChar)) {
+ case FoTextCharacters4a.IS_WORD_CHAR_TRUE:
+ return false;
+ case FoTextCharacters4a.IS_WORD_CHAR_FALSE:
+ return true;
+ /* "MAYBE" implies that additional context is needed. An example is a
+ * single-quote, either straight or closing, which might be interpreted
+ * as a possessive or a contraction, or might be a closing quote.
+ */
+ case FoTextCharacters4a.IS_WORD_CHAR_MAYBE:
+ final char prevPrevChar = getRelativeCharInBlock(context, charArray,
+ index, -2);
+ switch (isWordChar(prevPrevChar)) {
+ case FoTextCharacters4a.IS_WORD_CHAR_TRUE:
+ return false;
+ case FoTextCharacters4a.IS_WORD_CHAR_FALSE:
+ return true;
+ case FoTextCharacters4a.IS_WORD_CHAR_MAYBE:
+ return true;
+ default:
+ return false;
+ }
+ default:
+ return false;
+ }
+ }
+
+ /**
+ * Determines whether the input char should be considered part of a
+ * "word". This is used primarily to determine whether the character
+ * immediately following starts a new word, but may have other uses.
+ * We have not found a definition of "word" in the standard (1.0), so the
+ * logic used here is based on the programmer's best guess.
+ *
+ * @param inputChar the character to be tested.
+ * @return int IS_WORD_CHAR_TRUE, IS_WORD_CHAR_FALSE, or IS_WORD_CHAR_MAYBE,
+ * depending on whether the character should be considered part of a word
+ * or not.
+ */
+ private static int isWordChar(final char inputChar) {
+ switch (java.lang.Character.getType(inputChar)) {
+ case java.lang.Character.COMBINING_SPACING_MARK:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ case java.lang.Character.CONNECTOR_PUNCTUATION:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ case java.lang.Character.CONTROL:
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.CURRENCY_SYMBOL:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ case java.lang.Character.DASH_PUNCTUATION:
+ if (inputChar == '-') {
+ /* Hyphen. */
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ }
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.DECIMAL_DIGIT_NUMBER:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ case java.lang.Character.ENCLOSING_MARK:
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.END_PUNCTUATION:
+ if (inputChar == '\u2019') {
+ /* Apostrophe, right single quote. */
+ return FoTextCharacters4a.IS_WORD_CHAR_MAYBE;
+ }
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.FORMAT:
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.LETTER_NUMBER:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ case java.lang.Character.LINE_SEPARATOR:
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.LOWERCASE_LETTER:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ case java.lang.Character.MATH_SYMBOL:
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.MODIFIER_LETTER:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ case java.lang.Character.MODIFIER_SYMBOL:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ case java.lang.Character.NON_SPACING_MARK:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ case java.lang.Character.OTHER_LETTER:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ case java.lang.Character.OTHER_NUMBER:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ case java.lang.Character.OTHER_PUNCTUATION:
+ if (inputChar == '\'') {
+ /* ASCII apostrophe */
+ return FoTextCharacters4a.IS_WORD_CHAR_MAYBE;
+ }
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.OTHER_SYMBOL:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ case java.lang.Character.PARAGRAPH_SEPARATOR:
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.PRIVATE_USE:
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.SPACE_SEPARATOR:
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.START_PUNCTUATION:
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.SURROGATE:
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.TITLECASE_LETTER:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ case java.lang.Character.UNASSIGNED:
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ case java.lang.Character.UPPERCASE_LETTER:
+ return FoTextCharacters4a.IS_WORD_CHAR_TRUE;
+ default:
+ return FoTextCharacters4a.IS_WORD_CHAR_FALSE;
+ }
+ }
+
+ /**
+ * Finds a character within the current Block that is relative in location
+ * to a character in the current FOText. Treats all FOText objects within a
+ * block as one unit, allowing text in adjoining FOText objects to be
+ * returned if the parameters are outside of the current object.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @param charArray The charArray to be tested.
+ * @param index 0-based index into charArray.
+ * @param offset Signed integer with relative position within the block of
+ * the character to return. To return the character immediately preceding i,
+ * pass -1. To return the character immediately after i, pass 1.
+ *
+ * @return the character in the offset position within the block; 0x0000 if
+ * the offset points to an area outside of the block.
+ */
+ private char getRelativeCharInBlock(final FoContext context,
+ final CharSequence charArray, final int index, final int offset) {
+ // The easy case is where the desired character is in the same FOText
+ final int desiredIndex = index + offset;
+ if (desiredIndex >= 0 && desiredIndex < charArray.length()) {
+ return this.ca.charAt(desiredIndex);
+ }
+
+ int remainingOffset = 0;
+ if (offset > 0) {
+ // Look in subsequent text items.
+ remainingOffset = offset - (charArray.length() - 1 - index);
+ FoTextCharacters4a nextFOText =
+ this.getNextContiguousTextInBlock();
+ while (nextFOText != null) {
+ final StringBuilder nextText = nextFOText.getPreTextTransformText(context);
+ if (nextText.length() >= remainingOffset) {
+ return nextText.charAt(remainingOffset - 1);
+ }
+ remainingOffset -= nextText.length();
+ nextFOText = nextFOText.getNextContiguousTextInBlock();
+ }
+ return 0x0000;
+ }
+ // Remaining case has the text in some previous FOText node
+ remainingOffset = offset + index;
+ FoTextCharacters4a prevFOText =
+ this.getPreviousContiguousTextInBlock();
+ while (prevFOText != null) {
+ final StringBuilder prevText = prevFOText.getPreTextTransformText(context);
+ if (prevText.length() >= Math.abs(remainingOffset)) {
+ return prevText.charAt(prevText.length() + remainingOffset);
+ }
+ remainingOffset += prevText.length();
+ prevFOText = prevFOText.getPreviousContiguousTextInBlock();
+ }
+ return 0x0000;
+ }
+
+ @Override
+ public CharSequence getAreaTreeText(final FoContext context) {
+ final FoObj effectiveParent = this.getParent();
+ if (this.filterStatus >= FoTextCharacters4a.FILTER_AREA_TREE) {
+ /* The stored text has already been filtered. Just return it. */
+ return this.ca;
+ }
+
+ // Start with the refined FO Tree text
+ StringBuilder returnArray = getRefinedText(context);
+ // Apply white-space-collapse.
+ final boolean whiteSpaceCollapse =
+ effectiveParent.traitWhiteSpaceCollapse(context);
+ returnArray = applyWhiteSpaceCollapse(returnArray, whiteSpaceCollapse);
+
+ /* Set the instance text to the more refined value and update the
+ * status. */
+ this.ca = returnArray;
+ this.filterStatus = FoTextCharacters4a.FILTER_AREA_TREE;
+ return returnArray;
+ }
+
+ /**
+ * Returns the raw char array.
+ * @return The raw char array.
+ */
+ public StringBuilder getRawText() {
+ return this.ca;
+ }
+
+ @Override
+ public int length() {
+ return this.ca.length();
+ }
+
+ @Override
+ public char charAt(final int index) {
+ return this.ca.charAt(index);
+ }
+
+ @Override
+ public CharSequence subSequence(final int start, final int end) {
+ return this.ca.subSequence(start, end);
+ }
+
+}
Copied: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextWords4a.java (from rev 12225, trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java)
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextWords4a.java (rev 0)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextWords4a.java 2021-12-16 12:38:01 UTC (rev 12226)
@@ -0,0 +1,181 @@
+/*
+ * Copyright 2017 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.fo.obj;
+
+import org.foray.common.para.ParaBranch4a;
+import org.foray.common.para.ParaConfig4a;
+import org.foray.fotree.FoObj;
+
+import org.axsl.common.para.ParaBranch;
+import org.axsl.common.para.ParaNode;
+import org.axsl.common.value.LinefeedTreatment;
+import org.axsl.common.value.TextTransform;
+import org.axsl.common.value.WhiteSpaceTreatment;
+import org.axsl.fotree.FoContext;
+import org.axsl.orthography.Orthography;
+import org.axsl.orthography.OrthographyException;
+import org.axsl.orthography.OrthographyServer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Text in an FO document that is already broken into words.
+ */
+public class FoTextWords4a extends AbstractCharacterSequence {
+
+ /** The parent of this node. */
+ private FoObj parent;
+
+ /** The parsed words. */
+ private List<FoWordSequenceContent> content;
+
+ /**
+ * Constructor.
+ * @param parent The FoObj parent of this text.
+ * @param content The raw characters for this node.
+ * @throws OrthographyException For errors tokenizing the word sequence.
+ */
+ public FoTextWords4a(final FoObj parent, final CharSequence content) throws OrthographyException {
+ super(parent);
+ this.parent = parent;
+ final OrthographyServer orthographyServer = getOrthographyServer();
+ final Orthography orthography = orthographyServer.getOrthography(getWritingSystem());
+ final ParaBranch wordSequence =
+ orthography.tokenizeWordSequence(ParaBranch4a.getFactory(), content, 0, content.length());
+ final ParaConfig4a config = new ParaConfig4a(getPrimaryFont(null), inlineFontSize(), inlineOrthography(),
+ parent.traitWordSpacingMax(null), parent.traitWordSpacingMin(null));
+ wordSequence.setParaConfig(config);
+ this.content = new ArrayList<FoWordSequenceContent>(wordSequence.paraNodeSize());
+ for (int index = 0; index < wordSequence.paraNodeSize(); index ++) {
+ final ParaNode wordSequenceContent = wordSequence.paraNodeAt(index);
+ final FoWordSequenceContent contentElement = FoWordSequenceContent.create(wordSequenceContent);
+ this.content.add(contentElement);
+ }
+ }
+
+ @Override
+ public FoObj getParent() {
+ return this.parent;
+ }
+
+ @Override
+ public CharSequence getAreaTreeText(final FoContext context) {
+ final FoObj effectiveParent = this.effectiveParent(context);
+ final WhiteSpaceTreatment whiteSpaceTreatment = effectiveParent.traitWhiteSpaceTreatment(context);
+ final LinefeedTreatment linefeedTreatment = effectiveParent.traitLinefeedTreatment(context);
+ final TextTransform textTransform = effectiveParent.traitTextTransform(context);
+ final boolean isWhiteSpaceCollapse = effectiveParent.traitWhiteSpaceCollapse(context);
+ final StringBuilder builder = new StringBuilder();
+ for (int index = 0; index < this.content.size(); index ++) {
+ final FoWordSequenceContent content = this.content.get(index);
+ final int length = content.whiteSpaceCollapseLength(whiteSpaceTreatment, linefeedTreatment, textTransform,
+ isWhiteSpaceCollapse);
+ for (int contentIndex = 0; contentIndex ...
[truncated message content] |
|
From: <vic...@us...> - 2021-12-16 12:26:04
|
Revision: 12225
http://sourceforge.net/p/foray/code/12225
Author: victormote
Date: 2021-12-16 12:26:02 +0000 (Thu, 16 Dec 2021)
Log Message:
-----------
Preparation steps for separating character text from word text.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-16 12:16:50 UTC (rev 12224)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-16 12:26:02 UTC (rev 12225)
@@ -58,9 +58,6 @@
/** Constant indicating that a given character should be discarded. */
public static final char DISCARD_CHAR = 0xFFFF;
- /** The parent of this node. */
- private FoObj parent;
-
/**
* Constructor.
* @param parent The parent of this.
@@ -67,19 +64,8 @@
*/
protected AbstractCharacterSequence(final FoObj parent) {
super(parent);
- this.parent = parent;
}
- @Override
- public FoObj getParent() {
- return this.parent;
- }
-
-// @Override
-// public boolean getAllowsChildren() {
-// return false;
-// }
-
/**
* Indicates whether this text item is all whitespace.
* @return True if and only if all of the text in this item is whitespace.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2021-12-16 12:16:50 UTC (rev 12224)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2021-12-16 12:26:02 UTC (rev 12225)
@@ -66,6 +66,9 @@
* that is, that all text processing has been completed. */
private static final byte FILTER_AREA_TREE = 90;
+ /** The parent of this node. */
+ private FoObj parent;
+
/** The raw text content. */
private StringBuilder ca;
@@ -79,11 +82,17 @@
*/
public CharacterSequence4a(final FoObj parent, final char[] chars) {
super(parent);
+ this.parent = parent;
this.ca = new StringBuilder(chars.length);
this.ca.append(chars);
filterContent();
}
+ @Override
+ public FoObj getParent() {
+ return this.parent;
+ }
+
/**
* Filters the content for this text item.
*/
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java 2021-12-16 12:16:50 UTC (rev 12224)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java 2021-12-16 12:26:02 UTC (rev 12225)
@@ -50,6 +50,9 @@
*/
public class FoWordSequence extends AbstractCharacterSequence {
+ /** The parent of this node. */
+ private FoObj parent;
+
/** The parsed words. */
private List<FoWordSequenceContent> content;
@@ -61,6 +64,7 @@
*/
public FoWordSequence(final FoObj parent, final CharSequence content) throws OrthographyException {
super(parent);
+ this.parent = parent;
final OrthographyServer orthographyServer = getOrthographyServer();
final Orthography orthography = orthographyServer.getOrthography(getWritingSystem());
final ParaBranch wordSequence =
@@ -77,6 +81,11 @@
}
@Override
+ public FoObj getParent() {
+ return this.parent;
+ }
+
+ @Override
public CharSequence getAreaTreeText(final FoContext context) {
final FoObj effectiveParent = this.effectiveParent(context);
final WhiteSpaceTreatment whiteSpaceTreatment = effectiveParent.traitWhiteSpaceTreatment(context);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-16 12:16:53
|
Revision: 12224
http://sourceforge.net/p/foray/code/12224
Author: victormote
Date: 2021-12-16 12:16:50 +0000 (Thu, 16 Dec 2021)
Log Message:
-----------
Conform to aXSL changes: Minor fixes to hierarchy of FO objects containing text.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberGenerator.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdCharacter.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdGroupingSeparator.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtCharacter.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-16 11:37:21 UTC (rev 12223)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-16 12:16:50 UTC (rev 12224)
@@ -1104,7 +1104,7 @@
* Returns the "grouping-separator" trait.
* @return The "grouping-separator" trait.
*/
- public char traitGroupingSeparator() {
+ public int traitGroupingSeparator() {
return getPropertyList().getGroupingSeparator();
}
@@ -1414,7 +1414,7 @@
* Returns the "character" trait.
* @return The "character" trait.
*/
- public char traitCharacter() {
+ public int traitCharacter() {
return getPropertyList().getCharacter();
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2021-12-16 11:37:21 UTC (rev 12223)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2021-12-16 12:16:50 UTC (rev 12224)
@@ -1161,7 +1161,7 @@
* Returns the grouping-separator property.
* @return The grouping-separator property.
*/
- public char getGroupingSeparator() {
+ public int getGroupingSeparator() {
final PdGroupingSeparator property = (PdGroupingSeparator) getProperty(FoProperty.GROUPING_SEPARATOR);
if (property != null) {
return property.getValue();
@@ -1786,7 +1786,7 @@
* Returns the character property.
* @return The character property.
*/
- public char getCharacter() {
+ public int getCharacter() {
final PdCharacter property = (PdCharacter) getProperty(FoProperty.CHARACTER);
if (property != null) {
return property.getValue();
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java 2021-12-16 11:37:21 UTC (rev 12223)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java 2021-12-16 12:16:50 UTC (rev 12224)
@@ -81,7 +81,7 @@
@Override
protected void validateProperties() throws FoTreeException {
- final char c = traitCharacter();
+ final int c = traitCharacter();
if (c == org.foray.fotree.fo.prop.PdCharacter.CHARACTER_NOT_SPECIFIED) {
throwException("Property \"character\" is required.");
}
@@ -92,8 +92,8 @@
/* This is a duplication of data, but is deemed acceptable at the
* moment, because it is expected that use of fo:character will normally
* be very limited. */
- final char c = traitCharacter();
- final char[] chars = new char[] {c};
+ final int c = traitCharacter();
+ final char[] chars = java.lang.Character.toChars(c);
final CharacterSequence4a text = new CharacterSequence4a(this, chars);
this.getChildren().add(text);
}
@@ -424,24 +424,17 @@
@Override
public int length() {
- return 1;
+ return java.lang.Character.toChars(traitCharacter()).length;
}
@Override
public char charAt(final int index) {
- if (index != 0) {
- throw new IndexOutOfBoundsException();
- }
- return traitCharacter();
+ return java.lang.Character.toChars(traitCharacter())[index];
}
@Override
public CharSequence subSequence(final int start, final int end) {
- if (start != 0
- || end != 1) {
- throw new IndexOutOfBoundsException();
- }
- return java.lang.Character.toString(traitCharacter());
+ return new String(java.lang.Character.toChars(traitCharacter()), start, end - start);
}
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberGenerator.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberGenerator.java 2021-12-16 11:37:21 UTC (rev 12223)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberGenerator.java 2021-12-16 12:16:50 UTC (rev 12224)
@@ -55,10 +55,10 @@
* Constructor.
* @param format The format which should be used to create page numbers by
* this generator.
- * @param groupingSeparator The grouping separator which should be used.
+ * @param groupingSeparator The grouping separator (Unicode codepoint) which should be used.
* @param groupingSize The grouping size which should be used.
*/
- public PageNumberGenerator(final String format, final char groupingSeparator, final int groupingSize) {
+ public PageNumberGenerator(final String format, final int groupingSeparator, final int groupingSize) {
// the only accepted format strings are currently '0*1' 'a', 'A', 'i'
// and 'I'
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdCharacter.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdCharacter.java 2021-12-16 11:37:21 UTC (rev 12223)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdCharacter.java 2021-12-16 12:16:50 UTC (rev 12224)
@@ -67,7 +67,7 @@
* Returns the value for this property.
* @return The value of this property.
*/
- public char getValue() {
+ public int getValue() {
if (value() instanceof DtCharacter) {
return ((DtCharacter) value()).getValue();
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdGroupingSeparator.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdGroupingSeparator.java 2021-12-16 11:37:21 UTC (rev 12223)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdGroupingSeparator.java 2021-12-16 12:16:50 UTC (rev 12224)
@@ -67,7 +67,7 @@
* Returns the value for this property.
* @return The value of this property.
*/
- public char getValue() {
+ public int getValue() {
if (value() instanceof DtCharacter) {
return ((DtCharacter) value()).getValue();
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtCharacter.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtCharacter.java 2021-12-16 11:37:21 UTC (rev 12223)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtCharacter.java 2021-12-16 12:16:50 UTC (rev 12224)
@@ -35,22 +35,22 @@
*/
public class DtCharacter extends Datatype {
- /** The character value. */
- private char value = 0;
+ /** The character value, stored as a Unicode codepoint. */
+ private int value = 0;
/**
* Constructor.
* @param value The char value.
*/
- public DtCharacter(final char value) {
+ public DtCharacter(final int value) {
this.value = value;
}
/**
* Returns the value.
- * @return The char value.
+ * @return The value, a Unicode codepoint.
*/
- public char getValue() {
+ public int getValue() {
return this.value;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-16 11:37:24
|
Revision: 12223
http://sourceforge.net/p/foray/code/12223
Author: victormote
Date: 2021-12-16 11:37:21 +0000 (Thu, 16 Dec 2021)
Log Message:
-----------
Improvements to FO objects containing text.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
Added Paths:
-----------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoText4a.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-16 00:41:44 UTC (rev 12222)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-16 11:37:21 UTC (rev 12223)
@@ -32,8 +32,6 @@
import org.foray.common.i18n.Language4a;
import org.foray.common.primitive.XmlCharacterUtils;
import org.foray.fotree.FoObj;
-import org.foray.fotree.Namespace;
-import org.foray.fotree.PropertyList;
import org.foray.fotree.fo.FoValue;
import org.axsl.common.value.LinefeedTreatment;
@@ -45,7 +43,6 @@
import org.axsl.font.FontServer;
import org.axsl.font.FontUse;
import org.axsl.fotree.FoContext;
-import org.axsl.fotree.FoTreeException;
import org.axsl.fotree.ProxyFactory;
import org.axsl.fotree.fo.FoTextCharacters;
import org.axsl.fotree.fo.GraftingPoint;
@@ -53,12 +50,10 @@
import org.axsl.text.line.LineText;
import org.axsl.unicode.block.Basic_Latin_Block;
-import java.util.List;
-
/**
* Abstract superclass for representations of characters.
*/
-public abstract class AbstractCharacterSequence extends FoObj implements FoTextCharacters, CharSequence {
+public abstract class AbstractCharacterSequence extends FoText4a implements FoTextCharacters {
/** Constant indicating that a given character should be discarded. */
public static final char DISCARD_CHAR = 0xFFFF;
@@ -66,22 +61,9 @@
/** The parent of this node. */
private FoObj parent;
- /** The resolved primary Font.
- * It is very, VERY tempting to think that we don't need to cache this here,
- * since this is inherited from the parent, and there is no way that it can
- * be overriden by #PCDATA.
- * In other words, it is tempting to think that we can just get this value
- * from the parent.
- * However, not all parents cache this value, only those to whom the font
- * selection traits "apply".
- * So we must cache it here because the parent might not cache it, but font
- * selection properties might be set on the parent that affect how these
- * fo:character objects should compute their resolved font. */
- private org.axsl.font.FontUse resolvedFont = null;
-
/**
* Constructor.
- * @param parent The parent of
+ * @param parent The parent of this.
*/
protected AbstractCharacterSequence(final FoObj parent) {
super(parent);
@@ -93,11 +75,6 @@
return this.parent;
}
- @Override
- public List<FoObj> getChildren() {
- return EMPTY_CHILD_LIST;
- }
-
// @Override
// public boolean getAllowsChildren() {
// return false;
@@ -748,86 +725,8 @@
return null;
}
- @Override
- public void end() {
- }
-
- @Override
- public void validateAncestry() {
- }
-
- @Override
- public void validateProperties() {
- /* By definition, there are no properties. */
- }
-
- @Override
- public void validateDescendants() throws FoTreeException {
- validateEmptyContent();
- }
-
- @Override
- public void setup() {
- }
-
- @Override
- public void addChild(final FoObj node) {
- throw new IllegalStateException("Cannot add a child to " + this.getClass().getName());
- }
-
- @Override
- public boolean isPcdataContent() {
- return true;
- }
-
- @Override
- public String getName() {
- return "implicit-character-sequence";
- }
-
- @Override
- public Namespace getNamespace() {
- return this.getFoTree().getFONamespace();
- }
-
/**
* {@inheritDoc}
- * Overrides standard FO logic, because this object has no properties of
- * its own.
- */
- @Override
- public PropertyList getPropertyList() {
- /* Caveat: It is tempting to return the parent object's property list
- * here, and to use it for all property computations.
- * However, that allows fo:character objects to effectively inherit the
- * parent objects properties, which is incorrect.
- *
- * One example where it is tempting to do that is for text-decoration.
- * However, text-decoration is not an inherited property.
- * It has a sort of pseudo-inheritance in that when specified on a
- * block-level or inline-level object, it affects (or at least can
- * affect) the children.
- * That needs to be handled downstream, not here in the FO Tree.
- *
- * One place where horrible things happen by the faux inheritance
- * mentioned above is relative font-weight.
- * If "bolder" is specified on an fo:inline that contains #PCDATA, the
- * fo:inline becomes bolder, and the CharacterSequence4a representing
- * the #PCDATA also thinks it should become bolder, which is quite
- * wrong. */
- return PropertyList.emptyPropertyList();
- }
-
- @Override
- public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
- if (this.resolvedFont == null) {
- this.resolvedFont = resolvePrimaryFont(context);
- }
- return this.resolvedFont;
- }
-
- /**
- * {@inheritDoc}
* Overrides standard logic, because, although property "id" applies to
* fo:character, there is no way to set such a property on a sequence of
* fo:character objects that are inferred from #PCDATA. Any "id" for such
@@ -844,11 +743,6 @@
return null;
}
- @Override
- public boolean isValid() {
- return true;
- }
-
/**
* Indicates whether a given character is whitespace.
* @param c The character being examined.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2021-12-16 00:41:44 UTC (rev 12222)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2021-12-16 11:37:21 UTC (rev 12223)
@@ -447,26 +447,6 @@
}
@Override
- public boolean canHaveMarkerChildren() {
- return false;
- }
-
- @Override
- public boolean canHavePcdataChildren() {
- return false;
- }
-
- @Override
- public boolean canHaveInlineChildren() {
- return false;
- }
-
- @Override
- public boolean canHaveBlockChildren() {
- return false;
- }
-
- @Override
public int length() {
return this.ca.length();
}
Added: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoText4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoText4a.java (rev 0)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoText4a.java 2021-12-16 11:37:21 UTC (rev 12223)
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2021 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+package org.foray.fotree.fo.obj;
+
+import org.foray.fotree.FoObj;
+import org.foray.fotree.Namespace;
+import org.foray.fotree.PropertyList;
+
+import org.axsl.fotree.FoContext;
+import org.axsl.fotree.FoTreeException;
+import org.axsl.fotree.fo.FoText;
+
+import java.util.List;
+
+/**
+ * Abstract superclass for all text content in the FO tree.
+ */
+public abstract class FoText4a extends FoObj implements FoText {
+
+ /**
+ * The resolved primary Font.
+ * It is very, VERY tempting to think that we don't need to cache this here, since this is inherited from the
+ * parent, and there is no way that it can be overriden by #PCDATA.
+ * In other words, it is tempting to think that we can just get this value from the parent.
+ * However, not all parents cache this value, only those to whom the font selection traits "apply".
+ * So we must cache it here because the parent might not cache it, but font selection properties might be set on the
+ * parent that affect how these fo:character objects should compute their resolved font.
+ */
+ private org.axsl.font.FontUse resolvedFont = null;
+
+ /**
+ * Constructor.
+ * @param parent The parent of this.
+ */
+ protected FoText4a(final FoObj parent) {
+ super(parent);
+ }
+
+ @Override
+ public List<FoObj> getChildren() {
+ return EMPTY_CHILD_LIST;
+ }
+
+ @Override
+ public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
+ if (this.resolvedFont == null) {
+ this.resolvedFont = resolvePrimaryFont(context);
+ }
+ return this.resolvedFont;
+ }
+
+ @Override
+ public void end() {
+ }
+
+ @Override
+ public boolean isValid() {
+ return true;
+ }
+
+ @Override
+ public void addChild(final FoObj node) {
+ throw new IllegalStateException("Cannot add a child to " + this.getClass().getName());
+ }
+
+ @Override
+ public String getName() {
+ return "implicit-character-sequence";
+ }
+
+ @Override
+ public Namespace getNamespace() {
+ return this.getFoTree().getFONamespace();
+ }
+
+ /**
+ * {@inheritDoc}
+ * Overrides standard FO logic, because this object has no properties of
+ * its own.
+ */
+ @Override
+ public PropertyList getPropertyList() {
+ /* Caveat: It is tempting to return the parent object's property list here, and to use it for all property
+ * computations.
+ * However, that allows fo:character objects to effectively inherit the parent objects properties, which is
+ * incorrect.
+ *
+ * One example where it is tempting to do that is for text-decoration.
+ * However, text-decoration is not an inherited property.
+ * It has a sort of pseudo-inheritance in that when specified on a block-level or inline-level object, it
+ * affects (or at least can affect) the children.
+ * That needs to be handled downstream, not here in the FO Tree.
+ *
+ * One place where horrible things happen by the faux inheritance mentioned above is relative font-weight.
+ * If "bolder" is specified on an fo:inline that contains #PCDATA, the fo:inline becomes bolder, and the
+ * CharacterSequence4a representing the #PCDATA also thinks it should become bolder, which is quite wrong. */
+ return PropertyList.emptyPropertyList();
+ }
+
+ @Override
+ public boolean isPcdataContent() {
+ return true;
+ }
+
+ @Override
+ public void validateAncestry() {
+ }
+
+ @Override
+ public void validateProperties() throws FoTreeException {
+ /* By definition, there are no properties. */
+ }
+
+ @Override
+ public void validateDescendants() throws FoTreeException {
+ validateEmptyContent();
+ }
+
+ @Override
+ public void setup() {
+ }
+
+ @Override
+ public boolean canHaveMarkerChildren() {
+ return false;
+ }
+
+ @Override
+ public boolean canHavePcdataChildren() {
+ return false;
+ }
+
+ @Override
+ public boolean canHaveInlineChildren() {
+ return false;
+ }
+
+ @Override
+ public boolean canHaveBlockChildren() {
+ return false;
+ }
+
+}
Property changes on: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoText4a.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-16 00:41:46
|
Revision: 12222
http://sourceforge.net/p/foray/code/12222
Author: victormote
Date: 2021-12-16 00:41:44 +0000 (Thu, 16 Dec 2021)
Log Message:
-----------
Conform to aXSL change: Add interface for a ParaBranch factory.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/para/ParaBranch4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Orthography4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Word4a.java
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationConsumer4aTests.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/para/ParaBranch4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/para/ParaBranch4a.java 2021-12-15 20:11:58 UTC (rev 12221)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/para/ParaBranch4a.java 2021-12-16 00:41:44 UTC (rev 12222)
@@ -29,6 +29,7 @@
package org.foray.common.para;
import org.axsl.common.para.ParaBranch;
+import org.axsl.common.para.ParaBranchFactory;
import org.axsl.common.para.ParaConfig;
import org.axsl.common.para.ParaLeaf;
import org.axsl.common.para.ParaNode;
@@ -42,6 +43,14 @@
*/
public class ParaBranch4a implements ParaBranch {
+ /** Singleton factory. */
+ private static final ParaBranchFactory<ParaBranch4a> FACTORY = new ParaBranchFactory<ParaBranch4a>() {
+ @Override
+ public ParaBranch4a makeParaBranch() {
+ return new ParaBranch4a();
+ }
+ };
+
/** The configuration information for this branch. */
private ParaConfig config;
@@ -56,6 +65,11 @@
this.config = config;
}
+ /**
+ * No-args constructor.
+ */
+ public ParaBranch4a() { }
+
@Override
public Type getParaNodeType() {
return ParaNode.Type.BRANCH;
@@ -203,4 +217,17 @@
return builder.toString();
}
+ @Override
+ public void addNode(final ParaNode node) {
+ this.nodes.add(node);
+ }
+
+ /**
+ * Returns the singleton factory that creates instances of this class.
+ * @return The singleton factory that creates instances of this class.
+ */
+ public static ParaBranchFactory<ParaBranch4a> getFactory() {
+ return FACTORY;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java 2021-12-15 20:11:58 UTC (rev 12221)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java 2021-12-16 00:41:44 UTC (rev 12222)
@@ -28,6 +28,7 @@
package org.foray.fotree.fo.obj;
+import org.foray.common.para.ParaBranch4a;
import org.foray.common.para.ParaConfig4a;
import org.foray.fotree.FoObj;
@@ -63,7 +64,7 @@
final OrthographyServer orthographyServer = getOrthographyServer();
final Orthography orthography = orthographyServer.getOrthography(getWritingSystem());
final ParaBranch wordSequence =
- orthography.tokenizeWordSequence(content, 0, content.length());
+ orthography.tokenizeWordSequence(ParaBranch4a.getFactory(), content, 0, content.length());
final ParaConfig4a config = new ParaConfig4a(getPrimaryFont(null), inlineFontSize(), inlineOrthography(),
parent.traitWordSpacingMax(null), parent.traitWordSpacingMin(null));
wordSequence.setParaConfig(config);
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Orthography4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Orthography4a.java 2021-12-15 20:11:58 UTC (rev 12221)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Orthography4a.java 2021-12-16 00:41:44 UTC (rev 12222)
@@ -28,7 +28,6 @@
package org.foray.orthography;
-import org.foray.common.para.ParaBranch4a;
import org.foray.common.primitive.BooleanUtils;
import org.foray.common.primitive.CharSequenceUtils;
import org.foray.common.primitive.NumberUtils;
@@ -36,6 +35,8 @@
import org.foray.orthography.wrapper.ExactWord;
import org.foray.orthography.wrapper.UppercaseWord;
+import org.axsl.common.para.ParaBranch;
+import org.axsl.common.para.ParaBranchFactory;
import org.axsl.orthography.Orthography;
import org.axsl.orthography.OrthographyException;
import org.axsl.orthography.Word;
@@ -406,9 +407,9 @@
}
@Override
- public ParaBranch4a tokenizeWordSequence(final CharSequence characters, final int startIndex, final int length)
- throws OrthographyException {
- final ParaBranch4a wordSequence = new ParaBranch4a(null);
+ public <B extends ParaBranch> B tokenizeWordSequence(final ParaBranchFactory<B> factory,
+ final CharSequence characters, final int startIndex, final int length) throws OrthographyException {
+ final B wordSequence = factory.makeParaBranch();
final CharSequence sequence = characters.subSequence(startIndex, startIndex + length);
final List<CharSequence> chunks = this.lexer.tokenize(sequence);
@@ -430,13 +431,13 @@
if (word == null) {
word = new StringWord(0, chunk);
}
- wordSequence.add(word);
+ wordSequence.addNode(word);
}
}
return wordSequence;
}
- private void parseInterwordContent(final ParaBranch4a wordSequence, final CharSequence interword)
+ private void parseInterwordContent(final ParaBranch wordSequence, final CharSequence interword)
throws OrthographyException {
int index = 0;
while (index < interword.length()) {
@@ -443,11 +444,11 @@
final char contentChar = interword.charAt(index);
final Punctuation4a punctuation = Punctuation4a.findInstance(interword.subSequence(index, index + 1));
if (punctuation != null) {
- wordSequence.add(punctuation);
+ wordSequence.addNode(punctuation);
index ++;
} else if (Character.isWhitespace(contentChar)) {
final Whitespace4a whitespace = Whitespace4a.findInstance(interword.subSequence(index, index + 1));
- wordSequence.add(whitespace);
+ wordSequence.addNode(whitespace);
index ++;
} else {
throw new OrthographyException("Don't know how to handle interword content: " + contentChar);
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Word4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Word4a.java 2021-12-15 20:11:58 UTC (rev 12221)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Word4a.java 2021-12-16 00:41:44 UTC (rev 12222)
@@ -275,4 +275,9 @@
return null;
}
+ @Override
+ public void addNode(final ParaNode node) {
+ throw new IllegalStateException("Word implementations are static and cannot add child nodes.");
+ }
+
}
Modified: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationConsumer4aTests.java
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationConsumer4aTests.java 2021-12-15 20:11:58 UTC (rev 12221)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationConsumer4aTests.java 2021-12-16 00:41:44 UTC (rev 12222)
@@ -83,7 +83,7 @@
/* Spoken by Henry, Henry V, Act III Scene 1. */
final String testString = "Once more unto the breach, dear friends, once more;";
final ParaBranch4a wordSequence =
- this.consumer.tokenizeWordSequence(testString, 0, testString.length());
+ this.consumer.tokenizeWordSequence(ParaBranch4a.getFactory(), testString, 0, testString.length());
Assert.assertEquals(20, wordSequence.paraNodeSize());
Assert.assertEquals("Once", wordSequence.paraNodeAt(0).toString());
Assert.assertEquals(" ", wordSequence.paraNodeAt(1).toString());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-15 20:12:01
|
Revision: 12221
http://sourceforge.net/p/foray/code/12221
Author: victormote
Date: 2021-12-15 20:11:58 +0000 (Wed, 15 Dec 2021)
Log Message:
-----------
Conform to aXSL change: Make separate interfaces for text FO tree nodes that are stored as characters and those that are stored as words.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
trunk/foray/foray-layout/src/main/java/org/foray/layout/LayoutStrategy.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java 2021-12-15 19:29:38 UTC (rev 12220)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java 2021-12-15 20:11:58 UTC (rev 12221)
@@ -34,8 +34,8 @@
import org.axsl.font.FontContext;
import org.axsl.fotree.fo.BasicLink;
import org.axsl.fotree.fo.BidiOverride;
-import org.axsl.fotree.fo.CharacterSequence;
import org.axsl.fotree.fo.ExternalGraphic;
+import org.axsl.fotree.fo.FoTextCharacters;
import org.axsl.fotree.fo.GraftingPoint;
import org.axsl.fotree.fo.IndexPageCitationList;
import org.axsl.fotree.fo.Inline;
@@ -77,7 +77,7 @@
}
@Override
- public TextArea makeGlyphAreaSequence(final CharacterSequence foText,
+ public TextArea makeGlyphAreaSequence(final FoTextCharacters foText,
final int startOffset, final int sizeInChars, final int ipd,
final boolean hasDiscretionaryHyphen,
final boolean hasFauxSmallCaps, final boolean isLastItemOnLine,
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2021-12-15 19:29:38 UTC (rev 12220)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2021-12-15 20:11:58 UTC (rev 12221)
@@ -45,8 +45,8 @@
import org.axsl.fotree.FoContext;
import org.axsl.fotree.fo.BasicLink;
import org.axsl.fotree.fo.BidiOverride;
-import org.axsl.fotree.fo.CharacterSequence;
import org.axsl.fotree.fo.ExternalGraphic;
+import org.axsl.fotree.fo.FoTextCharacters;
import org.axsl.fotree.fo.GraftingPoint;
import org.axsl.fotree.fo.IndexPageCitationList;
import org.axsl.fotree.fo.Inline;
@@ -968,7 +968,7 @@
* @param context An object that knows how to resolve FO context issues.
* @return True if and only if a text area should be created for the text item.
*/
- static boolean shouldCreateTextArea(final CharacterSequence foText,
+ static boolean shouldCreateTextArea(final FoTextCharacters foText,
final Area4a parentArea, final int startOffset, final int sizeInChars,
final boolean isLastItemOnLine, final FoContext context) {
/* If the raw text is empty, don't create the TextArea. */
@@ -1003,7 +1003,7 @@
}
@Override
- public TextArea makeGlyphAreaSequence(final CharacterSequence foText,
+ public TextArea makeGlyphAreaSequence(final FoTextCharacters foText,
final int startOffset, final int sizeInChars, final int ipd,
final boolean hasDiscretionaryHyphen,
final boolean hasFauxSmallCaps, final boolean isLastItemOnLine,
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java 2021-12-15 19:29:38 UTC (rev 12220)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java 2021-12-15 20:11:58 UTC (rev 12221)
@@ -37,7 +37,7 @@
import org.axsl.font.FontContext;
import org.axsl.font.FontUse;
import org.axsl.fotree.Fo;
-import org.axsl.fotree.fo.CharacterSequence;
+import org.axsl.fotree.fo.FoTextCharacters;
import org.axsl.fotree.fo.GraftingPoint;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
@@ -135,7 +135,7 @@
* will be applied.
* @return The newly-created TextArea.
*/
- static TextArea makeTextArea(final CharacterSequence generatedBy,
+ static TextArea makeTextArea(final FoTextCharacters generatedBy,
final LineArea4a parentArea,
final GraftingPoint graftingPoint, final int backingOffset,
final int backingSize, final int progressionDimensionUsed,
@@ -177,7 +177,7 @@
* will be applied.
* @return The newly-created TextArea.
*/
- static TextArea makeTextArea(final CharacterSequence generatedBy,
+ static TextArea makeTextArea(final FoTextCharacters generatedBy,
final AbstractInlineArea parentArea,
final GraftingPoint graftingPoint, final int backingOffset,
final int backingSize, final int progressionDimensionUsed,
@@ -219,7 +219,7 @@
final int backingSize, final int progressionDimensionUsed,
final boolean hasDiscretionaryHyphen,
final boolean hasFauxSmallCaps) {
- final CharacterSequence generatedBy = this.traitGeneratedBy();
+ final FoTextCharacters generatedBy = this.traitGeneratedBy();
this.charSequence = new TextAreaCharSequence(generatedBy.getAreaTreeText(this),
backingOffset, backingSize, hasDiscretionaryHyphen, hasFauxSmallCaps);
this.resolvedLetterSpacing = this.traitLetterSpacingOpt();
@@ -620,7 +620,7 @@
*/
@Override
public int traitFontSize() {
- final CharacterSequence generatedBy = this.traitGeneratedBy();
+ final FoTextCharacters generatedBy = this.traitGeneratedBy();
final int nominalFontSize = generatedBy.traitFontSizeActual(this,
this.getPrimaryFont().getFont());
if (this.hasFauxSmallCaps()) {
@@ -644,8 +644,8 @@
}
@Override
- public CharacterSequence traitGeneratedBy() {
- return (CharacterSequence) this.getLinkage().getFONode();
+ public FoTextCharacters traitGeneratedBy() {
+ return (FoTextCharacters) this.getLinkage().getFONode();
}
@Override
@@ -702,8 +702,8 @@
public int traitHyphenationCharacter() {
/* TODO: Clean this method up after we clean up the construction. */
final Fo generatedBy = this.traitGeneratedBy();
- if (generatedBy instanceof CharacterSequence) {
- final CharacterSequence character = (CharacterSequence) generatedBy;
+ if (generatedBy instanceof FoTextCharacters) {
+ final FoTextCharacters character = (FoTextCharacters) generatedBy;
return character.traitHyphenationCharacter(this);
} else {
final NormalBlockArea4a blockArea = this.ancestorNormalBlockArea();
@@ -718,10 +718,10 @@
* @return The "generated-by" Character, or null if this area was not
* generated by an fo:character.
*/
- private CharacterSequence generatedByCharacter() {
+ private FoTextCharacters generatedByCharacter() {
final Fo generatedBy = this.traitGeneratedBy();
- if (generatedBy instanceof CharacterSequence) {
- return (CharacterSequence) generatedBy;
+ if (generatedBy instanceof FoTextCharacters) {
+ return (FoTextCharacters) generatedBy;
}
return null;
}
@@ -728,7 +728,7 @@
@Override
public int traitSpaceStartOptimum() {
- final CharacterSequence character = this.generatedByCharacter();
+ final FoTextCharacters character = this.generatedByCharacter();
if (character == null) {
return 0;
} else {
@@ -738,7 +738,7 @@
@Override
public int traitSpaceEndOptimum() {
- final CharacterSequence character = this.generatedByCharacter();
+ final FoTextCharacters character = this.generatedByCharacter();
if (character == null) {
return 0;
} else {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-15 19:29:38 UTC (rev 12220)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-15 20:11:58 UTC (rev 12221)
@@ -125,7 +125,7 @@
import org.axsl.fotree.FoContext;
import org.axsl.fotree.FoInlineContext;
import org.axsl.fotree.FoTreeException;
-import org.axsl.fotree.fo.CharacterSequence;
+import org.axsl.fotree.fo.FoTextCharacters;
import org.axsl.fotree.fo.Marker;
import org.axsl.fotree.fo.prop.WritingModePa;
import org.axsl.graphic.Graphic;
@@ -3266,8 +3266,8 @@
final DescendantIterator iterator = this.getDescendantIterator();
while (iterator.hasNext()) {
final FoObj fobj = iterator.next();
- if (fobj instanceof CharacterSequence) {
- final CharacterSequence text = (CharacterSequence) fobj;
+ if (fobj instanceof FoTextCharacters) {
+ final FoTextCharacters text = (FoTextCharacters) fobj;
builder.append(text.getAreaTreeText(null));
}
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-15 19:29:38 UTC (rev 12220)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-15 20:11:58 UTC (rev 12221)
@@ -47,7 +47,7 @@
import org.axsl.fotree.FoContext;
import org.axsl.fotree.FoTreeException;
import org.axsl.fotree.ProxyFactory;
-import org.axsl.fotree.fo.CharacterSequence;
+import org.axsl.fotree.fo.FoTextCharacters;
import org.axsl.fotree.fo.GraftingPoint;
import org.axsl.orthography.Orthography;
import org.axsl.text.line.LineText;
@@ -58,7 +58,7 @@
/**
* Abstract superclass for representations of characters.
*/
-public abstract class AbstractCharacterSequence extends FoObj implements CharacterSequence, CharSequence {
+public abstract class AbstractCharacterSequence extends FoObj implements FoTextCharacters, CharSequence {
/** Constant indicating that a given character should be discarded. */
public static final char DISCARD_CHAR = 0xFFFF;
Modified: trunk/foray/foray-layout/src/main/java/org/foray/layout/LayoutStrategy.java
===================================================================
--- trunk/foray/foray-layout/src/main/java/org/foray/layout/LayoutStrategy.java 2021-12-15 19:29:38 UTC (rev 12220)
+++ trunk/foray/foray-layout/src/main/java/org/foray/layout/LayoutStrategy.java 2021-12-15 20:11:58 UTC (rev 12221)
@@ -37,8 +37,8 @@
import org.axsl.area.RegionRefArea;
import org.axsl.fotree.FoLineNonText;
import org.axsl.fotree.FoLineText;
-import org.axsl.fotree.fo.CharacterSequence;
import org.axsl.fotree.fo.ExternalGraphic;
+import org.axsl.fotree.fo.FoTextCharacters;
import org.axsl.fotree.fo.GraftingPoint;
import org.axsl.fotree.fo.InstreamForeignObject;
import org.axsl.fotree.fo.Leader;
@@ -145,8 +145,8 @@
if (this.areaStack.size() > 0) {
factory = this.areaStack.peek();
}
- if (textToUse instanceof CharacterSequence) {
- final CharacterSequence foText = (CharacterSequence) textToUse;
+ if (textToUse instanceof FoTextCharacters) {
+ final FoTextCharacters foText = (FoTextCharacters) textToUse;
factory.makeGlyphAreaSequence(foText, startOffset, sizeInChars,
sizeInline,
hasDiscretionaryHyphen, hasFauxSmallCaps, isLastItemOnLine,
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextPnr.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextPnr.java 2021-12-15 19:29:38 UTC (rev 12220)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextPnr.java 2021-12-15 20:11:58 UTC (rev 12221)
@@ -32,16 +32,16 @@
import org.axsl.area.AreaTreeException;
import org.axsl.area.LineArea;
import org.axsl.fotree.FoLineText;
-import org.axsl.fotree.fo.CharacterSequence;
+import org.axsl.fotree.fo.FoTextCharacters;
import org.axsl.fotree.fo.GraftingPoint;
/**
- * Pioneer Layout for {@link CharacterSequence}.
+ * Pioneer Layout for {@link FoTextCharacters}.
*/
public class FoTextPnr extends FoNodePnr {
/** The real FONode which this proxy represents. */
- private CharacterSequence node;
+ private FoTextCharacters node;
/**
* Constructor.
@@ -48,7 +48,7 @@
* @param text The FO Tree object which is being laid out.
* @param layout The ancestor layout system.
*/
- public FoTextPnr(final CharacterSequence text, final PioneerLayoutStrategy layout) {
+ public FoTextPnr(final FoTextCharacters text, final PioneerLayoutStrategy layout) {
super(text, layout);
this.node = text;
}
@@ -99,7 +99,7 @@
}
@Override
- public CharacterSequence getFONode() {
+ public FoTextCharacters getFONode() {
return this.node;
}
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java 2021-12-15 19:29:38 UTC (rev 12220)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java 2021-12-15 20:11:58 UTC (rev 12221)
@@ -47,12 +47,12 @@
import org.axsl.fotree.fo.BlockDiscrete;
import org.axsl.fotree.fo.Bookmark;
import org.axsl.fotree.fo.BookmarkTitle;
-import org.axsl.fotree.fo.CharacterSequence;
import org.axsl.fotree.fo.ColorProfile;
import org.axsl.fotree.fo.Declarations;
import org.axsl.fotree.fo.ExternalGraphic;
import org.axsl.fotree.fo.Float;
import org.axsl.fotree.fo.Flow;
+import org.axsl.fotree.fo.FoTextCharacters;
import org.axsl.fotree.fo.Footnote;
import org.axsl.fotree.fo.FootnoteBody;
import org.axsl.fotree.fo.InitialPropertySet;
@@ -384,7 +384,7 @@
}
@Override
- public FoTextPnr makeProxy(final CharacterSequence node) {
+ public FoTextPnr makeProxy(final FoTextCharacters node) {
return new FoTextPnr(node, this);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-15 19:29:41
|
Revision: 12220
http://sourceforge.net/p/foray/code/12220
Author: victormote
Date: 2021-12-15 19:29:38 +0000 (Wed, 15 Dec 2021)
Log Message:
-----------
Conform to aXSL change: Change axsl-fo location and project name to axsl-fotree, for clarity and consistency.
Modified Paths:
--------------
trunk/foray/foray-common/build.gradle
trunk/foray/foray-core/build.gradle
trunk/foray/foray-fotree/build.gradle
trunk/foray/foray-output/build.gradle
Modified: trunk/foray/foray-common/build.gradle
===================================================================
--- trunk/foray/foray-common/build.gradle 2021-12-15 17:23:30 UTC (rev 12219)
+++ trunk/foray/foray-common/build.gradle 2021-12-15 19:29:38 UTC (rev 12220)
@@ -9,7 +9,6 @@
api group: 'org.axsl', name: 'axsl-common', version: axslVersion
api group: 'org.axsl', name: 'axsl-ps', version: axslVersion
api group: 'org.axsl', name: 'axsl-font', version: axslVersion
- api group: 'org.axsl', name: 'axsl-fo', version: axslVersion
api group: 'org.axsl', name: 'axsl-unicode', version: axslVersion
implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
Modified: trunk/foray/foray-core/build.gradle
===================================================================
--- trunk/foray/foray-core/build.gradle 2021-12-15 17:23:30 UTC (rev 12219)
+++ trunk/foray/foray-core/build.gradle 2021-12-15 19:29:38 UTC (rev 12220)
@@ -6,7 +6,6 @@
api group: 'org.axsl', name: 'axsl-area', version: axslVersion
api group: 'org.axsl', name: 'axsl-common', version: axslVersion
- api group: 'org.axsl', name: 'axsl-fo', version: axslVersion
api group: 'org.axsl', name: 'axsl-font', version: axslVersion
api group: 'org.axsl', name: 'axsl-galley', version: axslVersion
api group: 'org.axsl', name: 'axsl-graphic', version: axslVersion
Modified: trunk/foray/foray-fotree/build.gradle
===================================================================
--- trunk/foray/foray-fotree/build.gradle 2021-12-15 17:23:30 UTC (rev 12219)
+++ trunk/foray/foray-fotree/build.gradle 2021-12-15 19:29:38 UTC (rev 12220)
@@ -2,7 +2,7 @@
dependencies {
api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'org.axsl', name: 'axsl-fo', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
api project(':foray-common')
implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
Modified: trunk/foray/foray-output/build.gradle
===================================================================
--- trunk/foray/foray-output/build.gradle 2021-12-15 17:23:30 UTC (rev 12219)
+++ trunk/foray/foray-output/build.gradle 2021-12-15 19:29:38 UTC (rev 12220)
@@ -4,7 +4,7 @@
api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
api group: 'org.axsl', name: 'axsl-output', version: axslVersion
api group: 'org.axsl', name: 'axsl-mif', version: axslVersion
- api group: 'org.axsl', name: 'axsl-fo', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
api project(':foray-common')
implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-15 17:23:39
|
Revision: 12219
http://sourceforge.net/p/foray/code/12219
Author: victormote
Date: 2021-12-15 17:23:30 +0000 (Wed, 15 Dec 2021)
Log Message:
-----------
Conform to aXSL change: Change axsl-fo root package name from axsl.fo to axsl.fotree, to distinguish the fotree itself from the "fo" namespace.
Modified Paths:
--------------
trunk/foray/foray-app/src/main/java/org/foray/app/ForaySpecific.java
trunk/foray/foray-app/src/test/java/org/foray/app/fo/FoDocumentReader.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractInlineArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractListItemContent.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractTablePartContainer.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTreeFactory4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BasicLinkArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BeforeFloatRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BidiOverrideArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockContainerRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkParentArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkTitleArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkTreeArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/ExternalGraphicArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkage.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkageMarker.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkageNormal.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/FootnoteRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/ForeignObjectArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/IndexPageCitationListArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineContainerArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/LeaderArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/ListBlockArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/ListItemArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/ListItemBodyContainer.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/ListItemLabelContainer.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/MainRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/MathArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionRaBody.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/ScalingValueCitationArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/SpanRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/SvgArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TableBodyContainer.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TableCellRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TableFooterContainer.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TableHeaderContainer.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRowContainer.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java
trunk/foray/foray-core/src/main/java/org/foray/core/ForayDocument.java
trunk/foray/foray-core/src/main/java/org/foray/core/ForaySession.java
trunk/foray/foray-core/src/main/java/org/foray/core/ForayTarget.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoContainerComplex.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineNonText.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineText.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObjScaled.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTree4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeServer4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/Namespace.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/Property.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/NamespaceAxsl.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/prop/AxslEnumerated.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/ObjectMakerFo.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFlow.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageMaster.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractTablePart.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BasicLink4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BidiOverride4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTitle4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTree4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Declarations4a.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/obj/Float4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Flow4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowAssignment4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowMap4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowSourceList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowTargetList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FolioPrefix4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FolioSuffix4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FootnoteBody4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexKeyReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationListSeparator4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationRangeSeparator4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageNumberPrefix4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageNumberSuffix4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InitialPropertySet4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Inline4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/LayoutMasterSet4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItem4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemBody4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemLabel4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Marker4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiCase4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiProperties4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiPropertySet4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiSwitch4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiToggle4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageMasterResolver4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumber4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberCitation4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberCitationLast4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceMaster4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceWrapper4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Region4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionAfter4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionBefore4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionBody4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionEnd4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionNameSpecifier4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionStart4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmAlternatives4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveTableMarker4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Root4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ScalingValueCitation4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/SimplePageMaster4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/SinglePageMasterReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/StaticContent4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Table4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableAndCaption4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableBody4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableCaption4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableCell4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableColumn4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableFooter4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableHeader4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableRow4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Title4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Wrapper4a.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/AbstractAbsoluteOffset.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractAudioDial.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractBackgroundPosition.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractBorderColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractBorderPrecedence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractBorderStyle.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractBorderWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractContentDimension.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractCue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractIndent.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractKeep.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractMargin.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractMergeIndex.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractName.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractPadding.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractPageDimension.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractPause.java
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/AbstractRelativeSpace.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdAbsolutePosition.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdActiveState.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdAlignmentAdjust.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdAlignmentBaseline.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdAutoRestore.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdAzimuth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBackgroundAttachment.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBackgroundColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBackgroundImage.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBackgroundPosition.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBackgroundRepeat.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBaselineShift.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBlankOrNotBlank.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderAfterColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderAfterPrecedence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderAfterWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderBeforeColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderBeforePrecedence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderBeforeWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderBottomColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderBottomWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderCollapse.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderEndColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderEndPrecedence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderEndWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderLeftColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderLeftWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderRightColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderRightWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderSeparation.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderStartColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderStartPrecedence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderStartWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderStyle.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderTopColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderTopWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBottom.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBreakAfter.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBreakBefore.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdCaptionSide.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdChangeBarColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdChangeBarOffset.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdChangeBarWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdClear.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdClip.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdColumnCount.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdColumnGap.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdColumnNumber.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdColumnWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdContentHeight.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdContentWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdCountry.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdDestinationPlacementOffset.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdDirection.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdDisplayAlign.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdDominantBaseline.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdElevation.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdEmptyCells.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdEndsRow.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdExtent.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdFloat.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdFontFamily.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdFontSelectionStrategy.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdFontSize.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdFontSizeAdjust.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdFontStretch.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdFontStyle.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdFontVariant.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdFontWeight.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdForcePageCount.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdGlyphOrientationHorizontal.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdGlyphOrientationVertical.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdHyphenate.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdHyphenationCharacter.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdHyphenationKeep.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdHyphenationLadderCount.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdHyphenationPushCharacterCount.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdHyphenationRemainCharacterCount.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdIndicateDestination.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdInitialPageNumber.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLanguage.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLastLineEndIndent.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLeaderAlignment.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLeaderLength.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLeaderPattern.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLeaderPatternWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLeft.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLetterSpacing.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLineHeight.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLineHeightShiftAdjustment.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLineStackingStrategy.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLinefeedTreatment.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdMargin.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdMediaUsage.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdOrphans.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdOverflow.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPadding.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPaddingAfter.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPaddingBefore.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPaddingBottom.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPaddingEnd.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPaddingLeft.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPaddingRight.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPaddingStart.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPaddingTop.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPageBreakAfter.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPageBreakBefore.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPageBreakInside.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPitch.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPlayDuring.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPosition.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPrecedence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdProvisionalDistanceBetweenStarts.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdProvisionalLabelSeparation.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRefId.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdReferenceOrientation.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRelativeAlign.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRelativePosition.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRenderingIntent.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRight.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRole.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRuleStyle.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRuleThickness.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdScaling.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdScalingMethod.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdScoreSpaces.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdScript.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdShowDestination.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSize.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSourceDocument.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSpan.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSpeak.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSpeakHeader.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSpeakNumeral.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSpeakPunctuation.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSpeechRate.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSrc.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdStartingState.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdStartsRow.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSuppressAtLineBreak.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTableOmitFooterAtBreak.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTableOmitHeaderAtBreak.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTextAlign.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTextAlignLast.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTextAltitude.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTextDecoration.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTextDepth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTextIndent.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTextShadow.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTextTransform.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTop.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTreatAsWordSpace.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdUnicodeBidi.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdVerticalAlign.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdVisibility.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdVoiceFamily.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdVolume.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdWhiteSpace.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdWhiteSpaceCollapse.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdWhiteSpaceTreatment.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdWidows.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdWordSpacing.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdWrapOption.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdWritingMode.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdZindex.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foray/NamespaceForay.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/math/MathNamespace.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/math/MathObjectMaker.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/math/obj/InstreamMathElement.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyParser.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/svg/NamespaceSvg.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/svg/ObjectMakerSvg.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/svg/obj/InstreamSvgElement.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtShadowEffectWrapper.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnBodyStart.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnLabelEnd.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/NamespaceXml.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTest.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestVerticalAlign.java
trunk/foray/foray-layout/src/main/java/org/foray/layout/LayoutStrategy.java
trunk/foray/foray-output/src/main/java/org/foray/output/MifConverter.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/AbstractFlowPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/AbstractMixedInlinePnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/AbstractTablePartPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BasicLinkPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BidiOverridePnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockContainerPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockDiscretePnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/ExternalGraphicPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FlowPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoNodePnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoObjPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FootnoteBodyPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FootnotePnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/InlinePnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/InstreamForeignObjectPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/LeaderPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/ListBlockPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/ListItemBodyPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/ListItemLabelPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/ListItemPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/MarkerPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/NoLayoutPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/OverrideGraftingContext.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PageNumberCitationPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PageNumberPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/RetrieveMarkerPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/RowSpanMgr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/StaticContentPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/TableBodyPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/TableCellPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/TableFooterPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/TableHeaderPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/TablePnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/TableRowPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/WrapperPnr.java
Modified: trunk/foray/foray-app/src/main/java/org/foray/app/ForaySpecific.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/app/ForaySpecific.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-app/src/main/java/org/foray/app/ForaySpecific.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -43,9 +43,9 @@
import org.foray.speech.SpeechServer4a;
import org.axsl.area.AreaTreeFactory;
-import org.axsl.fo.FoTreeFactory;
import org.axsl.font.FontException;
import org.axsl.font.FontServer;
+import org.axsl.fotree.FoTreeFactory;
import org.axsl.graphic.GraphicServer;
import org.axsl.layout.LayoutFactory;
import org.axsl.linebreak.LineBreakerFactory;
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/fo/FoDocumentReader.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/fo/FoDocumentReader.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/fo/FoDocumentReader.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -37,9 +37,9 @@
import org.foray.fotree.FoTreeParser4a;
import org.foray.fotree.FoTreeServer4a;
-import org.axsl.fo.FoTreeException;
import org.axsl.font.FontConsumer;
import org.axsl.font.FontServer;
+import org.axsl.fotree.FoTreeException;
import org.axsl.graphic.GraphicServer;
import org.axsl.orthography.OrthographyServer;
import org.axsl.text.TextServer;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -31,21 +31,21 @@
import org.foray.common.FontContext4a;
import org.axsl.area.AreaTreeException;
-import org.axsl.fo.fo.BasicLink;
-import org.axsl.fo.fo.BidiOverride;
-import org.axsl.fo.fo.CharacterSequence;
-import org.axsl.fo.fo.ExternalGraphic;
-import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.IndexPageCitationList;
-import org.axsl.fo.fo.Inline;
-import org.axsl.fo.fo.InlineContainer;
-import org.axsl.fo.fo.InstreamForeignObject;
-import org.axsl.fo.fo.Leader;
-import org.axsl.fo.fo.PageNumber;
-import org.axsl.fo.fo.PageNumberCitation;
-import org.axsl.fo.fo.PageNumberCitationLast;
-import org.axsl.fo.fo.ScalingValueCitation;
import org.axsl.font.FontContext;
+import org.axsl.fotree.fo.BasicLink;
+import org.axsl.fotree.fo.BidiOverride;
+import org.axsl.fotree.fo.CharacterSequence;
+import org.axsl.fotree.fo.ExternalGraphic;
+import org.axsl.fotree.fo.GraftingPoint;
+import org.axsl.fotree.fo.IndexPageCitationList;
+import org.axsl.fotree.fo.Inline;
+import org.axsl.fotree.fo.InlineContainer;
+import org.axsl.fotree.fo.InstreamForeignObject;
+import org.axsl.fotree.fo.Leader;
+import org.axsl.fotree.fo.PageNumber;
+import org.axsl.fotree.fo.PageNumberCitation;
+import org.axsl.fotree.fo.PageNumberCitationLast;
+import org.axsl.fotree.fo.ScalingValueCitation;
import java.util.ArrayList;
import java.util.List;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractInlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractInlineArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractInlineArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -32,8 +32,8 @@
import org.axsl.area.AreaTreeException;
import org.axsl.common.value.RelativeAxis;
-import org.axsl.fo.Fo;
-import org.axsl.fo.fo.prop.BaselineShiftPa;
+import org.axsl.fotree.Fo;
+import org.axsl.fotree.fo.prop.BaselineShiftPa;
import org.axsl.galley.GeneralInlineArea;
/**
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractListItemContent.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractListItemContent.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractListItemContent.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -30,12 +30,12 @@
import org.axsl.area.AreaTreeException;
import org.axsl.area.BlockLevelAreaFactory;
-import org.axsl.fo.fo.Block;
-import org.axsl.fo.fo.BlockContainer;
-import org.axsl.fo.fo.BlockDiscrete;
-import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.ListBlock;
-import org.axsl.fo.fo.Table;
+import org.axsl.fotree.fo.Block;
+import org.axsl.fotree.fo.BlockContainer;
+import org.axsl.fotree.fo.BlockDiscrete;
+import org.axsl.fotree.fo.GraftingPoint;
+import org.axsl.fotree.fo.ListBlock;
+import org.axsl.fotree.fo.Table;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractTablePartContainer.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractTablePartContainer.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractTablePartContainer.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -30,8 +30,8 @@
import org.axsl.area.AreaTreeException;
import org.axsl.common.value.RelativeAxis;
-import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.TableRow;
+import org.axsl.fotree.fo.GraftingPoint;
+import org.axsl.fotree.fo.TableRow;
import org.axsl.galley.BackgroundArea;
import org.axsl.graphic.Graphic;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -40,11 +40,11 @@
import org.axsl.common.value.RelativeAxis;
import org.axsl.common.value.WhiteSpaceTreatment;
import org.axsl.common.value.WritingMode;
-import org.axsl.fo.Fo;
-import org.axsl.fo.fo.BasicLink;
-import org.axsl.fo.fo.prop.IdPa;
-import org.axsl.fo.fo.prop.WritingModePa;
import org.axsl.font.Font;
+import org.axsl.fotree.Fo;
+import org.axsl.fotree.fo.BasicLink;
+import org.axsl.fotree.fo.prop.IdPa;
+import org.axsl.fotree.fo.prop.WritingModePa;
import org.axsl.galley.BackgroundArea;
import java.awt.geom.Rectangle2D;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -33,10 +33,10 @@
import org.axsl.area.AreaNode;
import org.axsl.area.AreaTreeException;
import org.axsl.area.BlockLevelAreaFactory;
-import org.axsl.fo.Fo;
-import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.Table;
-import org.axsl.fo.fo.prop.ColorPa;
+import org.axsl.fotree.Fo;
+import org.axsl.fotree.fo.GraftingPoint;
+import org.axsl.fotree.fo.Table;
+import org.axsl.fotree.fo.prop.ColorPa;
import org.axsl.galley.Galley;
import org.axsl.orthography.Orthography;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -32,14 +32,14 @@
import org.axsl.area.AreaTreeEvent;
import org.axsl.area.AreaTreeException;
import org.axsl.area.AreaTreeListener;
-import org.axsl.fo.Fo;
-import org.axsl.fo.FoTree;
-import org.axsl.fo.fo.Bookmark;
-import org.axsl.fo.fo.BookmarkTree;
-import org.axsl.fo.fo.Marker;
-import org.axsl.fo.fo.PageSequence;
-import org.axsl.fo.fo.Root;
import org.axsl.font.FontConsumer;
+import org.axsl.fotree.Fo;
+import org.axsl.fotree.FoTree;
+import org.axsl.fotree.fo.Bookmark;
+import org.axsl.fotree.fo.BookmarkTree;
+import org.axsl.fotree.fo.Marker;
+import org.axsl.fotree.fo.PageSequence;
+import org.axsl.fotree.fo.Root;
import org.axsl.galley.Galley;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTreeFactory4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTreeFactory4a.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTreeFactory4a.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -29,7 +29,7 @@
package org.foray.area;
import org.axsl.area.AreaTreeFactory;
-import org.axsl.fo.FoTree;
+import org.axsl.fotree.FoTree;
import org.axsl.linebreak.LineBreakerFactory;
import org.axsl.text.TextServer;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BasicLinkArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BasicLinkArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BasicLinkArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -30,8 +30,8 @@
import org.axsl.area.AreaTreeException;
import org.axsl.common.value.BorderStyle;
-import org.axsl.fo.fo.BasicLink;
-import org.axsl.fo.fo.GraftingPoint;
+import org.axsl.fotree.fo.BasicLink;
+import org.axsl.fotree.fo.GraftingPoint;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BeforeFloatRa.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BeforeFloatRa.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BeforeFloatRa.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -30,7 +30,7 @@
import org.axsl.area.AreaTreeException;
import org.axsl.common.value.RelativeAxis;
-import org.axsl.fo.Fo;
+import org.axsl.fotree.Fo;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BidiOverrideArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BidiOverrideArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BidiOverrideArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -29,8 +29,8 @@
package org.foray.area;
import org.axsl.area.AreaTreeException;
-import org.axsl.fo.fo.BidiOverride;
-import org.axsl.fo.fo.GraftingPoint;
+import org.axsl.fotree.fo.BidiOverride;
+import org.axsl.fotree.fo.GraftingPoint;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -29,7 +29,7 @@
package org.foray.area;
import org.axsl.common.value.LineStackingStrategy;
-import org.axsl.fo.Fo;
+import org.axsl.fotree.Fo;
/**
* Superclass for {@link NormalBlockArea4a} and {@link LineArea4a}.
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockContainerRa.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockContainerRa.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockContainerRa.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -33,14 +33,14 @@
import org.axsl.common.value.BackgroundRepeat;
import org.axsl.common.value.BorderStyle;
import org.axsl.common.value.RelativeAxis;
-import org.axsl.fo.FoContext;
-import org.axsl.fo.fo.Block;
-import org.axsl.fo.fo.BlockContainer;
-import org.axsl.fo.fo.BlockDiscrete;
-import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.ListBlock;
-import org.axsl.fo.fo.Table;
-import org.axsl.fo.fo.prop.CommonPositionPa;
+import org.axsl.fotree.FoContext;
+import org.axsl.fotree.fo.Block;
+import org.axsl.fotree.fo.BlockContainer;
+import org.axsl.fotree.fo.BlockDiscrete;
+import org.axsl.fotree.fo.GraftingPoint;
+import org.axsl.fotree.fo.ListBlock;
+import org.axsl.fotree.fo.Table;
+import org.axsl.fotree.fo.prop.CommonPositionPa;
import org.axsl.galley.BlockContainerArea;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -28,10 +28,10 @@
package org.foray.area;
-import org.axsl.fo.Fo;
-import org.axsl.fo.fo.Bookmark;
-import org.axsl.fo.fo.BookmarkTitle;
import org.axsl.font.Font;
+import org.axsl.fotree.Fo;
+import org.axsl.fotree.fo.Bookmark;
+import org.axsl.fotree.fo.BookmarkTitle;
import java.awt.Color;
import java.util.ArrayList;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkParentArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkParentArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkParentArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -28,7 +28,7 @@
package org.foray.area;
-import org.axsl.fo.fo.Bookmark;
+import org.axsl.fotree.fo.Bookmark;
/**
* Superclass for classes that can be parents of {@link BookmarkArea}s.
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkTitleArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkTitleArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkTitleArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -28,8 +28,8 @@
package org.foray.area;
-import org.axsl.fo.fo.BookmarkTitle;
import org.axsl.font.Font;
+import org.axsl.fotree.fo.BookmarkTitle;
import java.awt.Color;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkTreeArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkTreeArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkTreeArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -28,7 +28,7 @@
package org.foray.area;
-import org.axsl.fo.fo.BookmarkTree;
+import org.axsl.fotree.fo.BookmarkTree;
import java.util.ArrayList;
import java.util.List;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/ExternalGraphicArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/ExternalGraphicArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/ExternalGraphicArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -29,8 +29,8 @@
package org.foray.area;
import org.axsl.area.AreaTreeException;
-import org.axsl.fo.fo.ExternalGraphic;
-import org.axsl.fo.fo.GraftingPoint;
+import org.axsl.fotree.fo.ExternalGraphic;
+import org.axsl.fotree.fo.GraftingPoint;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
import org.axsl.graphic.Graphic;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkage.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkage.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkage.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -28,8 +28,8 @@
package org.foray.area;
-import org.axsl.fo.Fo;
-import org.axsl.fo.fo.GraftingPoint;
+import org.axsl.fotree.Fo;
+import org.axsl.fotree.fo.GraftingPoint;
import org.axsl.orthography.Orthography;
/**
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkageMarker.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkageMarker.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkageMarker.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -30,10 +30,10 @@
import org.axsl.area.AreaTreeException;
import org.axsl.area.PageArea;
-import org.axsl.fo.Fo;
-import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.Marker;
-import org.axsl.fo.fo.RetrieveMarker;
+import org.axsl.fotree.Fo;
+import org.axsl.fotree.fo.GraftingPoint;
+import org.axsl.fotree.fo.Marker;
+import org.axsl.fotree.fo.RetrieveMarker;
import java.util.HashMap;
import java.util.Map;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkageNormal.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkageNormal.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkageNormal.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -28,8 +28,8 @@
package org.foray.area;
-import org.axsl.fo.Fo;
-import org.axsl.fo.fo.RetrieveMarker;
+import org.axsl.fotree.Fo;
+import org.axsl.fotree.fo.RetrieveMarker;
import java.util.ArrayList;
import java.util.List;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/FootnoteRa.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/FootnoteRa.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/FootnoteRa.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -30,7 +30,7 @@
import org.axsl.area.AreaTreeException;
import org.axsl.common.value.RelativeAxis;
-import org.axsl.fo.Fo;
+import org.axsl.fotree.Fo;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/ForeignObjectArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/ForeignObjectArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/ForeignObjectArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -29,11 +29,11 @@
package org.foray.area;
import org.axsl.area.AreaTreeException;
-import org.axsl.fo.FoForeignXml;
-import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.InstreamForeignObject;
-import org.axsl.fo.foreign.MathElement;
-import org.axsl.fo.foreign.SvgElement;
+import org.axsl.fotree.FoForeignXml;
+import org.axsl.fotree.fo.GraftingPoint;
+import org.axsl.fotree.fo.InstreamForeignObject;
+import org.axsl.fotree.foreign.MathElement;
+import org.axsl.fotree.foreign.SvgElement;
import org.axsl.galley.ForeignContent;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/IndexPageCitationListArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/IndexPageCitationListArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/IndexPageCitationListArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -29,8 +29,8 @@
package org.foray.area;
import org.axsl.area.AreaTreeException;
-import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.IndexPageCitationList;
+import org.axsl.fotree.fo.GraftingPoint;
+import org.axsl.fotree.fo.IndexPageCitationList;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -31,8 +31,8 @@
import org.axsl.area.AreaTreeException;
import org.axsl.common.value.BackgroundRepeat;
import org.axsl.common.value.BorderStyle;
-import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.Inline;
+import org.axsl.fotree.fo.GraftingPoint;
+import org.axsl.fotree.fo.Inline;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
import org.axsl.graphic.Graphic;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineContainerArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineContainerArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineContainerArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -29,14 +29,14 @@
package org.foray.area;
import org.axsl.area.AreaTreeException;
-import org.axsl.fo.fo.Block;
-import org.axsl.fo.fo.BlockContainer;
-import org.axsl.fo.fo.BlockDiscrete;
-import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.Inline;
-import org.axsl.fo.fo.InlineContainer;
-import org.axsl.fo.fo.ListBlock;
-import org.axsl.fo.fo.Table;
+import org.axsl.fotree.fo.Block;
+import org.axsl.fotree.fo.BlockContainer;
+import org.axsl.fotree.fo.BlockDiscrete;
+import org.axsl.fotree.fo.GraftingPoint;
+import org.axsl.fotree.fo.Inline;
+import org.axsl.fotree.fo.InlineContainer;
+import org.axsl.fotree.fo.ListBlock;
+import org.axsl.fotree.fo.Table;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/LeaderArea.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LeaderArea.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -32,12 +32,12 @@
import org.axsl.common.value.LeaderAlignment;
import org.axsl.common.value.LeaderPattern;
import org.axsl.common.value.RuleStyle;
-import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.Leader;
-import org.axsl.fo.fo.prop.LeaderAlignmentPa;
-import org.axsl.fo.fo.prop.LeaderPatternPa;
-import org.axsl.fo.fo.prop.LeaderPatternWidthPa;
import org.axsl.font.FontUse;
+import org.axsl.fotree.fo.GraftingPoint;
+import org.axsl.fotree.fo.Leader;
+import org.axsl.fotree.fo.prop.LeaderAlignmentPa;
+import org.axsl.fotree.fo.prop.LeaderPatternPa;
+import org.axsl.fotree.fo.prop.LeaderPatternWidthPa;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2021-12-15 14:51:16 UTC (rev 12218)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2021-12-15 17:23:30 UTC (rev 12219)
@@ -39,24 +39,24 @@
import org.axsl.common.value.TextAlign;
import org.axsl.common.value.TextAlignLast;
import org.axsl.common.value.WhiteSpaceTreatment;
-import org.axsl.fo.Fo;
-import org.axsl.fo.FoContext;
-import org.axsl.fo.fo.BasicLink;
-import org.axsl.fo.fo.BidiOverride;
-import org.axsl.fo.fo.CharacterSequence;
-import org.axsl.fo.fo.External...
[truncated message content] |
|
From: <vic...@us...> - 2021-12-15 14:51:18
|
Revision: 12218
http://sourceforge.net/p/foray/code/12218
Author: victormote
Date: 2021-12-15 14:51:16 +0000 (Wed, 15 Dec 2021)
Log Message:
-----------
Conform to aXSL change: Remove Interword interface, which was adding no value.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequenceContent.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Punctuation4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Whitespace4a.java
Added Paths:
-----------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoPunctuation.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWhitespace.java
Removed Paths:
-------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoInterword.java
Deleted: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoInterword.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoInterword.java 2021-12-14 21:55:28 UTC (rev 12217)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoInterword.java 2021-12-15 14:51:16 UTC (rev 12218)
@@ -1,88 +0,0 @@
-/*
- * Copyright 2017 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.fotree.fo.obj;
-
-import org.axsl.common.value.LinefeedTreatment;
-import org.axsl.common.value.TextTransform;
-import org.axsl.common.value.WhiteSpaceTreatment;
-import org.axsl.orthography.Interword;
-
-/**
- * Fo wrapper around an interword.
- */
-public class FoInterword extends FoWordSequenceContent {
-
- /** The wrapped interword. */
- private Interword interword;
-
- /**
- * Constructor.
- * @param interword The wrapped interword.
- */
- public FoInterword(final Interword interword) {
- this.interword = interword;
- }
-
- /**
- * Returns the wrapped interword.
- * @return The wrapped interword.
- */
- public Interword getInterword() {
- return this.interword;
- }
-
- @Override
- public int length() {
- return this.interword.length();
- }
-
- @Override
- public char charAt(final int index) {
- return this.interword.charAt(index);
- }
-
- @Override
- public CharSequence subSequence(final int start, final int end) {
- return this.interword.subSequence(start, end);
- }
-
- @Override
- public char textTransformCharAt(final WhiteSpaceTreatment whiteSpaceTreatment,
- final LinefeedTreatment linefeedTreatment, final TextTransform textTransform,
- final int textTransformIndex) {
- /* For now assume that interword never contains a character that can be affected by text-transform. */
- return linefeedTreatmentCharAt(whiteSpaceTreatment, linefeedTreatment, textTransformIndex);
- }
-
- @Override
- public String toString() {
- return this.interword.toString();
- }
-
-}
Added: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoPunctuation.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoPunctuation.java (rev 0)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoPunctuation.java 2021-12-15 14:51:16 UTC (rev 12218)
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2021 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.fo.obj;
+
+import org.axsl.common.value.LinefeedTreatment;
+import org.axsl.common.value.TextTransform;
+import org.axsl.common.value.WhiteSpaceTreatment;
+import org.axsl.orthography.Punctuation;
+
+/**
+ * Fo wrapper around an instance of {@link Punctuation}.
+ */
+public class FoPunctuation extends FoWordSequenceContent {
+
+ /** The wrapped punctuation. */
+ private Punctuation punctuation;
+
+ /**
+ * Constructor.
+ * @param punctuation The wrapped punctuation.
+ */
+ public FoPunctuation(final Punctuation punctuation) {
+ this.punctuation = punctuation;
+ }
+
+ /**
+ * Returns the wrapped punctuation.
+ * @return The wrapped punctuation.
+ */
+ public Punctuation getPunctuation() {
+ return this.punctuation;
+ }
+
+ @Override
+ public int length() {
+ return this.punctuation.length();
+ }
+
+ @Override
+ public char charAt(final int index) {
+ return this.punctuation.charAt(index);
+ }
+
+ @Override
+ public CharSequence subSequence(final int start, final int end) {
+ return this.punctuation.subSequence(start, end);
+ }
+
+ @Override
+ public char textTransformCharAt(final WhiteSpaceTreatment whiteSpaceTreatment,
+ final LinefeedTreatment linefeedTreatment, final TextTransform textTransform,
+ final int textTransformIndex) {
+ /* For now assume that punctuation never contains a character that can be affected by text-transform. */
+ return linefeedTreatmentCharAt(whiteSpaceTreatment, linefeedTreatment, textTransformIndex);
+ }
+
+ @Override
+ public String toString() {
+ return this.punctuation.toString();
+ }
+
+}
Property changes on: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoPunctuation.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Added: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWhitespace.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWhitespace.java (rev 0)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWhitespace.java 2021-12-15 14:51:16 UTC (rev 12218)
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2021 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.fo.obj;
+
+import org.axsl.common.value.LinefeedTreatment;
+import org.axsl.common.value.TextTransform;
+import org.axsl.common.value.WhiteSpaceTreatment;
+import org.axsl.orthography.Whitespace;
+
+/**
+ * Fo wrapper around an instance of {@link Whitespace}.
+ */
+public class FoWhitespace extends FoWordSequenceContent {
+
+ /** The wrapped whitespace. */
+ private Whitespace whitespace;
+
+ /**
+ * Constructor.
+ * @param whitespace The wrapped whitespace.
+ */
+ public FoWhitespace(final Whitespace whitespace) {
+ this.whitespace = whitespace;
+ }
+
+ /**
+ * Returns the wrapped whitespace.
+ * @return The wrapped whitespace.
+ */
+ public Whitespace getWhitespace() {
+ return this.whitespace;
+ }
+
+ @Override
+ public int length() {
+ return this.whitespace.length();
+ }
+
+ @Override
+ public char charAt(final int index) {
+ return this.whitespace.charAt(index);
+ }
+
+ @Override
+ public CharSequence subSequence(final int start, final int end) {
+ return this.whitespace.subSequence(start, end);
+ }
+
+ @Override
+ public char textTransformCharAt(final WhiteSpaceTreatment whiteSpaceTreatment,
+ final LinefeedTreatment linefeedTreatment, final TextTransform textTransform,
+ final int textTransformIndex) {
+ /* For now assume that whitespace never contains a character that can be affected by text-transform. */
+ return linefeedTreatmentCharAt(whiteSpaceTreatment, linefeedTreatment, textTransformIndex);
+ }
+
+ @Override
+ public String toString() {
+ return this.whitespace.toString();
+ }
+
+}
Property changes on: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWhitespace.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequenceContent.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequenceContent.java 2021-12-14 21:55:28 UTC (rev 12217)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequenceContent.java 2021-12-15 14:51:16 UTC (rev 12218)
@@ -32,7 +32,6 @@
import org.axsl.common.value.LinefeedTreatment;
import org.axsl.common.value.TextTransform;
import org.axsl.common.value.WhiteSpaceTreatment;
-import org.axsl.orthography.Interword;
import org.axsl.orthography.Punctuation;
import org.axsl.orthography.Whitespace;
import org.axsl.orthography.Word;
@@ -56,17 +55,13 @@
final Word word = (Word) wordSequenceContent;
return new FoWord(word);
}
- if (wordSequenceContent instanceof Interword) {
- final Interword interword = (Interword) wordSequenceContent;
- return new FoInterword(interword);
- }
if (wordSequenceContent instanceof Punctuation) {
final Punctuation interword = (Punctuation) wordSequenceContent;
- return new FoInterword(interword);
+ return new FoPunctuation(interword);
}
if (wordSequenceContent instanceof Whitespace) {
final Whitespace interword = (Whitespace) wordSequenceContent;
- return new FoInterword(interword);
+ return new FoWhitespace(interword);
}
throw new IllegalArgumentException("Unexpected word sequence type: " +
wordSequenceContent.getClass().getSimpleName());
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Punctuation4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Punctuation4a.java 2021-12-14 21:55:28 UTC (rev 12217)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Punctuation4a.java 2021-12-15 14:51:16 UTC (rev 12218)
@@ -226,11 +226,6 @@
}
@Override
- public CharSequence getContent() {
- return this.content;
- }
-
- @Override
public int length() {
return this.content.length();
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Whitespace4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Whitespace4a.java 2021-12-14 21:55:28 UTC (rev 12217)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Whitespace4a.java 2021-12-15 14:51:16 UTC (rev 12218)
@@ -159,11 +159,6 @@
}
@Override
- public CharSequence getContent() {
- return this.content;
- }
-
- @Override
public int length() {
return this.content.length();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-14 21:55:31
|
Revision: 12217
http://sourceforge.net/p/foray/code/12217
Author: victormote
Date: 2021-12-14 21:55:28 +0000 (Tue, 14 Dec 2021)
Log Message:
-----------
Conform to aXSL change: Remove unnecessary dependency on OutputLine.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java
trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/TotalFitLb.java
trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/LineBreaker4aTests.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2021-12-14 21:37:16 UTC (rev 12216)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2021-12-14 21:55:28 UTC (rev 12217)
@@ -50,7 +50,6 @@
import org.axsl.galley.RenderVisitor;
import org.axsl.graphic.Graphic;
import org.axsl.linebreak.LineBreakControl;
-import org.axsl.linebreak.OutputLine;
import java.awt.Color;
import java.util.ArrayList;
@@ -493,9 +492,9 @@
}
@Override
- public OutputLine getOutputLine(final int lineNumber) {
+ public int getLineLength(final int lineNumber) {
// TODO Auto-generated method stub
- return null;
+ return 0;
}
@Override
Modified: trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java
===================================================================
--- trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java 2021-12-14 21:37:16 UTC (rev 12216)
+++ trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java 2021-12-14 21:55:28 UTC (rev 12217)
@@ -37,7 +37,6 @@
import org.axsl.common.para.ParaLeaf;
import org.axsl.common.para.ParaPenalty;
import org.axsl.linebreak.LineBreakControl;
-import org.axsl.linebreak.OutputLine;
import java.util.ArrayList;
import java.util.List;
@@ -80,8 +79,8 @@
/** The 1-based line number of the layout for this paragraph. */
private int currentLineNumber;
- /** The line onto which the next line of output from this line-breaker should be placed. */
- private List<OutputLine> outputLines = new ArrayList<OutputLine>(BREAKPOINTS_INIT_SIZE);
+ /** The length(s) of the line(s) onto which the content is being laid out. */
+ private IntArrayBuilder lineLengths = new IntArrayBuilder(BREAKPOINTS_INIT_SIZE);
/** The accepted content of the current line. */
private List<ParaLeaf> currentLineContent = new ArrayList<ParaLeaf>(LINE_CONTENT_INIT_SIZE);
@@ -135,7 +134,7 @@
this.lbControl = lbControl;
this.paraControl = paraControl;
this.currentLineNumber = 1;
- this.outputLines.add(lbControl.getOutputLine(currentLineNumber));
+ this.lineLengths.append(lbControl.getLineLength(currentLineNumber));
}
/**
@@ -229,7 +228,7 @@
this.currentLineShrinkability = 0;
this.currentLineStretchability = 0;
this.currentLineNumber ++;
- this.outputLines.add(this.lbControl.getOutputLine(currentLineNumber));
+ this.lineLengths.append(this.lbControl.getLineLength(currentLineNumber));
}
/**
@@ -308,10 +307,10 @@
/* This is glue at the beginning of a provisional "word." */
state.addProvisionalGlue(glue);
} else {
- final OutputLine currentLine = state.outputLines.get(state.outputLines.size() - 1);
+ final int capacityCurrentLine = state.lineLengths.peek();
/* This is glue marking the end of a provisional "word" and the beginning of the next. We need to
* process the provisional word. */
- if (state.idealProvisionalLineWidth() <= currentLine.capacityTotal()) {
+ if (state.idealProvisionalLineWidth() <= capacityCurrentLine) {
/* Provisional word fits into the line using ideal widths. */
state.acceptProvisionalWord();
/* Now add this glue. */
@@ -318,7 +317,7 @@
state.addProvisionalGlue(glue);
} else {
/* Provisional word does not fit into the line using ideal widths. */
- processEndOfLine(state, currentLine.capacityTotal());
+ processEndOfLine(state, capacityCurrentLine);
state.addProvisionalGlue(glue);
}
}
@@ -325,16 +324,11 @@
}
}
state.markEndOfParagraph();
- while (state.outputLines.size() > state.breakpoints.length()) {
- state.outputLines.remove(state.outputLines.size() - 1);
+ while (state.lineLengths.length() > state.breakpoints.length()) {
+ state.lineLengths.pop();
}
- final IntArrayBuilder lineLengths = new IntArrayBuilder(state.outputLines.size());
- for (int index = 0; index < state.outputLines.size(); index ++) {
- final OutputLine outputLine = state.outputLines.get(index);
- lineLengths.append(outputLine.capacityTotal());
- }
- return new LineBreakResult4a(lineLengths.toArray(), state.breakpoints.toArray());
+ return new LineBreakResult4a(state.lineLengths.toArray(), state.breakpoints.toArray());
}
private void processEndOfLine(final State state, final int lineCapacity) {
Modified: trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/TotalFitLb.java
===================================================================
--- trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/TotalFitLb.java 2021-12-14 21:37:16 UTC (rev 12216)
+++ trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/TotalFitLb.java 2021-12-14 21:55:28 UTC (rev 12217)
@@ -348,18 +348,18 @@
final ParaPenalty penalty = b.getContent().asParaPenalty();
length += penalty.getWidth(b.getConfig());
}
- if (length < this.lbControl.getOutputLine(j - 1).capacityTotal()) {
+ if (length < this.lbControl.getLineLength(j - 1)) {
final int stretch = this.cumulativeStretch - a.getTotalStretch();
if (stretch > 0) {
- final int numerator = this.lbControl.getOutputLine(j - 1).capacityTotal() - length;
+ final int numerator = this.lbControl.getLineLength(j - 1) - length;
ratio = numerator / stretch;
} else {
ratio = Double.MAX_VALUE;
}
- } else if (length > this.lbControl.getOutputLine(j - 1).capacityTotal()) {
+ } else if (length > this.lbControl.getLineLength(j - 1)) {
final int shrink = this.cumulativeShrink - a.getTotalShrink();
if (shrink > 0) {
- final int numerator = this.lbControl.getOutputLine(j - 1).capacityTotal() - length;
+ final int numerator = this.lbControl.getLineLength(j - 1) - length;
ratio = numerator / shrink;
} else {
ratio = Double.MAX_VALUE;
Modified: trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/LineBreaker4aTests.java
===================================================================
--- trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/LineBreaker4aTests.java 2021-12-14 21:37:16 UTC (rev 12216)
+++ trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/LineBreaker4aTests.java 2021-12-14 21:55:28 UTC (rev 12217)
@@ -40,7 +40,6 @@
import org.axsl.common.para.DiscretionaryHyphen;
import org.axsl.common.para.ParaControl;
import org.axsl.linebreak.LineBreakControl;
-import org.axsl.linebreak.OutputLine;
import org.junit.Assert;
import org.mockito.Mockito;
@@ -391,14 +390,12 @@
*/
public LineBreakControl createLineBreakControl(final int lineWidth) {
final LineBreakControl lbControl = Mockito.mock(LineBreakControl.class);
- final OutputLine lineOutput = Mockito.mock(OutputLine.class);
if (lineWidth < 0) {
/* Page is 8.5 inches wide, 1 inch margin on both ends, leaving 6.5 inches, or 468,000 millipoints. */
- Mockito.when(lineOutput.capacityTotal()).thenReturn(468000);
+ Mockito.when(lbControl.getLineLength(Mockito.anyInt())).thenReturn(468000);
} else {
- Mockito.when(lineOutput.capacityTotal()).thenReturn(lineWidth);
+ Mockito.when(lbControl.getLineLength(Mockito.anyInt())).thenReturn(lineWidth);
}
- Mockito.when(lbControl.getOutputLine(Mockito.anyInt())).thenReturn(lineOutput);
return lbControl;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-14 21:37:19
|
Revision: 12216
http://sourceforge.net/p/foray/code/12216
Author: victormote
Date: 2021-12-14 21:37:16 +0000 (Tue, 14 Dec 2021)
Log Message:
-----------
Conform to aXSL change: Allow a LineBreaker instance to be reused. Document that it must be reusable and thread-safe.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2021-12-14 19:40:54 UTC (rev 12215)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2021-12-14 21:37:16 UTC (rev 12216)
@@ -43,6 +43,7 @@
import org.axsl.galley.Galley;
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.RenderVisitor;
+import org.axsl.linebreak.LineBreaker;
import org.axsl.linebreak.LineBreakerFactory;
import org.axsl.text.TextServer;
@@ -75,8 +76,8 @@
/** The text server for this area tree. */
private TextServer textServer;
- /** The LineBreakerFactory for this area tree. */
- private LineBreakerFactory lbFactory;
+ /** The LineBreaker for this area tree. */
+ private LineBreaker lineBreaker;
/** The logger. */
private Logger logger;
@@ -132,7 +133,7 @@
this.foTree = foTree;
this.fontConsumer = fontConsumer;
this.textServer = textServer;
- this.lbFactory = lbFactory;
+ this.lineBreaker = lbFactory.obtainLineBreaker();
this.logger = logger;
}
@@ -474,8 +475,8 @@
}
@Override
- public LineBreakerFactory getLineBreakerFactory() {
- return this.lbFactory;
+ public LineBreaker getLineBreaker() {
+ return this.lineBreaker;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-14 19:40:57
|
Revision: 12215
http://sourceforge.net/p/foray/code/12215
Author: victormote
Date: 2021-12-14 19:40:54 +0000 (Tue, 14 Dec 2021)
Log Message:
-----------
Conform to aXSL change: Return the line lengths as well as the breakpoints.
Modified Paths:
--------------
trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/BestFitLb.java
trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java
trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/TotalFitLb.java
trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/FirstFitLbTests.java
trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/TotalFitLbTests.java
Added Paths:
-----------
trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/LineBreakResult4a.java
Modified: trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/BestFitLb.java
===================================================================
--- trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/BestFitLb.java 2021-12-13 21:14:22 UTC (rev 12214)
+++ trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/BestFitLb.java 2021-12-14 19:40:54 UTC (rev 12215)
@@ -39,9 +39,9 @@
public class BestFitLb extends LineBreaker4a {
@Override
- public int[] breakIntoLines(final ParaBranch paragraph, final ParaControl paraControl,
+ public LineBreakResult4a breakIntoLines(final ParaBranch paragraph, final ParaControl paraControl,
final LineBreakControl lbControl) {
- return new int[0];
+ return new LineBreakResult4a(null, null);
}
}
Modified: trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java
===================================================================
--- trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java 2021-12-13 21:14:22 UTC (rev 12214)
+++ trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java 2021-12-14 19:40:54 UTC (rev 12215)
@@ -81,7 +81,7 @@
private int currentLineNumber;
/** The line onto which the next line of output from this line-breaker should be placed. */
- private OutputLine currentLine;
+ private List<OutputLine> outputLines = new ArrayList<OutputLine>(BREAKPOINTS_INIT_SIZE);
/** The accepted content of the current line. */
private List<ParaLeaf> currentLineContent = new ArrayList<ParaLeaf>(LINE_CONTENT_INIT_SIZE);
@@ -135,7 +135,7 @@
this.lbControl = lbControl;
this.paraControl = paraControl;
this.currentLineNumber = 1;
- this.currentLine = lbControl.getOutputLine(currentLineNumber);
+ this.outputLines.add(lbControl.getOutputLine(currentLineNumber));
}
/**
@@ -229,7 +229,7 @@
this.currentLineShrinkability = 0;
this.currentLineStretchability = 0;
this.currentLineNumber ++;
- this.currentLine = this.lbControl.getOutputLine(currentLineNumber);
+ this.outputLines.add(this.lbControl.getOutputLine(currentLineNumber));
}
/**
@@ -276,7 +276,7 @@
}
@Override
- public int[] breakIntoLines(final ParaBranch paragraph, final ParaControl paraControl,
+ public LineBreakResult4a breakIntoLines(final ParaBranch paragraph, final ParaControl paraControl,
final LineBreakControl lbControl) {
/* For purposes of this algorithm, "word" means the content between glue items, or, really, if (a) is non-glue,
* (b) is glue, (c) is non-glue, and (d) is glue, then (a) is the end of the previous word, and (b) and (c)
@@ -308,9 +308,10 @@
/* This is glue at the beginning of a provisional "word." */
state.addProvisionalGlue(glue);
} else {
+ final OutputLine currentLine = state.outputLines.get(state.outputLines.size() - 1);
/* This is glue marking the end of a provisional "word" and the beginning of the next. We need to
* process the provisional word. */
- if (state.idealProvisionalLineWidth() <= state.currentLine.capacityTotal()) {
+ if (state.idealProvisionalLineWidth() <= currentLine.capacityTotal()) {
/* Provisional word fits into the line using ideal widths. */
state.acceptProvisionalWord();
/* Now add this glue. */
@@ -317,7 +318,7 @@
state.addProvisionalGlue(glue);
} else {
/* Provisional word does not fit into the line using ideal widths. */
- processEndOfLine(state, state.currentLine);
+ processEndOfLine(state, currentLine.capacityTotal());
state.addProvisionalGlue(glue);
}
}
@@ -324,12 +325,21 @@
}
}
state.markEndOfParagraph();
- return state.breakpoints.toArray();
+ while (state.outputLines.size() > state.breakpoints.length()) {
+ state.outputLines.remove(state.outputLines.size() - 1);
+ }
+
+ final IntArrayBuilder lineLengths = new IntArrayBuilder(state.outputLines.size());
+ for (int index = 0; index < state.outputLines.size(); index ++) {
+ final OutputLine outputLine = state.outputLines.get(index);
+ lineLengths.append(outputLine.capacityTotal());
+ }
+ return new LineBreakResult4a(lineLengths.toArray(), state.breakpoints.toArray());
}
- private void processEndOfLine(final State state, final OutputLine currentLine) {
+ private void processEndOfLine(final State state, final int lineCapacity) {
/* Does the provisional word fit if we compress the word spacing? */
- if (state.minProvisionalLineWidth() <= currentLine.capacityTotal()) {
+ if (state.minProvisionalLineWidth() <= lineCapacity) {
/* Yes, it fits if we compress the word spacing. */
state.acceptProvisionalWord();
state.markEndOfLine();
@@ -339,7 +349,7 @@
/* If the word spacing is expanded to its maximum, is existing content (i.e. before the provisional word)
* long enough to fill the line? */
- if (state.currentLineIdealWidth + state.currentLineStretchability >= currentLine.capacityTotal()) {
+ if (state.currentLineIdealWidth + state.currentLineStretchability >= lineCapacity) {
/* Yes, the current line can be expanded to fill the line. */
state.markEndOfLine();
return;
@@ -363,7 +373,7 @@
}
if (state.minProvisionalLineWidth() - idealWidthToNextLine + penalty.getWidth(state.paraConfig)
- <= currentLine.capacityTotal()) {
+ <= lineCapacity) {
/* This is the breakpoint we want. However, we need to break after this breakpoint. */
state.markEndOfLine(index + 1);
return;
Added: trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/LineBreakResult4a.java
===================================================================
--- trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/LineBreakResult4a.java (rev 0)
+++ trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/LineBreakResult4a.java 2021-12-14 19:40:54 UTC (rev 12215)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2021 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.linebreak;
+
+import org.axsl.linebreak.LineBreakResult;
+
+/**
+ * The results of a line-breaking computation.
+ * See {@link LineBreakResult} interface documentation for more details.
+ */
+public class LineBreakResult4a implements LineBreakResult {
+
+ /** The array of line lengths, in millipoints, for the paragraph. */
+ private int[] lineLengths;
+
+ /** The array of breakpoints for the paragraph. */
+ private int[] breakPositions;
+
+ public LineBreakResult4a(final int[] lineLengths, final int[] breakPositions) {
+ if (lineLengths.length != breakPositions.length) {
+ throw new IllegalArgumentException("Line length and breakpoint arrays must be of equal length.");
+ }
+ this.lineLengths = lineLengths;
+ this.breakPositions = breakPositions;
+ }
+
+ @Override
+ public int getQtyLines() {
+ return this.lineLengths.length;
+ }
+
+ @Override
+ public int getLineLength(final int lineIndex) {
+ return this.lineLengths[lineIndex];
+ }
+
+ @Override
+ public int getBreakPosition(final int lineIndex) {
+ return this.breakPositions[lineIndex];
+ }
+
+}
Property changes on: trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/LineBreakResult4a.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Modified: trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/TotalFitLb.java
===================================================================
--- trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/TotalFitLb.java 2021-12-13 21:14:22 UTC (rev 12214)
+++ trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/TotalFitLb.java 2021-12-14 19:40:54 UTC (rev 12215)
@@ -99,7 +99,7 @@
private int cumulativeShrink;
@Override
- public int[] breakIntoLines(final ParaBranch paragraph, final ParaControl paraControl,
+ public LineBreakResult4a breakIntoLines(final ParaBranch paragraph, final ParaControl paraControl,
final LineBreakControl lbControl) {
this.paragraph = paragraph;
this.paraControl = paraControl;
@@ -106,7 +106,7 @@
this.lbControl = lbControl;
final IntArrayBuilder returnValue = new IntArrayBuilder();
if (paragraph == null) {
- return returnValue.toArray();
+ return new LineBreakResult4a(new int[0], new int[0]);
}
/* Initialize the data structures. */
@@ -138,7 +138,7 @@
// for (LbBreakpoint bp : this.activeNodes) {
// returnValue.add(bp.getNodeWrapper().getPath());
// }
- return returnValue.toArray();
+ return new LineBreakResult4a(new int[0], returnValue.toArray());
}
/**
Modified: trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/FirstFitLbTests.java
===================================================================
--- trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/FirstFitLbTests.java 2021-12-13 21:14:22 UTC (rev 12214)
+++ trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/FirstFitLbTests.java 2021-12-14 19:40:54 UTC (rev 12215)
@@ -53,9 +53,10 @@
final ParaControl paraControl = createParaControl();
final LineBreakControl lbControl = createLineBreakControl(-1);
final FirstFitLb out = new FirstFitLb();
- final int[] actual = out.breakIntoLines(para, paraControl, lbControl);
- final int[] expected = new int[] {1};
- Assert.assertArrayEquals(expected, actual);
+ final LineBreakResult4a actual = out.breakIntoLines(para, paraControl, lbControl);
+ Assert.assertEquals(1, actual.getQtyLines());
+ Assert.assertEquals(468000, actual.getLineLength(0));
+ Assert.assertEquals(1, actual.getBreakPosition(0));
}
/**
@@ -71,9 +72,32 @@
final LineBreakControl lbControl = createLineBreakControl(lineWidth);
final FirstFitLb out = new FirstFitLb();
- final int[] actual = out.breakIntoLines(para, paraControl, lbControl);
- final int[] expected = new int[] {19, 42, 68, 90, 113, 138, 164, 185, 209, 230, 254, 276};
- Assert.assertArrayEquals(expected, actual);
+ final LineBreakResult4a actual = out.breakIntoLines(para, paraControl, lbControl);
+ Assert.assertEquals(12, actual.getQtyLines());
+ Assert.assertEquals(390, actual.getLineLength(0));
+ Assert.assertEquals(390, actual.getLineLength(1));
+ Assert.assertEquals(390, actual.getLineLength(2));
+ Assert.assertEquals(390, actual.getLineLength(3));
+ Assert.assertEquals(390, actual.getLineLength(4));
+ Assert.assertEquals(390, actual.getLineLength(5));
+ Assert.assertEquals(390, actual.getLineLength(6));
+ Assert.assertEquals(390, actual.getLineLength(7));
+ Assert.assertEquals(390, actual.getLineLength(8));
+ Assert.assertEquals(390, actual.getLineLength(9));
+ Assert.assertEquals(390, actual.getLineLength(10));
+ Assert.assertEquals(390, actual.getLineLength(11));
+ Assert.assertEquals(19, actual.getBreakPosition(0));
+ Assert.assertEquals(42, actual.getBreakPosition(1));
+ Assert.assertEquals(68, actual.getBreakPosition(2));
+ Assert.assertEquals(90, actual.getBreakPosition(3));
+ Assert.assertEquals(113, actual.getBreakPosition(4));
+ Assert.assertEquals(138, actual.getBreakPosition(5));
+ Assert.assertEquals(164, actual.getBreakPosition(6));
+ Assert.assertEquals(185, actual.getBreakPosition(7));
+ Assert.assertEquals(209, actual.getBreakPosition(8));
+ Assert.assertEquals(230, actual.getBreakPosition(9));
+ Assert.assertEquals(254, actual.getBreakPosition(10));
+ Assert.assertEquals(276, actual.getBreakPosition(11));
}
}
Modified: trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/TotalFitLbTests.java
===================================================================
--- trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/TotalFitLbTests.java 2021-12-13 21:14:22 UTC (rev 12214)
+++ trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/TotalFitLbTests.java 2021-12-14 19:40:54 UTC (rev 12215)
@@ -34,6 +34,7 @@
import org.axsl.linebreak.LineBreakControl;
import org.junit.Assert;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -45,6 +46,7 @@
* A test.
*/
@Test
+ @Ignore
public void totalFitTest1() {
/* TODO: THE CLASS BEING TESTED IS VERY INCOMPLETE, AND SO IS THIS TEST !!!!!! */
@@ -55,10 +57,10 @@
final LineBreakControl lbControl = createLineBreakControl(390_000);
final TotalFitLb out = new TotalFitLb();
- final int[] actual = out.breakIntoLines(para, paraControl, lbControl);
+ final LineBreakResult4a actual = out.breakIntoLines(para, paraControl, lbControl);
final int[] expected = new int[0];
- Assert.assertArrayEquals(expected, actual);
+ Assert.assertEquals(expected, actual);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-13 21:14:24
|
Revision: 12214
http://sourceforge.net/p/foray/code/12214
Author: victormote
Date: 2021-12-13 21:14:22 +0000 (Mon, 13 Dec 2021)
Log Message:
-----------
Conform to aXSL change: Add CharSequence to the implemented interfaces for text.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineText.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineText.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineText.java 2021-12-13 16:12:32 UTC (rev 12213)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineText.java 2021-12-13 21:14:22 UTC (rev 12214)
@@ -228,4 +228,19 @@
return null;
}
+ @Override
+ public int length() {
+ return this.realLineText.length();
+ }
+
+ @Override
+ public char charAt(final int index) {
+ return this.realLineText.charAt(index);
+ }
+
+ @Override
+ public CharSequence subSequence(final int start, final int end) {
+ return this.realLineText.subSequence(start, end);
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-13 16:12:35
|
Revision: 12213
http://sourceforge.net/p/foray/code/12213
Author: victormote
Date: 2021-12-13 16:12:32 +0000 (Mon, 13 Dec 2021)
Log Message:
-----------
Steps toward cleaning up CharSequence hierarchy.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java
trunk/foray/master/ide/eclipse/launch-configurations/fonts-basic.launch
trunk/foray/master/ide/eclipse/launch-configurations/graphics-basic.launch
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-13 01:11:21 UTC (rev 12212)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-13 16:12:32 UTC (rev 12213)
@@ -58,7 +58,7 @@
/**
* Abstract superclass for representations of characters.
*/
-public abstract class AbstractCharacterSequence extends FoObj implements CharacterSequence {
+public abstract class AbstractCharacterSequence extends FoObj implements CharacterSequence, CharSequence {
/** Constant indicating that a given character should be discarded. */
public static final char DISCARD_CHAR = 0xFFFF;
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java 2021-12-13 01:11:21 UTC (rev 12212)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java 2021-12-13 16:12:32 UTC (rev 12213)
@@ -52,7 +52,7 @@
/**
* A "character" object in XSL-FO.
*/
-public class Character4a extends FoObj implements Character {
+public class Character4a extends FoObj implements Character, CharSequence {
/** The parent of this node. */
private FoObj parent;
@@ -422,4 +422,26 @@
return false;
}
+ @Override
+ public int length() {
+ return 1;
+ }
+
+ @Override
+ public char charAt(final int index) {
+ if (index != 0) {
+ throw new IndexOutOfBoundsException();
+ }
+ return traitCharacter();
+ }
+
+ @Override
+ public CharSequence subSequence(final int start, final int end) {
+ if (start != 0
+ || end != 1) {
+ throw new IndexOutOfBoundsException();
+ }
+ return java.lang.Character.toString(traitCharacter());
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2021-12-13 01:11:21 UTC (rev 12212)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2021-12-13 16:12:32 UTC (rev 12213)
@@ -466,4 +466,19 @@
return false;
}
+ @Override
+ public int length() {
+ return this.ca.length();
+ }
+
+ @Override
+ public char charAt(final int index) {
+ return this.ca.charAt(index);
+ }
+
+ @Override
+ public CharSequence subSequence(final int start, final int end) {
+ return this.ca.subSequence(start, end);
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java 2021-12-13 01:11:21 UTC (rev 12212)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoWordSequence.java 2021-12-13 16:12:32 UTC (rev 12213)
@@ -130,4 +130,42 @@
return false;
}
+ @Override
+ public int length() {
+ int totalLength = 0;
+ for (int index = 0; index < this.content.size(); index ++) {
+ totalLength += this.content.get(index).length();
+ }
+ return totalLength;
+ }
+
+ @Override
+ public char charAt(final int charIndex) {
+ if (charIndex < 0) {
+ throw new IndexOutOfBoundsException();
+ }
+ int totalLength = 0;
+ for (int index = 0; index < this.content.size(); index ++) {
+ final int currentLength = this.content.get(index).length();
+ totalLength += currentLength;
+ if (totalLength > charIndex) {
+ final int currentIndex = charIndex - (totalLength - currentLength);
+ return this.content.get(index).charAt(currentIndex);
+ }
+ }
+ throw new IndexOutOfBoundsException();
+ }
+
+ @Override
+ public CharSequence subSequence(final int start, final int end) {
+ /* TODO: This is horrible performance-wise, but should not be used much. If that turns out to not be true, it
+ * needs to be rewritten, probably using a character iterator concept. */
+ final StringBuilder builder = new StringBuilder();
+ for (int index = start; index < end; index ++) {
+ final char c = charAt(index);
+ builder.append(c);
+ }
+ return builder.toString();
+ }
+
}
Modified: trunk/foray/master/ide/eclipse/launch-configurations/fonts-basic.launch
===================================================================
--- trunk/foray/master/ide/eclipse/launch-configurations/fonts-basic.launch 2021-12-13 01:11:21 UTC (rev 12212)
+++ trunk/foray/master/ide/eclipse/launch-configurations/fonts-basic.launch 2021-12-13 16:12:32 UTC (rev 12213)
@@ -15,7 +15,7 @@
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.foray.app.FOray"/>
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="foray-app"/>
- <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-configuration-file ${foray-config} -fo ${fo-example-path}/basic/fonts.fo -pdf ${foray-test-output}/fonts-basic.pdf"/>
+ <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-configuration-file ${foray-config} -fo ${fo-example-path}/basic/fonts.fo -pdf ${foray-test-output-file}/fonts-basic.pdf"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="foray-app"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
</launchConfiguration>
Modified: trunk/foray/master/ide/eclipse/launch-configurations/graphics-basic.launch
===================================================================
--- trunk/foray/master/ide/eclipse/launch-configurations/graphics-basic.launch 2021-12-13 01:11:21 UTC (rev 12212)
+++ trunk/foray/master/ide/eclipse/launch-configurations/graphics-basic.launch 2021-12-13 16:12:32 UTC (rev 12213)
@@ -15,7 +15,7 @@
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.foray.app.FOray"/>
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="foray-app"/>
- <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-configuration-file ${foray-config} -fo ${fo-example-path}/basic/graphics.fo -pdf ${foray-test-output}/graphics-basic.pdf"/>
+ <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-configuration-file ${foray-config} -fo ${fo-example-path}/basic/graphics.fo -pdf ${foray-test-output-file}/graphics-basic.pdf"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="foray-app"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
</launchConfiguration>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-13 01:11:26
|
Revision: 12212
http://sourceforge.net/p/foray/code/12212
Author: victormote
Date: 2021-12-13 01:11:21 +0000 (Mon, 13 Dec 2021)
Log Message:
-----------
Replace all "iff" in javadoc with "if and only if" for clarity, and add checkstyle check for prevention.
Modified Paths:
--------------
trunk/foray/foray-app/src/main/java/org/foray/app/OutputTargetType.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractInlineArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkageNormal.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/SpanRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java
trunk/foray/foray-common/src/main/java/org/foray/common/ByteSequenceSearcher.java
trunk/foray/foray-common/src/main/java/org/foray/common/Environment.java
trunk/foray/foray-common/src/main/java/org/foray/common/primitive/StringUtils.java
trunk/foray/foray-common/src/main/java/org/foray/common/primitive/UnicodeCharUtils.java
trunk/foray/foray-common/src/main/java/org/foray/common/primitive/XmlCharacterUtils.java
trunk/foray/foray-common/src/main/java/org/foray/common/ps/PsColor.java
trunk/foray/foray-common/src/main/java/org/foray/common/url/FactoryProtocolRegistration.java
trunk/foray/foray-common/src/main/java/org/foray/common/url/UrlFactory.java
trunk/foray/foray-common/src/main/java/org/foray/common/url/UrlUtil.java
trunk/foray/foray-common/src/main/java/org/foray/common/url/classpath/Handler.java
trunk/foray/foray-core/src/main/java/org/foray/core/ForayException.java
trunk/foray/foray-core/src/main/java/org/foray/core/SessionConfig.java
trunk/foray/foray-font/src/main/java/org/foray/font/ConsumerFont4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/FontUse4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/FreeStandingFont.java
trunk/foray/foray-font/src/main/java/org/foray/font/Subset.java
trunk/foray/foray-font/src/main/java/org/foray/font/config/FontConfigParser.java
trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFont.java
trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontFamilyMember.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/Kerning.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TrueTypeFont.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TtfOffsetTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TtfTableGlyf.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TtfTableHead.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TtfTableName.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TtfTableOs2.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TtfTablePclt.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TtfTablePost.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1Metrics.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1MetricsParser.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1MetricsParserAfm.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObjScaled.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/AbstractFoProperty.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageMaster.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowSourceList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/LayoutMasterSet4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceTemplate.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/SimplePageMaster4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractBorderWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractPadding.java
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/PdClip.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdColumnNumber.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLineHeight.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdZindex.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyTokenizer.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtAngle.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtBorderStyle.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtBorderWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtLength.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtRectangle.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/PropertyValue.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/EpsGraphic.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/Graphic4a.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicLink4a.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/ImageConsumerImpl.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/JpegGraphic.java
trunk/foray/foray-linebreak/src/main/java/org/foray/text/line/LineBreaker.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/NaturalLanguage.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/WordListCreator.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfColor4a.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfEncryption4a.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfFont4a.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfString.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfTextString.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FootnoteBodyPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/RowSpanMgr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/Status.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/PsFile.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/PsMatrix.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/PsObject.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/PsPath.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/PsSystemDict4a.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/CharSet4a.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/Cmap04TtfEntry4a.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/Cmap12TtfEntry4a.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingParser.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingVector4a.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/GlyphList4a.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/GlyphListParser.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/filter/PsDecodeFilter4a.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/filter/PsEncodeFilter4a.java
trunk/foray/foray-render/src/main/java/org/foray/render/awt/viewer/LoadableProperties.java
trunk/foray/foray-render/src/main/java/org/foray/render/awt/viewer/Translator.java
trunk/foray/foray-render/src/main/java/org/foray/render/pcl/PclRenderer.java
trunk/foray/foray-render/src/main/java/org/foray/render/ps/PsRenderer.java
trunk/foray/foray-render/src/main/java/org/foray/render/txt/TxtStream.java
trunk/foray/foray-render/src/main/java/org/foray/render/xml/XmlRenderer.java
trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayPretty.java
trunk/foray/foray-xml/src/main/java/org/foray/xml/dtd/DtdElement.java
trunk/foray/foray-xml/src/main/java/org/foray/xml/dtd/DtdTokenizer.java
trunk/foray/foray-xml/src/main/java/org/foray/xml/dtd/ElementStack.java
trunk/foray/master/config/checkstyle/checkstyle-config.xml
Modified: trunk/foray/foray-app/src/main/java/org/foray/app/OutputTargetType.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/app/OutputTargetType.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-app/src/main/java/org/foray/app/OutputTargetType.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -80,7 +80,7 @@
/**
* Indicates whether this output target requires an output stream.
- * @return True iff this output target type requires an output stream.
+ * @return True if and only if this output target type requires an output stream.
*/
public boolean requiresOutputStream() {
return this.requiresOutputStream;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractInlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractInlineArea.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractInlineArea.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -211,7 +211,7 @@
/**
* Indicates whether this area is the first leaf area on the ancestor line.
- * @return True iff this area is the first leaf area on the ancestory line.
+ * @return True if and only if this area is the first leaf area on the ancestory line.
*/
public boolean isFirstLeafOnLine() {
final LineArea4a ancestorLine = this.ancestorLineArea();
@@ -221,7 +221,7 @@
/**
* Indicates whether this area is the first leaf area on the ancestor line.
- * @return True iff this area is the first leaf area on the ancestory line.
+ * @return True if and only if this area is the first leaf area on the ancestory line.
*/
public boolean isLastLeafOnLine() {
final LineArea4a ancestorLine = this.ancestorLineArea();
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -109,7 +109,7 @@
/**
* Indicates whether this area is its parent's first child.
- * @return True iff this area is its parent's first child.
+ * @return True if and only if this area is its parent's first child.
*/
protected boolean isFirstChildOfParent() {
if (getParent() == null) {
@@ -128,7 +128,7 @@
/**
* Indicates whether this area is its parent's last child.
- * @return True iff this area is its parent's last child.
+ * @return True if and only if this area is its parent's last child.
*/
protected boolean isLastChildOfParent() {
if (getParent() == null) {
@@ -706,7 +706,7 @@
/**
* Indicates whether this area is a reference area.
- * @return True iff this area is a reference area.
+ * @return True if and only if this area is a reference area.
*/
public boolean traitIsReferenceArea() {
return traitGeneratedBy().traitIsReferenceArea();
@@ -746,7 +746,7 @@
/**
* Indicates whether this is the first child of the "generated by".
- * @return True iff this is the first child of the "generated by".
+ * @return True if and only if this is the first child of the "generated by".
*/
public boolean traitIsFirst() {
return this.isFirstChildOfGeneratedBy();
@@ -754,7 +754,7 @@
/**
* Indicates whether this is the last child of the "generated by".
- * @return True iff this is the last child of the "generated by".
+ * @return True if and only if this is the last child of the "generated by".
*/
public boolean traitIsLast() {
return this.isLastChildOfGeneratedBy();
@@ -834,7 +834,7 @@
/**
* Indicates whether this Area is positioned absolutely or relatively.
- * @return True iff this Area is absolutely positioned.
+ * @return True if and only if this Area is absolutely positioned.
*/
public abstract boolean isAbsolutelyPositioned();
@@ -843,7 +843,7 @@
* See XSL-FO 1.0, Section 7.5, where absolutely-positioned Areas are
* excluded from the normal flow, and do not affect the positioning of later
* siblings.
- * @return True iff this Area is part of the normal flow and affects the
+ * @return True if and only if this Area is part of the normal flow and affects the
* positioning of later siblings.
*/
public boolean isInNormalFlow() {
@@ -855,7 +855,7 @@
/**
* Indicates whether the parent progression dimension should be adjusted.
- * @return True iff the parent progression dimension should be adjusted.
+ * @return True if and only if the parent progression dimension should be adjusted.
*/
public boolean shouldAdjustParentPD() {
/* If not in the normal flow, the parent's dimensions are not used up
@@ -895,7 +895,7 @@
* purposes of stacking constraints.
* This method is only relevant for block-areas as inline-areas have a more
* complicated fencing procedure.
- * @return True iff this Area has a fence preceding it.
+ * @return True if and only if this Area has a fence preceding it.
* @see "XSL-FO 1.1, Section 4.2.5, under 'Block-stacking constraints'."
*/
public boolean hasFencePreceding() {
@@ -918,7 +918,7 @@
* purposes of stacking constraints.
* This method is only relevant for block-areas as inline-areas have a more
* complicated fencing procedure.
- * @return True iff this Area has a fence following it.
+ * @return True if and only if this Area has a fence following it.
* @see "XSL-FO 1.1, Section 4.2.5, under 'Block-stacking constraints'."
*/
public boolean hasFenceFollowing() {
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -230,7 +230,7 @@
/**
* Indicates whether this is the last child of this area's "generated-by".
- * @return True iff this is the last child of this area's "generated-by".
+ * @return True if and only if this is the last child of this area's "generated-by".
*/
protected boolean isLastChildOfGeneratedBy() {
return this.getNormalLinkage().isLastGeneratedBy(this);
@@ -409,7 +409,7 @@
/**
* Indicates whether this Area was generated by a block-level FO.
- * @return True iff this Area was generated by a block-level FO.
+ * @return True if and only if this Area was generated by a block-level FO.
*/
public boolean isGeneratedByBlockLevelFo() {
return this.traitGeneratedBy().isBlockLevelFo();
@@ -549,7 +549,7 @@
* Areas that are generated by Formatting Objects for whom the property
* "ref-id" is used should override this method in an appropriate
* manner.</p>
- * @return True iff this node has an unresolved "ref-id".
+ * @return True if and only if this node has an unresolved "ref-id".
*/
public boolean hasUnresolvedRefId() {
return false;
@@ -579,7 +579,7 @@
* variables.
* NOTE: This method is called recursively by each node.
* The process starts at {@link PageRa#layoutComplete()}.
- * @return True iff the Area node thinks it should be removed.
+ * @return True if and only if the Area node thinks it should be removed.
*/
protected abstract boolean optimize();
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -462,7 +462,7 @@
* Indicates whether a given page is completed and in the queue to be
* rendered.
* @param page The page being tested.
- * @return True iff the given page is in the queue of completed pages.
+ * @return True if and only if the given page is in the queue of completed pages.
*/
public boolean isPageQueued(final PageRa page) {
return this.renderQueue.contains(page);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkageNormal.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkageNormal.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/FoLinkageNormal.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -135,7 +135,7 @@
* Indicates whether a given area is the first one generated by this
* linkage.
* @param area An Area instance.
- * @return True iff area is the first Area generated by this.
+ * @return True if and only if area is the first Area generated by this.
*/
public boolean isFirstGeneratedBy(final AreaNode4a area) {
if (this.generatedAreas.indexOf(area) == 0) {
@@ -148,7 +148,7 @@
* Indicates whether a given area is the last one generated by this
* linkage.
* @param area An Area instance.
- * @return True iff area is the first Area generated by this.
+ * @return True if and only if area is the first Area generated by this.
*/
public boolean isLastGeneratedBy(final AreaNode4a area) {
if (this.generatedAreas.indexOf(area)
@@ -246,7 +246,7 @@
/**
* Indicates whether a given area was generated by this linkage.
* @param areaNode The node to be tested.
- * @return True iff this linkage generated {@code areaNode}.
+ * @return True if and only if this linkage generated {@code areaNode}.
*/
public boolean contains(final AreaNode4a areaNode) {
for (int i = 0; i < this.generatedAreas.size(); i++) {
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -560,7 +560,7 @@
/**
* Indicates whether this is the first line-area generated by the parent
* block.
- * @return True iff this is the first LineArea instance generated by the
+ * @return True if and only if this is the first LineArea instance generated by the
* parent Block.
*/
public boolean isFirstLineAreaInBlock() {
@@ -576,7 +576,7 @@
/**
* Indicates whether this is the last line-area generated by the parent
* block.
- * @return True iff this is the last LineArea instance generated by the
+ * @return True if and only if this is the last LineArea instance generated by the
* parent Block.
*/
public boolean isLastLineAreaInBlock() {
@@ -599,7 +599,7 @@
* line-area generated by the formatting object whose following sibling is a
* block-area that is not a line-area, and any lines in the block ending in
* U+000A."
- * @return True iff the text-align-last trait should be used as the
+ * @return True if and only if the text-align-last trait should be used as the
* alignment for this LineArea.
*/
public boolean textAlignLastApplies() {
@@ -966,7 +966,7 @@
* @param isLastItemOnLine Indicates whether this will be the last item on
* the line.
* @param context An object that knows how to resolve FO context issues.
- * @return True iff a text area should be created for the text item.
+ * @return True if and only if a text area should be created for the text item.
*/
static boolean shouldCreateTextArea(final CharacterSequence foText,
final Area4a parentArea, final int startOffset, final int sizeInChars,
@@ -1137,7 +1137,7 @@
/**
* Indicates whether this line-area has a half-leading on both its before
* and after edges.
- * @return True iff this line-area has space on either side of it.
+ * @return True if and only if this line-area has space on either side of it.
*/
private boolean hasSurroundingSpace() {
final LineStackingStrategy lineStackingStrategy
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageRa.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageRa.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageRa.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -690,7 +690,7 @@
* This "sufficient number" of pages is currently thought to be one
* non-blank page.</li>
* </ul>
- * @return True iff this page is ready to be released for rendering.
+ * @return True if and only if this page is ready to be released for rendering.
*/
public boolean isReleasable() {
if (this.firstUnresolvedRefId() != null) {
@@ -727,7 +727,7 @@
/**
* Indicates whether this page is a blank page or not.
- * @return True iff this page is blank.
+ * @return True if and only if this page is blank.
*/
public boolean isBlank() {
for (RegionRaBody body : this.bodies.values()) {
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/SpanRa.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/SpanRa.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/SpanRa.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -126,7 +126,7 @@
/**
* Indicates whether this span area has been balanced.
- * @return True iff this span area has been balanced.
+ * @return True if and only if this span area has been balanced.
*/
public boolean isBalanced() {
return this.isBalanced;
@@ -172,7 +172,7 @@
/**
* Indicates whether the current column is the last column in this
* span area.
- * @return True iff the current column is the last column in this span area.
+ * @return True if and only if the current column is the last column in this span area.
*/
public boolean isLastColumn() {
return this.currentColumn == traitColumnCount();
@@ -272,7 +272,7 @@
/**
* Indicates whether a new line can be added to a given block area.
* @param blockArea The block area to be tested.
- * @return True iff there is enough room to add a new line to {@code blockArea}.
+ * @return True if and only if there is enough room to add a new line to {@code blockArea}.
*/
public boolean canAddLineArea(final NormalBlockArea4a blockArea) {
for (int i = 0; i < getChildren().size(); i++) {
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRa.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRa.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRa.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -466,7 +466,7 @@
* Indicates whether a given background area actually has a background that
* should be painted.
* @param backgroundArea The background area to be tested.
- * @return True iff {@code backgroundArea} actually has a background.
+ * @return True if and only if {@code backgroundArea} actually has a background.
*/
private boolean hasBackground(final BackgroundArea backgroundArea) {
if (backgroundArea.getGraphic() != null) {
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -513,7 +513,7 @@
/**
* Indicates whether word-spacing should be applied to a given character.
* @param c The character to be tested.
- * @return True iff word-spacing should be added for this character.
+ * @return True if and only if word-spacing should be added for this character.
*/
private boolean wordSpacingApplies(final int c) {
switch (c) {
@@ -546,7 +546,7 @@
/**
* Indicates whether this text-area ends with a linefeed.
- * @return True iff this text-area ends with a linefeed.
+ * @return True if and only if this text-area ends with a linefeed.
*/
public boolean endsWithLinefeed() {
final CharSequence rawText = this.getRawText();
@@ -632,7 +632,7 @@
/**
* Indicates whether this text area has faux small caps.
- * @return True iff this character sequence has faux small caps.
+ * @return True if and only if this character sequence has faux small caps.
*/
private boolean hasFauxSmallCaps() {
return this.charSequence.hasFauxSmallCaps();
@@ -899,7 +899,7 @@
/**
* Indicates whether this character sequence has faux small caps.
- * @return True iff this character sequence has faux small caps.
+ * @return True if and only if this character sequence has faux small caps.
*/
public boolean hasFauxSmallCaps() {
return this.hasFauxSmallCaps;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/ByteSequenceSearcher.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/ByteSequenceSearcher.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/ByteSequenceSearcher.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -381,7 +381,7 @@
/**
* Indicates whether the input is valid.
- * @return True iff the input is valid.
+ * @return True if and only if the input is valid.
* @throws IOException For I/O error.
*/
private boolean isInputValid() throws IOException {
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/Environment.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/Environment.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/Environment.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -55,7 +55,7 @@
* Some environments that are not headless, i.e. that support a mouse,
* keyboard, and display, are nevertheless not graphical. A Unix/Linux
* terminal is a good example.
- * @return True iff a local graphical environment can be created.
+ * @return True if and only if a local graphical environment can be created.
*/
public static boolean isGraphicalEnvironment() {
GraphicsEnvironment ge = null;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/primitive/StringUtils.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/primitive/StringUtils.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/primitive/StringUtils.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -66,7 +66,7 @@
* Reports whether an input character is a valid hexadecimal character.
* Valid hex characters are 0-9, A-F, and a-f.
* @param input The character to be tested.
- * @return True iff the character is a valid hexadecimal character.
+ * @return True if and only if the character is a valid hexadecimal character.
*/
public static boolean isASCIIHex(final int input) {
// "0" thru "9"
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/primitive/UnicodeCharUtils.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/primitive/UnicodeCharUtils.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/primitive/UnicodeCharUtils.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -120,7 +120,7 @@
* "Printable" for this purpose is defined as a code point that would
* require a glyph.
* @param codePoint The Unicode code point to be tested.
- * @return True iff the given code point is printable.
+ * @return True if and only if the given code point is printable.
*/
public static boolean isPrintable(final int codePoint) {
if (! Character.isValidCodePoint(codePoint)) {
@@ -154,7 +154,7 @@
* that is, a string in the form "U+nnnn" where "nnnn" represents a string
* of 1 to 5 hex characters (0-9, a-z, A-Z).
* @param unparsed The unparsed String to be tested.
- * @return True iff {@code unparsed} is a valid Unicode value String.
+ * @return True if and only if {@code unparsed} is a valid Unicode value String.
*/
public static boolean isValidUnparsedCodePoint(final String unparsed) {
if (unparsed == null) {
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/primitive/XmlCharacterUtils.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/primitive/XmlCharacterUtils.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/primitive/XmlCharacterUtils.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -421,7 +421,7 @@
* @param charArray The class of chars to in which {@code c} will be
* sought.
* @param c The char being tested.
- * @return True iff {@code c} is in class {@code charArray}.
+ * @return True if and only if {@code c} is in class {@code charArray}.
*/
private static boolean isInClass(final char[] charArray, final char c) {
for (int i = 0; i < charArray.length; i += 2) {
@@ -436,7 +436,7 @@
* Indicates whether a given char is a "base" character as defined in the
* XML specification.
* @param c The char to be tested.
- * @return True iff {@code c} is a "base" character.
+ * @return True if and only if {@code c} is a "base" character.
*/
public static boolean isBaseChar(final char c) {
return isInClass(XmlCharacterUtils.BASE_CHAR, c);
@@ -446,7 +446,7 @@
* Indicates whether a given char is an "ideographic" character as defined
* in the XML specification.
* @param c The char to be tested.
- * @return True iff {@code c} is an "ideographic" character.
+ * @return True if and only if {@code c} is an "ideographic" character.
*/
public static boolean isIdeographic(final char c) {
return isInClass(XmlCharacterUtils.IDEOGRAPHIC, c);
@@ -456,7 +456,7 @@
* Indicates whether a given char is a "combining" character as defined in
* the XML specification.
* @param c The char to be tested.
- * @return True iff {@code c} is a "combining" character.
+ * @return True if and only if {@code c} is a "combining" character.
*/
public static boolean isCombiningChar(final char c) {
return isInClass(XmlCharacterUtils.COMBINING_CHAR, c);
@@ -466,7 +466,7 @@
* Indicates whether a given char is a "digit" character as defined in the
* XML specification.
* @param c The char to be tested.
- * @return True iff {@code c} is a "digit" character.
+ * @return True if and only if {@code c} is a "digit" character.
*/
public static boolean isDigit(final char c) {
return isInClass(XmlCharacterUtils.DIGIT, c);
@@ -476,7 +476,7 @@
* Indicates whether a given char is an "extender" character as defined in
* the XML specification.
* @param c The char to be tested.
- * @return True iff {@code c} is an "extender" character.
+ * @return True if and only if {@code c} is an "extender" character.
*/
public static boolean isExtender(final char c) {
return isInClass(XmlCharacterUtils.EXTENDER, c);
@@ -486,7 +486,7 @@
* Indicates whether a given char is a "letter" character as defined in the
* XML specification.
* @param c The char to be tested.
- * @return True iff {@code c} is a "letter" character.
+ * @return True if and only if {@code c} is a "letter" character.
*/
public static boolean isLetter(final char c) {
if (isBaseChar(c)) {
@@ -501,7 +501,7 @@
/**
* Indicates whether a given char can be the first character of an XML NAME.
* @param c The char to be tested.
- * @return True iff {@code c} is a valid character with which to start
+ * @return True if and only if {@code c} is a valid character with which to start
* an XML "NAME".
* @see "http://www.w3.org/TR/REC-xml-names/#NT-NCName"
*/
@@ -518,7 +518,7 @@
/**
* Indicates whether a given char can be part of an XML NAME.
* @param c The char to be tested.
- * @return True iff {@code c} is a valid XML NAME character.
+ * @return True if and only if {@code c} is a valid XML NAME character.
* @see "http://www.w3.org/TR/REC-xml-names/#NT-NCNameChar"
*/
private static boolean isNameChar(final char c) {
@@ -551,7 +551,7 @@
* The definition of XML whitespace is obtained from the XML 1.0
* Recommendation, Section 2.3.
* @param c The character to be tested.
- * @return True iff the character is XML whitespace.
+ * @return True if and only if the character is XML whitespace.
*/
public static boolean isXMLWhitespace(final char c) {
switch (c) {
@@ -572,7 +572,7 @@
* The definition of XML whitespace is obtained from the XML 1.0
* Recommendation, Section 2.3.
* @param chars The sequence of character to be tested.
- * @return True iff every character in {@code chars} is XML whitespace.
+ * @return True if and only if every character in {@code chars} is XML whitespace.
*/
public static boolean isXMLWhitespace(final char[] chars) {
if (chars == null) {
@@ -590,7 +590,7 @@
/**
* Indicates whether the argument is a valid NAME as defined by XML.
* @param input The String to check.
- * @return True iff {@code input} is a valid XML NAME.
+ * @return True if and only if {@code input} is a valid XML NAME.
* @see <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">The NCName definition for XML</a>
*/
public static boolean isNCName(final String input) {
@@ -615,7 +615,7 @@
* Indicates whether the input is one of the five predefined XML entity
* references.
* @param c The char to be tested.
- * @return True iff {@code c} is a predefined XML entity reference.
+ * @return True if and only if {@code c} is a predefined XML entity reference.
*/
public static boolean isEntityReference(final char c) {
switch (c) {
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/ps/PsColor.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/ps/PsColor.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/ps/PsColor.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -47,7 +47,7 @@
* Convert a Color to PostScript.
* @param color The AWT color instance that should be expressed in
* PostScript.
- * @param fillNotStroke Set to true iff the color should be used for the
+ * @param fillNotStroke Set to true if and only if the color should be used for the
* fill but not for the stroke.
* @return The PostScript code that represents this color.
*/
@@ -70,7 +70,7 @@
* Convert an RGB Color to PostScript.
* @param color The AWT color instance that should be expressed in
* PostScript.
- * @param fillNotStroke Set to true iff the color should be used for the
+ * @param fillNotStroke Set to true if and only if the color should be used for the
* fill but not for the stroke.
* @return The PostScript code that represents this color.
*/
@@ -115,7 +115,7 @@
* Convert a CMYK Color to PostScript.
* @param color The AWT color instance that should be expressed in
* PostScript.
- * @param fillNotStroke Set to true iff the color should be used for the
+ * @param fillNotStroke Set to true if and only if the color should be used for the
* fill but not for the stroke.
* @return The PostScript code that represents this color.
*/
@@ -150,7 +150,7 @@
* Convert a DeviceGray Color to PostScript.
* @param color The AWT color instance that should be expressed in
* PostScript.
- * @param fillNotStroke Set to true iff the color should be used for the
+ * @param fillNotStroke Set to true if and only if the color should be used for the
* fill but not for the stroke.
* @return The PostScript code that represents this color.
*/
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/url/FactoryProtocolRegistration.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/url/FactoryProtocolRegistration.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/url/FactoryProtocolRegistration.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -85,7 +85,7 @@
/**
* Indicates whether the factory protocol registration is usable.
- * @return True iff The factory protocal registration is usable.
+ * @return True if and only if The factory protocal registration is usable.
*/
public boolean isValid() {
return ForayUrlStreamHandlerFactory.getURLStreamHandlerFactory()
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/url/UrlFactory.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/url/UrlFactory.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/url/UrlFactory.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -228,7 +228,7 @@
* This method is derived from the {@link URL} method with the same
* signature.
* @param protocol The String to be tested for validity.
- * @return True iff the protocol is valid.
+ * @return True if and only if the protocol is valid.
*/
public static boolean isValidProtocol(final String protocol) {
final int len = protocol.length();
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/url/UrlUtil.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/url/UrlUtil.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/url/UrlUtil.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -231,7 +231,7 @@
/**
* Indicates whether a given URL references a directory.
* @param url The URL to be tested.
- * @return True iff {@code url} references a directory.
+ * @return True if and only if {@code url} references a directory.
*/
public static boolean isDirectory(final URL url) {
final String path = url.getPath().trim();
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/url/classpath/Handler.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/url/classpath/Handler.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/url/classpath/Handler.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -55,7 +55,7 @@
/** The hard-coded name of this protocol. */
private static final String PROTOCOL = "classpath";
- /** True iff this protocol has already been registered. */
+ /** True if and only if this protocol has already been registered. */
private static boolean alreadyRegistered = false;
@Override
Modified: trunk/foray/foray-core/src/main/java/org/foray/core/ForayException.java
===================================================================
--- trunk/foray/foray-core/src/main/java/org/foray/core/ForayException.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-core/src/main/java/org/foray/core/ForayException.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -117,7 +117,7 @@
/**
* Indicates whether a context message exists for this exception.
- * @return True iff this exception has a context message.
+ * @return True if and only if this exception has a context message.
*/
public boolean isContextSet() {
return this.contextMessage != null;
Modified: trunk/foray/foray-core/src/main/java/org/foray/core/SessionConfig.java
===================================================================
--- trunk/foray/foray-core/src/main/java/org/foray/core/SessionConfig.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-core/src/main/java/org/foray/core/SessionConfig.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -367,7 +367,7 @@
/**
* Indicates whether the "mode" is "render".
- * @return True iff the "mode" is "render".
+ * @return True if and only if the "mode" is "render".
*/
public boolean isModeRender() {
return getStringValue("mode").equals("render");
@@ -375,7 +375,7 @@
/**
* Indicates whether the "mode" is "validate".
- * @return True iff the "mode" is "validate".
+ * @return True if and only if the "mode" is "validate".
*/
public boolean isModeValidate() {
return getStringValue("mode").equals("validate");
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ConsumerFont4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ConsumerFont4a.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ConsumerFont4a.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -127,7 +127,7 @@
/**
* Indicates whether this font is being subsetted.
- * @return True iff this font is being subsetted.
+ * @return True if and only if this font is being subsetted.
*/
public boolean subSetting() {
return this.subset != null;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -293,7 +293,7 @@
* Reports on the availability of a glyph in this font, without regard to
* encoding issues.
* @param c The Unicode code point to be tested.
- * @return True iff this font can paint a glyph for <em>c</em>.
+ * @return True if and only if this font can paint a glyph for <em>c</em>.
*/
public abstract boolean glyphAvailable(int c);
@@ -516,7 +516,7 @@
/**
* Indicates whether this font has the ability to map Unicode characters to font glyphs.
- * @return True iff this font can map Unicode characters to font glyphs.
+ * @return True if and only if this font can map Unicode characters to font glyphs.
*/
public abstract boolean supportsUnicode();
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -187,7 +187,7 @@
/**
* Indicates whether this consumer can use free-standing fonts or not.
- * @return True iff this consumer can use free-standing fonts.
+ * @return True if and only if this consumer can use free-standing fonts.
*/
public boolean isUsingFreeStandingFonts() {
return this.usesFreeStandingFonts;
@@ -195,7 +195,7 @@
/**
* Indicates whether this consumer can use system fonts or not.
- * @return True iff this consumer can use system fonts.
+ * @return True if and only if this consumer can use system fonts.
*/
public boolean isUsingSystemFonts() {
return this.usesSystemFonts;
@@ -203,7 +203,7 @@
/**
* Indicates whether free-standing fonts are preferred over system fonts.
- * @return True iff free-standing fonts are preferred over system fonts.
+ * @return True if and only if free-standing fonts are preferred over system fonts.
*/
public boolean preferFreeStandingFonts() {
return this.prefersFreeStandingFonts;
@@ -585,7 +585,7 @@
/**
* Tests a given encoding latitude for validity.
* @param encodingLatitude The encoding latitude to be tested.
- * @return True iff the encoding latitude is valid.
+ * @return True if and only if the encoding latitude is valid.
*/
private boolean validEncodingLatitude(final int encodingLatitude) {
for (int i = 0; i < FontConsumer4a.VALID_ENCODING_LATITUDES.length;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -941,7 +941,7 @@
* Indicates whether a given String has been registered as a font-family
* alias.
* @param alias The alias which is being tested.
- * @return True iff this alias is already registered.
+ * @return True if and only if this alias is already registered.
*/
public boolean isRegisteredFontFamilyAlias(final String alias) {
final String familyName = this.getFontFamilyForAlias(alias);
@@ -965,7 +965,7 @@
* @param systemName The "system-name" for the font.
* @param fontFile The font file for the font.
* @param metricsFile The metric file for the font.
- * @return True iff the font has the barest necessities to be usable by this
+ * @return True if and only if the font has the barest necessities to be usable by this
* font server.
*/
private boolean isUsableFont(final String systemName, final Object fontFile,
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontUse4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontUse4a.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontUse4a.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -442,7 +442,7 @@
/**
* Indicates whether this font use is being subsetted.
- * @return True iff this font is being subsetted.
+ * @return True if and only if this font is being subsetted.
*/
public boolean subSetting() {
return this.getSubset() != null;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FreeStandingFont.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FreeStandingFont.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FreeStandingFont.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -415,7 +415,7 @@
/**
* Indicates whether the font allows embedding.
- * @return True iff the font allows embedding.
+ * @return True if and only if the font allows embedding.
*/
public boolean allowsEmbedding() {
return this.allowsEmbedding;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/Subset.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/Subset.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/Subset.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -215,7 +215,7 @@
/**
* Indicates whether a given glyph is in this subset.
* @param originalGlyphIndex The original (full font) glyph index that is being checked.
- * @return True iff originalGlyphIndex exists in this subset.
+ * @return True if and only if originalGlyphIndex exists in this subset.
*/
public boolean glyphUsed(final int originalGlyphIndex) {
final int index = this.originalByOriginal.binarySearch(originalGlyphIndex);
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/config/FontConfigParser.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/config/FontConfigParser.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/config/FontConfigParser.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -279,7 +279,7 @@
* @param key The parameter key.
* @param value The parameter value.
* @param fromEnvironment The from-environment value.
- * @return True iff the parameter is valid.
+ * @return True if and only if the parameter is valid.
*/
private boolean validParameter(final String key, final String value,
final String fromEnvironment) {
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFont.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFont.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFont.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -455,7 +455,7 @@
/**
* Indicates whether a FreeStandingFont manifestation of this registered
* font exists.
- * @return True iff a FreeStandingFont manifestation of this registered
+ * @return True if and only if a FreeStandingFont manifestation of this registered
* font exists.
*/
public boolean hasFreeStandingFont() {
@@ -477,7 +477,7 @@
/**
* Indicates whether a SystemFont manifestation of this registered font
* exists.
- * @return True iff a SystemFont manifestation of this registered font
+ * @return True if and only if a SystemFont manifestation of this registered font
* exists.
*/
public boolean hasSystemFont() {
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontFamilyMember.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontFamilyMember.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontFamilyMember.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -501,7 +501,7 @@
* considered to be a characteristic.
* @param otherDesc A RegisteredFontDesc instance which should be compared
* to this one.
- * @return True iff otherDesc has the same set of characteristics as this.
+ * @return True if and only if otherDesc has the same set of characteristics as this.
*/
public boolean equivalent(final RegisteredFontFamilyMember otherDesc) {
return matchPerfect(otherDesc.getRegisteredFontFamily(),
@@ -522,7 +522,7 @@
* considered to be a characteristic.
* @param otherDesc A RegisteredFontDesc instance which should be compared
* to this one.
- * @return True iff otherDesc has the same set of characteristics as this,
+ * @return True if and only if otherDesc has the same set of characteristics as this,
* but without regard to font-weight.
* In other words, if all other characteristics are equal, true will be
* returned, regardless of whether font-weight is equal or not.
@@ -542,7 +542,7 @@
* @param inputDesiredStyle The style to match.
* @param considerSimulated Indicates whether simulated features should be
* considered in the test.
- * @return True iff the style of this font description matches the criteria.
+ * @return True if and only if the style of this font description matches the criteria.
*/
public boolean styleMatches(final Font.Style inputDesiredStyle,
final boolean considerSimulated) {
@@ -594,7 +594,7 @@
* @param desiredVariant The variant to match.
* @param considerSimulated Indicates whether simulated features should be
* considered in the test.
- * @return True iff the style of this font description matches the criteria.
+ * @return True if and only if the style of this font description matches the criteria.
*/
public boolean variantMatches(final Font.Variant desiredVariant,
final boolean considerSimulated) {
@@ -620,7 +620,7 @@
* @param desiredStretch The stretch to match.
* @param considerSimulated Indicates whether simulated features should be
* considered in the test.
- * @return True iff the style of this font description matches the criteria.
+ * @return True if and only if the style of this font description matches the criteria.
*/
public boolean stretchMatches(final Font.Stretch desiredStretch,
final boolean considerSimulated) {
@@ -647,7 +647,7 @@
/**
* Indicates whether this font description matches a given weight.
* @param desiredWeight The weight to match.
- * @return True iff the style of this font description matches the criteria.
+ * @return True if and only if the style of this font description matches the criteria.
*/
public boolean weightMatches(final Font.Weight desiredWeight) {
if (desiredWeight == Font.Weight.ANY) {
@@ -674,7 +674,7 @@
* considered in this selection.
* @param systemFonts Indicates whether system fonts can be consdidered in
* this selection.
- * @return True iff this font descriptions perfectly matches all of the
+ * @return True if and only if this font descriptions perfectly matches all of the
* selection criteria.
*/
public boolean matchPerfect(final RegisteredFontFamily family,
@@ -708,7 +708,7 @@
* considered in this selection.
* @param systemFonts Indicates whether system fonts can be consdidered in
* this selection.
- * @return True iff this font descriptions perfectly matches all of the
+ * @return True if and only if this font descriptions perfectly matches all of the
* selection criteria.
*/
public boolean matchIgnoreWeight(final RegisteredFontFamily family,
@@ -737,10 +737,10 @@
/**
* Determines whether this registered font can return a Font instance that
* matches the general type requested.
- * @param freeStandingFonts True iff the returned font can be a
+ * @param freeStandingFonts True if and only if the returned font can be a
* FreeStandingFont.
- * @param systemFonts True iff the returned font can be a SystemFont.
- * @return True iff this registered font is able to return a Font instance
+ * @param systemFonts True if and only if the returned font can be a SystemFont.
+ * @return True if and only if this registered font is able to return a Font instance
* that matches the needs described by freeStandingFonts and systemFonts.
*/
public boolean generalTypeMatches(final boolean freeStandingFonts,
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/format/Kerning.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/format/Kerning.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/format/Kerning.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -174,7 +174,7 @@
/**
* Indicates whether there is any kerning information.
- * @return True iff this has no kerning information at all.
+ * @return True if and only if this has no kerning information at all.
*/
public boolean isEmpty() {
return this.length < 1;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TrueTypeFont.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TrueTypeFont.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TrueTypeFont.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -705,7 +705,7 @@
/**
* Indicates whether this font grants permission for it to be embedded.
- * @return True iff this font can be embedded in documents.
+ * @return True if and only if this font can be embedded in documents.
*/
public boolean isEmbeddable() {
if (this.os2Table == null) {
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TtfOffsetTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TtfOffsetTable.java 2021-12-13 00:12:54 UTC (rev 12211)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TtfOffsetTable.java 2021-12-13 01:11:21 UTC (rev 12212)
@@ -117,7 +117,7 @@
/**
* Indicates whether the font has been created.
- * @return True iff the {@link TrueTypeFont} instance has been instantiated.
+ * @return True if and only if the {@link TrueTypeFont} instance has been instantiated.
*/
public boolean ttfFontCreated() {
return this.ttfFont != null;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TtfTableGlyf.java
===================================================================
--- trunk/foray/foray-font/s...
[truncated message content] |
|
From: <vic...@us...> - 2021-12-13 00:12:57
|
Revision: 12211
http://sourceforge.net/p/foray/code/12211
Author: victormote
Date: 2021-12-13 00:12:54 +0000 (Mon, 13 Dec 2021)
Log Message:
-----------
Clean up relationships between the various content model methods.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageMaster.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractTablePart.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BasicLink4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BidiOverride4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTitle4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTree4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Declarations4a.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/obj/Float4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Flow4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowAssignment4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowMap4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowSourceList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowTargetList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FolioPrefix4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FolioSuffix4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FootnoteBody4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexKeyReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationListSeparator4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationRangeSeparator4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageNumberPrefix4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageNumberSuffix4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InitialPropertySet4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Inline4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/LayoutMasterSet4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItem4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemBody4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemLabel4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Marker4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiCase4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiProperties4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiPropertySet4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiSwitch4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiToggle4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceMaster4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceWrapper4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Region4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionNameSpecifier4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveTableMarker4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Root4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ScalingValueCitation4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/StaticContent4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Table4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableAndCaption4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableCaption4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableCell4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableColumn4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableRow4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Title4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Wrapper4a.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -3000,6 +3000,7 @@
/**
* Indicates whether this object is <em>always</em> (%block;) content.
* @return True if and only if this object is always (%block;) content.
+ * @see "XSL-FO 1.0, Section 6.2."
* @see "XSL-FO 1.1, Section 6.2"
*/
public boolean isAlwaysBlockContent() {
@@ -3009,6 +3010,7 @@
/**
* Indicates whether this object is <em>always</em> (%inline;) content.
* @return True if and only if this object is always (%inline;) content.
+ * @see "XSL-FO 1.0, Section 6.2."
* @see "XSL-FO 1.1, Section 6.2"
*/
public boolean isAlwaysInlineContent() {
@@ -3020,6 +3022,8 @@
* (%block;), or (%inline;) content.
* @return True if and only if this object is a normal flow object that be used as #PCDATA, (%block;), or (%inline;)
* content.
+ * @see "XSL-FO 1.0, Section 6.2."
+ * @see "XSL-FO 1.1, Section 6.2"
*/
public boolean isNeutralContainer() {
return false;
@@ -3030,6 +3034,7 @@
* content, with some limitations.
* @return True if and only if this object is an out-of-line object that can be treated as #PCDATA, (%block;), or
* (%inline;) content.
+ * @see "XSL-FO 1.0, Section 6.2."
* @see "XSL-FO 1.1, Section 6.2"
*/
public boolean isOutOfLineAnyContent() {
@@ -3041,7 +3046,8 @@
* with some limitations.
* @return True if and only if this object is an out-of-line object that can be treated as #PCDATA or (%inline;)
* content.
- * @see "XSL-FO 1.1, Section 6.2"
+ * @see "XSL-FO 1.0, Section 6.2."
+ * @see "XSL-FO 1.1, Section 6.2."
*/
public boolean isOutOfLineInlineContent() {
return false;
@@ -3048,27 +3054,55 @@
}
/**
- * Reports whether the object fits the #PCDATA content type in XSL-FO Std 1.0, Section 6.2.
+ * Indicates whether this object fits the #PCDATA content type.
* This includes objects such as the neutral containers that can be used where #PCDATA can.
* @return Returns true iff the object fits the #PCDATA content model.
+ * @see "XSL-FO 1.0, Section 6.2."
+ * @see "XSL-FO 1.1, Section 6.2."
*/
- public abstract boolean isContentPcdata();
+ public abstract boolean isPcdataContent();
/**
- * Reports whether the object fits the %block parameter entity described in XSL-FO Std 1.0, Section 6.2.
+ * Indicates whether this object is a "point" object, which is valid anywhere as a descendant of fo:flow or
+ * fo:static-content.
+ * @return Returns true iff the object is a "point" object.
+ * @see "XSL-FO 1.0, Section 6.2."
+ * @see "XSL-FO 1.1, Section 6.2."
+ */
+ public boolean isPointObject() {
+ return false;
+ }
+
+ /**
+ * Indicates whether this object can in any case be (%block;) content. described in
* This includes not just the %block definition, but also all other objects, such as the neutral containers that can
* be used where %block can.
- * @return Returns true iff the object fits the %block content model.
+ * @return Returns true iff the object fits the (%block;) content model.
+ * @see "XSL-FO 1.0, Section 6.2."
+ * @see "XSL-FO 1.1, Section 6.2."
*/
- public abstract boolean isContentBlock();
+ public boolean canBeBlockContent() {
+ return isAlwaysBlockContent()
+ || isNeutralContainer()
+ || isOutOfLineAnyContent()
+ || isPointObject();
+ }
/**
- * Reports whether the object fits the %inline parameter entity described in XSL-FO Std 1.0, Section 6.2.
+ * Indicates whether the object fits the %inline parameter entity described in XSL-FO Std 1.0, Section 6.2.
* This includes not just the %inline definition, but also all other objects, such as the neutral containers that
* can be used where %inline can.
* @return Returns true iff the object fits the %inline content model.
+ * @see "XSL-FO 1.0, Section 6.2."
+ * @see "XSL-FO 1.1, Section 6.2."
*/
- public abstract boolean isContentInline();
+ public boolean canBeInlineContent() {
+ return isAlwaysInlineContent()
+ || isNeutralContainer()
+ || isOutOfLineAnyContent()
+ || isOutOfLineInlineContent()
+ || isPointObject();
+ }
/**
* Indicates whether the object's content model includes (%block;).
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -281,21 +281,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
return this.getParent().getPrimaryFont(context);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -206,21 +206,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
return this.getParent().getPrimaryFont(context);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -776,17 +776,7 @@
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentInline() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
+ public boolean isPcdataContent() {
return true;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -111,7 +111,7 @@
this.children.add((AbstractCharacterSequence) fobj);
return;
}
- if (! fobj.isContentInline()) {
+ if (! fobj.canBeInlineContent()) {
fobj.throwException("Child of " + this.getFullName() + " must be #PCDATA or %inline.");
}
if (fobj instanceof PageNumber4a
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageMaster.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageMaster.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageMaster.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -97,21 +97,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -109,21 +109,11 @@
}
@Override
- public boolean isContentInline() {
- return true;
- }
-
- @Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public FoLineNonText getContextWrapper(final FoContext context) {
return new org.foray.fotree.FoLineNonText(this, context);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractTablePart.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractTablePart.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractTablePart.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -247,21 +247,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BasicLink4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BasicLink4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BasicLink4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -106,11 +106,6 @@
}
@Override
- public boolean isContentInline() {
- return true;
- }
-
- @Override
public Namespace getNamespace() {
return this.getFoTree().getFONamespace();
}
@@ -126,16 +121,11 @@
}
@Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
return this.getParent().getPrimaryFont(context);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BidiOverride4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BidiOverride4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BidiOverride4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -99,11 +99,6 @@
}
@Override
- public boolean isContentInline() {
- return true;
- }
-
- @Override
public <T> T acceptProxyFactory(final ProxyFactory<T> factory) {
return factory.makeProxy(this);
}
@@ -114,16 +109,11 @@
}
@Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
if (this.resolvedFont == null) {
this.resolvedFont = resolvePrimaryFont(context);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -108,11 +108,6 @@
}
@Override
- public boolean isContentBlock() {
- return true;
- }
-
- @Override
public <T> T acceptProxyFactory(final ProxyFactory<T> factory) {
return factory.makeProxy(this);
}
@@ -123,16 +118,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
if (this.resolvedFont == null) {
this.resolvedFont = resolvePrimaryFont(context);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -112,11 +112,6 @@
}
@Override
- public boolean isContentBlock() {
- return true;
- }
-
- @Override
public <T> T acceptProxyFactory(final ProxyFactory<T> factory) {
return factory.makeProxy(this);
}
@@ -137,16 +132,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -113,8 +113,8 @@
@Override
public void addChild(final FoObj fobj) throws FoTreeException {
- if (fobj.isContentInline()
- || fobj.isContentPcdata()) {
+ if (fobj.canBeInlineContent()
+ || fobj.isPcdataContent()) {
if (! fobj.hasDescendantBlocks()) {
this.children.add(fobj);
return;
@@ -135,21 +135,16 @@
}
@Override
- public boolean isContentBlock() {
+ public boolean isAlwaysBlockContent() {
return true;
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public String getName() {
return "block-discrete-(pseudo)";
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -177,21 +177,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTitle4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTitle4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTitle4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -173,21 +173,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
return this.getParent().getPrimaryFont(context);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTree4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTree4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTree4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -131,21 +131,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -118,21 +118,16 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPointObject() {
return true;
}
@Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
return true;
}
@Override
- public boolean isContentPcdata() {
- return true;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -118,21 +118,16 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPointObject() {
return true;
}
@Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
return true;
}
@Override
- public boolean isContentPcdata() {
- return true;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -119,11 +119,6 @@
}
@Override
- public boolean isContentInline() {
- return true;
- }
-
- @Override
public CharSequence getAreaTreeText(final FoContext context) {
final CharacterSequence4a text =
(CharacterSequence4a) this.getChildren().get(0);
@@ -152,16 +147,12 @@
}
@Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
+ /* This looks wrong, because the object is text content. However, the content model is empty. */
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -118,21 +118,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -270,21 +270,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Declarations4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Declarations4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Declarations4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -189,21 +189,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
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-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -115,11 +115,6 @@
}
@Override
- public boolean isContentInline() {
- return true;
- }
-
- @Override
public Graphic getGraphic(final FoContext context) {
if (this.graphic == null
&& ! this.makeGraphicAttempted) {
@@ -243,16 +238,11 @@
}
@Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
return this.getParent().getPrimaryFont(context);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Float4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Float4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Float4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -100,21 +100,11 @@
}
@Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
return true;
}
@Override
- public boolean isContentInline() {
- return true;
- }
-
- @Override
- public boolean isContentPcdata() {
- return true;
- }
-
- @Override
public <T> T acceptProxyFactory(final ProxyFactory<T> factory) {
return factory.makeProxy(this);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Flow4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Flow4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Flow4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -83,7 +83,7 @@
/* Cast to FoObj should be OK, because it is not possible to create
* an FOText item whose parent is anything but an FoObjMixed. */
final FoObj child = getChildren().get(i);
- if (child.isContentBlock()) {
+ if (child.canBeBlockContent()) {
anyBlockContent = true;
continue;
}
@@ -125,21 +125,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public List<String> regionBodies() {
final FlowMap4a flowMap = this.getParent().getFlowMap();
final String flowName = this.traitFlowName();
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowAssignment4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowAssignment4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowAssignment4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -160,21 +160,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowMap4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowMap4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowMap4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -126,20 +126,10 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
- @Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
/**
* Returns the target list that should be used by a given flow-name.
* @param flowName The name of the flow for which the target list is needed.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -117,21 +117,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowSourceList4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowSourceList4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowSourceList4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -127,20 +127,10 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
- @Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
/**
* Indicates whether this flow-source-list contains a flow-name-specifier
* whose flow-name-reference property is equal to a given value.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowTargetList4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowTargetList4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowTargetList4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -127,20 +127,10 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
- @Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
/**
* Returns the "region-name-reference" property of each child
* region-name-specifier in a list.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FolioPrefix4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FolioPrefix4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FolioPrefix4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -54,21 +54,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public String getContentAsText() {
return this.getDescendantText();
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FolioSuffix4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FolioSuffix4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FolioSuffix4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -54,21 +54,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public String getContentAsText() {
return this.getDescendantText();
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -110,16 +110,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return true;
}
@Override
- public boolean isContentPcdata() {
- return true;
- }
-
- @Override
public org.axsl.fo.fo.Inline getInline() {
/* Cast and index are guaranteed in the end() method. */
return (Inline4a) this.getChildren().get(0);
@@ -152,11 +147,6 @@
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FootnoteBody4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FootnoteBody4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FootnoteBody4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -121,21 +121,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexKeyReference4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexKeyReference4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexKeyReference4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -123,21 +123,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -123,21 +123,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationListSeparator4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationListSeparator4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationListSeparator4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -55,21 +55,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public boolean canHaveMarkerChildren() {
return false;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationRangeSeparator4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationRangeSeparator4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationRangeSeparator4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -55,21 +55,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public boolean canHaveMarkerChildren() {
return false;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageNumberPrefix4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageNumberPrefix4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageNumberPrefix4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -54,21 +54,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public boolean canHaveMarkerChildren() {
return false;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageNumberSuffix4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageNumberSuffix4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageNumberSuffix4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -54,21 +54,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public boolean canHaveMarkerChildren() {
return false;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -123,21 +123,11 @@
}
@Override
- public boolean isContentInline() {
- return true;
- }
-
- @Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -122,21 +122,11 @@
}
@Override
- public boolean isContentInline() {
- return true;
- }
-
- @Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InitialPropertySet4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InitialPropertySet4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InitialPropertySet4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -124,21 +124,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Inline4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Inline4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Inline4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -96,11 +96,6 @@
}
@Override
- public boolean isContentInline() {
- return true;
- }
-
- @Override
public <T> T acceptProxyFactory(final ProxyFactory<T> factory) {
return factory.makeProxy(this);
}
@@ -111,16 +106,11 @@
}
@Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
if (this.resolvedFont == null) {
this.resolvedFont = resolvePrimaryFont(context);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -101,11 +101,6 @@
}
@Override
- public boolean isContentInline() {
- return true;
- }
-
- @Override
public boolean traitIsReferenceArea() {
// See XSL-FO Standard, Section 5.6
return true;
@@ -132,16 +127,11 @@
}
@Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -105,11 +105,6 @@
}
@Override
- public boolean isContentInline() {
- return true;
- }
-
- @Override
public org.axsl.fo.FoForeignXml getForeignXml() {
/* Existence is verified in validateDescendants(). */
return getChildren().get(0);
@@ -205,16 +200,11 @@
}
@Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
return this.getParent().getPrimaryFont(context);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/LayoutMasterSet4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/LayoutMasterSet4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/LayoutMasterSet4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -327,20 +327,10 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
- @Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
/**
* Returns the implicit flow-map.
* @return The implicit flow-map.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -105,11 +105,6 @@
}
@Override
- public boolean isContentInline() {
- return true;
- }
-
- @Override
public FoLineNonText getContextWrapper(final FoContext context) {
return new org.foray.fotree.FoLineNonText(this, context);
}
@@ -193,16 +188,11 @@
}
@Override
- public boolean isContentBlock() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
if (this.resolvedFont == null) {
this.resolvedFont = resolvePrimaryFont(context);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -105,11 +105,6 @@
}
@Override
- public boolean isContentBlock() {
- return true;
- }
-
- @Override
public void end() throws FoTreeException {
return;
}
@@ -135,16 +130,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItem4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItem4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItem4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -150,21 +150,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemBody4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemBody4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemBody4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -132,21 +132,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemLabel4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemLabel4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemLabel4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -132,21 +132,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Marker4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Marker4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Marker4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -151,21 +151,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
return this.getParent().getPrimaryFont(context);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiCase4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiCase4a.java 2021-12-12 23:27:39 UTC (rev 12210)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiCase4a.java 2021-12-13 00:12:54 UTC (rev 12211)
@@ -122,21 +122,11 @@
}
@Override
- public boolean isContentInline() {
+ public boolean isPcdataContent() {
return false;
}
@Override
- public boolean isContentBlock() {
- return false;
- }
-
- @Override
- public boolean isContentPcdata() {
- return false;
- }
-
- @Override
public PropertyList getPropertyList() {
return this.propertyList;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiProperties4a.java
======================================================...
[truncated message content] |
|
From: <vic...@us...> - 2021-12-12 23:27:42
|
Revision: 12210
http://sourceforge.net/p/foray/code/12210
Author: victormote
Date: 2021-12-12 23:27:39 +0000 (Sun, 12 Dec 2021)
Log Message:
-----------
Conform to aXSL change: Remove content-model interfaces.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BasicLink4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BidiOverride4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.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/obj/Float4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Inline4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiProperties4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiSwitch4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiToggle4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumber4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberCitation4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberCitationLast4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ScalingValueCitation4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Table4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableAndCaption4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Wrapper4a.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -119,7 +119,6 @@
import org.axsl.common.value.WhiteSpaceTreatment;
import org.axsl.common.value.WrapOption;
import org.axsl.fo.Fo;
-import org.axsl.fo.FoContentModelBlockOnly;
import org.axsl.fo.FoContext;
import org.axsl.fo.FoInlineContext;
import org.axsl.fo.FoTreeException;
@@ -2999,6 +2998,63 @@
}
/**
+ * Indicates whether this object is <em>always</em> (%block;) content.
+ * @return True if and only if this object is always (%block;) content.
+ * @see "XSL-FO 1.1, Section 6.2"
+ */
+ public boolean isAlwaysBlockContent() {
+ return false;
+ }
+
+ /**
+ * Indicates whether this object is <em>always</em> (%inline;) content.
+ * @return True if and only if this object is always (%inline;) content.
+ * @see "XSL-FO 1.1, Section 6.2"
+ */
+ public boolean isAlwaysInlineContent() {
+ return false;
+ }
+
+ /**
+ * Indicates whether this object is a "neutral" container that can be used, subject to limitations, as #PCDATA,
+ * (%block;), or (%inline;) content.
+ * @return True if and only if this object is a normal flow object that be used as #PCDATA, (%block;), or (%inline;)
+ * content.
+ */
+ public boolean isNeutralContainer() {
+ return false;
+ }
+
+ /**
+ * Indicates whether this object is an out-of-line object that can be treated as #PCDATA, (%block;), or (%inline;)
+ * content, with some limitations.
+ * @return True if and only if this object is an out-of-line object that can be treated as #PCDATA, (%block;), or
+ * (%inline;) content.
+ * @see "XSL-FO 1.1, Section 6.2"
+ */
+ public boolean isOutOfLineAnyContent() {
+ return false;
+ }
+
+ /**
+ * Indicates whether this object is an out-of-line object that can be treated as #PCDATA or (%inline;) content,
+ * with some limitations.
+ * @return True if and only if this object is an out-of-line object that can be treated as #PCDATA or (%inline;)
+ * content.
+ * @see "XSL-FO 1.1, Section 6.2"
+ */
+ public boolean isOutOfLineInlineContent() {
+ return false;
+ }
+
+ /**
+ * Reports whether the object fits the #PCDATA content type in XSL-FO Std 1.0, Section 6.2.
+ * This includes objects such as the neutral containers that can be used where #PCDATA can.
+ * @return Returns true iff the object fits the #PCDATA content model.
+ */
+ public abstract boolean isContentPcdata();
+
+ /**
* Reports whether the object fits the %block parameter entity described in XSL-FO Std 1.0, Section 6.2.
* This includes not just the %block definition, but also all other objects, such as the neutral containers that can
* be used where %block can.
@@ -3015,13 +3071,6 @@
public abstract boolean isContentInline();
/**
- * Reports whether the object fits the #PCDATA content type in XSL-FO Std 1.0, Section 6.2.
- * This includes objects such as the neutral containers that can be used where #PCDATA can.
- * @return Returns true iff the object fits the #PCDATA content model.
- */
- public abstract boolean isContentPcdata();
-
- /**
* Indicates whether the object's content model includes (%block;).
* @return True if and only if this object is allowed to have children of type (%block;).
* A "true" value does <em>not</em> indicate whether this object <em>actually contains</em> any (%block;) elements,
@@ -3582,7 +3631,7 @@
public boolean hasDescendantBlocks() {
for (int index = 0; index < formattingObjectCount(); index ++) {
final FoObj foobj = this.formattingObjectAt(index);
- if (foobj instanceof FoContentModelBlockOnly) {
+ if (foobj.isAlwaysBlockContent()) {
return true;
} else if (foobj.hasDescendantBlocks()) {
return true;
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -260,4 +260,14 @@
return false;
}
+ @Override
+ public boolean isAlwaysBlockContent() {
+ return false;
+ }
+
+ @Override
+ public boolean isOutOfLineAnyContent() {
+ return false;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -33,7 +33,6 @@
import org.foray.fotree.Namespace;
import org.foray.fotree.PropertyList;
-import org.axsl.fo.FoContentModelInlineOnly;
import org.axsl.fo.FoContext;
import org.axsl.fo.FoTreeException;
import org.axsl.fo.ProxyFactory;
@@ -110,16 +109,16 @@
@Override
public void addChild(final FoObj fobj) throws FoTreeException {
- if (fobj instanceof AbstractCharacterSequence) {
- this.children.add(fobj);
- return;
+ if (fobj instanceof AbstractCharacterSequence) {
+ this.children.add(fobj);
+ return;
+ }
+ if (fobj.isAlwaysInlineContent()) {
+ this.children.add(fobj);
+ return;
+ }
+ throwExceptionContentModelViolation();
}
- if (fobj instanceof FoContentModelInlineOnly) {
- this.children.add(fobj);
- return;
- }
- throwExceptionContentModelViolation();
- }
@Override
public org.axsl.font.FontUse getPrimaryFont(final FoContext context) {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BasicLink4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BasicLink4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BasicLink4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -168,4 +168,9 @@
return true;
}
+ @Override
+ public boolean isAlwaysInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BidiOverride4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BidiOverride4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BidiOverride4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -161,4 +161,9 @@
return true;
}
+ @Override
+ public boolean isAlwaysInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -173,6 +173,11 @@
return true;
}
+ @Override
+ public boolean isAlwaysBlockContent() {
+ return true;
+ }
+
// @Override
// public void addChild(final FoObj fobj) throws FoTreeException {
// if (fobj instanceof FoContentModelBlockOnly) {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -186,4 +186,9 @@
return true;
}
+ @Override
+ public boolean isAlwaysBlockContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -46,7 +46,7 @@
/**
* A container for only text and inline items.
* This is a pass-thru pseudo-element that is always a child of a {@link FoContainerComplex} and that has no
- * {@link org.axsl.fo.FoContentModelBlock} descendants.
+ * (%block;) descendants.
* In other words, it is content that can be laid out as a discrete paragraph, uninterrupted by other blocks.
*/
public class BlockDiscrete4a extends FoContainerInline implements BlockDiscrete {
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-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -287,4 +287,9 @@
return false;
}
+ @Override
+ public boolean isAlwaysInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Float4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Float4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Float4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -174,4 +174,14 @@
return true;
}
+ @Override
+ public boolean isAlwaysBlockContent() {
+ return false;
+ }
+
+ @Override
+ public boolean isOutOfLineAnyContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -196,4 +196,9 @@
return false;
}
+ @Override
+ public boolean isOutOfLineInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -177,4 +177,9 @@
return false;
}
+ @Override
+ public boolean isAlwaysInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -177,4 +177,9 @@
return false;
}
+ @Override
+ public boolean isNeutralContainer() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -176,4 +176,9 @@
return false;
}
+ @Override
+ public boolean isNeutralContainer() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Inline4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Inline4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Inline4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -161,4 +161,9 @@
return true;
}
+ @Override
+ public boolean isAlwaysInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -181,4 +181,9 @@
return true;
}
+ @Override
+ public boolean isAlwaysInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -249,4 +249,9 @@
return false;
}
+ @Override
+ public boolean isAlwaysInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -253,4 +253,9 @@
return false;
}
+ @Override
+ public boolean isAlwaysInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -184,4 +184,9 @@
return false;
}
+ @Override
+ public boolean isAlwaysBlockContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiProperties4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiProperties4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiProperties4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -175,4 +175,9 @@
return false;
}
+ @Override
+ public boolean isNeutralContainer() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiSwitch4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiSwitch4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiSwitch4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -175,4 +175,9 @@
return false;
}
+ @Override
+ public boolean isNeutralContainer() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiToggle4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiToggle4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiToggle4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -176,4 +176,9 @@
return true;
}
+ @Override
+ public boolean isAlwaysInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumber4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumber4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumber4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -116,4 +116,9 @@
return false;
}
+ @Override
+ public boolean isAlwaysInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberCitation4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberCitation4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberCitation4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -117,4 +117,9 @@
return false;
}
+ @Override
+ public boolean isAlwaysInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberCitationLast4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberCitationLast4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberCitationLast4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -117,4 +117,9 @@
return false;
}
+ @Override
+ public boolean isAlwaysInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -230,4 +230,9 @@
return false;
}
+ @Override
+ public boolean isNeutralContainer() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ScalingValueCitation4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ScalingValueCitation4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ScalingValueCitation4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -154,4 +154,9 @@
return false;
}
+ @Override
+ public boolean isAlwaysInlineContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Table4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Table4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Table4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -428,4 +428,9 @@
return false;
}
+ @Override
+ public boolean isAlwaysBlockContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableAndCaption4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableAndCaption4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableAndCaption4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -175,4 +175,9 @@
return false;
}
+ @Override
+ public boolean isAlwaysBlockContent() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Wrapper4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Wrapper4a.java 2021-12-11 16:37:04 UTC (rev 12209)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Wrapper4a.java 2021-12-12 23:27:39 UTC (rev 12210)
@@ -170,4 +170,9 @@
return true;
}
+ @Override
+ public boolean isNeutralContainer() {
+ return true;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-11 16:37:08
|
Revision: 12209
http://sourceforge.net/p/foray/code/12209
Author: victormote
Date: 2021-12-11 16:37:04 +0000 (Sat, 11 Dec 2021)
Log Message:
-----------
Style changes only.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2021-12-11 14:20:06 UTC (rev 12208)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2021-12-11 16:37:04 UTC (rev 12209)
@@ -84,6 +84,7 @@
import org.foray.fotree.fo.prop.PdBreakBefore;
import org.foray.fotree.fo.prop.PdCaptionSide;
import org.foray.fotree.fo.prop.PdCaseTitle;
+import org.foray.fotree.fo.prop.PdCharacter;
import org.foray.fotree.fo.prop.PdClear;
import org.foray.fotree.fo.prop.PdClip;
import org.foray.fotree.fo.prop.PdColor;
@@ -104,6 +105,7 @@
import org.foray.fotree.fo.prop.PdEndsRow;
import org.foray.fotree.fo.prop.PdExtent;
import org.foray.fotree.fo.prop.PdExternalDestination;
+import org.foray.fotree.fo.prop.PdFloat;
import org.foray.fotree.fo.prop.PdFlowMapName;
import org.foray.fotree.fo.prop.PdFlowMapReference;
import org.foray.fotree.fo.prop.PdFlowNameReference;
@@ -240,6 +242,7 @@
import org.axsl.common.value.ShadowEffect;
import org.axsl.fo.FoContext;
import org.axsl.fo.FoInlineContext;
+import org.axsl.font.Font;
import org.axsl.graphic.Graphic;
import java.awt.Shape;
@@ -285,13 +288,12 @@
* @param property The property to be added.
*/
public void addProperty(final FoObj fobj, final Property property) {
- final Property existingProperty = getProperty(
- property.getPropertyType());
+ final Property existingProperty = getProperty(property.getPropertyType());
/*
* Check to see if a property of this type is already in the collection.
- * If so, and if they are the same object, then all that has happened
- * is that a compound property has been updated. If they are not the
- * same object, then the user has specified the same property twice.
+ * If so, and if they are the same object, then all that has happened is that a compound property has been
+ * updated.
+ * If they are not the same object, then the user has specified the same property twice.
*/
if (existingProperty != null && property != existingProperty) {
fobj.getLogger().error("Property "
@@ -304,12 +306,10 @@
/**
* Returns the named Property from this PropertyList, if any.
* This is very raw. No conversions or intelligent work is done.
- * The user of this method needs to handle the situation where the property
- * is not found, and to do something useful with the property.
- * @param propertyType The integral identifier of the property that is
- * sought.
- * @return The Property instance matching propertyName, or null if none is
- * found.
+ * The user of this method needs to handle the situation where the property is not found, and to do something useful
+ * with the property.
+ * @param propertyType The integral identifier of the property that is sought.
+ * @return The Property instance matching propertyName, or null if none is found.
*/
public Property getProperty(final PropertyType propertyType) {
for (int i = 0; i < this.properties.size(); i++) {
@@ -324,14 +324,11 @@
/**
* Returns the text decoration property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The text decoration property.
*/
- public DtTextDeco getTextDecoration(final FoObj fobj,
- final FoContext context) {
- final PdTextDecoration property = (PdTextDecoration) getProperty(
- FoProperty.TEXT_DECORATION);
+ public DtTextDeco getTextDecoration(final FoObj fobj, final FoContext context) {
+ final PdTextDecoration property = (PdTextDecoration) getProperty(FoProperty.TEXT_DECORATION);
if (property == null) {
return PdTextDecoration.getValueNoInstance(context, fobj);
}
@@ -341,8 +338,7 @@
/**
* See XSL-FO 1.0, Section 5.5.6.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return True iff this should be underlined.
*/
public boolean getUnderlineScore(final FoObj fobj, final FoContext context) {
@@ -356,8 +352,7 @@
/**
* See XSL-FO 1.0, Section 5.5.6.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return True iff this should be overlined.
*/
public boolean getOverlineScore(final FoObj fobj, final FoContext context) {
@@ -371,10 +366,8 @@
/**
* See XSL-FO 1.0, Section 5.5.6.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @return True iff this should be through-scored (i.e. a line drawn
- * through, as if it were crossed out).
+ * @param context An object that knows how to resolve FO Tree context issues.
+ * @return True iff this should be through-scored (i.e. a line drawn through, as if it were crossed out).
*/
public boolean getThroughScore(final FoObj fobj, final FoContext context) {
final DtTextDeco textDecoration = getTextDecoration(fobj, context);
@@ -387,10 +380,8 @@
/**
* See XSL-FO 1.0, Section 5.5.6.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @return True iff this should be through-scored (i.e. a line drawn
- * through, as if it were crossed out).
+ * @param context An object that knows how to resolve FO Tree context issues.
+ * @return True iff this should blink.
*/
public boolean getBlink(final FoObj fobj, final FoContext context) {
final DtTextDeco textDecoration = getTextDecoration(fobj, context);
@@ -403,18 +394,13 @@
/**
* Common logic for retrieving margin values.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @param absoluteDirection One of WritingModeDT.DIRECTION_TOP,
- * WritingModeDT.DIRECTION_BOTTOM, WritingModeDT.DIRECTION_LEFT,
- * WritingModeDT.DIRECTION_RIGHT.
+ * @param context An object that knows how to resolve FO Tree context issues.
+ * @param absoluteDirection The absolute direction for which the margin value is needed.
* @return The margin value, in millipoints.
*/
- public int getAbsoluteMargin(final FoObj fobj, final FoContext context,
- final AbsoluteCompass absoluteDirection) {
+ public int getAbsoluteMargin(final FoObj fobj, final FoContext context, final AbsoluteCompass absoluteDirection) {
// Try the specific property first (e.g. "margin-top")
- final FoProperty propertyType = AbstractMargin.rawPropertyType(
- absoluteDirection);
+ final FoProperty propertyType = AbstractMargin.rawPropertyType(absoluteDirection);
AbstractMargin property = (AbstractMargin) getProperty(propertyType);
if (property != null) {
return property.getValue(context, fobj);
@@ -429,24 +415,18 @@
}
/**
- * Determines whether a corresponding margin property exists for a
- * relative direction.
+ * Determines whether a corresponding margin property exists for a relative direction.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @param relativeDirection The relative Direction to be tested, one of
- * WritingModeDT.DIRECTION_BEFORE, WritingModeDT.DIRECTION_AFTER,
- * WritingModeDT.DIRECTION_LEFT, or WritingModeDT.DIRECTION_RIGHT.
+ * @param context An object that knows how to resolve FO Tree context issues.
+ * @param relativeDirection The relative Direction to be tested.
* @return True if the property (or a shorthand) exists, false otherwise.
*/
- private boolean correspondingMarginExists(final FoObj fobj,
- final FoContext context, final RelativeCompass relativeDirection) {
+ private boolean correspondingMarginExists(final FoObj fobj, final FoContext context,
+ final RelativeCompass relativeDirection) {
final AbsoluteCompass absoluteDirection = getWritingMode(fobj, context)
.getAbsoluteDirection(relativeDirection);
- final FoProperty propertyType = AbstractMargin.rawPropertyType(
- absoluteDirection);
- AbstractMargin marginProperty = (AbstractMargin) getProperty(
- propertyType);
+ final FoProperty propertyType = AbstractMargin.rawPropertyType(absoluteDirection);
+ AbstractMargin marginProperty = (AbstractMargin) getProperty(propertyType);
if (marginProperty != null) {
return true;
}
@@ -460,8 +440,7 @@
/**
* Returns the top margin property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The top margin property.
*/
public int getMarginTop(final FoObj fobj, final FoContext context) {
@@ -471,8 +450,7 @@
/**
* Returns the bottom margin property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The bottom margin property.
*/
public int getMarginBottom(final FoObj fobj, final FoContext context) {
@@ -482,8 +460,7 @@
/**
* Returns the left margin property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The left margin property.
*/
public int getMarginLeft(final FoObj fobj, final FoContext context) {
@@ -493,8 +470,7 @@
/**
* Returns the right margin property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The right margin property.
*/
public int getMarginRight(final FoObj fobj, final FoContext context) {
@@ -504,8 +480,7 @@
/**
* Returns the color property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The color property.
*/
public java.awt.Color getColor(final FoObj fobj, final FoContext context) {
@@ -519,34 +494,23 @@
/**
* Returns the wrap-option property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The wrap-option property.
*/
public FoValue getWrapOption(final FoObj fobj, final FoContext context) {
- final PdWrapOption property = (PdWrapOption) getProperty(
- FoProperty.WRAP_OPTION);
+ final PdWrapOption property = (PdWrapOption) getProperty(FoProperty.WRAP_OPTION);
if (property != null) {
return property.getValue(context, fobj);
}
// Try the shorthand
- final PdWhiteSpace whiteSpace = (PdWhiteSpace) getProperty(
- FoProperty.WHITE_SPACE);
+ final PdWhiteSpace whiteSpace = (PdWhiteSpace) getProperty(FoProperty.WHITE_SPACE);
if (whiteSpace != null) {
switch (whiteSpace.getValue(context, fobj)) {
- case NORMAL: {
- return FoValue.WRAP;
+ case NORMAL: return FoValue.WRAP;
+ case PRE: return FoValue.NO_WRAP;
+ case NOWRAP: return FoValue.NO_WRAP;
+ default: break;
}
- case PRE: {
- return FoValue.NO_WRAP;
- }
- case NOWRAP: {
- return FoValue.NO_WRAP;
- }
- default: {
- break;
- }
- }
}
return PdWrapOption.getValueNoInstance(context, fobj);
}
@@ -554,36 +518,23 @@
/**
* Returns the whitespace-collapse property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The whitespace-collapse property.
*/
- public boolean getWhiteSpaceCollapse(final FoObj fobj,
- final FoContext context) {
- final PdWhiteSpaceCollapse property =
- (PdWhiteSpaceCollapse) getProperty(
- FoProperty.WHITE_SPACE_COLLAPSE);
+ public boolean getWhiteSpaceCollapse(final FoObj fobj, final FoContext context) {
+ final PdWhiteSpaceCollapse property = (PdWhiteSpaceCollapse) getProperty(FoProperty.WHITE_SPACE_COLLAPSE);
if (property != null) {
return property.getValue(context, fobj);
}
// Try the shorthand
- final PdWhiteSpace enumProperty = (PdWhiteSpace) getProperty(
- FoProperty.WHITE_SPACE);
+ final PdWhiteSpace enumProperty = (PdWhiteSpace) getProperty(FoProperty.WHITE_SPACE);
if (enumProperty != null) {
switch (enumProperty.getValue(context, fobj)) {
- case NORMAL: {
- return true;
+ case NORMAL: return true;
+ case PRE: return false;
+ case NOWRAP: return true;
+ default: break;
}
- case PRE: {
- return false;
- }
- case NOWRAP: {
- return true;
- }
- default: {
- break;
- }
- }
}
return PdWhiteSpaceCollapse.getValueNoInstance(context, fobj);
}
@@ -591,14 +542,11 @@
/**
* Returns the writing-mode property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The writing-mode property.
*/
- public DtWritingMode getWritingMode(final FoObj fobj,
- final FoContext context) {
- final PdWritingMode property = (PdWritingMode) getProperty(
- FoProperty.WRITING_MODE);
+ public DtWritingMode getWritingMode(final FoObj fobj, final FoContext context) {
+ final PdWritingMode property = (PdWritingMode) getProperty(FoProperty.WRITING_MODE);
if (property == null) {
return PdWritingMode.getValueNoInstance(context, fobj);
}
@@ -635,9 +583,7 @@
* @return The external-destination property.
*/
public String getExternalDestination() {
- final PdExternalDestination property =
- (PdExternalDestination) getProperty(
- FoProperty.EXTERNAL_DESTINATION);
+ final PdExternalDestination property = (PdExternalDestination) getProperty(FoProperty.EXTERNAL_DESTINATION);
if (property != null) {
return property.getValue();
}
@@ -647,13 +593,11 @@
/**
* Returns the start-indent or end-indent value.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @param direction The direction for which the indent value is needed.
* @return The start-indent or end-indent value, in millipoints.
*/
- public int getIndent(final FoObj fobj, final FoContext context,
- final RelativeCompass direction) {
+ public int getIndent(final FoObj fobj, final FoContext context, final RelativeCompass direction) {
/* This algorithm is mostly documented at XSL-FO Recommendation 1.1,
* Section 5.3.2, but see also Sections 7.11.7 (start-indent property)
* and 7.11.8 (end-indent property). */
@@ -660,10 +604,8 @@
/* Find the corresponding absolute margin if it is specified. */
final FoProperty rawMarginPropertyType =
- AbstractIndent.rawAbsoluteCorrespondingPropertyType(
- fobj, context, direction);
- final AbstractMargin abstractMargin = (AbstractMargin)
- getProperty(rawMarginPropertyType);
+ AbstractIndent.rawAbsoluteCorrespondingPropertyType(fobj, context, direction);
+ final AbstractMargin abstractMargin = (AbstractMargin) getProperty(rawMarginPropertyType);
/* The intent of the algorithm seems to be that, if the absolute margin
* is set and the relative indent property is not, and if this FO
@@ -675,8 +617,7 @@
int indent = 0;
if (! fobj.traitIsReferenceArea()) {
/* Start with the inherited relative value. */
- indent += AbstractIndent.getValueNoInstance(context, fobj,
- direction);
+ indent += AbstractIndent.getValueNoInstance(context, fobj, direction);
}
indent += abstractMargin.getValue(context, fobj);
/* TODO: Do the padding and border-width values below actually
@@ -693,8 +634,7 @@
* indent value and return it. */
AbstractIndent indent = null;
- final FoProperty rawPropertyType = AbstractIndent.rawPropertyType(
- direction);
+ final FoProperty rawPropertyType = AbstractIndent.rawPropertyType(direction);
indent = (AbstractIndent) getProperty(rawPropertyType);
if (indent == null) {
return AbstractIndent.getValueNoInstance(context, fobj, direction);
@@ -705,8 +645,7 @@
/**
* Returns the span property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The span property.
*/
public FoValue getSpan(final FoObj fobj, final FoContext context) {
@@ -722,8 +661,7 @@
* @return The flow-name property.
*/
public String getFlowName() {
- final AbstractName property = (AbstractName) getProperty(
- FoProperty.FLOW_NAME);
+ final AbstractName property = (AbstractName) getProperty(FoProperty.FLOW_NAME);
if (property != null) {
return property.getValue();
}
@@ -735,8 +673,7 @@
* @return The marker-class-name property.
*/
public String getMarkerClassName() {
- final AbstractName property = (AbstractName) getProperty(
- FoProperty.MARKER_CLASS_NAME);
+ final AbstractName property = (AbstractName) getProperty(FoProperty.MARKER_CLASS_NAME);
if (property != null) {
return property.getValue();
}
@@ -748,8 +685,7 @@
* @return The retrieve-class-name property.
*/
public String getRetrieveClassName() {
- final AbstractName property = (AbstractName) getProperty(
- FoProperty.RETRIEVE_CLASS_NAME);
+ final AbstractName property = (AbstractName) getProperty(FoProperty.RETRIEVE_CLASS_NAME);
if (property != null) {
return property.getValue();
}
@@ -761,8 +697,7 @@
* @return The retrieve-position property.
*/
public FoValue getRetrievePosition() {
- final PdRetrievePosition property = (PdRetrievePosition) getProperty(
- FoProperty.RETRIEVE_POSITION);
+ final PdRetrievePosition property = (PdRetrievePosition) getProperty(FoProperty.RETRIEVE_POSITION);
if (property != null) {
return property.getValue();
}
@@ -774,8 +709,7 @@
* @return Teh retrieve-boundary property.
*/
public FoValue getRetrieveBoundary() {
- final PdRetrieveBoundary property = (PdRetrieveBoundary) getProperty(
- FoProperty.RETRIEVE_BOUNDARY);
+ final PdRetrieveBoundary property = (PdRetrieveBoundary) getProperty(FoProperty.RETRIEVE_BOUNDARY);
if (property != null) {
return property.getValue();
}
@@ -785,13 +719,11 @@
/**
* Returns the column-number property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The column-number property.
*/
public int getColumnNumber(final FoObj fobj, final FoContext context) {
- final PdColumnNumber property = (PdColumnNumber) getProperty(
- FoProperty.COLUMN_NUMBER);
+ final PdColumnNumber property = (PdColumnNumber) getProperty(FoProperty.COLUMN_NUMBER);
if (property == null) {
return PdColumnNumber.getValueNoInstance(context, fobj);
}
@@ -827,13 +759,11 @@
/**
* Returns the border-collapse property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The border-collapse property.
*/
public FoValue getBorderCollapse(final FoObj fobj, final FoContext context) {
- final PdBorderCollapse property = (PdBorderCollapse) getProperty(
- FoProperty.BORDER_COLLAPSE);
+ final PdBorderCollapse property = (PdBorderCollapse) getProperty(FoProperty.BORDER_COLLAPSE);
if (property != null) {
return property.getValue(context, fobj);
}
@@ -843,13 +773,11 @@
/**
* Returns the display-align property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The display-align property.
*/
public FoValue getDisplayAlign(final FoObj fobj, final FoContext context) {
- final PdDisplayAlign property = (PdDisplayAlign) getProperty(
- FoProperty.DISPLAY_ALIGN);
+ final PdDisplayAlign property = (PdDisplayAlign) getProperty(FoProperty.DISPLAY_ALIGN);
if (property == null) {
return PdDisplayAlign.traitValueNoInstance();
}
@@ -859,13 +787,11 @@
/**
* Returns the relative-align property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The relative-align property.
*/
public FoValue getRelativeAlign(final FoObj fobj, final FoContext context) {
- final PdRelativeAlign property = (PdRelativeAlign) getProperty(
- FoProperty.RELATIVE_ALIGN);
+ final PdRelativeAlign property = (PdRelativeAlign) getProperty(FoProperty.RELATIVE_ALIGN);
if (property != null) {
return property.getValue(context, fobj);
}
@@ -875,49 +801,39 @@
/**
* Returns the border-separation (IPD) property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The border-separation (IPD) property.
*/
- public int getBorderSeparationIPD(final FoObj fobj,
- final FoContext context) {
+ public int getBorderSeparationIPD(final FoObj fobj, final FoContext context) {
PdBorderSeparation property = (PdBorderSeparation)
getProperty(FoProperty.BORDER_SEPARATION);
if (property == null) {
- final PdBorderSpacing borderSpacing = (PdBorderSpacing) getProperty(
- FoProperty.BORDER_SPACING);
+ final PdBorderSpacing borderSpacing = (PdBorderSpacing) getProperty(FoProperty.BORDER_SPACING);
property = borderSpacing.getBorderSeparation();
}
if (property != null) {
- return property.getValue(context, RelativeAxis.INLINE_PROGRESSION,
- fobj);
+ return property.getValue(context, RelativeAxis.INLINE_PROGRESSION, fobj);
}
- return PdBorderSeparation.getValueNoInstance(context,
- RelativeAxis.INLINE_PROGRESSION, fobj);
+ return PdBorderSeparation.getValueNoInstance(context, RelativeAxis.INLINE_PROGRESSION, fobj);
}
/**
* Returns the border-separation (BPD) property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The border-separation (BPD) property.
*/
- public int getBorderSeparationBPD(final FoObj fobj,
- final FoContext context) {
+ public int getBorderSeparationBPD(final FoObj fobj, final FoContext context) {
PdBorderSeparation property = (PdBorderSeparation)
getProperty(FoProperty.BORDER_SEPARATION);
if (property == null) {
- final PdBorderSpacing borderSpacing = (PdBorderSpacing) getProperty(
- FoProperty.BORDER_SPACING);
+ final PdBorderSpacing borderSpacing = (PdBorderSpacing) getProperty(FoProperty.BORDER_SPACING);
property = borderSpacing.getBorderSeparation();
}
if (property != null) {
- return property.getValue(context, RelativeAxis.BLOCK_PROGRESSION,
- fobj);
+ return property.getValue(context, RelativeAxis.BLOCK_PROGRESSION, fobj);
}
- return PdBorderSeparation.getValueNoInstance(context,
- RelativeAxis.BLOCK_PROGRESSION, fobj);
+ return PdBorderSeparation.getValueNoInstance(context, RelativeAxis.BLOCK_PROGRESSION, fobj);
}
/**
@@ -936,13 +852,11 @@
/**
* Returns the nominal em-width.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The <em>nominal</em> width.
*/
public int getColumnWidth(final FoObj fobj, final FoContext context) {
- final PdColumnWidth property = (PdColumnWidth) getProperty(
- FoProperty.COLUMN_WIDTH);
+ final PdColumnWidth property = (PdColumnWidth) getProperty(FoProperty.COLUMN_WIDTH);
if (property == null) {
return PdColumnWidth.getValueNoInstance();
}
@@ -954,8 +868,7 @@
* @return The column-width property.
*/
public double getColumnWidthTableUnits() {
- final PdColumnWidth property = (PdColumnWidth) getProperty(
- FoProperty.COLUMN_WIDTH);
+ final PdColumnWidth property = (PdColumnWidth) getProperty(FoProperty.COLUMN_WIDTH);
if (property == null) {
return PdColumnWidth.getValueNoInstance();
}
@@ -965,39 +878,24 @@
/**
* Returns the break-after property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The break-after property.
*/
public FoValue getBreakAfter(final FoObj fobj, final FoContext context) {
- final PdBreakAfter property = (PdBreakAfter) getProperty(
- FoProperty.BREAK_AFTER);
+ final PdBreakAfter property = (PdBreakAfter) getProperty(FoProperty.BREAK_AFTER);
if (property != null) {
return property.getValue(context, fobj);
}
- final PdPageBreakAfter pageBreakAfter = (PdPageBreakAfter) getProperty(
- FoProperty.PAGE_BREAK_AFTER);
+ final PdPageBreakAfter pageBreakAfter = (PdPageBreakAfter) getProperty(FoProperty.PAGE_BREAK_AFTER);
if (pageBreakAfter != null) {
switch(pageBreakAfter.getValue(context, fobj)) {
- case AUTO: {
- return FoValue.AUTO;
+ case AUTO: return FoValue.AUTO;
+ case ALWAYS: return FoValue.PAGE;
+ case AVOID: return FoValue.AUTO;
+ case LEFT: return FoValue.EVEN_PAGE;
+ case RIGHT: return FoValue.ODD_PAGE;
+ default: break;
}
- case ALWAYS: {
- return FoValue.PAGE;
- }
- case AVOID: {
- return FoValue.AUTO;
- }
- case LEFT: {
- return FoValue.EVEN_PAGE;
- }
- case RIGHT: {
- return FoValue.ODD_PAGE;
- }
- default: {
- break;
- }
- }
}
return PdBreakAfter.getValueNoInstance();
}
@@ -1005,34 +903,22 @@
/**
* Returns the keep-together property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @param subProperty The keep type of the property to be returned.
* @return The keep-together property.
*/
- public int getKeepTogether(final FoObj fobj, final FoContext context,
- final AbstractKeep.Type subProperty) {
- final AbstractKeep property = (AbstractKeep) getProperty(
- FoProperty.KEEP_TOGETHER);
+ public int getKeepTogether(final FoObj fobj, final FoContext context, final AbstractKeep.Type subProperty) {
+ final AbstractKeep property = (AbstractKeep) getProperty(FoProperty.KEEP_TOGETHER);
if (property == null) {
- return AbstractKeep.getValueNoInstance(context,
- FoProperty.KEEP_TOGETHER,
- subProperty, fobj);
+ return AbstractKeep.getValueNoInstance(context, FoProperty.KEEP_TOGETHER, subProperty, fobj);
}
- final PdPageBreakInside enumProperty = (PdPageBreakInside) getProperty(
- FoProperty.PAGE_BREAK_INSIDE);
+ final PdPageBreakInside enumProperty = (PdPageBreakInside) getProperty(FoProperty.PAGE_BREAK_INSIDE);
if (enumProperty != null) {
switch(enumProperty.getValue(context, fobj)) {
- case AUTO: {
- return Integer.MIN_VALUE;
+ case AUTO: return Integer.MIN_VALUE;
+ case AVOID: return Integer.MAX_VALUE;
+ default: break;
}
- case AVOID: {
- return Integer.MAX_VALUE;
- }
- default: {
- break;
- }
- }
}
return property.getValue(context, subProperty, fobj);
}
@@ -1040,12 +926,10 @@
/**
* Returns the keep-together.within-line property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The keep-together.within-line property.
*/
- public int traitKeepTogetherWithinLine(final FoObj fobj,
- final FoContext context) {
+ public int traitKeepTogetherWithinLine(final FoObj fobj, final FoContext context) {
return getKeepTogether(fobj, context, AbstractKeep.Type.WITHIN_LINE);
}
@@ -1052,12 +936,10 @@
/**
* Returns the keep-together.within-column property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The keep-together.within-column property.
*/
- public int traitKeepTogetherWithinColumn(final FoObj fobj,
- final FoContext context) {
+ public int traitKeepTogetherWithinColumn(final FoObj fobj, final FoContext context) {
return getKeepTogether(fobj, context, AbstractKeep.Type.WITHIN_COLUMN);
}
@@ -1064,12 +946,10 @@
/**
* Returns the keep-together.within-page property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The keep-together.within-page property.
*/
- public int traitKeepTogetherWithinPage(final FoObj fobj,
- final FoContext context) {
+ public int traitKeepTogetherWithinPage(final FoObj fobj, final FoContext context) {
return getKeepTogether(fobj, context, AbstractKeep.Type.WITHIN_PAGE);
}
@@ -1076,43 +956,25 @@
/**
* Returns the keep-with-next property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @param subProperty The keep type of the property to be returned.
* @return The keep-with-next property.
*/
- public int getKeepWithNext(final FoObj fobj, final FoContext context,
- final AbstractKeep.Type subProperty) {
- final AbstractKeep property = (AbstractKeep) getProperty(
- FoProperty.KEEP_WITH_NEXT);
+ public int getKeepWithNext(final FoObj fobj, final FoContext context, final AbstractKeep.Type subProperty) {
+ final AbstractKeep property = (AbstractKeep) getProperty(FoProperty.KEEP_WITH_NEXT);
if (property == null) {
- return AbstractKeep.getValueNoInstance(context,
- FoProperty.KEEP_WITH_NEXT,
- subProperty, fobj);
+ return AbstractKeep.getValueNoInstance(context, FoProperty.KEEP_WITH_NEXT, subProperty, fobj);
}
- final PdPageBreakAfter enumProperty = (PdPageBreakAfter) getProperty(
- FoProperty.PAGE_BREAK_AFTER);
+ final PdPageBreakAfter enumProperty = (PdPageBreakAfter) getProperty(FoProperty.PAGE_BREAK_AFTER);
if (enumProperty != null) {
switch(enumProperty.getValue(context, fobj)) {
- case AUTO: {
- return Integer.MIN_VALUE;
+ case AUTO: return Integer.MIN_VALUE;
+ case ALWAYS: return Integer.MIN_VALUE;
+ case AVOID: return Integer.MAX_VALUE;
+ case LEFT: return Integer.MIN_VALUE;
+ case RIGHT: return Integer.MIN_VALUE;
+ default: break;
}
- case ALWAYS: {
- return Integer.MIN_VALUE;
- }
- case AVOID: {
- return Integer.MAX_VALUE;
- }
- case LEFT: {
- return Integer.MIN_VALUE;
- }
- case RIGHT: {
- return Integer.MIN_VALUE;
- }
- default: {
- break;
- }
- }
}
return property.getValue(context, subProperty, fobj);
}
@@ -1120,12 +982,10 @@
/**
* Returns the keep-with-next.within-line property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The keep-with-next.within-line property.
*/
- public int traitKeepWithNextWithinLine(final FoObj fobj,
- final FoContext context) {
+ public int traitKeepWithNextWithinLine(final FoObj fobj, final FoContext context) {
return getKeepWithNext(fobj, context, AbstractKeep.Type.WITHIN_LINE);
}
@@ -1132,12 +992,10 @@
/**
* Returns the keep-with-next.within-column property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The keep-with-next.within-column property.
*/
- public int traitKeepWithNextWithinColumn(final FoObj fobj,
- final FoContext context) {
+ public int traitKeepWithNextWithinColumn(final FoObj fobj, final FoContext context) {
return getKeepWithNext(fobj, context, AbstractKeep.Type.WITHIN_COLUMN);
}
@@ -1144,12 +1002,10 @@
/**
* Returns the keep-with-next.within-page property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The keep-with-next.within-page property.
*/
- public int traitKeepWithNextWithinPage(final FoObj fobj,
- final FoContext context) {
+ public int traitKeepWithNextWithinPage(final FoObj fobj, final FoContext context) {
return getKeepWithNext(fobj, context, AbstractKeep.Type.WITHIN_PAGE);
}
@@ -1156,43 +1012,25 @@
/**
* Returns the keep-with-previous property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @param subProperty The keep type of the property to be returned.
* @return The keep-with-previous property.
*/
- public int getKeepWithPrevious(final FoObj fobj, final FoContext context,
- final AbstractKeep.Type subProperty) {
- final AbstractKeep property = (AbstractKeep) getProperty(
- FoProperty.KEEP_WITH_PREVIOUS);
+ public int getKeepWithPrevious(final FoObj fobj, final FoContext context, final AbstractKeep.Type subProperty) {
+ final AbstractKeep property = (AbstractKeep) getProperty(FoProperty.KEEP_WITH_PREVIOUS);
if (property == null) {
- return AbstractKeep.getValueNoInstance(context,
- FoProperty.KEEP_WITH_PREVIOUS,
- subProperty, fobj);
+ return AbstractKeep.getValueNoInstance(context, FoProperty.KEEP_WITH_PREVIOUS, subProperty, fobj);
}
- final PdPageBreakBefore enumProperty = (PdPageBreakBefore) getProperty(
- FoProperty.PAGE_BREAK_BEFORE);
+ final PdPageBreakBefore enumProperty = (PdPageBreakBefore) getProperty(FoProperty.PAGE_BREAK_BEFORE);
if (enumProperty != null) {
switch(enumProperty.getValue(context, fobj)) {
- case AUTO: {
- return Integer.MIN_VALUE;
+ case AUTO: return Integer.MIN_VALUE;
+ case ALWAYS: return Integer.MIN_VALUE;
+ case AVOID: return Integer.MAX_VALUE;
+ case LEFT: return Integer.MIN_VALUE;
+ case RIGHT: return Integer.MIN_VALUE;
+ default: break;
}
- case ALWAYS: {
- return Integer.MIN_VALUE;
- }
- case AVOID: {
- return Integer.MAX_VALUE;
- }
- case LEFT: {
- return Integer.MIN_VALUE;
- }
- case RIGHT: {
- return Integer.MIN_VALUE;
- }
- default: {
- break;
- }
- }
}
return property.getValue(context, subProperty, fobj);
}
@@ -1200,40 +1038,31 @@
/**
* Returns the keep-with-previous.within-line property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The keep-with-previous.within-line property.
*/
- public int traitKeepWithPreviousWithinLine(final FoObj fobj,
- final FoContext context) {
- return getKeepWithPrevious(fobj, context,
- AbstractKeep.Type.WITHIN_LINE);
+ public int traitKeepWithPreviousWithinLine(final FoObj fobj, final FoContext context) {
+ return getKeepWithPrevious(fobj, context, AbstractKeep.Type.WITHIN_LINE);
}
/**
* Returns the keep-with-previous.within-column property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The keep-with-previous.within-column property.
*/
- public int traitKeepWithPreviousWithinColumn(final FoObj fobj,
- final FoContext context) {
- return getKeepWithPrevious(fobj, context,
- AbstractKeep.Type.WITHIN_COLUMN);
+ public int traitKeepWithPreviousWithinColumn(final FoObj fobj, final FoContext context) {
+ return getKeepWithPrevious(fobj, context, AbstractKeep.Type.WITHIN_COLUMN);
}
/**
* Returns the keep-with-previous.within-page property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The keep-with-previous.within-page property.
*/
- public int traitKeepWithPreviousWithinPage(final FoObj fobj,
- final FoContext context) {
- return getKeepWithPrevious(fobj, context,
- AbstractKeep.Type.WITHIN_PAGE);
+ public int traitKeepWithPreviousWithinPage(final FoObj fobj, final FoContext context) {
+ return getKeepWithPrevious(fobj, context, AbstractKeep.Type.WITHIN_PAGE);
}
/**
@@ -1241,8 +1070,7 @@
* @return The master-reference property.
*/
public String getMasterReference() {
- final AbstractName property = (AbstractName) getProperty(
- FoProperty.MASTER_REFERENCE);
+ final AbstractName property = (AbstractName) getProperty(FoProperty.MASTER_REFERENCE);
if (property != null) {
return property.getValue();
}
@@ -1254,8 +1082,7 @@
* @return The page-position property.
*/
public FoValue getPagePosition() {
- final PdPagePosition property = (PdPagePosition) getProperty(
- FoProperty.PAGE_POSITION);
+ final PdPagePosition property = (PdPagePosition) getProperty(FoProperty.PAGE_POSITION);
if (property != null) {
return property.getValue();
}
@@ -1267,8 +1094,7 @@
* @return The odd-or-even property.
*/
public FoValue getOddOrEven() {
- final PdOddOrEven property = (PdOddOrEven) getProperty(
- FoProperty.ODD_OR_EVEN);
+ final PdOddOrEven property = (PdOddOrEven) getProperty(FoProperty.ODD_OR_EVEN);
if (property != null) {
return property.getValue();
}
@@ -1281,8 +1107,7 @@
* @return The blank-or-not-blank property.
*/
public FoValue getBlankOrNotBlank(final FoObj fobj) {
- final PdBlankOrNotBlank property = (PdBlankOrNotBlank) getProperty(
- FoProperty.BLANK_OR_NOT_BLANK);
+ final PdBlankOrNotBlank property = (PdBlankOrNotBlank) getProperty(FoProperty.BLANK_OR_NOT_BLANK);
if (property != null) {
return property.getValue(null, fobj);
}
@@ -1296,10 +1121,8 @@
* page-sequence.
* @return The initial-page-number property.
*/
- public int getInitialPageNumber(final FoObj fobj,
- final int lastPageNumberUsed) {
- final PdInitialPageNumber property = (PdInitialPageNumber) getProperty(
- FoProperty.INITIAL_PAGE_NUMBER);
+ public int getInitialPageNumber(final FoObj fobj, final int lastPageNumberUsed) {
+ final PdInitialPageNumber property = (PdInitialPageNumber) getProperty(FoProperty.INITIAL_PAGE_NUMBER);
if (property != null) {
/* Null context is OK here as this trait is not dependent on
* context. */
@@ -1315,9 +1138,7 @@
* @return The raw initial-page-number property.
*/
public FoValue getRawInitialPageNumber(final FoObj fobj) {
- final PdInitialPageNumber property =
- (PdInitialPageNumber) getProperty(
- FoProperty.INITIAL_PAGE_NUMBER);
+ final PdInitialPageNumber property = (PdInitialPageNumber) getProperty(FoProperty.INITIAL_PAGE_NUMBER);
if (property != null) {
return property.getRawValue(fobj);
}
@@ -1341,8 +1162,7 @@
* @return The grouping-separator property.
*/
public char getGroupingSeparator() {
- final PdGroupingSeparator property = (PdGroupingSeparator) getProperty(
- FoProperty.GROUPING_SEPARATOR);
+ final PdGroupingSeparator property = (PdGroupingSeparator) getProperty(FoProperty.GROUPING_SEPARATOR);
if (property != null) {
return property.getValue();
}
@@ -1354,8 +1174,7 @@
* @return The grouping-size property.
*/
public int getGroupingSize() {
- final PdGroupingSize property = (PdGroupingSize) getProperty(
- FoProperty.GROUPING_SIZE);
+ final PdGroupingSize property = (PdGroupingSize) getProperty(FoProperty.GROUPING_SIZE);
if (property != null) {
return property.getValue();
}
@@ -1367,8 +1186,7 @@
* @return The letter-value property.
*/
public FoValue getLetterValue() {
- final PdLetterValue property = (PdLetterValue) getProperty(
- FoProperty.LETTER_VALUE);
+ final PdLetterValue property = (PdLetterValue) getProperty(FoProperty.LETTER_VALUE);
if (property != null) {
return property.getValue();
}
@@ -1378,8 +1196,7 @@
/**
* Returns the force-page-count property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The force-page-count property.
*/
public FoValue getForcePageCount(final FoObj fobj, final FoContext context) {
@@ -1396,8 +1213,7 @@
* @return The master-name property.
*/
public String getMasterName() {
- final AbstractName property = (AbstractName) getProperty(
- FoProperty.MASTER_NAME);
+ final AbstractName property = (AbstractName) getProperty(FoProperty.MASTER_NAME);
if (property != null) {
return property.getValue();
}
@@ -1410,8 +1226,7 @@
* @return The region-name property.
*/
public String getRegionName(final FoObj fobj) {
- final PdRegionName property = (PdRegionName) getProperty(
- FoProperty.REGION_NAME);
+ final PdRegionName property = (PdRegionName) getProperty(FoProperty.REGION_NAME);
if (property != null) {
return property.getValue();
}
@@ -1427,8 +1242,7 @@
* @return The precedence property.
*/
public boolean getPrecedence(final FoObj fobj) {
- final PdPrecedence property = (PdPrecedence) getProperty(
- FoProperty.PRECEDENCE);
+ final PdPrecedence property = (PdPrecedence) getProperty(FoProperty.PRECEDENCE);
/* Null context is OK, because the object this applies to cannot be
* insider a marker. */
final FoContext context = null;
@@ -1454,13 +1268,11 @@
/**
* Returns the column-gap property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The column-gap property.
*/
public int getColumnGap(final FoObj fobj, final FoContext context) {
- final PdColumnGap property = (PdColumnGap) getProperty(
- FoProperty.COLUMN_GAP);
+ final PdColumnGap property = (PdColumnGap) getProperty(FoProperty.COLUMN_GAP);
if (property != null) {
return property.getValue(context, fobj);
}
@@ -1470,13 +1282,11 @@
/**
* Returns the overflow property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The overflow property.
*/
public FoValue getOverflow(final FoObj fobj, final FoContext context) {
- final PdOverflow property = (PdOverflow) getProperty(
- FoProperty.OVERFLOW);
+ final PdOverflow property = (PdOverflow) getProperty(FoProperty.OVERFLOW);
if (property != null) {
return property.getValue(context, fobj);
}
@@ -1486,13 +1296,11 @@
/**
* Returns the column-count property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The column-count property.
*/
public int getColumnCount(final FoObj fobj, final FoContext context) {
- final PdColumnCount property = (PdColumnCount) getProperty(
- FoProperty.COLUMN_COUNT);
+ final PdColumnCount property = (PdColumnCount) getProperty(FoProperty.COLUMN_COUNT);
if (property != null) {
int columnCount = property.getValue(context, fobj);
if ((columnCount > 1)
@@ -1529,8 +1337,7 @@
* @return The requested page-dimension.
*/
private int getPageDimension(final FoObj fobj, final AbsoluteAxis axis) {
- final FoProperty propertyType = AbstractPageDimension.rawPropertyType(
- axis);
+ final FoProperty propertyType = AbstractPageDimension.rawPropertyType(axis);
final AbstractPageDimension property = (AbstractPageDimension)
getProperty(propertyType);
if (property != null) {
@@ -1567,13 +1374,11 @@
/**
* Returns the text-align property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The text-align property.
*/
public FoValue getTextAlign(final FoObj fobj, final FoContext context) {
- final PdTextAlign property = (PdTextAlign) getProperty(
- FoProperty.TEXT_ALIGN);
+ final PdTextAlign property = (PdTextAlign) getProperty(FoProperty.TEXT_ALIGN);
if (property == null) {
return PdTextAlign.getValueNoInstance(context, fobj);
}
@@ -1585,8 +1390,7 @@
* @return The text-align String, or null if there is none.
*/
public String getTextAlignString() {
- final PdTextAlign property = (PdTextAlign) getProperty(
- FoProperty.TEXT_ALIGN);
+ final PdTextAlign property = (PdTextAlign) getProperty(FoProperty.TEXT_ALIGN);
if (property == null) {
return null;
}
@@ -1596,13 +1400,11 @@
/**
* Returns the text-align-last property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The text-align-last property.
*/
public FoValue getTextAlignLast(final FoObj fobj, final FoContext context) {
- final PdTextAlignLast property = (PdTextAlignLast) getProperty(
- FoProperty.TEXT_ALIGN_LAST);
+ final PdTextAlignLast property = (PdTextAlignLast) getProperty(FoProperty.TEXT_ALIGN_LAST);
if (property == null) {
return PdTextAlignLast.getValueNoInstance(context, fobj);
}
@@ -1610,21 +1412,16 @@
}
/**
- * This method is used to get the raw line height multiplier. The trait
- * line-height is returned as millipoints, but several of the values
- * that the line-height property can take are expressions of a multiplier
- * of the font-size for the object. This includes the keyword "normal",
- * a <em>number</em>, and a <em>percentage</em>.
+ * This method is used to get the raw line height multiplier.
+ * The trait line-height is returned as millipoints, but several of the values that the line-height property can
+ * take are expressions of a multiplier of the font-size for the object.
+ * This includes the keyword "normal", a <em>number</em>, and a <em>percentage</em>.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @return The line-height multiplier value, expressed as a float. For
- * example, if the line-height should be computed
+ * @param context An object that knows how to resolve FO Tree context issues.
+ * @return The line-height multiplier value, expressed as a float.
*/
- public float getLineHeightMultiplier(final FoObj fobj,
- final FoContext context) {
- PdLineHeight property = (PdLineHeight) getProperty(
- FoProperty.LINE_HEIGHT);
+ public float getLineHeightMultiplier(final FoObj fobj, final FoContext context) {
+ PdLineHeight property = (PdLineHeight) getProperty(FoProperty.LINE_HEIGHT);
if (property != null) {
return property.getValueMultiplier(context, fobj);
}
@@ -1640,15 +1437,12 @@
/**
* Returns the line-height.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @param rangeID One of MINIMUM, OPTIMUM, OR MAXIMUM.
* @return The line-height, in millipoints.
*/
- public int getLineHeight(final FoObj fobj, final FoContext context,
- final LengthRange rangeID) {
- PdLineHeight property = (PdLineHeight) getProperty(
- FoProperty.LINE_HEIGHT);
+ public int getLineHeight(final FoObj fobj, final FoContext context, final LengthRange rangeID) {
+ PdLineHeight property = (PdLineHeight) getProperty(FoProperty.LINE_HEIGHT);
if (property != null) {
return property.getValue(context, rangeID, fobj);
}
@@ -1664,14 +1458,11 @@
/**
* Returns the line-height.conditionality property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The line-height.conditionality property.
*/
- public Conditionality getLineHeightConditionality(final FoObj fobj,
- final FoContext context) {
- PdLineHeight property = (PdLineHeight) getProperty(
- FoProperty.LINE_HEIGHT);
+ public Conditionality getLineHeightConditionality(final FoObj fobj, final FoContext context) {
+ PdLineHeight property = (PdLineHeight) getProperty(FoProperty.LINE_HEIGHT);
if (property != null) {
return property.getConditionality(context, fobj);
}
@@ -1687,14 +1478,11 @@
/**
* Returns the line-height.precedence property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The line-height.precedence property.
*/
- public int getLineHeightPrecedence(final FoObj fobj,
- final FoContext context) {
- PdLineHeight property = (PdLineHeight) getProperty(
- FoProperty.LINE_HEIGHT);
+ public int getLineHeightPrecedence(final FoObj fobj, final FoContext context) {
+ PdLineHeight property = (PdLineHeight) getProperty(FoProperty.LINE_HEIGHT);
if (property != null) {
return property.getPrecedence(context, fobj);
}
@@ -1710,19 +1498,15 @@
/**
* Generic logic for computing the space-???.length property.
* @param fobj The FoObj to which the property belongs.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @param subProperty The length-range specifier.
- * @param relativePropertyEnum The enum for the relative property that
- * should be retrieved.
- * @param relativeDirection The enum for the relative direction that should
- * be retrieved (should correspond to {@code relativeProperty}.
+ * @param relativePropertyEnum The enum for the relative property that should be retrieved.
+ * @param relativeDirection The enum for the relative direction that should be retrieved (should correspond to
+ * {@code relativeProperty}.
* @return The space-???.length property.
*/
- private int getRelativeSpaceLength(final FoObj fobj, final FoContext context,
- final LengthRange subProperty,
- final FoProperty relativePropertyEnum,
- final RelativeCompass relativeDirection) {
+ private int getRelativeSpaceLength(final FoObj fobj, final FoContext context, final LengthRange subProperty,
+ final FoProperty relativePropertyEnum, final RelativeCompass relativeDirection) {
/* The priority here comes from XSL-FO 1.1, Section 5.3.1:
* 1) The absolute-direction property (margin-top, for example), if
* explicitly set.
@@ -1732,26 +1516,21 @@
/* First try the absolute-direction property. */
final DtWritingMode...
[truncated message content] |
|
From: <vic...@us...> - 2021-12-11 14:20:09
|
Revision: 12208
http://sourceforge.net/p/foray/code/12208
Author: victormote
Date: 2021-12-11 14:20:06 +0000 (Sat, 11 Dec 2021)
Log Message:
-----------
Use the parsed parent when obtaining inheritable properties.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-11 14:09:10 UTC (rev 12207)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-11 14:20:06 UTC (rev 12208)
@@ -2991,7 +2991,7 @@
if (this instanceof WritingModePa) {
return getPropertyList().getWritingMode(this, context);
}
- final FoObj parent = this.getParent();
+ final FoObj parent = getParsedParent();
if (parent == null) {
return PdWritingMode.getValueNoInstance(context, this);
}
@@ -3215,7 +3215,7 @@
* @return The requested property, or null if the root node is reached without finding the property.
*/
public Property ancestorProperty(final FoProperty propertyType) {
- final FoObj parent = this.getParent();
+ final FoObj parent = getParsedParent();
if (parent == null) {
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-11 14:09:13
|
Revision: 12207
http://sourceforge.net/p/foray/code/12207
Author: victormote
Date: 2021-12-11 14:09:10 +0000 (Sat, 11 Dec 2021)
Log Message:
-----------
Mark all BlockDiscrete4a objects as pseudo-objects, and make that concept more universally available in the tree.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableCell4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableRow4a.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-10 19:14:10 UTC (rev 12206)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-11 14:09:10 UTC (rev 12207)
@@ -205,13 +205,41 @@
/**
* Returns the parent that was parsed from the FO document.
* This can be different from the parent, in cases where pseudo-objects are placed in the tree to normalize it.
- * For example, table-cells that are direct children of a table-body
- * (instead of a table-row), are reparented with a pseudo table-row.
+ * For example, table-cells that are direct children of a table-body (instead of a table-row), are reparented with
+ * a pseudo table-row.
+ * This method is declared "final" to avoid each class needing to consider whether parents of its instances could be
+ * affected by pseudo-objects.
+ * Instead each instance reports whether it is a pseudo-object, using the {@link #isPseudoObject()} method.
+ * Implementatons may change the behavior of {@link #getParsedParent()} logic by overriding
+ * {@link #isPseudoObject()} method in appropriate subclasses.
+ * @return The "real" parent of this object.
+ * @see #isPseudoObject()
+ */
+ public final FoObj getParsedParent() {
+ final FoObj parent = getParent();
+ if (parent == null) {
+ return null;
+ }
+ if (parent.isPseudoObject()) {
+ return parent.getParsedParent();
+ }
+ return parent;
+ }
+
+ /**
+ * Indicates whether this is object is a "true" object in the tree, or one that has been added to normalize the
+ * content.
+ * For example, pseudo fo:table-row are created to contain fo:table-cell instances that are directly children of
+ * an fo:table-body.
+ * This interrupts the normal parent-child relationship amongst objects in the tree, and must be considered in some
+ * cases when looking at isues of ancestry and property inheritance.
* Subclasses should override this method as necessary.
- * @return The parent that was parsed from the FO tree.
+ * @return True iff this is object does not exist in the original FO document, but was created to normalize the
+ * content.
+ * @see #getParsedParent()
*/
- public FoObj getParsedParent() {
- return this.getParent();
+ public boolean isPseudoObject() {
+ return false;
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java 2021-12-10 19:14:10 UTC (rev 12206)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java 2021-12-11 14:09:10 UTC (rev 12207)
@@ -184,4 +184,9 @@
return false;
}
+ @Override
+ public boolean isPseudoObject() {
+ return true;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableCell4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableCell4a.java 2021-12-10 19:14:10 UTC (rev 12206)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableCell4a.java 2021-12-11 14:09:10 UTC (rev 12207)
@@ -198,23 +198,7 @@
return factory.makeProxy(this);
}
- /**
- * {@inheritDoc}
- * Overrides the FoObj implementation, because the parsed parent can be
- * different for a table-cell.
- */
@Override
- public FoObj getParsedParent() {
- if (this.getParent() instanceof TableRow4a) {
- final TableRow4a tableRow = (TableRow4a) this.getParent();
- if (tableRow.isPseudoRow()) {
- return tableRow.getParent();
- }
- }
- return this.getParent();
- }
-
- @Override
public FoObj getParent() {
return this.parent;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableRow4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableRow4a.java 2021-12-10 19:14:10 UTC (rev 12206)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableRow4a.java 2021-12-11 14:09:10 UTC (rev 12207)
@@ -115,12 +115,8 @@
return factory.makeProxy(this);
}
- /**
- * Indicates whether this is a pseudo-row.
- * @return True iff this is a pseudo-row that does not exist in the original
- * FO document, but was created to wrap loose table-cells.
- */
- protected boolean isPseudoRow() {
+ @Override
+ public boolean isPseudoObject() {
return this.isPseudoRow;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-10 19:14:13
|
Revision: 12206
http://sourceforge.net/p/foray/code/12206
Author: victormote
Date: 2021-12-10 19:14:10 +0000 (Fri, 10 Dec 2021)
Log Message:
-----------
Move marker-related method for finding the grafting point to Marker4a, and resolve the TODO items in that method by documenting why null values can be passed for FoContext and GraftingPoint.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Marker4a.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-10 17:46:34 UTC (rev 12205)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-10 19:14:10 UTC (rev 12206)
@@ -124,7 +124,6 @@
import org.axsl.fo.FoInlineContext;
import org.axsl.fo.FoTreeException;
import org.axsl.fo.fo.CharacterSequence;
-import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.Marker;
import org.axsl.fo.fo.prop.WritingModePa;
import org.axsl.font.Font;
@@ -244,44 +243,10 @@
* @return This node's effective parent.
*/
public FoObj effectiveParent(final FoContext context) {
- /* If either this or its parent is a Marker, we want to return that
- * Marker's surrogate RetrieveMarker's parent. */
- if (this instanceof Marker) {
- return effectiveMarkerParent(context);
- }
- final FoObj parent = this.getParent();
- if (parent instanceof Marker) {
- return effectiveMarkerParent(context);
- }
return getParent();
}
/**
- * Returns the effective parent of a Marker instance.
- * @param context An object that knows how to resolve FO Tree context issues.
- * @return The parent of the RetrieveMarker instance found in the context.
- */
- private FoObj effectiveMarkerParent(final FoContext context) {
- if (context == null) {
- /* TODO: Consider throwing an Exception. This should NOT happen. */
- return getParent();
- }
- final GraftingPoint graftingPoint = context.getGraftingPoint();
- if (graftingPoint == null) {
- /* TODO: Consider throwing an Exception. This should NOT happen. */
- return getParent();
- }
- org.foray.fotree.FoObj forayGraftingPoint = null;
- if (graftingPoint instanceof org.foray.fotree.FoObj) {
- forayGraftingPoint = (org.foray.fotree.FoObj) graftingPoint;
- } else {
- throw new IllegalStateException("Non-FOray object found in FO Tree");
- }
- /* We don't want to return the GraftingPoint, but rather its parent. */
- return forayGraftingPoint.getParent();
- }
-
- /**
* Adds the context information to a given message.
* @param message The message to which context information should be added.
* @return The original message plus the context information.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Marker4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Marker4a.java 2021-12-10 17:46:34 UTC (rev 12205)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Marker4a.java 2021-12-10 19:14:10 UTC (rev 12206)
@@ -38,6 +38,7 @@
import org.axsl.fo.FoContext;
import org.axsl.fo.FoTreeException;
import org.axsl.fo.ProxyFactory;
+import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.Marker;
import java.util.List;
@@ -202,4 +203,33 @@
return true;
}
+ /**
+ * Returns the effective parent of this Marker instance.
+ * @param context An object that knows how to resolve FO Tree context issues.
+ * This contains the grafting point (RetrieveMarker), if any, on which this marker is considered to be grafted.
+ * If null, or if its {@link FoContext#getGraftingPoint()} returns null, this implies that this marker is being
+ * treated for purposes of this method as lodging in its native place in the FO tree instead of being grafted onto
+ * an fo:retrieve-marker.
+ * @return If either {@code context} or its {@link FoContext#getGraftingPoint()} are null, the parent of this
+ * marker will be returned.
+ * If a non-null grafting point is obtained, its parent will be returned.
+ */
+ public FoObj effectiveParent(final FoContext context) {
+ if (context == null) {
+ return getParent();
+ }
+ final GraftingPoint graftingPoint = context.getGraftingPoint();
+ if (graftingPoint == null) {
+ return getParent();
+ }
+ org.foray.fotree.FoObj forayGraftingPoint = null;
+ if (graftingPoint instanceof org.foray.fotree.FoObj) {
+ forayGraftingPoint = (org.foray.fotree.FoObj) graftingPoint;
+ } else {
+ throw new IllegalStateException("Non-FOray object found in FO Tree");
+ }
+ /* We don't want to return the GraftingPoint, but rather its parent. */
+ return forayGraftingPoint.getParent();
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-10 17:46:37
|
Revision: 12205
http://sourceforge.net/p/foray/code/12205
Author: victormote
Date: 2021-12-10 17:46:34 +0000 (Fri, 10 Dec 2021)
Log Message:
-----------
Style changes only.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineNonText.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineText.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.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/AbstractFlow.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageMaster.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractTablePart.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowAssignment4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowMap4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowSourceList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowTargetList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexKeyReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationListSeparator4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationRangeSeparator4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageNumberPrefix4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageNumberSuffix4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InitialPropertySet4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiPropertySet4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageMasterResolver4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberCitation4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberCitationLast4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberGenerator.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceMaster4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceWrapper4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Region4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionAfter4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionBefore4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionBody4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionEnd4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionNameSpecifier4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionStart4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmAlternatives4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveTableMarker4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ScalingValueCitation4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/SimplePageMaster4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/SinglePageMasterReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/StaticContent4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableCell4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableRow4a.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineNonText.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineNonText.java 2021-12-10 14:35:34 UTC (rev 12204)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineNonText.java 2021-12-10 17:46:34 UTC (rev 12205)
@@ -48,8 +48,7 @@
* @param realLineNonText The wrapped non-text item.
* @param context The FO context for this non-text item.
*/
- public FoLineNonText(final org.axsl.fo.FoLineNonText realLineNonText,
- final FoContext context) {
+ public FoLineNonText(final org.axsl.fo.FoLineNonText realLineNonText, final FoContext context) {
this.realLineNonText = realLineNonText;
this.context = context;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineText.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineText.java 2021-12-10 14:35:34 UTC (rev 12204)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoLineText.java 2021-12-10 17:46:34 UTC (rev 12205)
@@ -52,8 +52,7 @@
* @param realLineText The wrapped text item.
* @param context The FO context for this text item.
*/
- public FoLineText(final org.axsl.fo.FoLineText realLineText,
- final FoContext context) {
+ public FoLineText(final org.axsl.fo.FoLineText realLineText, final FoContext context) {
this.realLineText = realLineText;
this.context = context;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-10 14:35:34 UTC (rev 12204)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-10 17:46:34 UTC (rev 12205)
@@ -205,8 +205,7 @@
/**
* Returns the parent that was parsed from the FO document.
- * This can be different from the parent, in cases where pseudo-objects are
- * placed in the tree to normalize it.
+ * This can be different from the parent, in cases where pseudo-objects are placed in the tree to normalize it.
* For example, table-cells that are direct children of a table-body
* (instead of a table-row), are reparented with a pseudo table-row.
* Subclasses should override this method as necessary.
@@ -240,10 +239,8 @@
}
/**
- * Return this node's effective parent, cast as an FoObj.
- * This differs from the value returned by
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * Return this node's effective parent.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return This node's effective parent.
*/
public FoObj effectiveParent(final FoContext context) {
@@ -261,20 +258,17 @@
/**
* Returns the effective parent of a Marker instance.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The parent of the RetrieveMarker instance found in the context.
*/
private FoObj effectiveMarkerParent(final FoContext context) {
if (context == null) {
- /* TODO: Consider throwing an Exception. This should NOT
- * happen. */
+ /* TODO: Consider throwing an Exception. This should NOT happen. */
return getParent();
}
final GraftingPoint graftingPoint = context.getGraftingPoint();
if (graftingPoint == null) {
- /* TODO: Consider throwing an Exception. This should NOT
- * happen. */
+ /* TODO: Consider throwing an Exception. This should NOT happen. */
return getParent();
}
org.foray.fotree.FoObj forayGraftingPoint = null;
@@ -281,8 +275,7 @@
if (graftingPoint instanceof org.foray.fotree.FoObj) {
forayGraftingPoint = (org.foray.fotree.FoObj) graftingPoint;
} else {
- throw new IllegalStateException("Non-FOray object found in FO "
- + "Tree");
+ throw new IllegalStateException("Non-FOray object found in FO Tree");
}
/* We don't want to return the GraftingPoint, but rather its parent. */
return forayGraftingPoint.getParent();
@@ -357,8 +350,7 @@
* @param message The message indicating the reason for the exception.
* @throws FoTreeException Always, as that is the purpose of this method.
*/
- public static void throwException(final String contextMessage,
- final String message) throws FoTreeException {
+ public static void throwException(final String contextMessage, final String message) throws FoTreeException {
final FoTreeException exception = new FoTreeException(message);
exception.setContextMessage(contextMessage);
throw exception;
@@ -365,8 +357,7 @@
}
/**
- * Convenience method that throws a general content model violation
- * exception.
+ * Convenience method that throws a general content model violation exception.
* @throws FoTreeException Always, as that is the purpose of this method.
*/
public void throwExceptionContentModelViolation() throws FoTreeException {
@@ -374,8 +365,7 @@
}
/**
- * Convenience method that throws a general exception indicating that an
- * element is not valid at this location.
+ * Convenience method that throws a general exception indicating that an element is not valid at this location.
* @throws FoTreeException Always, as that is the purpose of this method.
*/
public void throwExceptionInvalidLocation() throws FoTreeException {
@@ -383,15 +373,12 @@
}
/**
- * Throws a standard exception when an attempt is made to add content to
- * an object that has an empty content model.
+ * Throws a standard exception when an attempt is made to add content to an object that has an empty content model.
* @param child The child object which was attempting to be added to this.
* @throws FoTreeException Always, as that is the purpose of this method.
*/
- public void addChildToEmptyContentModel(final FoObj child)
- throws FoTreeException {
- child.throwException("Content model of " + this.getName()
- + " is EMPTY.");
+ public void addChildToEmptyContentModel(final FoObj child) throws FoTreeException {
+ child.throwException("Content model of " + this.getName() + " is EMPTY.");
}
@Override
@@ -417,10 +404,8 @@
/**
* Sets the location of this object.
* @param systemId The system ID (document) in which this object is located.
- * @param line The line number in the document at which this object is
- * located.
- * @param column The column number in {@code line} as which this object
- * is located.
+ * @param line The line number in the document at which this object is located.
+ * @param column The column number in {@code line} as which this object is located.
*/
public void setLocation(final String systemId, final int line,
final int column) {
@@ -430,10 +415,9 @@
}
/**
- * Provides a formatted version of the full name of this object in the
- * form namespace-abbreviation:object-name. For example, "fo:bookmark".
- * @return The name of this object, with the typical namespace abbreviation
- * prepended.
+ * Provides a formatted version of the full name of this object in the form namespace-abbreviation:object-name.
+ * For example, "fo:bookmark".
+ * @return The name of this object, with the typical namespace abbreviation prepended.
*/
public String getFullName() {
return getNamespace().getTypicalPrefix() + ":" + getName();
@@ -440,28 +424,22 @@
}
/**
- * Adds text characters to the object. Since most FOs cannot have PCDATA
- * content, the default behavior is to ignore white-space content, and to
- * throw an exception for any other content.
+ * Adds text characters to the object.
+ * Since most FOs cannot have PCDATA content, the default behavior is to ignore white-space content, and to throw an
+ * exception for any other content.
* Subclasses should override this as appropriate.
* @param data text
* @param start start position
* @param length length of the text
- * @param systemId The systemId of the file containing the text being
- * added (used in error messages).
- * @param line The line number of the location of the text being added
- * (used in error messages).
- * @param column The columns number of the location of the text being
- * added (used in error messages).
- * @throws FoTreeException If the object contains text but is not allowed
- * to.
+ * @param systemId The systemId of the file containing the text being added (used in error messages).
+ * @param line The line number of the location of the text being added (used in error messages).
+ * @param column The columns number of the location of the text being added (used in error messages).
+ * @throws FoTreeException If the object contains text but is not allowed to.
*/
- protected void addCharacters(final char[] data, final int start,
- final int length, final String systemId, final int line,
- final int column) throws FoTreeException {
+ protected void addCharacters(final char[] data, final int start, final int length, final String systemId,
+ final int line, final int column) throws FoTreeException {
if (containsText(data, start, length)) {
- throwException(getContextMessage(systemId, line, column),
- "May not contain non-whitespace text.");
+ throwException(getContextMessage(systemId, line, column), "May not contain non-whitespace text.");
}
}
@@ -472,8 +450,7 @@
* @param length The length of the text in the char array to be examined.
* @return True iff the char array contains non-whitespace text.
*/
- protected boolean containsText(final char[] data, final int start,
- final int length) {
+ protected boolean containsText(final char[] data, final int start, final int length) {
if (data == null || data.length < 1) {
return false;
}
@@ -491,34 +468,28 @@
}
/**
- * A hook into the parsing process which allows the subclass instance to
- * validate its ancestry.
- * This method is called after object construction, but before any
- * properties are parsed.
+ * A hook into the parsing process which allows the subclass instance to validate its ancestry.
+ * This method is called after object construction, but before any properties are parsed.
* @throws FoTreeException For invalid ancestry.
*/
protected abstract void validateAncestry() throws FoTreeException;
/**
- * A hook into the parsing process which allows the subclass instance to
- * validate its properties.
- * This method is called after all properties have been parsed, but before
- * any children have been read.
+ * A hook into the parsing process which allows the subclass instance to validate its properties.
+ * This method is called after all properties have been parsed, but before any children have been read.
* @throws FoTreeException For invalid properties.
*/
protected abstract void validateProperties() throws FoTreeException;
/**
- * A hook into the parsing process which allows the subclass instance to
- * do some initialization-type work after all of the properties have been
- * parsed, but before any of the children have been parsed.
+ * A hook into the parsing process which allows the subclass instance to do some initialization-type work after all
+ * of the properties have been parsed, but before any of the children have been parsed.
* @throws FoTreeException For errors during initialization.
*/
protected abstract void setup() throws FoTreeException;
/**
- * A hook into the parsing process which allows the subclass instance to
- * validate its descendants.
+ * A hook into the parsing process which allows the subclass instance to validate its descendants.
* This method is called after all children have been parsed.
* @throws FoTreeException For invalid descendants.
*/
@@ -525,9 +496,8 @@
protected abstract void validateDescendants() throws FoTreeException;
/**
- * This method is a hook into the parsing process, primarily to allow the
- * subclass to do some validation or setup work after the object and all of
- * its properties have been parsed and all of its children processed.
+ * This method is a hook into the parsing process, primarily to allow the subclass to do some validation or setup
+ * work after the object and all of its properties have been parsed and all of its children processed.
* @throws FoTreeException For errors during validation or setup.
*/
protected abstract void end() throws FoTreeException;
@@ -543,27 +513,22 @@
}
/**
- * Ensures that this has at least one child by throwing an exception if it
- * does not.
+ * Ensures that this has at least one child by throwing an exception if it does not.
* @throws FoTreeException If this has no children.
*/
public void validateAtLeastOneChild() throws FoTreeException {
if (formattingObjectCount() < 1) {
- throwException(this.getFullName() + " must have at least one "
- + "child.");
+ throwException(this.getFullName() + " must have at least one child.");
}
}
/**
- * Creates a suitable exception or warning if an object references a
- * non-existent page.
+ * Creates a suitable exception or warning if an object references a non-existent page.
* @param invalidReference The page reference that is invalid.
* @throws FoTreeException If a non-existent page is referenced.
*/
- public void invalidPageReference(final String invalidReference)
- throws FoTreeException {
- final String message = this.getFullName() + " references a "
- + "non-existent page: \"" + invalidReference + "\"";
+ public void invalidPageReference(final String invalidReference) throws FoTreeException {
+ final String message = this.getFullName() + " references a non-existent page: \"" + invalidReference + "\"";
this.throwException(message);
}
@@ -579,8 +544,7 @@
/**
* Returns the nearest ancestor FoObj that generates reference areas.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The nearest ancestor FoObj that generates reference areas.
*/
public FoObj ancestorGeneratingRA(final FoContext context) {
@@ -592,8 +556,7 @@
/**
* Returns self or the nearest ancestor FoObj that generates reference areas.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return Self or the nearest ancestor FoObj that generates reference areas.
*/
public FoObj nearestGeneratingRA(final FoContext context) {
@@ -605,23 +568,19 @@
/**
* Returns self or the nearest ancestor FoObj that is a ListItem.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return Self or the nearest ancestor FoObj that is a ListItem.
*/
- public ListItem4a getNearestListItem(
- final FoContext context) {
+ public ListItem4a getNearestListItem(final FoContext context) {
return effectiveParent(context).getNearestListItem(context);
}
/**
* Returns the nearest ancestor FoObj that is a ListBlock.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The nearest ancestor FoObj that is a ListBlock.
*/
- public ListBlock4a getNearestAncestorListBlock(
- final FoContext context) {
+ public ListBlock4a getNearestAncestorListBlock(final FoContext context) {
if (getParent() == null) {
return null;
}
@@ -641,11 +600,9 @@
/**
* Finds the nearest self-or-ancestor that is a Block.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @return If this is an instance of Block, returns this, otherwise returns
- * the nearest ancestor that is a Block, or null if there is no ancestor
- * Block.
+ * @param context An object that knows how to resolve FO Tree context issues.
+ * @return If this is an instance of Block, returns this, otherwise returns the nearest ancestor that is a Block, or
+ * null if there is no ancestor Block.
*/
public Block4a getContainingBlock(final FoContext context) {
return effectiveParent(context).getContainingBlock(context);
@@ -653,10 +610,8 @@
/**
* Returns the ancestor {@link Flow4a}, if any.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @return The ancestor {@link Flow4a}, or null if this object does not
- * descend from a {@link Flow4a}.
+ * @param context An object that knows how to resolve FO Tree context issues.
+ * @return The ancestor {@link Flow4a}, or null if this object does not descend from a {@link Flow4a}.
*/
public Flow4a ancestorFlow(final FoContext context) {
if (getParent() == null) {
@@ -685,10 +640,8 @@
/**
* Return the nearest ancestor Leader instance, if any.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @return The nearest ancestor Leader instance, or null if there is no
- * ancestor Leader.
+ * @param context An object that knows how to resolve FO Tree context issues.
+ * @return The nearest ancestor Leader instance, or null if there is no ancestor Leader.
*/
public Leader4a getNearestLeader(final FoContext context) {
return effectiveParent(context).getNearestLeader(context);
@@ -700,8 +653,7 @@
}
@Override
- public FoObj ancestorListRelatedObject(
- final FoContext context) {
+ public FoObj ancestorListRelatedObject(final FoContext context) {
return effectiveParent(context).ancestorListRelatedObject(context);
}
@@ -708,21 +660,14 @@
/**
* Add a child to this object.
* @param child The child to be added.
- * @throws FoTreeException If the child cannot be added as a child for any
- * reason, either because it an invalid type or is in the wrong order.
+ * @throws FoTreeException If the child cannot be added as a child for any reason, either because it an invalid type
+ * or is in the wrong order.
*/
public abstract void addChild(FoObj child) throws FoTreeException;
-// @Override
-// public boolean getAllowsChildren() {
-// return true;
-// }
-
/**
- * Sets the location (from the SAX Locator) of an exception if it has not
- * been set already.
- * @param exception The exception whose location information is to be
- * checked.
+ * Sets the location (from the SAX Locator) of an exception if it has not been set already.
+ * @param exception The exception whose location information is to be checked.
*/
public void checkExceptionLocation(final FoTreeException exception) {
if (exception.isContextSet()) {
@@ -771,52 +716,47 @@
/**
* Returns the left margin of this object.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The left margin, in millipoints, of this object.
*/
public int getMarginLeft(final FoContext context) {
- return this.getPropertyList().getMarginLeft(this, context);
+ return getPropertyList().getMarginLeft(this, context);
}
/**
* Returns the right margin of this object.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The right margin, in millipoints, of this object.
*/
public int getMarginRight(final FoContext context) {
- return this.getPropertyList().getMarginRight(this, context);
+ return getPropertyList().getMarginRight(this, context);
}
/**
* Returns the top margin of this object.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The top margin, in millipoints, of this object.
*/
public int getMarginTop(final FoContext context) {
- return this.getPropertyList().getMarginTop(this, context);
+ return getPropertyList().getMarginTop(this, context);
}
/**
* Returns the bottom margin of this object.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The bottom margin, in millipoints, of this object.
*/
public int getMarginBottom(final FoContext context) {
- return this.getPropertyList().getMarginBottom(this, context);
+ return getPropertyList().getMarginBottom(this, context);
}
@Override
public Color traitColor(final FoContext context) {
- return this.getPropertyList().getColor(this, context);
+ return getPropertyList().getColor(this, context);
}
/**
- * Converts an {@link FoValue} wrap-option value to the more generic
- * {@link WrapOption} value.
+ * Converts an {@link FoValue} wrap-option value to the more generic {@link WrapOption} value.
* @param foWrapOption The raw FO wrap-option value to be converted.
* @return The matching WrapOption instance.
*/
@@ -831,7 +771,7 @@
@Override
public WrapOption traitWrapOption(final FoContext context) {
- final FoValue foWrapOption = this.getPropertyList().getWrapOption(this,
+ final FoValue foWrapOption = getPropertyList().getWrapOption(this,
context);
return convertWrapOption(foWrapOption);
}
@@ -838,22 +778,22 @@
@Override
public boolean traitWhiteSpaceCollapse(final FoContext context) {
- return this.getPropertyList().getWhiteSpaceCollapse(this, context);
+ return getPropertyList().getWhiteSpaceCollapse(this, context);
}
@Override
public boolean traitUnderlineScore(final FoContext context) {
- return this.getPropertyList().getUnderlineScore(this, context);
+ return getPropertyList().getUnderlineScore(this, context);
}
@Override
public boolean traitOverlineScore(final FoContext context) {
- return this.getPropertyList().getOverlineScore(this, context);
+ return getPropertyList().getOverlineScore(this, context);
}
@Override
public boolean traitThroughScore(final FoContext context) {
- return this.getPropertyList().getThroughScore(this, context);
+ return getPropertyList().getThroughScore(this, context);
}
@Override
@@ -877,12 +817,12 @@
@Override
public boolean traitBlink(final FoContext context) {
- return this.getPropertyList().getBlink(this, context);
+ return getPropertyList().getBlink(this, context);
}
@Override
public String traitId() {
- return this.getPropertyList().getId();
+ return getPropertyList().getId();
}
/**
@@ -891,7 +831,7 @@
* @see "XSL-FO Standard 1.0, Section 7.22.8"
*/
public String traitInternalDestination() {
- return this.getPropertyList().getInternalDestination();
+ return getPropertyList().getInternalDestination();
}
/**
@@ -900,13 +840,12 @@
* @see "XSL-FO Standard 1.0, Section 7.22.6"
*/
public String traitExternalDestination() {
- return this.getPropertyList().getExternalDestination();
+ return getPropertyList().getExternalDestination();
}
@Override
public int traitStartIndent(final FoContext context) {
- return this.getPropertyList().getIndent(this, context,
- RelativeCompass.START);
+ return getPropertyList().getIndent(this, context, RelativeCompass.START);
}
/**
@@ -919,8 +858,7 @@
switch (foSpan) {
case NONE: return Span.NONE;
case ALL: return Span.ALL;
- default: throw new IllegalArgumentException(
- "Illegal span value: " + foSpan.toXslFo());
+ default: throw new IllegalArgumentException("Illegal span value: " + foSpan.toXslFo());
}
}
@@ -930,8 +868,7 @@
/* Only block-level FOs are affected by column-count, so, for all other
* FOs, treat them as if the span trait were "all". */
if (this.isBlockLevelFo()) {
- final FoValue foSpan = this.getPropertyList().getSpan(this,
- context);
+ final FoValue foSpan = getPropertyList().getSpan(this, context);
return convertSpan(foSpan);
}
return Span.ALL;
@@ -939,7 +876,7 @@
@Override
public String traitFlowName() {
- return this.getPropertyList().getFlowName();
+ return getPropertyList().getFlowName();
}
/**
@@ -947,7 +884,7 @@
* @return The "marker-class-name" trait.
*/
public String traitMarkerClassName() {
- return this.getPropertyList().getMarkerClassName();
+ return getPropertyList().getMarkerClassName();
}
/**
@@ -955,17 +892,16 @@
* @return The "retrieve-class-name" trait.
*/
public String traitRetrieveClassName() {
- return this.getPropertyList().getRetrieveClassName();
+ return getPropertyList().getRetrieveClassName();
}
/**
* Returns the "column-number" trait.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The "column-number" trait.
*/
public int traitColumnNumber(final FoContext context) {
- return this.getPropertyList().getColumnNumber(this, context);
+ return getPropertyList().getColumnNumber(this, context);
}
/**
@@ -973,7 +909,7 @@
* @return The "number-columns-spanned" trait.
*/
public int traitNumberColumnsSpanned() {
- return this.getPropertyList().getNumberColumnsSpanned();
+ return getPropertyList().getNumberColumnsSpanned();
}
/**
@@ -981,49 +917,37 @@
* @return The "number-rows-spanned" trait.
*/
public int traitNumberRowsSpanned() {
- return this.getPropertyList().getNumberRowsSpanned();
+ return getPropertyList().getNumberRowsSpanned();
}
@Override
public BorderModel traitBorderCollapse(final FoContext context) {
- switch (this.getPropertyList().getBorderCollapse(this, context)) {
- case COLLAPSE_WITH_PRECEDENCE: {
- return BorderModel.COLLAPSE_WITH_PRECEDENCE;
+ switch (getPropertyList().getBorderCollapse(this, context)) {
+ case COLLAPSE_WITH_PRECEDENCE: return BorderModel.COLLAPSE_WITH_PRECEDENCE;
+ case SEPARATE: return BorderModel.SEPARATE;
+ default: return BorderModel.COLLAPSE;
}
- case SEPARATE: {
- return BorderModel.SEPARATE;
- }
- default: {
- return BorderModel.COLLAPSE;
- }
- }
}
/**
- * Converts an {@link FoValue} display-align value to the more generic
- * {@link DisplayAlign} value.
+ * Converts an {@link FoValue} display-align value to the more generic {@link DisplayAlign} value.
* @param foDisplayAlign The raw FO display-align value to be converted.
* @return The matching DisplayAlign instance.
*/
- private static DisplayAlign convertDisplayAlign(
- final FoValue foDisplayAlign) {
+ private static DisplayAlign convertDisplayAlign(final FoValue foDisplayAlign) {
switch (foDisplayAlign) {
case BEFORE: return DisplayAlign.BEFORE;
case CENTER: return DisplayAlign.CENTER;
- case AFTER: return DisplayAlign.AFTER;
- default: throw new IllegalArgumentException(
- "Illegal display-align value: " + foDisplayAlign.toXslFo());
+ case AFTER: return DisplayAlign.AFTER;
+ default: throw new IllegalArgumentException("Illegal display-align value: " + foDisplayAlign.toXslFo());
}
-
}
@Override
public DisplayAlign traitDisplayAlign(final FoContext context) {
- final FoValue foDisplayAlign = this.getPropertyList().getDisplayAlign(
- this, context);
+ final FoValue foDisplayAlign = getPropertyList().getDisplayAlign(this, context);
if (this.relativeAlignApplies()) {
- final RelativeAlign foRelativeAlign = this.traitRelativeAlign(
- context);
+ final RelativeAlign foRelativeAlign = this.traitRelativeAlign(context);
switch (foRelativeAlign) {
case BEFORE: return DisplayAlign.BEFORE;
case BASELINE: return DisplayAlign.BASELINE;
@@ -1033,48 +957,42 @@
}
/**
- * Converts an {@link FoValue} relative-align value to the more generic
- * {@link RelativeAlign} value.
+ * Converts an {@link FoValue} relative-align value to the more generic {@link RelativeAlign} value.
* @param foRelativeAlign The raw FO relative-align value to be converted.
* @return The matching RelativeAlign instance.
*/
- private static RelativeAlign convertRelativeAlign(
- final FoValue foRelativeAlign) {
+ private static RelativeAlign convertRelativeAlign(final FoValue foRelativeAlign) {
switch (foRelativeAlign) {
case BEFORE: return RelativeAlign.BEFORE;
case BASELINE: return RelativeAlign.BASELINE;
- default: throw new IllegalArgumentException(
- "Illegal display-align value: " + foRelativeAlign.toXslFo());
+ default: throw new IllegalArgumentException("Illegal display-align value: " + foRelativeAlign.toXslFo());
}
}
@Override
public RelativeAlign traitRelativeAlign(final FoContext context) {
- final FoValue foRelativeAlign = this.getPropertyList().getRelativeAlign(
- this, context);
+ final FoValue foRelativeAlign = getPropertyList().getRelativeAlign(this, context);
return convertRelativeAlign(foRelativeAlign);
}
@Override
public int traitBorderSeparationIpd(final FoContext context) {
- return this.getPropertyList().getBorderSeparationIPD(this, context);
+ return getPropertyList().getBorderSeparationIPD(this, context);
}
@Override
public int traitBorderSeparationBpd(final FoContext context) {
- return this.getPropertyList().getBorderSeparationBPD(this, context);
+ return getPropertyList().getBorderSeparationBPD(this, context);
}
@Override
public int traitNumberColumnsRepeated() {
- return this.getPropertyList().getNumberColumnsRepeated();
+ return getPropertyList().getNumberColumnsRepeated();
}
/**
- * Converts a {@link FoValue} break-after or break-before value to the more
- * generic {@link Break} value.
- * @param foBreak The raw FO break-after or break-before value to be
- * converted.
+ * Converts a {@link FoValue} break-after or break-before value to the more generic {@link Break} value.
+ * @param foBreak The raw FO break-after or break-before value to be converted.
* @return The matching Break instance.
*/
private static Break convertBreak(final FoValue foBreak) {
@@ -1084,70 +1002,59 @@
case PAGE: return Break.PAGE;
case EVEN_PAGE: return Break.EVEN_PAGE;
case ODD_PAGE: return Break.ODD_PAGE;
- default: throw new IllegalArgumentException(
- "Illegal break value: " + foBreak.toXslFo());
+ default: throw new IllegalArgumentException("Illegal break value: " + foBreak.toXslFo());
}
}
@Override
public Break traitBreakAfter(final FoContext context) {
- final FoValue foBreak = this.getPropertyList().getBreakAfter(this,
- context);
+ final FoValue foBreak = getPropertyList().getBreakAfter(this, context);
return convertBreak(foBreak);
}
@Override
public int traitKeepTogetherWithinLine(final FoContext context) {
- return this.getPropertyList().traitKeepTogetherWithinLine(this,
- context);
+ return getPropertyList().traitKeepTogetherWithinLine(this, context);
}
@Override
public int traitKeepTogetherWithinColumn(final FoContext context) {
- return this.getPropertyList().traitKeepTogetherWithinColumn(this,
- context);
+ return getPropertyList().traitKeepTogetherWithinColumn(this, context);
}
@Override
public int traitKeepTogetherWithinPage(final FoContext context) {
- return this.getPropertyList().traitKeepTogetherWithinPage(this,
- context);
+ return getPropertyList().traitKeepTogetherWithinPage(this, context);
}
@Override
public int traitKeepWithNextWithinLine(final FoContext context) {
- return this.getPropertyList().traitKeepWithNextWithinLine(this,
- context);
+ return getPropertyList().traitKeepWithNextWithinLine(this, context);
}
@Override
public int traitKeepWithNextWithinColumn(final FoContext context) {
- return this.getPropertyList().traitKeepWithNextWithinColumn(this,
- context);
+ return getPropertyList().traitKeepWithNextWithinColumn(this, context);
}
@Override
public int traitKeepWithNextWithinPage(final FoContext context) {
- return this.getPropertyList().traitKeepWithNextWithinPage(this,
- context);
+ return getPropertyList().traitKeepWithNextWithinPage(this, context);
}
@Override
public int traitKeepWithPreviousWithinLine(final FoContext context) {
- return this.getPropertyList().traitKeepWithPreviousWithinLine(this,
- context);
+ return getPropertyList().traitKeepWithPreviousWithinLine(this, context);
}
@Override
public int traitKeepWithPreviousWithinColumn(final FoContext context) {
- return this.getPropertyList().traitKeepWithPreviousWithinColumn(this,
- context);
+ return getPropertyList().traitKeepWithPreviousWithinColumn(this, context);
}
@Override
public int traitKeepWithPreviousWithinPage(final FoContext context) {
- return this.getPropertyList().traitKeepWithPreviousWithinPage(this,
- context);
+ return getPropertyList().traitKeepWithPreviousWithinPage(this, context);
}
/**
@@ -1155,7 +1062,7 @@
* @return The "master-reference" trait.
*/
public String traitMasterReference() {
- return this.getPropertyList().getMasterReference();
+ return getPropertyList().getMasterReference();
}
/**
@@ -1163,7 +1070,7 @@
* @return The "page-position" trait.
*/
public FoValue traitPagePosition() {
- return this.getPropertyList().getPagePosition();
+ return getPropertyList().getPagePosition();
}
/**
@@ -1171,7 +1078,7 @@
* @return The "odd-or-even" trait.
*/
public FoValue traitOddOrEven() {
- return this.getPropertyList().getOddOrEven();
+ return getPropertyList().getOddOrEven();
}
/**
@@ -1179,19 +1086,17 @@
* @return The "blank-or-not-blank" trait.
*/
public FoValue traitBlankOrNotBlank() {
- return this.getPropertyList().getBlankOrNotBlank(this);
+ return getPropertyList().getBlankOrNotBlank(this);
}
@Override
public int traitInitialPageNumber(final int lastPageNumberUsed) {
- return this.getPropertyList().getInitialPageNumber(this,
- lastPageNumberUsed);
+ return getPropertyList().getInitialPageNumber(this, lastPageNumberUsed);
}
@Override
public boolean initialPageNumberSetExplicitly() {
- final FoValue rawInitialPageNumber =
- this.getPropertyList().getRawInitialPageNumber(this);
+ final FoValue rawInitialPageNumber = getPropertyList().getRawInitialPageNumber(this);
return rawInitialPageNumber == FoValue.NOT_A_KEYWORD;
}
@@ -1200,7 +1105,7 @@
* @return The "format" trait.
*/
public String traitFormat() {
- return this.getPropertyList().getFormat();
+ return getPropertyList().getFormat();
}
/**
@@ -1208,7 +1113,7 @@
* @return The "grouping-separator" trait.
*/
public char traitGroupingSeparator() {
- return this.getPropertyList().getGroupingSeparator();
+ return getPropertyList().getGroupingSeparator();
}
/**
@@ -1216,7 +1121,7 @@
* @return The "grouping-size" trait.
*/
public int traitGroupingSize() {
- return this.getPropertyList().getGroupingSize();
+ return getPropertyList().getGroupingSize();
}
/**
@@ -1224,18 +1129,15 @@
* @return The "letter-value" trait.
*/
public FoValue traitLetterValue() {
- return this.getPropertyList().getLetterValue();
+ return getPropertyList().getLetterValue();
}
/**
- * Converts a {@link FoValue} force-page-count value to the more
- * generic {@link ForcePageCount} value.
- * @param foForcePageCount The raw FO force-page-count value to be
- * converted.
+ * Converts a {@link FoValue} force-page-count value to the more generic {@link ForcePageCount} value.
+ * @param foForcePageCount The raw FO force-page-count value to be converted.
* @return The matching ForcePageCount instance.
*/
- private static ForcePageCount convertForcePageCount(
- final FoValue foForcePageCount) {
+ private static ForcePageCount convertForcePageCount(final FoValue foForcePageCount) {
switch (foForcePageCount) {
case AUTO: return ForcePageCount.AUTO;
case EVEN: return ForcePageCount.EVEN;
@@ -1243,16 +1145,13 @@
case END_ON_EVEN: return ForcePageCount.END_ON_EVEN;
case END_ON_ODD: return ForcePageCount.END_ON_ODD;
case NO_FORCE: return ForcePageCount.NO_FORCE;
- default: throw new IllegalArgumentException(
- "Illegal force-page-count value: "
- + foForcePageCount.toXslFo());
+ default: throw new IllegalArgumentException("Illegal force-page-count value: " + foForcePageCount.toXslFo());
}
}
@Override
public ForcePageCount traitForcePageCount(final FoContext context) {
- final FoValue foForcePageCount =
- this.getPropertyList().getForcePageCount(this, context);
+ final FoValue foForcePageCount = getPropertyList().getForcePageCount(this, context);
return convertForcePageCount(foForcePageCount);
}
@@ -1261,7 +1160,7 @@
* @return The "master-name" trait.
*/
public String traitMasterName() {
- return this.getPropertyList().getMasterName();
+ return getPropertyList().getMasterName();
}
/**
@@ -1269,22 +1168,21 @@
* @return The "precedence" trait.
*/
public boolean traitPrecedence() {
- return this.getPropertyList().getPrecedence(this);
+ return getPropertyList().getPrecedence(this);
}
@Override
public int traitExtent() {
- return this.getPropertyList().getExtent(this);
+ return getPropertyList().getExtent(this);
}
@Override
public int traitColumnGap(final FoContext context) {
- return this.getPropertyList().getColumnGap(this, context);
+ return getPropertyList().getColumnGap(this, context);
}
/**
- * Converts an {@link FoValue} overflow value to the more generic
- * {@link Overflow} value.
+ * Converts an {@link FoValue} overflow value to the more generic {@link Overflow} value.
* @param foOverflow The raw FO overflow value to be converted.
* @return The matching Overflow instance.
*/
@@ -1296,21 +1194,19 @@
case AUTO: return Overflow.AUTO;
case ERROR_IF_OVERFLOW: return Overflow.ERROR_IF_OVERFLOW;
case REPEAT: return Overflow.REPEAT;
- default: throw new IllegalArgumentException("Illegal overflow value: "
- + foOverflow.toXslFo());
+ default: throw new IllegalArgumentException("Illegal overflow value: " + foOverflow.toXslFo());
}
}
@Override
public Overflow traitOverflow(final FoContext context) {
- final FoValue foOverflow = this.getPropertyList().getOverflow(this,
- context);
+ final FoValue foOverflow = getPropertyList().getOverflow(this, context);
return convertOverflow(foOverflow);
}
@Override
public int traitColumnCount(final FoContext context) {
- return this.getPropertyList().getColumnCount(this, context);
+ return getPropertyList().getColumnCount(this, context);
}
/**
@@ -1318,22 +1214,21 @@
* @return The "maximum-repeats" trait.
*/
public int traitMaximumRepeats() {
- return this.getPropertyList().getMaximumRepeats(this);
+ return getPropertyList().getMaximumRepeats(this);
}
@Override
public int traitPageWidth() {
- return this.getPropertyList().getPageWidth(this);
+ return getPropertyList().getPageWidth(this);
}
@Override
public int traitPageHeight() {
- return this.getPropertyList().getPageHeight(this);
+ return getPropertyList().getPageHeight(this);
}
/**
- * Converts an {@link FoValue} text-align value to the more generic
- * {@link TextAlign} value.
+ * Converts an {@link FoValue} text-align value to the more generic {@link TextAlign} value.
* @param foTextAlign The raw FO text-align value to be converted.
* @return The matching TextAlign instance.
*/
@@ -1350,31 +1245,27 @@
case LEFT: return TextAlign.START;
/* As per XSL-FO 1.1 Section 7.16.9, normalize "right" to "end". */
case RIGHT: return TextAlign.END;
- default: throw new IllegalArgumentException("Illegal text-align value: "
- + foTextAlign.toXslFo());
+ default: throw new IllegalArgumentException("Illegal text-align value: " + foTextAlign.toXslFo());
}
}
@Override
public TextAlign traitTextAlign(final FoContext context) {
- final FoValue foTextAlign = this.getPropertyList().getTextAlign(this,
- context);
+ final FoValue foTextAlign = getPropertyList().getTextAlign(this, context);
return convertTextAlign(foTextAlign);
}
@Override
public String traitTextAlignString() {
- return this.getPropertyList().getTextAlignString();
+ return getPropertyList().getTextAlignString();
}
/**
- * Converts an {@link FoValue} text-align-last value to the more generic
- * {@link TextAlignLast} value.
+ * Converts an {@link FoValue} text-align-last value to the more generic {@link TextAlignLast} value.
* @param foTextAlignLast The raw FO text-align-last value to be converted.
* @return The matching TextAlignLast instance.
*/
- private static TextAlignLast convertTextAlignLast(
- final FoValue foTextAlignLast) {
+ private static TextAlignLast convertTextAlignLast(final FoValue foTextAlignLast) {
switch (foTextAlignLast) {
case RELATIVE: return TextAlignLast.RELATIVE;
case START: return TextAlignLast.START;
@@ -1387,164 +1278,144 @@
case LEFT: return TextAlignLast.START;
/* As per XSL-FO 1.1 Section 7.16.10, normalize "right" to "end". */
case RIGHT: return TextAlignLast.END;
- default: throw new IllegalArgumentException(
- "Illegal text-align-last value: "
- + foTextAlignLast.toXslFo());
+ default: throw new IllegalArgumentException("Illegal text-align-last value: " + foTextAlignLast.toXslFo());
}
}
@Override
public TextAlignLast traitTextAlignLast(final FoContext context) {
- final FoValue foTextAlignLast = this.getPropertyList().getTextAlignLast(
- this, context);
+ final FoValue foTextAlignLast = getPropertyList().getTextAlignLast(this, context);
return convertTextAlignLast(foTextAlignLast);
}
@Override
public int traitEndIndent(final FoContext context) {
- return this.getPropertyList().getIndent(this, context,
- RelativeCompass.END);
+ return getPropertyList().getIndent(this, context, RelativeCompass.END);
}
@Override
public int traitSpaceBeforeMinimum(final FoContext context) {
- return this.getPropertyList().traitSpaceBeforeLength(this, context,
- LengthRange.MINIMUM);
+ return getPropertyList().traitSpaceBeforeLength(this, context, LengthRange.MINIMUM);
}
@Override
public int traitSpaceBeforeOptimum(final FoContext context) {
- return this.getPropertyList().traitSpaceBeforeLength(this, context,
- LengthRange.OPTIMUM);
+ return getPropertyList().traitSpaceBeforeLength(this, context, LengthRange.OPTIMUM);
}
@Override
public int traitSpaceBeforeMaximum(final FoContext context) {
- return this.getPropertyList().traitSpaceBeforeLength(this, context,
- LengthRange.MAXIMUM);
+ return getPropertyList().traitSpaceBeforeLength(this, context, LengthRange.MAXIMUM);
}
@Override
- public Conditionality traitSpaceBeforeConditionality(
- final FoContext context) {
- return this.getPropertyList().traitSpaceBeforeConditionality(this,
- context);
+ public Conditionality traitSpaceBeforeConditionality(final FoContext context) {
+ return getPropertyList().traitSpaceBeforeConditionality(this, context);
}
@Override
public int traitSpaceBeforePrecedence() {
- return this.getPropertyList().traitSpaceBeforePrecedence();
+ return getPropertyList().traitSpaceBeforePrecedence();
}
@Override
public int traitSpaceAfterMinimum(final FoContext context) {
- return this.getPropertyList().traitSpaceAfterLength(this, context,
- LengthRange.MINIMUM);
+ return getPropertyList().traitSpaceAfterLength(this, context, LengthRange.MINIMUM);
}
@Override
public int traitSpaceAfterOptimum(final FoContext context) {
- return this.getPropertyList().traitSpaceAfterLength(this, context,
- LengthRange.OPTIMUM);
+ return getPropertyList().traitSpaceAfterLength(this, context, LengthRange.OPTIMUM);
}
@Override
public int traitSpaceAfterMaximum(final FoContext context) {
- return this.getPropertyList().traitSpaceAfterLength(this, context,
- LengthRange.MAXIMUM);
+ return getPropertyList().traitSpaceAfterLength(this, context, LengthRange.MAXIMUM);
}
@Override
- public Conditionality traitSpaceAfterConditionality(
- final FoContext context) {
- return this.getPropertyList().traitSpaceAfterConditionality(this,
- context);
+ public Conditionality traitSpaceAfterConditionality(final FoContext context) {
+ return getPropertyList().traitSpaceAfterConditionality(this, context);
}
@Override
public int traitSpaceAfterPrecedence() {
- return this.getPropertyList().traitSpaceAfterPrecedence();
+ return getPropertyList().traitSpaceAfterPrecedence();
}
@Override
public int traitSpaceStartMinimum(final FoContext context) {
- return this.getPropertyList().traitSpaceStartLength(this, context,
- LengthRange.MINIMUM);
+ return getPropertyList().traitSpaceStartLength(this, context, LengthRange.MINIMUM);
}
@Override
public int traitSpaceStartOptimum(final FoContext context) {
- return this.getPropertyList().traitSpaceStartLength(this, context,
- LengthRange.OPTIMUM);
+ return getPropertyList().traitSpaceStartLength(this, context, LengthRange.OPTIMUM);
}
@Override
public int traitSpaceStartMaximum(final FoContext context) {
- return this.getPropertyList().traitSpaceStartLength(this, context,
- LengthRange.MAXIMUM);
+ return getPropertyList().traitSpaceStartLength(this, context, LengthRange.MAXIMUM);
}
@Override
public Conditionality traitSpaceStartConditionality() {
- return this.getPropertyList().traitSpaceStartConditionality();
+ return getPropertyList().traitSpaceStartConditionality();
}
@Override
public int traitSpaceStartPrecedence() {
- return this.getPropertyList().traitSpaceStartPrecedence();
+ return getPropertyList().traitSpaceStartPrecedence();
}
@Override
public int traitSpaceEndMinimum(final FoContext context) {
- return this.getPropertyList().traitSpaceEndLength(this, context,
- LengthRange.MINIMUM);
+ return getPropertyList().traitSpaceEndLength(this, context, LengthRange.MINIMUM);
}
@Override
public int traitSpaceEndOptimum(final FoContext context) {
- return this.getPropertyList().traitSpaceEndLength(this, context,
- LengthRange.OPTIMUM);
+ return getPropertyList().traitSpaceEndLength(this, context, LengthRange.OPTIMUM);
}
@Override
public int traitSpaceEndMaximum(final FoContext context) {
- return this.getPropertyList().traitSpaceEndLength(this, context,
- LengthRange.MAXIMUM);
+ return getPropertyList().traitSpaceEndLength(this, context, LengthRange.MAXIMUM);
}
@Override
public Conditionality traitSpaceEndConditionality() {
- return this.getPropertyList().traitSpaceEndConditionality();
+ return getPropertyList().traitSpaceEndConditionality();
}
@Override
public int traitSpaceEndPrecedence() {
- return this.getPropertyList().traitSpaceEndPrecedence();
+ return getPropertyList().traitSpaceEndPrecedence();
}
@Override
public int traitTextIndent(final FoContext context) {
- return this.getPropertyList().getTextIndent(this, context);
+ return getPropertyList().getTextIndent(this, context);
}
@Override
public int traitTop(final FoContext context) {
- return this.getPropertyList().getTop(this, context);
+ return getPropertyList().getTop(this, context);
}
@Override
public int traitBottom(final FoContext context) {
- return this.getPropertyList().getBottom(this, context);
+ return getPropertyList().getBottom(this, context);
}
@Override
public int traitLeft(final FoContext context) {
- return this.getPropertyList().getLeft(this, context);
+ return getPropertyList().getLeft(this, context);
}
@Override
public int traitRight(final FoContext context) {
- return this.getPropertyList().getRight(this, context);
+ return getPropertyList().getRight(this, context);
}
/**
@@ -1552,24 +1423,22 @@
* @return The "character" trait.
*/
public char traitCharacter() {
- return this.getPropertyList().getCharacter();
+ return getPropertyList().getCharacter();
}
@Override
public String traitSrc(final FoContext context) {
- return this.getPropertyList().getSrc(this, context);
+ return getPropertyList().getSrc(this, context);
}
@Override
public Break traitBreakBefore(final FoContext context) {
- final FoValue foBreak = this.getPropertyList().getBreakBefore(this,
- context);
+ final FoValue foBreak = getPropertyList().getBreakBefore(this, context);
return convertBreak(foBreak);
}
/**
- * Converts an {@link FoValue} scaling value to the more generic
- * {@link Scaling} value.
+ * Converts an {@link FoValue} scaling value to the more generic {@link Scaling} value.
* @param foScaling The raw FO scaling value to be converted.
* @return The matching Scaling instance.
*/
@@ -1577,27 +1446,23 @@
switch (foScaling) {
case UNIFORM: return Scaling.UNIFORM;
case NON_UNIFORM: return Scaling.NON_UNIFORM;
- default: throw new IllegalArgumentException("Illegal scaling value: "
- + foScaling.toXslFo());
+ default: throw new IllegalArgumentException("Illegal scaling value: " + foScaling.toXslFo());
}
}
/**
* Returns the "scaling" trait for this FO.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
+ * @param context An object that knows how to resolve FO Tree context issues.
* @return The "scaling" trait.
* @see "XSL-FO Standard 1.0, Section 7.14.10"
*/
public Scaling traitScaling(final FoContext context) {
- final FoValue foScaling = this.getPropertyList().getScaling(this,
- context);
+ final FoValue foScaling = getPropertyList().getScaling(this, context);
return convertScaling(foScaling);
}
/**
- * Converts an {@link FoValue} leader-pattern value to the more generic
- * {@link LeaderPattern} value.
+ * Converts an {@link FoValue} leader-pattern value to the more generic {@link LeaderPattern} value.
* @param foLeaderPattern The raw FO leader-pattern value to be converted.
* @return The matching LeaderPattern instance.
*/
@@ -1608,31 +1473,29 @@
case RULE: return LeaderPattern.RULE;
case DOTS: return LeaderPattern.DOTS;
case USE_CONTENT: return LeaderPattern.USE_CONTENT;
- default: throw new IllegalArgumentException("Illegal leader-pattern "
- + " value: " + foLeaderPattern.toXslFo());
+ default: throw new IllegalArgumentException("Illegal leader-pattern value: " + foLeaderPattern.toXslFo());
}
}
@Override
public LeaderPattern traitLeaderPattern(final FoContext context) {
- final FoValue foLeaderPattern = this.getPropertyList().getLeaderPattern(
- ...
[truncated message content] |
|
From: <vic...@us...> - 2021-12-10 14:35:36
|
Revision: 12204
http://sourceforge.net/p/foray/code/12204
Author: victormote
Date: 2021-12-10 14:35:34 +0000 (Fri, 10 Dec 2021)
Log Message:
-----------
Improvements to area tree renderer.
Modified Paths:
--------------
trunk/foray/foray-render/src/main/java/org/foray/render/xml/XmlRenderer.java
Modified: trunk/foray/foray-render/src/main/java/org/foray/render/xml/XmlRenderer.java
===================================================================
--- trunk/foray/foray-render/src/main/java/org/foray/render/xml/XmlRenderer.java 2021-12-10 13:23:16 UTC (rev 12203)
+++ trunk/foray/foray-render/src/main/java/org/foray/render/xml/XmlRenderer.java 2021-12-10 14:35:34 UTC (rev 12204)
@@ -226,7 +226,7 @@
@Override
public void render(final BlockContainerArea area) throws GalleyVisitorException {
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
outputAllRectangles(area);
renderChildren(area);
@@ -236,7 +236,7 @@
@Override
public void render(final MainReferenceArea area) throws GalleyVisitorException {
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
outputAllRectangles(area);
renderChildren(area);
@@ -246,7 +246,7 @@
@Override
public void render(final RegionArea area) throws GalleyVisitorException {
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
outputAllRectangles(area);
renderChildren(area);
@@ -260,7 +260,7 @@
return;
}
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
outputAllRectangles(area);
renderChildren(area);
@@ -274,7 +274,7 @@
return;
}
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
outputAllRectangles(area);
renderChildren(area);
@@ -284,7 +284,7 @@
@Override
public void render(final NormalBlockArea area) throws GalleyVisitorException {
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
outputAllRectangles(area);
renderChildren(area);
@@ -298,7 +298,7 @@
*/
public void renderInlineArea(final GeneralInlineArea area) throws GalleyVisitorException {
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
renderChildren(area);
writeEndTag(area);
@@ -307,7 +307,7 @@
@Override
public void render(final ForeignObjectArea area) throws GalleyVisitorException {
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
outputAllRectangles(area);
renderChildren(area);
@@ -325,7 +325,7 @@
@Override
public void render(final ExternalGraphicArea area) {
final StringBuilder attributes = new StringBuilder();
- outputGeneratedBy(area, attributes);
+ outputCommonAttributes(area, attributes);
final URL url = area.getGraphic().getUrl();
if (url != null) {
outputAttribute(attributes, "url", url.toExternalForm());
@@ -347,7 +347,7 @@
return;
}
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
/* Line areas have no border or padding, so write only the content
* rectangle.
@@ -368,7 +368,7 @@
return;
}
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
outputAttribute(buffer, "leader-pattern",
area.traitLeaderPattern().toString());
outputAttribute(buffer, "leader-length", area.crIpd());
@@ -383,7 +383,7 @@
@Override
public void render(final TextArea area) {
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
outputAllRectangles(area);
if (this.printFont) {
@@ -413,7 +413,7 @@
@Override
public void render(final InlineArea area) throws GalleyVisitorException {
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
outputAllRectangles(area);
renderChildren(area);
@@ -423,7 +423,7 @@
@Override
public void render(final TableArea area) throws GalleyVisitorException {
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
outputAllRectangles(area);
renderChildren(area);
@@ -433,7 +433,7 @@
@Override
public void render(final TableCellArea area) throws GalleyVisitorException {
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
outputAllRectangles(area);
renderChildren(area);
@@ -450,7 +450,7 @@
@Override
public void render(final Area area) throws GalleyVisitorException {
final StringBuilder buffer = new StringBuilder();
- outputGeneratedBy(area, buffer);
+ outputCommonAttributes(area, buffer);
writeStartTag(area, buffer);
outputAllRectangles(area);
renderChildren(area);
@@ -528,17 +528,18 @@
* @param area The Area instance whose generatedBy trait is to be output.
* @param buffer StringBuilder instance in which to append the output.
*/
- private void outputGeneratedBy(final Area area,
- final StringBuilder buffer) {
- if (! area.generatedByExists()) {
- return;
+ private void outputCommonAttributes(final Area area, final StringBuilder buffer) {
+ if (area.generatedByExists()) {
+ String idString = "";
+ if (area.traitId() != null && ! area.traitId().equals("")) {
+ idString = "(id " + area.traitId() + ")";
+ }
+ outputAttribute(buffer, "generated-by", area.generatedByName() + idString);
}
- String idString = "";
- if (area.traitId() != null && ! area.traitId().equals("")) {
- idString = "(id " + area.traitId() + ")";
+
+ if (area.destinationName() != null) {
+ outputAttribute(buffer, "destination", area.destinationName());
}
- outputAttribute(buffer, "generated-by", area.generatedByName()
- + idString);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2021-12-10 13:23:18
|
Revision: 12203
http://sourceforge.net/p/foray/code/12203
Author: victormote
Date: 2021-12-10 13:23:16 +0000 (Fri, 10 Dec 2021)
Log Message:
-----------
Improvements in BlockDiscrete building.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java 2021-12-10 13:03:10 UTC (rev 12202)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java 2021-12-10 13:23:16 UTC (rev 12203)
@@ -176,11 +176,19 @@
// @Override
// public void addChild(final FoObj fobj) throws FoTreeException {
// if (fobj instanceof FoContentModelBlockOnly) {
-// children.add(fobj);
+// getChildren().add(fobj);
// return;
// }
// if (fobj instanceof AbstractCharacterSequence) {
-// addBlockDiscreteContent(fobj);
+// /* If we are still in a place where an fo:marker can be added (i.e. at the beginning of the block), and
+// * this text is all whitespace, it is not really part of the BlockDiscrete content.
+// * Place it directly into the block content so that fo:marker objecs can be added if needed. */
+// if (getChildren().size() < 1
+// || getChildren().get(getChildren().size() - 1) instanceof Marker4a) {
+// getChildren().add(fobj);
+// } else {
+// addBlockDiscreteContent(fobj);
+// }
// return;
// }
// if (fobj instanceof FoContentModelInlineOnly) {
@@ -192,13 +200,25 @@
// if (! fobj.hasDescendantBlocks()) {
// addBlockDiscreteContent(fobj);
// } else {
-// children.add(fobj);
+// getChildren().add(fobj);
// }
// return;
// }
+// if (fobj instanceof Marker4a) {
+// getChildren().add(fobj);
+// return;
+// }
+// if (fobj instanceof Footnote4a) {
+// addBlockDiscreteContent(fobj);
+// return;
+// }
+// if (fobj instanceof Footnote4a) {
+// addBlockDiscreteContent(fobj);
+// return;
+// }
// throwException("Unable to handle this kind of mixed content.");
// }
-
+//
// private void addBlockDiscreteContent(final FoObj fobj) throws FoTreeException {
// final FoObj lastChild = this.getLastChild();
// BlockDiscrete4a discrete = null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|