foray-commit Mailing List for FOray (Page 33)
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
|
Dec
|
|
From: <vic...@us...> - 2023-01-21 00:33:27
|
Revision: 13075
http://sourceforge.net/p/foray/code/13075
Author: victormote
Date: 2023-01-21 00:33:24 +0000 (Sat, 21 Jan 2023)
Log Message:
-----------
Rename methods for consistency.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractListItemContent.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BasicLinkArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BidiOverrideArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockContainerRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/ExternalGraphicArea.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/NormalBlockArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.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/RegionOuterRa4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/RetrieveMarkerNode4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/ScalingValueCitationArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TableCellRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaCharacters.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaWords.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 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -185,7 +185,7 @@
public RetrieveMarkerNode4a createRetrieveMarkerNode(final RetrieveMarker retrieveMarker,
final Marker selectedMarker) {
final RetrieveMarkerNode4a newRmNode =
- RetrieveMarkerNode4a.makeRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
+ RetrieveMarkerNode4a.createRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
this.children.add(newRmNode);
return newRmNode;
}
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 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractListItemContent.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -126,7 +126,7 @@
public RetrieveMarkerNode4a createRetrieveMarkerNode(final RetrieveMarker retrieveMarker,
final Marker selectedMarker) {
final RetrieveMarkerNode4a newRmNode =
- RetrieveMarkerNode4a.makeRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
+ RetrieveMarkerNode4a.createRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
this.children.add(newRmNode);
return newRmNode;
}
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 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BasicLinkArea.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -74,7 +74,7 @@
* @param parentArea The parent area.
* @return The new instance.
*/
- static BasicLinkArea makeBasicLinkArea(final BasicLink generatedBy, final LineArea4a parentArea) {
+ static BasicLinkArea createBasicLinkArea(final BasicLink generatedBy, final LineArea4a parentArea) {
final BasicLinkArea newLinkArea = new BasicLinkArea(parentArea);
newLinkArea.foLink = newLinkArea.getLink(generatedBy);
newLinkArea.registerLink(generatedBy);
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 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BidiOverrideArea.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -73,7 +73,7 @@
* @param parentArea The parent area.
* @return The new instance.
*/
- static BidiOverrideArea makeBidiOverrideArea(final BidiOverride generatedBy, final LineArea4a parentArea) {
+ static BidiOverrideArea createBidiOverrideArea(final BidiOverride generatedBy, final LineArea4a parentArea) {
final BidiOverrideArea newBidiArea = new BidiOverrideArea(parentArea);
newBidiArea.foLink = newBidiArea.getLink(generatedBy);
newBidiArea.registerLink(generatedBy);
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 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockContainerRa.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -244,7 +244,7 @@
public RetrieveMarkerNode4a createRetrieveMarkerNode(final RetrieveMarker retrieveMarker,
final Marker selectedMarker) {
final RetrieveMarkerNode4a newRmNode =
- RetrieveMarkerNode4a.makeRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
+ RetrieveMarkerNode4a.createRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
this.children.add(newRmNode);
return newRmNode;
}
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 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/ExternalGraphicArea.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -101,7 +101,7 @@
* @param width The width, in millipoints, of this Area.
* @return The new instance.
*/
- static ExternalGraphicArea makeExternalGraphicArea(final ExternalGraphic generatedBy, final LineArea4a parentArea,
+ static ExternalGraphicArea createExternalGraphicArea(final ExternalGraphic generatedBy, final LineArea4a parentArea,
final int width) {
final ExternalGraphicArea newEgArea = new ExternalGraphicArea(parentArea);
ExternalGraphicArea.init(newEgArea, generatedBy, width);
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 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/ForeignObjectArea.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -83,7 +83,7 @@
* @param width The width, in millipoints, of the Area.
* @return The new instance.
*/
- static ForeignObjectArea makeForeignObjectArea(final InstreamForeignObject generatedBy,
+ static ForeignObjectArea createForeignObjectArea(final InstreamForeignObject generatedBy,
final LineArea4a parentArea, final int width) {
final ForeignObjectArea newFoArea = new ForeignObjectArea(parentArea);
ForeignObjectArea.init(newFoArea, generatedBy, width);
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 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/IndexPageCitationListArea.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -73,7 +73,7 @@
* @param parentArea The parent area.
* @return The new instance.
*/
- static IndexPageCitationListArea makeIndexPageCitationListArea(final IndexPageCitationList generatedBy,
+ static IndexPageCitationListArea createIndexPageCitationListArea(final IndexPageCitationList generatedBy,
final LineArea4a parentArea) {
final IndexPageCitationListArea newCitationListArea = new IndexPageCitationListArea(parentArea);
newCitationListArea.foLink = newCitationListArea.getLink(generatedBy);
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 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineArea.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -76,7 +76,7 @@
* @param parentArea The parent area.
* @return The new instance.
*/
- static InlineArea makeInlineArea(final Inline generatedBy, final LineArea4a parentArea) {
+ static InlineArea createInlineArea(final Inline generatedBy, final LineArea4a parentArea) {
final InlineArea newInlineArea = new InlineArea(parentArea);
newInlineArea.foLink = newInlineArea.getLink(generatedBy);
newInlineArea.registerLink(generatedBy);
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 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineContainerArea.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -84,7 +84,8 @@
* @param parentArea The parent area.
* @return The new instance.
*/
- static InlineContainerArea makeInlineContainerArea(final InlineContainer generatedBy, final LineArea4a parentArea) {
+ static InlineContainerArea createInlineContainerArea(final InlineContainer generatedBy,
+ final LineArea4a parentArea) {
final InlineContainerArea newInlineArea = new InlineContainerArea(parentArea);
newInlineArea.foLink = newInlineArea.getLink(generatedBy);
newInlineArea.registerLink(generatedBy);
@@ -265,7 +266,7 @@
public RetrieveMarkerNode4a createRetrieveMarkerNode(final RetrieveMarker retrieveMarker,
final Marker selectedMarker) {
final RetrieveMarkerNode4a newRmNode =
- RetrieveMarkerNode4a.makeRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
+ RetrieveMarkerNode4a.createRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
this.children.add(newRmNode);
return newRmNode;
}
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 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LeaderArea.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -136,7 +136,7 @@
* @throws AreaTreeException If the minimum length is greater than the optimum length, or if the optimum length is
* greater than the maximum length.
*/
- static LeaderArea makeLeaderArea(final Leader generatedBy, final LineArea4a parentArea,
+ static LeaderArea createLeaderArea(final Leader generatedBy, final LineArea4a parentArea,
final int initialProgressionDimension) throws AreaTreeException {
final LeaderArea newLeaderArea = new LeaderArea(parentArea);
LeaderArea.initLeaderArea(newLeaderArea, generatedBy, initialProgressionDimension);
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 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -103,7 +103,7 @@
* area.
* @return The new instance.
*/
- static LineArea4a makeLineArea(final NormalBlockArea4a parentArea, final GraftingPoint graftingPoint) {
+ static LineArea4a createLineArea(final NormalBlockArea4a parentArea, final GraftingPoint graftingPoint) {
final LineArea4a newLineArea = new LineArea4a(parentArea);
newLineArea.registerLink(parentArea.getAreaParent().traitGeneratedBy());
newLineArea.computeInitialPD();
@@ -985,7 +985,7 @@
@Override
public BidiOverrideArea createBidiOverrideArea(final BidiOverride bidiOverride) {
- final BidiOverrideArea newBidiArea = BidiOverrideArea.makeBidiOverrideArea(bidiOverride, this);
+ final BidiOverrideArea newBidiArea = BidiOverrideArea.createBidiOverrideArea(bidiOverride, this);
this.children.add(newBidiArea);
return newBidiArea;
}
@@ -995,7 +995,7 @@
final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine, final int resolvedWordSpacing,
final int resolvedLetterSpacing, final BigDecimal resolvedIpdStretch) {
if (shouldCreateTextArea(foText, this, startOffset, sizeInChars, isLastItemOnLine, this)) {
- final TextAreaCharacters newTextArea = TextAreaCharacters.makeTextArea(foText, this, startOffset,
+ final TextAreaCharacters newTextArea = TextAreaCharacters.createTextArea(foText, this, startOffset,
sizeInChars, hasDiscretionaryHyphen);
this.children.add(newTextArea);
return newTextArea;
@@ -1007,7 +1007,7 @@
public GlyphAreaSequenceG5 createGlyphAreaSequence(final FoTextWords paragraph,
final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation,
final int resolvedWordSpacing, final int resolvedLetterSpacing, final BigDecimal resolvedIpdStretch) {
- final TextAreaWords newTextArea = TextAreaWords.makeTextArea(paragraph, this, startLocation, endLocation);
+ final TextAreaWords newTextArea = TextAreaWords.createTextArea(paragraph, this, startLocation, endLocation);
this.children.add(newTextArea);
return newTextArea;
}
@@ -1015,7 +1015,7 @@
@Override
public ExternalGraphicArea createExternalGraphicArea(final ExternalGraphic ifo, final int ipd) {
final ExternalGraphicArea newEgArea
- = ExternalGraphicArea.makeExternalGraphicArea(ifo, this, ipd);
+ = ExternalGraphicArea.createExternalGraphicArea(ifo, this, ipd);
this.children.add(newEgArea);
return newEgArea;
}
@@ -1022,7 +1022,7 @@
@Override
public ForeignObjectArea createForeignObjectArea(final InstreamForeignObject ifo, final int ipd) {
- final ForeignObjectArea newForeignArea = ForeignObjectArea.makeForeignObjectArea(ifo, this, ipd);
+ final ForeignObjectArea newForeignArea = ForeignObjectArea.createForeignObjectArea(ifo, this, ipd);
this.children.add(newForeignArea);
return newForeignArea;
}
@@ -1029,7 +1029,7 @@
@Override
public InlineArea createInlineArea(final Inline inline) {
- final InlineArea newInlineArea = InlineArea.makeInlineArea(inline, this);
+ final InlineArea newInlineArea = InlineArea.createInlineArea(inline, this);
this.children.add(newInlineArea);
return newInlineArea;
}
@@ -1037,7 +1037,7 @@
@Override
public InlineContainerArea createInlineContainerArea(final InlineContainer inlineContainer) {
final InlineContainerArea newInlineContainerArea =
- InlineContainerArea.makeInlineContainerArea(inlineContainer, this);
+ InlineContainerArea.createInlineContainerArea(inlineContainer, this);
this.children.add(newInlineContainerArea);
return newInlineContainerArea;
}
@@ -1044,7 +1044,7 @@
@Override
public LeaderArea createLeaderArea(final Leader leader, final int ipd) throws AreaTreeException {
- final LeaderArea newLeaderArea = LeaderArea.makeLeaderArea(leader, this, ipd);
+ final LeaderArea newLeaderArea = LeaderArea.createLeaderArea(leader, this, ipd);
this.children.add(newLeaderArea);
return newLeaderArea;
}
@@ -1052,7 +1052,7 @@
@Override
public PageNumberArea createPageNumberArea(final PageNumber pageNumber, final int ipd) {
final PageNumberArea newPageNumberArea
- = PageNumberArea.makePageNumberArea(pageNumber, this, ipd);
+ = PageNumberArea.createPageNumberArea(pageNumber, this, ipd);
this.children.add(newPageNumberArea);
return newPageNumberArea;
}
@@ -1060,7 +1060,7 @@
@Override
public PageNumberCitationArea createPageNumberCitationArea(final PageNumberCitation citation, final int ipd) {
final PageNumberCitationArea newCitationArea =
- PageNumberCitationArea.makePageNumberCitationArea(citation, this, ipd);
+ PageNumberCitationArea.createPageNumberCitationArea(citation, this, ipd);
this.children.add(newCitationArea);
return newCitationArea;
}
@@ -1069,7 +1069,7 @@
public PageNumberCitationLastArea createPageNumberCitationLastArea(final PageNumberCitationLast citation,
final int ipd) {
final PageNumberCitationLastArea newCitationArea =
- PageNumberCitationLastArea.makePageNumberCitationLastArea(citation, this, ipd);
+ PageNumberCitationLastArea.createPageNumberCitationLastArea(citation, this, ipd);
this.children.add(newCitationArea);
return newCitationArea;
}
@@ -1077,7 +1077,7 @@
@Override
public ScalingValueCitationArea createScalingValueCitationArea(final ScalingValueCitation citation, final int ipd) {
final ScalingValueCitationArea newCitationArea =
- ScalingValueCitationArea.makeScalingValueCitationArea(citation, this, ipd);
+ ScalingValueCitationArea.createScalingValueCitationArea(citation, this, ipd);
this.children.add(newCitationArea);
return newCitationArea;
}
@@ -1084,7 +1084,7 @@
@Override
public BasicLinkArea createBasicLinkArea(final BasicLink basicLink) {
- final BasicLinkArea newLinkArea = BasicLinkArea.makeBasicLinkArea(basicLink, this);
+ final BasicLinkArea newLinkArea = BasicLinkArea.createBasicLinkArea(basicLink, this);
this.children.add(newLinkArea);
return newLinkArea;
}
@@ -1092,7 +1092,7 @@
@Override
public IndexPageCitationListArea createIndexPageCitationListArea(final IndexPageCitationList indexPcl) {
final IndexPageCitationListArea newIpclArea =
- IndexPageCitationListArea.makeIndexPageCitationListArea(indexPcl, this);
+ IndexPageCitationListArea.createIndexPageCitationListArea(indexPcl, this);
this.children.add(newIpclArea);
return newIpclArea;
}
@@ -1101,7 +1101,7 @@
public RetrieveMarkerNode4a createRetrieveMarkerNode(final RetrieveMarker retrieveMarker,
final Marker selectedMarker) {
final RetrieveMarkerNode4a newRmNode =
- RetrieveMarkerNode4a.makeRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
+ RetrieveMarkerNode4a.createRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
this.children.add(newRmNode);
return newRmNode;
}
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 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -111,7 +111,7 @@
return null;
}
}
- final LineArea4a newLineArea = LineArea4a.makeLineArea(this, this.getGraftingPoint());
+ final LineArea4a newLineArea = LineArea4a.createLineArea(this, this.getGraftingPoint());
this.children.add(newLineArea);
return newLineArea;
}
@@ -291,7 +291,7 @@
public RetrieveMarkerNode4a createRetrieveMarkerNode(final RetrieveMarker retrieveMarker,
final Marker selectedMarker) {
final RetrieveMarkerNode4a newRmNode =
- RetrieveMarkerNode4a.makeRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
+ RetrieveMarkerNode4a.createRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
this.children.add(newRmNode);
return newRmNode;
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -236,7 +236,7 @@
public RetrieveMarkerNode4a createRetrieveMarkerNode(final RetrieveMarker retrieveMarker,
final Marker selectedMarker) {
final RetrieveMarkerNode4a newRmNode =
- RetrieveMarkerNode4a.makeRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
+ RetrieveMarkerNode4a.createRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
this.children.add(newRmNode);
return newRmNode;
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -75,7 +75,7 @@
* @param width The width, in millipoints, of this Area.
* @return The new instance.
*/
- static PageNumberArea makePageNumberArea(final PageNumber generatedBy, final LineArea4a parentArea,
+ static PageNumberArea createPageNumberArea(final PageNumber generatedBy, final LineArea4a parentArea,
final int width) {
final PageNumberArea newPnArea = new PageNumberArea(parentArea);
PageNumberArea.init(newPnArea, generatedBy, width);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -75,7 +75,7 @@
* @param width The width, in millipoints, of this Area.
* @return The newly-created instance.
*/
- static PageNumberCitationArea makePageNumberCitationArea(final PageNumberCitation generatedBy,
+ static PageNumberCitationArea createPageNumberCitationArea(final PageNumberCitation generatedBy,
final LineArea4a parentArea, final int width) {
final PageNumberCitationArea newPncArea = new PageNumberCitationArea(parentArea);
PageNumberCitationArea.init(newPncArea, generatedBy, width);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -75,7 +75,7 @@
* @param width The width, in millipoints, of this Area.
* @return The newly-created instance.
*/
- static PageNumberCitationLastArea makePageNumberCitationLastArea(final PageNumberCitationLast generatedBy,
+ static PageNumberCitationLastArea createPageNumberCitationLastArea(final PageNumberCitationLast generatedBy,
final LineArea4a parentArea, final int width) {
final PageNumberCitationLastArea newPncArea = new PageNumberCitationLastArea(parentArea);
PageNumberCitationLastArea.init(newPncArea, generatedBy, width);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionOuterRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionOuterRa4a.java 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionOuterRa4a.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -220,7 +220,7 @@
public RetrieveMarkerNode4a createRetrieveMarkerNode(final RetrieveMarker retrieveMarker,
final Marker selectedMarker) {
final RetrieveMarkerNode4a newRmNode =
- RetrieveMarkerNode4a.makeRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
+ RetrieveMarkerNode4a.createRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
this.children.add(newRmNode);
return newRmNode;
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/RetrieveMarkerNode4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/RetrieveMarkerNode4a.java 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/RetrieveMarkerNode4a.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -74,7 +74,7 @@
* @param selectedMarker The {@link Marker} instance whose content is grafted onto {@code generatedBy}.
* @return The new instance.
*/
- static RetrieveMarkerNode4a makeRetrieveMarkerNode(final RetrieveMarker generatedBy, final AreaNode4a parent,
+ static RetrieveMarkerNode4a createRetrieveMarkerNode(final RetrieveMarker generatedBy, final AreaNode4a parent,
final Marker selectedMarker) {
final RetrieveMarkerNode4a newRmNode = new RetrieveMarkerNode4a(parent);
final NoGenerationLink<RetrieveMarker> link = new NoGenerationLink<RetrieveMarker>(generatedBy);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/ScalingValueCitationArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/ScalingValueCitationArea.java 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/ScalingValueCitationArea.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -78,7 +78,7 @@
* @param width The width, in millipoints, of this Area.
* @return The new instance.
*/
- static ScalingValueCitationArea makeScalingValueCitationArea(final ScalingValueCitation generatedBy,
+ static ScalingValueCitationArea createScalingValueCitationArea(final ScalingValueCitation generatedBy,
final LineArea4a parentArea, final int width) {
final ScalingValueCitationArea newSvcArea = new ScalingValueCitationArea(parentArea);
ScalingValueCitationArea.init(newSvcArea, generatedBy, width);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TableCellRa.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TableCellRa.java 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TableCellRa.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -425,7 +425,7 @@
public RetrieveMarkerNode4a createRetrieveMarkerNode(final RetrieveMarker retrieveMarker,
final Marker selectedMarker) {
final RetrieveMarkerNode4a newRmNode =
- RetrieveMarkerNode4a.makeRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
+ RetrieveMarkerNode4a.createRetrieveMarkerNode(retrieveMarker, this, selectedMarker);
this.children.add(newRmNode);
return newRmNode;
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaCharacters.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaCharacters.java 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaCharacters.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -83,7 +83,7 @@
* @param hasDiscretionaryHyphen Set this to true if the text should be followed by the hyphenation character.
* @return The newly-created TextArea.
*/
- static TextAreaCharacters makeTextArea(final FoTextCharacters generatedBy, final LineArea4a parentArea,
+ static TextAreaCharacters createTextArea(final FoTextCharacters generatedBy, final LineArea4a parentArea,
final int backingOffset, final int backingSize, final boolean hasDiscretionaryHyphen) {
final Link<FoTextCharacters> linkage = parentArea.getLink(generatedBy);
final TextAreaCharacters newTextArea = new TextAreaCharacters(parentArea, linkage);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaWords.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaWords.java 2023-01-21 00:20:17 UTC (rev 13074)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaWords.java 2023-01-21 00:33:24 UTC (rev 13075)
@@ -79,7 +79,7 @@
* @param endLocation The ending location in {@code generatedBy} for the text in this area, exclusive.
* @return The newly-created TextArea.
*/
- static TextAreaWords makeTextArea(final FoTextWords generatedBy, final LineArea4a parentArea,
+ static TextAreaWords createTextArea(final FoTextWords generatedBy, final LineArea4a parentArea,
final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation) {
final Link<FoTextWords> linkage = parentArea.getLink(generatedBy);
final TextAreaWords newTextArea = new TextAreaWords(parentArea, linkage, startLocation, endLocation);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-21 00:20:20
|
Revision: 13074
http://sourceforge.net/p/foray/code/13074
Author: victormote
Date: 2023-01-21 00:20:17 +0000 (Sat, 21 Jan 2023)
Log Message:
-----------
Conform to aXSL change: Add resolved factors from layout to construction of text areas.
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-content/src/main/java/org/foray/content/TextTokensContent4a.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.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 2023-01-20 23:27:42 UTC (rev 13073)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java 2023-01-21 00:20:17 UTC (rev 13074)
@@ -49,6 +49,7 @@
import org.axsl.galley.GlyphAreaSequenceG5;
import org.axsl.orthography.TextTokenFlowLocation;
+import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@@ -75,7 +76,8 @@
@Override
public TextArea createGlyphAreaSequence(final FoTextCharacters foText, final int startOffset, final int sizeInChars,
- final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine) {
+ final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine, final int resolvedWordSpacing,
+ final int resolvedLetterSpacing, final BigDecimal resolvedIpdStretch) {
if (LineArea4a.shouldCreateTextArea(foText, this, startOffset, sizeInChars, isLastItemOnLine, this)) {
final TextArea newTextArea = TextAreaCharacters.makeTextArea(foText, this, startOffset, sizeInChars,
hasDiscretionaryHyphen);
@@ -87,7 +89,8 @@
@Override
public GlyphAreaSequenceG5 createGlyphAreaSequence(final FoTextWords paragraph,
- final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation) {
+ final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation,
+ final int resolvedWordSpacing, final int resolvedLetterSpacing, final BigDecimal resolvedIpdStretch) {
throw new UnsupportedOperationException();
}
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 2023-01-20 23:27:42 UTC (rev 13073)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2023-01-21 00:20:17 UTC (rev 13074)
@@ -65,6 +65,7 @@
import org.axsl.value.TextAlignLast;
import org.axsl.value.WhiteSpaceTreatment;
+import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -991,7 +992,8 @@
@Override
public TextArea createGlyphAreaSequence(final FoTextCharacters foText, final int startOffset, final int sizeInChars,
- final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine) {
+ final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine, final int resolvedWordSpacing,
+ final int resolvedLetterSpacing, final BigDecimal resolvedIpdStretch) {
if (shouldCreateTextArea(foText, this, startOffset, sizeInChars, isLastItemOnLine, this)) {
final TextAreaCharacters newTextArea = TextAreaCharacters.makeTextArea(foText, this, startOffset,
sizeInChars, hasDiscretionaryHyphen);
@@ -1003,7 +1005,8 @@
@Override
public GlyphAreaSequenceG5 createGlyphAreaSequence(final FoTextWords paragraph,
- final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation) {
+ final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation,
+ final int resolvedWordSpacing, final int resolvedLetterSpacing, final BigDecimal resolvedIpdStretch) {
final TextAreaWords newTextArea = TextAreaWords.makeTextArea(paragraph, this, startLocation, endLocation);
this.children.add(newTextArea);
return newTextArea;
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2023-01-20 23:27:42 UTC (rev 13073)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2023-01-21 00:20:17 UTC (rev 13074)
@@ -173,7 +173,7 @@
* content item belongs on this line. */
final TextTokenFlowLocation end =
foTextTokenFlow.markLocation(tokenIndex, PrimitiveConstants.MAX_7_BIT_UNSIGNED_VALUE);
- lineArea.createGlyphAreaSequence(this.content, start, end);
+ lineArea.createGlyphAreaSequence(this.content, start, end, 0, 0, null);
return iterator.nextIndex();
}
}
@@ -181,13 +181,13 @@
tokenIndex = iterator.branchIndexAt(1);
segmentIndex = iterator.depth() > 2 ? iterator.branchIndexAt(2) : 0;
final TextTokenFlowLocation end = foTextTokenFlow.markLocation(tokenIndex, segmentIndex);
- lineArea.createGlyphAreaSequence(this.content, start, end);
+ lineArea.createGlyphAreaSequence(this.content, start, end, 0, 0, null);
return iterator.nextIndex();
}
/* The iterator is out of content. All of this content item goes on this line. */
final TextTokenFlowLocation end =
foTextTokenFlow.markLocation(tokenIndex, PrimitiveConstants.MAX_7_BIT_UNSIGNED_VALUE);
- lineArea.createGlyphAreaSequence(this.content, start, end);
+ lineArea.createGlyphAreaSequence(this.content, start, end, 0, 0, null);
return iterator.nextIndex();
}
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2023-01-20 23:27:42 UTC (rev 13073)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2023-01-21 00:20:17 UTC (rev 13074)
@@ -127,7 +127,7 @@
final TextTokenFlowLocation endLocation =
this.node.getFoTokenFlow().markLocation(tokenIndex, segmentIndex);
- lineArea.createGlyphAreaSequence(this.node, startLocation, endLocation);
+ lineArea.createGlyphAreaSequence(this.node, startLocation, endLocation, 0, 0, null);
startLocation = endLocation;
}
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 2023-01-20 23:27:42 UTC (rev 13073)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java 2023-01-21 00:20:17 UTC (rev 13074)
@@ -747,7 +747,8 @@
}
if (textToUse instanceof FoTextCharacters) {
final FoTextCharacters foText = (FoTextCharacters) textToUse;
- factory.createGlyphAreaSequence(foText, startOffset, sizeInChars, hasDiscretionaryHyphen, isLastItemOnLine);
+ factory.createGlyphAreaSequence(foText, startOffset, sizeInChars, hasDiscretionaryHyphen, isLastItemOnLine,
+ 0, 0, null);
} else {
throw new TextException("Returned LineText is an unknown type.");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-20 23:27:45
|
Revision: 13073
http://sourceforge.net/p/foray/code/13073
Author: victormote
Date: 2023-01-20 23:27:42 +0000 (Fri, 20 Jan 2023)
Log Message:
-----------
Conform to aXSL change: Remove ipd from construction of a text area.
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/TextAreaCharacters.java
trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.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 2023-01-20 22:15:50 UTC (rev 13072)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java 2023-01-20 23:27:42 UTC (rev 13073)
@@ -74,12 +74,10 @@
}
@Override
- public TextArea createGlyphAreaSequence(final FoTextCharacters foText,
- final int startOffset, final int sizeInChars, final int ipd,
+ public TextArea createGlyphAreaSequence(final FoTextCharacters foText, final int startOffset, final int sizeInChars,
final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine) {
- if (LineArea4a.shouldCreateTextArea(foText, this, startOffset,
- sizeInChars, isLastItemOnLine, this)) {
- final TextArea newTextArea = TextAreaCharacters.makeTextArea(foText, this, startOffset, sizeInChars, ipd,
+ if (LineArea4a.shouldCreateTextArea(foText, this, startOffset, sizeInChars, isLastItemOnLine, this)) {
+ final TextArea newTextArea = TextAreaCharacters.makeTextArea(foText, this, startOffset, sizeInChars,
hasDiscretionaryHyphen);
this.children.add(newTextArea);
return newTextArea;
@@ -89,8 +87,7 @@
@Override
public GlyphAreaSequenceG5 createGlyphAreaSequence(final FoTextWords paragraph,
- final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation,
- final int ipd) {
+ final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation) {
throw new UnsupportedOperationException();
}
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 2023-01-20 22:15:50 UTC (rev 13072)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2023-01-20 23:27:42 UTC (rev 13073)
@@ -991,10 +991,10 @@
@Override
public TextArea createGlyphAreaSequence(final FoTextCharacters foText, final int startOffset, final int sizeInChars,
- final int ipd, final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine) {
+ final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine) {
if (shouldCreateTextArea(foText, this, startOffset, sizeInChars, isLastItemOnLine, this)) {
final TextAreaCharacters newTextArea = TextAreaCharacters.makeTextArea(foText, this, startOffset,
- sizeInChars, ipd, hasDiscretionaryHyphen);
+ sizeInChars, hasDiscretionaryHyphen);
this.children.add(newTextArea);
return newTextArea;
}
@@ -1003,8 +1003,7 @@
@Override
public GlyphAreaSequenceG5 createGlyphAreaSequence(final FoTextWords paragraph,
- final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation,
- final int ipd) {
+ final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation) {
final TextAreaWords newTextArea = TextAreaWords.makeTextArea(paragraph, this, startLocation, endLocation);
this.children.add(newTextArea);
return newTextArea;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaCharacters.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaCharacters.java 2023-01-20 22:15:50 UTC (rev 13072)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaCharacters.java 2023-01-20 23:27:42 UTC (rev 13073)
@@ -80,17 +80,15 @@
* For example, if the text in this TextSegment starts at array element 5 and has a size of 14, backingSize will be
* 14.
* The ending array element that belongs to this TextSegment is computed as backingOffset + backingSize.
- * @param progressionDimensionUsed The size, in millipoints, of the IPD used by this text-area.
* @param hasDiscretionaryHyphen Set this to true if the text should be followed by the hyphenation character.
* @return The newly-created TextArea.
*/
static TextAreaCharacters makeTextArea(final FoTextCharacters generatedBy, final LineArea4a parentArea,
- final int backingOffset, final int backingSize, final int progressionDimensionUsed,
- final boolean hasDiscretionaryHyphen) {
+ final int backingOffset, final int backingSize, final boolean hasDiscretionaryHyphen) {
final Link<FoTextCharacters> linkage = parentArea.getLink(generatedBy);
final TextAreaCharacters newTextArea = new TextAreaCharacters(parentArea, linkage);
newTextArea.registerLink(generatedBy);
- newTextArea.init(parentArea, backingOffset, backingSize, progressionDimensionUsed, hasDiscretionaryHyphen);
+ newTextArea.init(parentArea, backingOffset, backingSize, hasDiscretionaryHyphen);
return newTextArea;
}
@@ -98,29 +96,23 @@
* Package-visible factory method.
* @param generatedBy The FO node generating this area.
* @param parentArea The parent area.
- * @param backingOffset The index of the first character in the char array
- * that is the backing for the text in this object.
- * For example, if the text in this TextSegment starts at array element 5
- * and has a size of 14, backingOffset will be 5.
- * @param backingSize The number of char elements in the backing char array
- * that are actually included in this area.
- * For example, if the text in this TextSegment starts at array element 5
- * and has a size of 14, backingSize will be 14.
- * The ending array element that belongs to this TextSegment is computed
- * as backingOffset + backingSize.
- * @param progressionDimensionUsed The size, in millipoints, of the IPD used
- * by this text-area.
- * @param hasDiscretionaryHyphen Set this to true if the text should be
- * followed by the hyphenation character.
+ * @param backingOffset The index of the first character in the char array that is the backing for the text in this
+ * object.
+ * For example, if the text in this TextSegment starts at array element 5 and has a size of 14, backingOffset will
+ * be 5.
+ * @param backingSize The number of char elements in the backing char array that are actually included in this area.
+ * For example, if the text in this TextSegment starts at array element 5 and has a size of 14, backingSize will be
+ * 14.
+ * The ending array element that belongs to this TextSegment is computed as backingOffset + backingSize.
+ * @param hasDiscretionaryHyphen Set this to true if the text should be followed by the hyphenation character.
* @return The newly-created TextArea.
*/
static TextAreaCharacters makeTextArea(final FoTextCharacters generatedBy, final AbstractInlineArea parentArea,
- final int backingOffset, final int backingSize, final int progressionDimensionUsed,
- final boolean hasDiscretionaryHyphen) {
+ final int backingOffset, final int backingSize, final boolean hasDiscretionaryHyphen) {
final Link<FoTextCharacters> linkage = parentArea.getLink(generatedBy);
final TextAreaCharacters newTextArea = new TextAreaCharacters(parentArea, linkage);
newTextArea.registerLink(generatedBy);
- newTextArea.init(parentArea, backingOffset, backingSize, progressionDimensionUsed, hasDiscretionaryHyphen);
+ newTextArea.init(parentArea, backingOffset, backingSize, hasDiscretionaryHyphen);
return newTextArea;
}
@@ -127,27 +119,21 @@
/**
* Initialized the dimensions of this Area.
* @param parentArea The parent area.
- * @param backingOffset The index of the first character in the char array
- * that is the backing for the text in this object.
- * For example, if the text in this TextSegment starts at array element 5
- * and has a size of 14, backingOffset will be 5.
- * @param backingSize The number of char elements in the backing char array
- * that are actually included in this area.
- * For example, if the text in this TextSegment starts at array element 5
- * and has a size of 14, backingSize will be 14.
- * The ending array element that belongs to this TextSegment is computed
- * as backingOffset + backingSize.
- * @param progressionDimensionUsed The size, in millipoints, of the IPD used
- * by this text-area.
- * @param hasDiscretionaryHyphen Set this to true if the text should be
- * followed by the hyphenation character.
+ * @param backingOffset The index of the first character in the char array that is the backing for the text in this
+ * object.
+ * For example, if the text in this TextSegment starts at array element 5 and has a size of 14, backingOffset will
+ * be 5.
+ * @param backingSize The number of char elements in the backing char array that are actually included in this area.
+ * For example, if the text in this TextSegment starts at array element 5 and has a size of 14, backingSize will be
+ * 14.
+ * The ending array element that belongs to this TextSegment is computed as backingOffset + backingSize.
+ * @param hasDiscretionaryHyphen Set this to true if the text should be followed by the hyphenation character.
*/
- private void init(final Area4a parentArea, final int backingOffset,
- final int backingSize, final int progressionDimensionUsed,
+ private void init(final Area4a parentArea, final int backingOffset, final int backingSize,
final boolean hasDiscretionaryHyphen) {
final FoTextCharacters generatedBy = this.traitGeneratedBy();
- this.charSequence = new TextAreaCharSequence(generatedBy.getRefinedText(this),
- backingOffset, backingSize, hasDiscretionaryHyphen);
+ this.charSequence = new TextAreaCharSequence(generatedBy.getRefinedText(this), backingOffset, backingSize,
+ hasDiscretionaryHyphen);
setResolvedLetterSpacing(traitLetterSpacingOpt());
setResolvedWordSpacing(traitWordSpacingOpt());
final int computedPD = this.recomputeProgressionDimension();
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2023-01-20 22:15:50 UTC (rev 13072)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2023-01-20 23:27:42 UTC (rev 13073)
@@ -173,7 +173,7 @@
* content item belongs on this line. */
final TextTokenFlowLocation end =
foTextTokenFlow.markLocation(tokenIndex, PrimitiveConstants.MAX_7_BIT_UNSIGNED_VALUE);
- lineArea.createGlyphAreaSequence(this.content, start, end, ipd);
+ lineArea.createGlyphAreaSequence(this.content, start, end);
return iterator.nextIndex();
}
}
@@ -181,13 +181,13 @@
tokenIndex = iterator.branchIndexAt(1);
segmentIndex = iterator.depth() > 2 ? iterator.branchIndexAt(2) : 0;
final TextTokenFlowLocation end = foTextTokenFlow.markLocation(tokenIndex, segmentIndex);
- lineArea.createGlyphAreaSequence(this.content, start, end, ipd);
+ lineArea.createGlyphAreaSequence(this.content, start, end);
return iterator.nextIndex();
}
/* The iterator is out of content. All of this content item goes on this line. */
final TextTokenFlowLocation end =
foTextTokenFlow.markLocation(tokenIndex, PrimitiveConstants.MAX_7_BIT_UNSIGNED_VALUE);
- lineArea.createGlyphAreaSequence(this.content, start, end, ipd);
+ lineArea.createGlyphAreaSequence(this.content, start, end);
return iterator.nextIndex();
}
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2023-01-20 22:15:50 UTC (rev 13072)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2023-01-20 23:27:42 UTC (rev 13073)
@@ -127,7 +127,7 @@
final TextTokenFlowLocation endLocation =
this.node.getFoTokenFlow().markLocation(tokenIndex, segmentIndex);
- lineArea.createGlyphAreaSequence(this.node, startLocation, endLocation, 0);
+ lineArea.createGlyphAreaSequence(this.node, startLocation, endLocation);
startLocation = endLocation;
}
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 2023-01-20 22:15:50 UTC (rev 13072)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java 2023-01-20 23:27:42 UTC (rev 13073)
@@ -747,8 +747,7 @@
}
if (textToUse instanceof FoTextCharacters) {
final FoTextCharacters foText = (FoTextCharacters) textToUse;
- factory.createGlyphAreaSequence(foText, startOffset, sizeInChars, sizeInline, hasDiscretionaryHyphen,
- isLastItemOnLine);
+ factory.createGlyphAreaSequence(foText, startOffset, sizeInChars, hasDiscretionaryHyphen, isLastItemOnLine);
} else {
throw new TextException("Returned LineText is an unknown type.");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-20 22:15:52
|
Revision: 13072
http://sourceforge.net/p/foray/code/13072
Author: victormote
Date: 2023-01-20 22:15:50 +0000 (Fri, 20 Jan 2023)
Log Message:
-----------
Conform to aXSL change: Remove hasFauxSmallCaps from text area creation.
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-areatree/src/main/java/org/foray/area/TextAreaCharacters.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaWords.java
trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/lb/LineBreakHandler.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/lb/SolitaryLineBreaker.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 2023-01-20 21:38:45 UTC (rev 13071)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java 2023-01-20 22:15:50 UTC (rev 13072)
@@ -76,12 +76,11 @@
@Override
public TextArea createGlyphAreaSequence(final FoTextCharacters foText,
final int startOffset, final int sizeInChars, final int ipd,
- final boolean hasDiscretionaryHyphen,
- final boolean hasFauxSmallCaps, final boolean isLastItemOnLine) {
+ final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine) {
if (LineArea4a.shouldCreateTextArea(foText, this, startOffset,
sizeInChars, isLastItemOnLine, this)) {
final TextArea newTextArea = TextAreaCharacters.makeTextArea(foText, this, startOffset, sizeInChars, ipd,
- hasDiscretionaryHyphen, hasFauxSmallCaps);
+ hasDiscretionaryHyphen);
this.children.add(newTextArea);
return newTextArea;
}
@@ -91,7 +90,7 @@
@Override
public GlyphAreaSequenceG5 createGlyphAreaSequence(final FoTextWords paragraph,
final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation,
- final int ipd, final boolean hasFauxSmallCaps) {
+ final int ipd) {
throw new UnsupportedOperationException();
}
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 2023-01-20 21:38:45 UTC (rev 13071)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2023-01-20 22:15:50 UTC (rev 13072)
@@ -991,11 +991,10 @@
@Override
public TextArea createGlyphAreaSequence(final FoTextCharacters foText, final int startOffset, final int sizeInChars,
- final int ipd, final boolean hasDiscretionaryHyphen, final boolean hasFauxSmallCaps,
- final boolean isLastItemOnLine) {
+ final int ipd, final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine) {
if (shouldCreateTextArea(foText, this, startOffset, sizeInChars, isLastItemOnLine, this)) {
final TextAreaCharacters newTextArea = TextAreaCharacters.makeTextArea(foText, this, startOffset,
- sizeInChars, ipd, hasDiscretionaryHyphen, hasFauxSmallCaps);
+ sizeInChars, ipd, hasDiscretionaryHyphen);
this.children.add(newTextArea);
return newTextArea;
}
@@ -1005,7 +1004,7 @@
@Override
public GlyphAreaSequenceG5 createGlyphAreaSequence(final FoTextWords paragraph,
final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation,
- final int ipd, final boolean hasFauxSmallCaps) {
+ final int ipd) {
final TextAreaWords newTextArea = TextAreaWords.makeTextArea(paragraph, this, startLocation, endLocation);
this.children.add(newTextArea);
return newTextArea;
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 2023-01-20 21:38:45 UTC (rev 13071)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java 2023-01-20 22:15:50 UTC (rev 13072)
@@ -383,7 +383,7 @@
public int traitFontSize() {
final FoText generatedBy = this.traitGeneratedBy();
final int nominalFontSize = generatedBy.traitFontSizeActual(this);
- if (this.hasFauxSmallCaps()) {
+ if (usesFauxSmallCaps()) {
final FontUse fontUse = traitNominalFont();
return fontUse.smallCapsSize(nominalFontSize);
}
@@ -391,12 +391,6 @@
}
/**
- * Indicates whether this text area has faux small caps.
- * @return True if and only if this character sequence has faux small caps.
- */
- abstract boolean hasFauxSmallCaps();
-
- /**
* Indicates whether this text-area ends with a linefeed.
* @return True if and only if this text-area ends with a linefeed.
*/
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaCharacters.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaCharacters.java 2023-01-20 21:38:45 UTC (rev 13071)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaCharacters.java 2023-01-20 22:15:50 UTC (rev 13072)
@@ -82,19 +82,15 @@
* The ending array element that belongs to this TextSegment is computed as backingOffset + backingSize.
* @param progressionDimensionUsed The size, in millipoints, of the IPD used by this text-area.
* @param hasDiscretionaryHyphen Set this to true if the text should be followed by the hyphenation character.
- * @param hasFauxSmallCaps Set this to true if faux small caps should be applied to this TextArea.
- * If true, all text will be converted to uppercase and a reduced font-size will be applied.
* @return The newly-created TextArea.
*/
static TextAreaCharacters makeTextArea(final FoTextCharacters generatedBy, final LineArea4a parentArea,
final int backingOffset, final int backingSize, final int progressionDimensionUsed,
- final boolean hasDiscretionaryHyphen, final boolean hasFauxSmallCaps) {
+ final boolean hasDiscretionaryHyphen) {
final Link<FoTextCharacters> linkage = parentArea.getLink(generatedBy);
final TextAreaCharacters newTextArea = new TextAreaCharacters(parentArea, linkage);
newTextArea.registerLink(generatedBy);
- newTextArea.init(parentArea, backingOffset, backingSize,
- progressionDimensionUsed,
- hasDiscretionaryHyphen, hasFauxSmallCaps);
+ newTextArea.init(parentArea, backingOffset, backingSize, progressionDimensionUsed, hasDiscretionaryHyphen);
return newTextArea;
}
@@ -116,20 +112,15 @@
* by this text-area.
* @param hasDiscretionaryHyphen Set this to true if the text should be
* followed by the hyphenation character.
- * @param hasFauxSmallCaps Set this to true if faux small caps should be
- * applied to this TextArea.
- * If true, all text will be converted to uppercase and a reduced font-size
- * will be applied.
* @return The newly-created TextArea.
*/
static TextAreaCharacters makeTextArea(final FoTextCharacters generatedBy, final AbstractInlineArea parentArea,
final int backingOffset, final int backingSize, final int progressionDimensionUsed,
- final boolean hasDiscretionaryHyphen, final boolean hasFauxSmallCaps) {
+ final boolean hasDiscretionaryHyphen) {
final Link<FoTextCharacters> linkage = parentArea.getLink(generatedBy);
final TextAreaCharacters newTextArea = new TextAreaCharacters(parentArea, linkage);
newTextArea.registerLink(generatedBy);
- newTextArea.init(parentArea, backingOffset, backingSize, progressionDimensionUsed, hasDiscretionaryHyphen,
- hasFauxSmallCaps);
+ newTextArea.init(parentArea, backingOffset, backingSize, progressionDimensionUsed, hasDiscretionaryHyphen);
return newTextArea;
}
@@ -150,18 +141,13 @@
* by this text-area.
* @param hasDiscretionaryHyphen Set this to true if the text should be
* followed by the hyphenation character.
- * @param hasFauxSmallCaps Set this to true if faux small caps should be
- * applied to this TextArea.
- * If true, all text will be converted to uppercase and a reduced font-size
- * will be applied.
*/
private void init(final Area4a parentArea, final int backingOffset,
final int backingSize, final int progressionDimensionUsed,
- final boolean hasDiscretionaryHyphen,
- final boolean hasFauxSmallCaps) {
+ final boolean hasDiscretionaryHyphen) {
final FoTextCharacters generatedBy = this.traitGeneratedBy();
this.charSequence = new TextAreaCharSequence(generatedBy.getRefinedText(this),
- backingOffset, backingSize, hasDiscretionaryHyphen, hasFauxSmallCaps);
+ backingOffset, backingSize, hasDiscretionaryHyphen);
setResolvedLetterSpacing(traitLetterSpacingOpt());
setResolvedWordSpacing(traitWordSpacingOpt());
final int computedPD = this.recomputeProgressionDimension();
@@ -175,11 +161,6 @@
return this.foLink;
}
- @Override
- boolean hasFauxSmallCaps() {
- return this.charSequence.hasFauxSmallCaps();
- }
-
/**
* {@inheritDoc}
* <p>Computes and returns the text that should actually be used in the
@@ -256,13 +237,6 @@
private boolean hasDiscretionaryHyphen = false;
/**
- * Set this to true if faux small caps should be applied to this TextArea.
- * If true, all text will be converted to uppercase and a reduced font-size
- * will be applied.
- */
- private boolean hasFauxSmallCaps = false;
-
- /**
* Constructor.
* @param wrappedSequence The encapsulated sequence, a subset of which is the content for
* this sequence.
@@ -272,14 +246,9 @@
* be part of this sequence.
* @param hasDiscretionaryHyphen Set this to true if the text should be
* followed by the hyphenation character.
- * @param hasFauxSmallCaps Set this to true if faux small caps should be
- * applied to this TextArea.
- * If true, all text will be converted to uppercase and a reduced font-size
- * will be applied.
*/
private TextAreaCharSequence(final CharSequence wrappedSequence, final int start,
- final int length, final boolean hasDiscretionaryHyphen,
- final boolean hasFauxSmallCaps) {
+ final int length, final boolean hasDiscretionaryHyphen) {
if (start < 0
|| length < 0
|| start + length > wrappedSequence.length()) {
@@ -289,18 +258,9 @@
this.start = start;
this.length = length;
this.hasDiscretionaryHyphen = hasDiscretionaryHyphen;
- this.hasFauxSmallCaps = hasFauxSmallCaps;
}
/**
- * Indicates whether 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;
- }
-
- /**
* Returns the raw text for this area. This method is used primarily for
* testing purposes as it just dumps the text out without any final
* adjustments.
@@ -402,7 +362,7 @@
if (ourIndex < ourEnd) {
final char c = this.wrappedSequence.charAt(ourIndex);
/* Apply faux small-caps, if appropriate. */
- if (this.hasFauxSmallCaps) {
+ if (usesFauxSmallCaps()) {
return java.lang.Character.toUpperCase(c);
} else {
return c;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaWords.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaWords.java 2023-01-20 21:38:45 UTC (rev 13071)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaWords.java 2023-01-20 22:15:50 UTC (rev 13072)
@@ -103,12 +103,6 @@
}
@Override
- boolean hasFauxSmallCaps() {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
boolean endsWithLinefeed() {
// TODO Auto-generated method stub
return false;
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2023-01-20 21:38:45 UTC (rev 13071)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2023-01-20 22:15:50 UTC (rev 13072)
@@ -173,7 +173,7 @@
* content item belongs on this line. */
final TextTokenFlowLocation end =
foTextTokenFlow.markLocation(tokenIndex, PrimitiveConstants.MAX_7_BIT_UNSIGNED_VALUE);
- lineArea.createGlyphAreaSequence(this.content, start, end, ipd, false);
+ lineArea.createGlyphAreaSequence(this.content, start, end, ipd);
return iterator.nextIndex();
}
}
@@ -181,13 +181,13 @@
tokenIndex = iterator.branchIndexAt(1);
segmentIndex = iterator.depth() > 2 ? iterator.branchIndexAt(2) : 0;
final TextTokenFlowLocation end = foTextTokenFlow.markLocation(tokenIndex, segmentIndex);
- lineArea.createGlyphAreaSequence(this.content, start, end, ipd, false);
+ lineArea.createGlyphAreaSequence(this.content, start, end, ipd);
return iterator.nextIndex();
}
/* The iterator is out of content. All of this content item goes on this line. */
final TextTokenFlowLocation end =
foTextTokenFlow.markLocation(tokenIndex, PrimitiveConstants.MAX_7_BIT_UNSIGNED_VALUE);
- lineArea.createGlyphAreaSequence(this.content, start, end, ipd, false);
+ lineArea.createGlyphAreaSequence(this.content, start, end, ipd);
return iterator.nextIndex();
}
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2023-01-20 21:38:45 UTC (rev 13071)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2023-01-20 22:15:50 UTC (rev 13072)
@@ -127,7 +127,7 @@
final TextTokenFlowLocation endLocation =
this.node.getFoTokenFlow().markLocation(tokenIndex, segmentIndex);
- lineArea.createGlyphAreaSequence(this.node, startLocation, endLocation, 0, false);
+ lineArea.createGlyphAreaSequence(this.node, startLocation, endLocation, 0);
startLocation = endLocation;
}
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 2023-01-20 21:38:45 UTC (rev 13071)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java 2023-01-20 22:15:50 UTC (rev 13072)
@@ -730,11 +730,9 @@
}
@Override
- public void handleLineBreakText(final OutputLine lineOutput,
- final CharContent text, final int startOffset, final int sizeInChars,
- final int sizeInline, final boolean hasDiscretionaryHyphen,
- final boolean hasFauxSmallCaps, final boolean isLastItemOnLine)
- throws TextException {
+ public void handleLineBreakText(final OutputLine lineOutput, final CharContent text, final int startOffset,
+ final int sizeInChars, final int sizeInline, final boolean hasDiscretionaryHyphen,
+ final boolean isLastItemOnLine) throws TextException {
checkLayoutTarget(lineOutput);
final LineArea lineArea = (LineArea) lineOutput;
@@ -750,7 +748,7 @@
if (textToUse instanceof FoTextCharacters) {
final FoTextCharacters foText = (FoTextCharacters) textToUse;
factory.createGlyphAreaSequence(foText, startOffset, sizeInChars, sizeInline, hasDiscretionaryHyphen,
- hasFauxSmallCaps, isLastItemOnLine);
+ isLastItemOnLine);
} else {
throw new TextException("Returned LineText is an unknown type.");
}
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/lb/LineBreakHandler.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/lb/LineBreakHandler.java 2023-01-20 21:38:45 UTC (rev 13071)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/lb/LineBreakHandler.java 2023-01-20 22:15:50 UTC (rev 13072)
@@ -53,8 +53,6 @@
* on the line.
* @param hasDiscretionaryHyphen Indicates whether a discretionary hyphen
* should be added to the text being added.
- * @param hasFauxSmallCaps Indicates whether faux small-caps should be
- * applied to the text being added.
* @param isLastItemOnLine Indicates whether this text item is the last
* item on this line.
* @throws TextException For errors handling the output.
@@ -61,8 +59,7 @@
*/
void handleLineBreakText(OutputLine lineOutput, CharContent text,
int startOffset, int sizeInChars, int sizeInline,
- boolean hasDiscretionaryHyphen, boolean hasFauxSmallCaps,
- boolean isLastItemOnLine) throws TextException;
+ boolean hasDiscretionaryHyphen, boolean isLastItemOnLine) throws TextException;
/**
* Handle the results of the line-breaking by placing the specified text
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/lb/SolitaryLineBreaker.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/lb/SolitaryLineBreaker.java 2023-01-20 21:38:45 UTC (rev 13071)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/lb/SolitaryLineBreaker.java 2023-01-20 22:15:50 UTC (rev 13072)
@@ -353,10 +353,8 @@
isLastItemOnLine = false;
}
}
- final boolean isFauxSmallCaps = this.isInLowerCase();
- getHandler().handleLineBreakText(getCurrentLine(), lineText,
- startIndex, endIndex - startIndex + 1, sizeInline, isHyphenated,
- isFauxSmallCaps, isLastItemOnLine);
+ getHandler().handleLineBreakText(getCurrentLine(), lineText, startIndex, endIndex - startIndex + 1, sizeInline,
+ isHyphenated, isLastItemOnLine);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-20 21:38:48
|
Revision: 13071
http://sourceforge.net/p/foray/code/13071
Author: victormote
Date: 2023-01-20 21:38:45 +0000 (Fri, 20 Jan 2023)
Log Message:
-----------
Conform to aXSL change: Add method indicating whether the area uses faux small-caps.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/LeaderArea.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/ScalingValueCitationArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java
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 2023-01-20 18:23:38 UTC (rev 13070)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LeaderArea.java 2023-01-20 21:38:45 UTC (rev 13071)
@@ -531,4 +531,9 @@
return traitGeneratedBy().traitFontSizeActual(this);
}
+ @Override
+ public boolean usesFauxSmallCaps() {
+ return false;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java 2023-01-20 18:23:38 UTC (rev 13070)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java 2023-01-20 21:38:45 UTC (rev 13071)
@@ -281,4 +281,9 @@
return traitGeneratedBy().traitFontSizeActual(this);
}
+ @Override
+ public boolean usesFauxSmallCaps() {
+ return false;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java 2023-01-20 18:23:38 UTC (rev 13070)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java 2023-01-20 21:38:45 UTC (rev 13071)
@@ -302,4 +302,9 @@
return traitGeneratedBy().traitFontSizeActual(this);
}
+ @Override
+ public boolean usesFauxSmallCaps() {
+ return false;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java 2023-01-20 18:23:38 UTC (rev 13070)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java 2023-01-20 21:38:45 UTC (rev 13071)
@@ -302,4 +302,9 @@
return traitGeneratedBy().traitFontSizeActual(this);
}
+ @Override
+ public boolean usesFauxSmallCaps() {
+ return false;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/ScalingValueCitationArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/ScalingValueCitationArea.java 2023-01-20 18:23:38 UTC (rev 13070)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/ScalingValueCitationArea.java 2023-01-20 21:38:45 UTC (rev 13071)
@@ -293,4 +293,9 @@
return FontContext.DEFAULT;
}
+ @Override
+ public boolean usesFauxSmallCaps() {
+ return false;
+ }
+
}
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 2023-01-20 18:23:38 UTC (rev 13070)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java 2023-01-20 21:38:45 UTC (rev 13071)
@@ -566,4 +566,10 @@
*/
public abstract CharSequence getRawText();
+ @Override
+ public boolean usesFauxSmallCaps() {
+ /* TODO: Compute this from the resolved font and the font-variation property. */
+ return false;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-20 18:23:40
|
Revision: 13070
http://sourceforge.net/p/foray/code/13070
Author: victormote
Date: 2023-01-20 18:23:38 +0000 (Fri, 20 Jan 2023)
Log Message:
-----------
Minor doc and style changes.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java
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 2023-01-18 19:02:52 UTC (rev 13069)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2023-01-20 18:23:38 UTC (rev 13070)
@@ -74,12 +74,12 @@
*/
public final class LineArea4a extends BlockArea implements LineArea {
- /** The link to the FO tree. */
- private List<AreaNode4a> children = new ArrayList<AreaNode4a>();
-
/** The parent of this node. */
private NormalBlockArea4a parent;
+ /** The child nodes. */
+ private List<AreaNode4a> children = new ArrayList<AreaNode4a>();
+
/** See {@link #getProgressionDimension()} for a description of
* "progression dimension". */
private int progressionDimension = 0;
@@ -209,7 +209,7 @@
* user-specified limits is supported by the following statement from
* XSL-FO 1.0, Section 7.16.8: "Word spacing is also influenced by
* justification ...". */
- optimizeImpliedWordSpacing();
+// optimizeImpliedWordSpacing();
}
/**
@@ -490,52 +490,52 @@
text.incrementProgressionDimension(adjustment);
}
- /**
- * Optimize this line for implied word-spacing.
- */
- private void optimizeImpliedWordSpacing() {
- final int unusedSpace = this.pdAvailable();
- // If line is already justified, no optimization possible.
- if (unusedSpace == 0) {
- return;
- }
- /*
- * Approach here is to weight the distribution among various child
- * TextAreas according to their font-size. So, a bigger font-size will
- * absorb a relatively larger share of the change in word-space.
- */
- int totalDenominator = 0;
- final Iterator<OrderedTreeNode<AreaNode4a>> iterator = this.postOrderDescendantIterator();
- while (iterator.hasNext()) {
- final OrderedTreeNode<AreaNode4a> descendant = iterator.next();
- if (descendant instanceof TextArea) {
- final TextArea text = (TextArea) descendant;
- final int denominator = text.countSpaces()
- * text.traitFontSize();
- totalDenominator += denominator;
- }
- }
- if (totalDenominator == 0) {
- return;
- }
- final Iterator<OrderedTreeNode<AreaNode4a>> iterator2 = this.postOrderDescendantIterator();
- while (iterator2.hasNext()) {
- final OrderedTreeNode<AreaNode4a> descendant = iterator2.next();
- if (descendant instanceof TextArea) {
- final TextArea text = (TextArea) descendant;
- final int numSpaces = text.countSpaces();
- if (numSpaces == 0) {
- continue;
- }
- final int numerator = numSpaces * text.traitFontSize();
- final float share = (float) numerator / (float) totalDenominator
- * unusedSpace;
- final int adjustment = Math.round(share / numSpaces);
- final int previousWordSpacing = text.traitWordSpacing();
- text.setResolvedWordSpacing(previousWordSpacing + adjustment);
- }
- }
- }
+// /**
+// * Optimize this line for implied word-spacing.
+// */
+// private void optimizeImpliedWordSpacing() {
+// final int unusedSpace = this.pdAvailable();
+// // If line is already justified, no optimization possible.
+// if (unusedSpace == 0) {
+// return;
+// }
+// /*
+// * Approach here is to weight the distribution among various child
+// * TextAreas according to their font-size. So, a bigger font-size will
+// * absorb a relatively larger share of the change in word-space.
+// */
+// int totalDenominator = 0;
+// final Iterator<OrderedTreeNode<AreaNode4a>> iterator = this.postOrderDescendantIterator();
+// while (iterator.hasNext()) {
+// final OrderedTreeNode<AreaNode4a> descendant = iterator.next();
+// if (descendant instanceof TextArea) {
+// final TextArea text = (TextArea) descendant;
+// final int denominator = text.countSpaces()
+// * text.traitFontSize();
+// totalDenominator += denominator;
+// }
+// }
+// if (totalDenominator == 0) {
+// return;
+// }
+// final Iterator<OrderedTreeNode<AreaNode4a>> iterator2 = this.postOrderDescendantIterator();
+// while (iterator2.hasNext()) {
+// final OrderedTreeNode<AreaNode4a> descendant = iterator2.next();
+// if (descendant instanceof TextArea) {
+// final TextArea text = (TextArea) descendant;
+// final int numSpaces = text.countSpaces();
+// if (numSpaces == 0) {
+// continue;
+// }
+// final int numerator = numSpaces * text.traitFontSize();
+// final float share = (float) numerator / (float) totalDenominator
+// * unusedSpace;
+// final int adjustment = Math.round(share / numSpaces);
+// final int previousWordSpacing = text.traitWordSpacing();
+// text.setResolvedWordSpacing(previousWordSpacing + adjustment);
+// }
+// }
+// }
/**
* Balance (vertically) the inline areas within this line.
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 2023-01-18 19:02:52 UTC (rev 13069)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java 2023-01-20 18:23:38 UTC (rev 13070)
@@ -64,18 +64,10 @@
/** The parent of this node. The parent can be either a {@link LineArea4a} or another {@link AbstractInlineArea}. */
private Area4a parent;
- /**
- * The amount, in millipoints, of letter-spacing to be used <em>between
- * each letter</em> in this text.
- * area.
- */
+ /** The amount, in millipoints, of letter-spacing to be used <em>between each letter</em> in this text area. */
private int resolvedLetterSpacing;
- /**
- * The amount, in millipoints, of word-spacing to be used <em>on each
- * space</em> in this text.
- * area.
- */
+ /** The amount, in millipoints, of word-spacing to be used <em>on each space</em> in this text area. */
private int resolvedWordSpacing;
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-18 19:02:54
|
Revision: 13069
http://sourceforge.net/p/foray/code/13069
Author: victormote
Date: 2023-01-18 19:02:52 +0000 (Wed, 18 Jan 2023)
Log Message:
-----------
Conform to aXSL changes: 1. Add ipd to creation methods for word content. 2. Add method returning a horizontal stretch value for text items.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.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/TextArea.java
trunk/foray/foray-content/src/main/java/org/foray/content/CharContent4a.java
trunk/foray/foray-content/src/main/java/org/foray/content/Content4a.java
trunk/foray/foray-content/src/main/java/org/foray/content/LeaderContent.java
trunk/foray/foray-content/src/main/java/org/foray/content/PageReferenceContent.java
trunk/foray/foray-content/src/main/java/org/foray/content/ScalableContent.java
trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.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 2023-01-14 18:37:12 UTC (rev 13068)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java 2023-01-18 19:02:52 UTC (rev 13069)
@@ -91,7 +91,7 @@
@Override
public GlyphAreaSequenceG5 createGlyphAreaSequence(final FoTextWords paragraph,
final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation,
- final boolean hasFauxSmallCaps) {
+ final int ipd, final boolean hasFauxSmallCaps) {
throw new UnsupportedOperationException();
}
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 2023-01-14 18:37:12 UTC (rev 13068)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LeaderArea.java 2023-01-18 19:02:52 UTC (rev 13069)
@@ -263,12 +263,6 @@
return actualWordSpacing();
}
- @Override
- public int traitLetterSpacing() {
- /* Letter-spacing is not applicable for this inline element. */
- return 0;
- }
-
/**
* Computes the offset from this's start-edge at which the first dot
* should appear. The renderer needs to adjust its positioning to account
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 2023-01-14 18:37:12 UTC (rev 13068)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2023-01-18 19:02:52 UTC (rev 13069)
@@ -1005,7 +1005,7 @@
@Override
public GlyphAreaSequenceG5 createGlyphAreaSequence(final FoTextWords paragraph,
final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation,
- final boolean hasFauxSmallCaps) {
+ final int ipd, final boolean hasFauxSmallCaps) {
final TextAreaWords newTextArea = TextAreaWords.makeTextArea(paragraph, this, startLocation, endLocation);
this.children.add(newTextArea);
return newTextArea;
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 2023-01-14 18:37:12 UTC (rev 13068)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java 2023-01-18 19:02:52 UTC (rev 13069)
@@ -48,21 +48,15 @@
import java.util.List;
/**
- * <p>TextArea is a convenience class whose members represent contiguous
- * glyph-areas that have identical text-related traits.
- * With regard to the XSL-FO AreaTree, it is not a real area: essentially
- * each character in the TextArea represents an XSL-FO glyph-area.</p>
+ * <p>FOray implementation of {@link GlyphAreaSequenceG5}.</p>
*
- * <p>TextArea does not contain a copy of the text, but only keeps pointers to
- * the text that is in the FOTree.
- * Its generated-by is always an FObjMixed FO, and it is "backed" by exactly
- * one of the nodes immediately under that FObjMixed item, usually an FOText
- * node.
- * TextArea stores a pointer to that node, as well a record of how much of
- * that node's text actually belongs in this area.
- * Please note that a given FOText node may have more than one TextArea that
- * springs from it (they would have to be in different LineAreas or use
- * different Fonts due to overriding).
+ * <p>TextArea does not contain a copy of the text, but only keeps pointers to the text that is in the FOTree.
+ * Its generated-by is always an {@code TODO: Fix this}, and it is "backed" by exactly one of the nodes immediately
+ * under that object, usually an FOText node.
+ * TextArea stores a pointer to that node, as well a record of how much of that node's text actually belongs in this
+ * area.
+ * Please note that a given FOText node may have more than one TextArea that springs from it (they would have to be in
+ * different LineAreas or use different Fonts due to overriding).
* However, a TextSegment always springs from exactly one FOText node.
*/
public abstract class TextArea extends AbstractInlineArea implements GlyphAreaSequenceG5 {
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/CharContent4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/CharContent4a.java 2023-01-14 18:37:12 UTC (rev 13068)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/CharContent4a.java 2023-01-18 19:02:52 UTC (rev 13069)
@@ -74,7 +74,8 @@
}
@Override
- public int addToLine(final LineArea lineArea, final KpLeafIterator iterator, final int endLeafIndex) {
+ public int addToLine(final LineArea lineArea, final KpLeafIterator iterator, final int endLeafIndex,
+ final int ipd) {
return iterator.nextIndex();
}
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/Content4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/Content4a.java 2023-01-14 18:37:12 UTC (rev 13068)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/Content4a.java 2023-01-18 19:02:52 UTC (rev 13069)
@@ -77,8 +77,9 @@
* @param iterator The iterator over the paragraph content.
* @param endLeafIndex The index to the first leaf node that should <em>not</em> be processed by this method, i.e.
* the first item on the next line.
+ * @param ipd The inline-progression-dimension (width in horizontal writing systems) of the content being added.
* @return The index to the next leaf in {@code iterator} that is now unprocessed.
*/
- public abstract int addToLine(LineArea lineArea, KpLeafIterator iterator, int endLeafIndex);
+ public abstract int addToLine(LineArea lineArea, KpLeafIterator iterator, int endLeafIndex, int ipd);
}
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/LeaderContent.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/LeaderContent.java 2023-01-14 18:37:12 UTC (rev 13068)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/LeaderContent.java 2023-01-18 19:02:52 UTC (rev 13069)
@@ -75,7 +75,8 @@
}
@Override
- public int addToLine(final LineArea lineArea, final KpLeafIterator iterator, final int endLeafIndex) {
+ public int addToLine(final LineArea lineArea, final KpLeafIterator iterator, final int endLeafIndex,
+ final int ipd) {
return iterator.nextIndex();
}
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/PageReferenceContent.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/PageReferenceContent.java 2023-01-14 18:37:12 UTC (rev 13068)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/PageReferenceContent.java 2023-01-18 19:02:52 UTC (rev 13069)
@@ -87,7 +87,8 @@
}
@Override
- public int addToLine(final LineArea lineArea, final KpLeafIterator iterator, final int endLeafIndex) {
+ public int addToLine(final LineArea lineArea, final KpLeafIterator iterator, final int endLeafIndex,
+ final int ipd) {
return iterator.nextIndex();
}
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/ScalableContent.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/ScalableContent.java 2023-01-14 18:37:12 UTC (rev 13068)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/ScalableContent.java 2023-01-18 19:02:52 UTC (rev 13069)
@@ -78,7 +78,8 @@
}
@Override
- public int addToLine(final LineArea lineArea, final KpLeafIterator iterator, final int endLeafIndex) {
+ public int addToLine(final LineArea lineArea, final KpLeafIterator iterator, final int endLeafIndex,
+ final int ipd) {
if (this.content instanceof ExternalGraphic) {
final ExternalGraphic externalGraphic = (ExternalGraphic) this.content;
lineArea.createExternalGraphicArea(externalGraphic, -1);
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2023-01-14 18:37:12 UTC (rev 13068)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2023-01-18 19:02:52 UTC (rev 13069)
@@ -149,7 +149,8 @@
}
@Override
- public int addToLine(final LineArea lineArea, final KpLeafIterator iterator, final int endLeafIndex) {
+ public int addToLine(final LineArea lineArea, final KpLeafIterator iterator, final int endLeafIndex,
+ final int ipd) {
/* The iterator branch stack tells us where we are. Element 0 is the index into the children of
* contentTree. If there is an element 1, it is because the element in contentTree is a text element,
* and element 1 is the index into its child tokens. If there is an element 2, it is the index into
@@ -172,7 +173,7 @@
* content item belongs on this line. */
final TextTokenFlowLocation end =
foTextTokenFlow.markLocation(tokenIndex, PrimitiveConstants.MAX_7_BIT_UNSIGNED_VALUE);
- lineArea.createGlyphAreaSequence(this.content, start, end, false);
+ lineArea.createGlyphAreaSequence(this.content, start, end, ipd, false);
return iterator.nextIndex();
}
}
@@ -180,13 +181,13 @@
tokenIndex = iterator.branchIndexAt(1);
segmentIndex = iterator.depth() > 2 ? iterator.branchIndexAt(2) : 0;
final TextTokenFlowLocation end = foTextTokenFlow.markLocation(tokenIndex, segmentIndex);
- lineArea.createGlyphAreaSequence(this.content, start, end, false);
+ lineArea.createGlyphAreaSequence(this.content, start, end, ipd, false);
return iterator.nextIndex();
}
/* The iterator is out of content. All of this content item goes on this line. */
final TextTokenFlowLocation end =
foTextTokenFlow.markLocation(tokenIndex, PrimitiveConstants.MAX_7_BIT_UNSIGNED_VALUE);
- lineArea.createGlyphAreaSequence(this.content, start, end, false);
+ lineArea.createGlyphAreaSequence(this.content, start, end, ipd, false);
return iterator.nextIndex();
}
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2023-01-14 18:37:12 UTC (rev 13068)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2023-01-18 19:02:52 UTC (rev 13069)
@@ -127,7 +127,7 @@
final TextTokenFlowLocation endLocation =
this.node.getFoTokenFlow().markLocation(tokenIndex, segmentIndex);
- lineArea.createGlyphAreaSequence(this.node, startLocation, endLocation, false);
+ lineArea.createGlyphAreaSequence(this.node, startLocation, endLocation, 0, false);
startLocation = endLocation;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-14 18:37:16
|
Revision: 13068
http://sourceforge.net/p/foray/code/13068
Author: victormote
Date: 2023-01-14 18:37:12 +0000 (Sat, 14 Jan 2023)
Log Message:
-----------
Fix bug related to transferring line-breaking results into actual areas.
Modified Paths:
--------------
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2023-01-14 16:20:12 UTC (rev 13067)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2023-01-14 18:37:12 UTC (rev 13068)
@@ -120,7 +120,7 @@
/* If we are at the end of the content, set the token index to the number of tokens, i.e. one past the last
* token index. */
- if (iterator.hasNext()) {
+ if (! iterator.hasNext()) {
tokenIndex = this.content.getTokenFlow().qtyTokens();
segmentIndex = 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-14 16:20:16
|
Revision: 13067
http://sourceforge.net/p/foray/code/13067
Author: victormote
Date: 2023-01-14 16:20:12 +0000 (Sat, 14 Jan 2023)
Log Message:
-----------
Allow test documents to be embedded as Strings directly in the test.
Modified Paths:
--------------
trunk/foray/foray-app/build.gradle
trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/BorderTests.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/GraphicAreaTests.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/InlineTests.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/MetadataTests.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/VerticalTests.java
trunk/foray/foray-app/src/testFixtures/java/org/foray/app/AreaTreeCreator.java
trunk/foray/foray-app/src/testFixtures/java/org/foray/app/FoDocumentReader.java
Removed Paths:
-------------
trunk/foray/foray-00-master/dist/resource/test/fo/vertical-001.fo
Deleted: trunk/foray/foray-00-master/dist/resource/test/fo/vertical-001.fo
===================================================================
--- trunk/foray/foray-00-master/dist/resource/test/fo/vertical-001.fo 2023-01-14 15:47:04 UTC (rev 13066)
+++ trunk/foray/foray-00-master/dist/resource/test/fo/vertical-001.fo 2023-01-14 16:20:12 UTC (rev 13067)
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-This fo file contains one empty block nested inside another block and tests that
-the three resulting block areas exist and are positioned correctly.
--->
-
-<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xml:lang="eng-US">
-
-<fo:layout-master-set>
- <!-- layout for the first page -->
- <fo:simple-page-master master-name="simple"
- margin-top="1in"
- margin-bottom="1in"
- margin-left="1in"
- margin-right="1in">
- <fo:region-body/>
- </fo:simple-page-master>
-</fo:layout-master-set>
-
-<fo:page-sequence master-reference="simple">
-<fo:flow flow-name="xsl-region-body">
-
-
-<fo:block font-family="Base14-Courier" font-size="12pt">At the end of this sentence is a footnote
-citation.<fo:inline font-size="60%" vertical-align="super">7</fo:inline></fo:block>
-
-
-
-</fo:flow>
-</fo:page-sequence>
-</fo:root>
Modified: trunk/foray/foray-app/build.gradle
===================================================================
--- trunk/foray/foray-app/build.gradle 2023-01-14 15:47:04 UTC (rev 13066)
+++ trunk/foray/foray-app/build.gradle 2023-01-14 16:20:12 UTC (rev 13067)
@@ -50,6 +50,8 @@
testFixturesImplementation (project(':foray-core'))
testFixturesImplementation (project(':foray-fotree'))
testFixturesImplementation (project(':foray-pioneer'))
+
+ testImplementation(testFixtures(group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl))
}
javadoc {
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java 2023-01-14 15:47:04 UTC (rev 13066)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java 2023-01-14 16:20:12 UTC (rev 13067)
@@ -72,7 +72,7 @@
@Test
public void testBlock001() {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
- final AreaTree areaTree = creator.buildAreaTree("fo/block-001.fo", getLineBreakerFactory());
+ final AreaTree areaTree = creator.buildAreaTreeFromFile("fo/block-001.fo", getLineBreakerFactory());
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* The outer block area. */
@@ -161,7 +161,7 @@
@Test
public void testBlock002() {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
- final AreaTree4a areaTree = creator.buildAreaTree("fo/block-002.fo", getLineBreakerFactory());
+ final AreaTree4a areaTree = creator.buildAreaTreeFromFile("fo/block-002.fo", getLineBreakerFactory());
final PageCollection4a pageCollection = areaTree.getChildren().get(0);
final int numPages = pageCollection.qtyAreaChildren();
assertEquals(2, numPages);
@@ -238,7 +238,7 @@
public void testBlock003() throws FontException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
- final AreaTree4a areaTree = creator.buildAreaTree("fo/block-003.fo", getLineBreakerFactory());
+ final AreaTree4a areaTree = creator.buildAreaTreeFromFile("fo/block-003.fo", getLineBreakerFactory());
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* Test location and dimensions of the block area. */
@@ -299,7 +299,7 @@
@Disabled
public void testBlock004() throws FontException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
- final AreaTree4a areaTree = creator.buildAreaTree("fo/block-004.fo", getLineBreakerFactory());
+ final AreaTree4a areaTree = creator.buildAreaTreeFromFile("fo/block-004.fo", getLineBreakerFactory());
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* Test location and dimensions of the block area. */
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/BorderTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/BorderTests.java 2023-01-14 15:47:04 UTC (rev 13066)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/BorderTests.java 2023-01-14 16:20:12 UTC (rev 13067)
@@ -50,7 +50,7 @@
@Test
public void testBorderStyle001() {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
- final AreaTree4a areaTree = creator.buildAreaTree("fo/border-style-001.fo", getLineBreakerFactory());
+ final AreaTree4a areaTree = creator.buildAreaTreeFromFile("fo/border-style-001.fo", getLineBreakerFactory());
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
final AreaNode node = firstNormalFlowArea.areaChildAt(0);
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/GraphicAreaTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/GraphicAreaTests.java 2023-01-14 15:47:04 UTC (rev 13066)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/GraphicAreaTests.java 2023-01-14 16:20:12 UTC (rev 13067)
@@ -58,7 +58,7 @@
@Disabled("Basic layout appears to be broken")
public void testGraphic002() throws ForayException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
- final AreaTree4a areaTree = creator.buildAreaTree("fo/graphic-002.fo", getLineBreakerFactory());
+ final AreaTree4a areaTree = creator.buildAreaTreeFromFile("fo/graphic-002.fo", getLineBreakerFactory());
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* There are two block areas. */
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/InlineTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/InlineTests.java 2023-01-14 15:47:04 UTC (rev 13066)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/InlineTests.java 2023-01-14 16:20:12 UTC (rev 13067)
@@ -59,7 +59,7 @@
@Disabled("Basic layout appears to be broken")
public void testInline001() throws ForayException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
- final AreaTree4a areaTree = creator.buildAreaTree("fo/inline-001.fo", getLineBreakerFactory());
+ final AreaTree4a areaTree = creator.buildAreaTreeFromFile("fo/inline-001.fo", getLineBreakerFactory());
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
assertEquals(1, firstNormalFlowArea.qtyAreaChildren());
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/MetadataTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/MetadataTests.java 2023-01-14 15:47:04 UTC (rev 13066)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/MetadataTests.java 2023-01-14 16:20:12 UTC (rev 13067)
@@ -48,7 +48,7 @@
@Test
public void testMetadata001() throws ForayException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
- final AreaTree4a areaTree = creator.buildAreaTree("fo/metadata-001.fo", getLineBreakerFactory());
+ final AreaTree4a areaTree = creator.buildAreaTreeFromFile("fo/metadata-001.fo", getLineBreakerFactory());
assertNotNull(areaTree);
assertEquals("Test Title", areaTree.getMetadata().getTitle());
assertEquals("Test Author", areaTree.getMetadata().getAuthor());
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/VerticalTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/VerticalTests.java 2023-01-14 15:47:04 UTC (rev 13066)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/VerticalTests.java 2023-01-14 16:20:12 UTC (rev 13067)
@@ -41,6 +41,7 @@
import org.axsl.area.NormalFlowRa;
import org.axsl.font.FontUse;
import org.axsl.fotree.FoTreeException;
+import org.axsl.fotree.fixture.FoTreeBoilerplate;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -53,14 +54,22 @@
public class VerticalTests extends AbstractAreaTreeTest {
/**
- * Test of fo/vertical-001.fo.
+ * Test of superscript vertical positioning.
* @throws ForayException For errors creating the FO Tree or Area Tree.
*/
@Test
@Disabled("Basic layout appears to be broken")
public void testVertical001() throws FoTreeException, AreaTreeException {
+ final String document =
+FoTreeBoilerplate.MINIMUM_PROLOG +
+"<fo:flow flow-name=\"xsl-region-body\">\n" +
+" <fo:block font-family=\"Base14-Courier\" font-size=\"12pt\">At the end of this sentence is a footnote\n" +
+" citation.<fo:inline font-size=\"60%\" vertical-align=\"super\">7</fo:inline></fo:block>\n" +
+"</fo:flow>\n" +
+FoTreeBoilerplate.MINIMUM_EPILOG;
+
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
- final AreaTree4a areaTree = creator.buildAreaTree("fo/vertical-001.fo", getLineBreakerFactory());
+ final AreaTree4a areaTree = creator.buildAreaTreeFromString(document, getLineBreakerFactory());
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* The block area. */
Modified: trunk/foray/foray-app/src/testFixtures/java/org/foray/app/AreaTreeCreator.java
===================================================================
--- trunk/foray/foray-app/src/testFixtures/java/org/foray/app/AreaTreeCreator.java 2023-01-14 15:47:04 UTC (rev 13066)
+++ trunk/foray/foray-app/src/testFixtures/java/org/foray/app/AreaTreeCreator.java 2023-01-14 16:20:12 UTC (rev 13067)
@@ -100,20 +100,13 @@
}
/**
- * Converts a file in the test directory to an AreaTree.
- * @param file The file to be converted.
+ * Converts a parsed FoTree to an AreaTree.
+ * @param foTree The FO tree to be converted.
* @param lbFactory The line-breaker factory.
* @return The parsed FO Tree instance.
* @throws FoTreeException For errors building the FO Tree.
*/
- public AreaTree4a buildAreaTree(final String file, final LineBreakerFactory lbFactory) {
- final FoDocumentReader foReader = FoDocumentReader.getInstance();
- FoTree4a foTree = null;
- try {
- foTree = foReader.buildFoTree(file);
- } catch (final FoTreeException e) {
- fail(e.getMessage());
- }
+ public AreaTree4a buildAreaTreeFromFoTree(final FoTree4a foTree, final LineBreakerFactory lbFactory) {
final Root4a root = foTree.getRootFo();
final AreaTree4a areaTree = this.areaTreeFactory.createAreaTree(foTree, this.fontServer,
FontSelectionConstraintsMdo.FREE_STANDING_ONLY, this.graphicServer);
@@ -134,4 +127,43 @@
return areaTree;
}
+ /**
+ * Converts a file in the test directory to an AreaTree.
+ * @param file The file to be converted.
+ * @param lbFactory The line-breaker factory.
+ * @return The parsed FO Tree instance.
+ * @throws FoTreeException For errors building the FO Tree.
+ */
+ public AreaTree4a buildAreaTreeFromFile(final String file, final LineBreakerFactory lbFactory) {
+ final FoDocumentReader foReader = FoDocumentReader.getInstance();
+ FoTree4a foTree = null;
+ try {
+ foTree = foReader.buildFoTreeFromFile(file);
+ } catch (final FoTreeException e) {
+ fail(e.getMessage());
+ }
+ return buildAreaTreeFromFoTree(foTree, lbFactory);
+ }
+
+ /**
+ * Converts a file in the test directory to an AreaTree.
+ * @param unparsedDocument The string containing the document to be converted.
+ * @param lbFactory The line-breaker factory.
+ * @return The parsed FO Tree instance.
+ * @throws FoTreeException For errors building the FO Tree.
+ */
+ public AreaTree4a buildAreaTreeFromString(final String unparsedDocument, final LineBreakerFactory lbFactory) {
+ final FoDocumentReader foReader = FoDocumentReader.getInstance();
+ FoTree4a foTree = null;
+ try {
+ foTree = foReader.buildFoTreeFromString(unparsedDocument);
+ } catch (final FoTreeException e) {
+ fail(e.getMessage());
+ }
+ return buildAreaTreeFromFoTree(foTree, lbFactory);
+ }
+
+
+
+
}
Modified: trunk/foray/foray-app/src/testFixtures/java/org/foray/app/FoDocumentReader.java
===================================================================
--- trunk/foray/foray-app/src/testFixtures/java/org/foray/app/FoDocumentReader.java 2023-01-14 15:47:04 UTC (rev 13066)
+++ trunk/foray/foray-app/src/testFixtures/java/org/foray/app/FoDocumentReader.java 2023-01-14 16:20:12 UTC (rev 13067)
@@ -49,6 +49,7 @@
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
+import java.io.StringReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
@@ -122,7 +123,7 @@
* @return The parsed FO Tree instance.
* @throws ForayException For errors building the FO Tree.
*/
- public FoTree4a buildFoTree(final String file) throws FoTreeException {
+ public FoTree4a buildFoTreeFromFile(final String file) throws FoTreeException {
File testDirectory = null;
try {
testDirectory = Environment.getTestDirectory();
@@ -147,6 +148,21 @@
}
/**
+ * Converts a file in the test directory to an Fo Tree.
+ * @param unparsedDocument The string containing the unparsed document.
+ * @return The parsed FO Tree instance.
+ * @throws ForayException For errors building the FO Tree.
+ */
+ public FoTree4a buildFoTreeFromString(final String unparsedDocument) throws FoTreeException {
+ final Reader reader = new StringReader(unparsedDocument);
+ final InputSource inputSource = new InputSource(reader);
+ final FoTreeParser4a parser = this.treeServer.createFoTreeParser();
+ parser.parseFoTree(inputSource);
+ final FoTree4a foTree = parser.getFoTree();
+ return foTree;
+ }
+
+ /**
* Returns the tree server.
* @return The tree server.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-14 15:47:06
|
Revision: 13066
http://sourceforge.net/p/foray/code/13066
Author: victormote
Date: 2023-01-14 15:47:04 +0000 (Sat, 14 Jan 2023)
Log Message:
-----------
Conform to aXSL change: Move FO boilerplate code to axsl-fotree test fixture to maximize reuse.
Modified Paths:
--------------
trunk/foray/foray-fotree/build.gradle
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/AbstractFoTreeTest.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/CommonFontPropertiesTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/InlineLevelFoTests.java
Modified: trunk/foray/foray-fotree/build.gradle
===================================================================
--- trunk/foray/foray-fotree/build.gradle 2023-01-14 14:06:05 UTC (rev 13065)
+++ trunk/foray/foray-fotree/build.gradle 2023-01-14 15:47:04 UTC (rev 13066)
@@ -37,6 +37,8 @@
api (project(':foray-common'))
implementation (project(':foray-primitive'))
api (project(':foray-xml'))
+
+ testImplementation(testFixtures(group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl))
}
javadoc {
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/AbstractFoTreeTest.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/AbstractFoTreeTest.java 2023-01-14 14:06:05 UTC (rev 13065)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/AbstractFoTreeTest.java 2023-01-14 15:47:04 UTC (rev 13066)
@@ -53,35 +53,6 @@
*/
public abstract class AbstractFoTreeTest {
- /** Boilerplate bare-minimum start of an XSL-FO document. Used by subclasses to create a full document for
- * testing. */
- protected static final String DOCUMENT_PROLOG =
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- + "<fo:root xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" xml:lang=\"eng-US\">\n"
- + "<fo:layout-master-set>\n"
- + " <fo:simple-page-master\n"
- + " master-name=\"simplePM\"\n"
- + " page-height=\"25cm\"\n"
- + " page-width=\"20cm\"\n"
- + " margin-top=\"1cm\"\n"
- + " margin-bottom=\"1cm\"\n"
- + " margin-left=\"1.5cm\"\n"
- + " margin-right=\"1.5cm\">\n"
- + " <fo:region-before extent=\"2.5cm\"/>\n"
- + " <fo:region-body margin-top=\"3cm\" margin-bottom=\"3cm\"/>\n"
- + " <fo:region-after extent=\"2.5cm\"/>\n"
- + " </fo:simple-page-master>\n"
- + "</fo:layout-master-set>\n"
- + "\n"
- + "<fo:page-sequence master-reference=\"simplePM\">\n";
-
-
- /** Boilerplate bare-minimum end of an XSL-FO document. Used by subclasses to create a full document for
- * testing. */
- protected static final String DOCUMENT_EPILOG =
- "</fo:page-sequence>\n"
- + "</fo:root>\n";
-
/**
* Parses an XSL-FO document using a {@link FoTreeParser4a} instance and the
* {@link FoTreeParser4a.TextStrategy#CHARACTER} strategy.
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/CommonFontPropertiesTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/CommonFontPropertiesTests.java 2023-01-14 14:06:05 UTC (rev 13065)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/CommonFontPropertiesTests.java 2023-01-14 15:47:04 UTC (rev 13066)
@@ -35,6 +35,7 @@
import org.axsl.fotree.FoContext;
import org.axsl.fotree.FoTreeException;
+import org.axsl.fotree.fixture.FoTreeBoilerplate;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -55,12 +56,12 @@
@Test
public void fontFamilyTest_001() throws FoTreeException {
final String document =
-DOCUMENT_PROLOG
+FoTreeBoilerplate.MINIMUM_PROLOG
+ "<fo:flow flow-name=\"xsl-region-body\">\n"
+ " <fo:block>The default font.</fo:block>\n"
+ " <fo:block font-family=\"Base14-Courier\">font-family: Base14-Courier.</fo:block>\n"
+ "</fo:flow>\n"
-+ DOCUMENT_EPILOG;
++ FoTreeBoilerplate.MINIMUM_EPILOG;
final FoTree4a foTree = parseDocument(document);
final Flow4a flow = getFlow(foTree);
@@ -88,7 +89,7 @@
@Test
public void fontSizeTest_001() throws FoTreeException {
final String document =
-DOCUMENT_PROLOG
+FoTreeBoilerplate.MINIMUM_PROLOG
+ "<fo:flow flow-name=\"xsl-region-body\">\n"
+ " <fo:block>This block is the default font size and default font.</fo:block>\n"
+ " <fo:block font-family=\"Courier\" font-size=\"8pt\">This block is Courier, 8 points.</fo:block>\n"
@@ -96,7 +97,7 @@
+ " Base14-Courier, font-size=\"10 points\", and font-size-adjust=\".6\". Since the x-height for Courier is "
+ " 426, the actual font-size for this block should be</fo:block>\n"
+ "</fo:flow>\n"
-+ DOCUMENT_EPILOG;
++ FoTreeBoilerplate.MINIMUM_EPILOG;
final FoTree4a foTree = parseDocument(document);
final Flow4a flow = getFlow(foTree);
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/InlineLevelFoTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/InlineLevelFoTests.java 2023-01-14 14:06:05 UTC (rev 13065)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/InlineLevelFoTests.java 2023-01-14 15:47:04 UTC (rev 13066)
@@ -36,6 +36,7 @@
import org.axsl.fotree.FoContext;
import org.axsl.fotree.FoTreeException;
+import org.axsl.fotree.fixture.FoTreeBoilerplate;
import org.apache.batik.anim.dom.SVGOMDocument;
import org.w3c.dom.Document;
@@ -58,7 +59,7 @@
@Test
public void graphicTest_001() throws FoTreeException {
final String document =
-DOCUMENT_PROLOG
+FoTreeBoilerplate.MINIMUM_PROLOG
+ "<fo:flow flow-name=\"xsl-region-body\">\n"
+ " <fo:block>The following block contains an inline SVG wrapped in a fo:foreign-xml object.</fo:block>\n"
+ " <fo:block><fo:instream-foreign-object>\n"
@@ -71,7 +72,7 @@
+ "</svg></fo:instream-foreign-object>\n"
+ " </fo:block>\n"
+ "</fo:flow>\n"
-+ DOCUMENT_EPILOG;
++ FoTreeBoilerplate.MINIMUM_EPILOG;
final FoTree4a foTree = parseDocument(document);
final Flow4a flow = getFlow(foTree);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-14 14:06:09
|
Revision: 13065
http://sourceforge.net/p/foray/code/13065
Author: victormote
Date: 2023-01-14 14:06:05 +0000 (Sat, 14 Jan 2023)
Log Message:
-----------
Use new AreaNode iterator to remove a dependency on FOray code.
Modified Paths:
--------------
trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2023-01-13 18:58:54 UTC (rev 13064)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2023-01-14 14:06:05 UTC (rev 13065)
@@ -28,9 +28,7 @@
package org.foray.app.area;
-import org.foray.area.AreaNode4a;
import org.foray.area.TextArea;
-import org.foray.common.data.OrderedTreeNode;
import org.foray.font.ConsumerFont4a;
import org.foray.font.Font4a;
import org.foray.font.FontConsumer4a;
@@ -39,6 +37,7 @@
import org.foray.font.FreeStandingFont;
import org.foray.font.config.RegisteredFontContent;
+import org.axsl.area.AreaNode;
import org.axsl.area.AreaTree;
import org.axsl.area.MainRa;
import org.axsl.area.NormalFlowRa;
@@ -103,21 +102,20 @@
}
/**
- * For the given AreaTree node, concatenates all descendant text items into
- * one string and returns that string, removing hyphens that have been added
- * for line-breaking purposes.
- * This is useful for making sure that the text content is as expected,
- * regardless of line breaks and page breaks.
- * @param node The node whose descendant text should be returned.
+ * For the given AreaTree node, concatenates all descendant text items into one string and returns that string,
+ * removing hyphens that have been added for line-breaking purposes.
+ * This is useful for making sure that the text content is as expected, regardless of line breaks and page breaks.
+ * @param root The node whose descendant text should be returned.
* @return The String concatenating all descendant text items.
*/
- protected String getText(final AreaNode4a node) {
+ protected String getText(final AreaNode root) {
final StringBuilder builder = new StringBuilder();
- final Iterator<OrderedTreeNode<AreaNode4a>> iterator = node.postOrderDescendantIterator();
+ final Iterator<AreaNode> iterator = root.getPreorderIterator();
+
while (iterator.hasNext()) {
- final OrderedTreeNode<AreaNode4a> otn = iterator.next();
- if (otn instanceof TextArea) {
- final TextArea textArea = (TextArea) otn;
+ final AreaNode node = iterator.next();
+ if (node instanceof TextArea) {
+ final TextArea textArea = (TextArea) node;
final CharSequence text = textArea.getRawText();
builder.append(text);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-13 18:59:07
|
Revision: 13064
http://sourceforge.net/p/foray/code/13064
Author: victormote
Date: 2023-01-13 18:58:54 +0000 (Fri, 13 Jan 2023)
Log Message:
-----------
Conform to aXSL change: Shorten names of Area tree child iteration methods.
Modified Paths:
--------------
trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/BorderTests.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/GraphicAreaTests.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/InlineTests.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/VerticalTests.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractInlineArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractTablePartContainer.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/BasicLinkArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BeforeFloatRa4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BidiOverrideArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockContainerRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/FootnoteRa4a.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/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/MainRa4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.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/PageRa4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionBodyRa4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionOuterRa4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/RetrieveMarkerNode4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/RetrieveTableMarkerNode4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/SpanRa4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TableCellRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRowContainer4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/metadata/BookmarkParentNode4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/metadata/DocumentMetadata4a.java
trunk/foray/foray-core/src/main/java/org/foray/core/ForayTarget.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FootnoteBodyPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java
trunk/foray/foray-render/src/main/java/org/foray/render/Renderer4a.java
trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -93,12 +93,12 @@
* @return The first normal-flow reference area in {@code areaTree}.
*/
protected NormalFlowRa getFirstNormalFlowArea(final AreaTree areaTree) {
- final PageCollection pageCollection = areaTree.areaNodeChildAt(0);
- final PageRa firstPage = pageCollection.areaNodeChildAt(0);
+ final PageCollection pageCollection = areaTree.areaChildAt(0);
+ final PageRa firstPage = pageCollection.areaChildAt(0);
final RegionBodyRa regionBody = firstPage.getRegionBody("xsl-region-body");
final MainRa main = regionBody.getMainRefArea();
- final SpanRa span = main.areaNodeChildAt(0);
- final NormalFlowRa nfa = span.areaNodeChildAt(0);
+ final SpanRa span = main.areaChildAt(0);
+ final NormalFlowRa nfa = span.areaChildAt(0);
return nfa;
}
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -76,7 +76,7 @@
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* The outer block area. */
- AreaNode node = firstNormalFlowArea.areaNodeChildAt(0);
+ AreaNode node = firstNormalFlowArea.areaChildAt(0);
assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a outerBlockArea = (NormalBlockArea4a) node;
/* 1 inch left margin. */
@@ -87,7 +87,7 @@
assertEquals(432000, outerBlockArea.crIpd());
/* The first child of the outer block area is a line-area. */
- node = outerBlockArea.areaNodeChildAt(0);
+ node = outerBlockArea.areaChildAt(0);
assertTrue(node instanceof LineArea4a);
LineArea4a lineArea = (LineArea4a) node;
/* Should have anterior space of one half-leading, which comes from the space-before of this line. */
@@ -105,7 +105,7 @@
assertEquals(12000, lineArea.crBpd());
/* The second child of the outer block area is a block-area. */
- node = outerBlockArea.areaNodeChildAt(1);
+ node = outerBlockArea.areaChildAt(1);
assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a insideBlockArea = (NormalBlockArea4a) node;
/* Should have anterior space of one half-leading, which comes from the space-after of the previous line. */
@@ -122,7 +122,7 @@
assertEquals(0, insideBlockArea.crBpd());
/* The third child of the outer block area is another line-area. */
- node = outerBlockArea.areaNodeChildAt(2);
+ node = outerBlockArea.areaChildAt(2);
assertTrue(node instanceof LineArea4a);
lineArea = (LineArea4a) node;
/* Should have anterior space of one half-leading, which comes from the space-before of this line. */
@@ -138,7 +138,7 @@
assertEquals(12000, lineArea.crBpd());
/* The fourth child of the outer block area is another line-area. */
- node = outerBlockArea.areaNodeChildAt(3);
+ node = outerBlockArea.areaChildAt(3);
assertTrue(node instanceof LineArea4a);
lineArea = (LineArea4a) node;
/* Should have anterior space of two half-leadings, one from the space-after of the previous line, one from the
@@ -163,7 +163,7 @@
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree4a areaTree = creator.buildAreaTree("fo/block-002.fo", getLineBreakerFactory());
final PageCollection4a pageCollection = areaTree.getChildren().get(0);
- final int numPages = pageCollection.qtyAreaNodeChildren();
+ final int numPages = pageCollection.qtyAreaChildren();
assertEquals(2, numPages);
final String actual = getText(areaTree);
final String expected =
@@ -242,7 +242,7 @@
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* Test location and dimensions of the block area. */
- AreaNode node = firstNormalFlowArea.areaNodeChildAt(0);
+ AreaNode node = firstNormalFlowArea.areaChildAt(0);
assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
/* 1 inch left margin. */
@@ -254,7 +254,7 @@
assertEquals(468000, blockArea.crIpd());
/* Test location and dimensions of the line area. */
- node = blockArea.areaNodeChildAt(0);
+ node = blockArea.areaChildAt(0);
assertTrue(node instanceof LineArea4a);
final LineArea4a lineArea = (LineArea4a) node;
/* x same as the parent block. */
@@ -266,7 +266,7 @@
/* Test location and dimensions of the text area. The key thing we are
* testing here is that IT IS CENTERED. */
- node = lineArea.areaNodeChildAt(0);
+ node = lineArea.areaChildAt(0);
assertTrue(node instanceof TextArea);
final TextArea textArea = (TextArea) node;
@@ -303,7 +303,7 @@
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* Test location and dimensions of the block area. */
- AreaNode node = firstNormalFlowArea.areaNodeChildAt(0);
+ AreaNode node = firstNormalFlowArea.areaChildAt(0);
assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
/* 1 inch left margin. */
@@ -315,7 +315,7 @@
assertEquals(468000, blockArea.crIpd());
/* Test location and dimensions of the line area. */
- node = blockArea.areaNodeChildAt(0);
+ node = blockArea.areaChildAt(0);
assertTrue(node instanceof LineArea4a);
final LineArea4a lineArea = (LineArea4a) node;
/* x same as the parent block. */
@@ -327,7 +327,7 @@
/* Test location and dimensions of the text area. The key thing we are
* testing here is that IT IS CENTERED. */
- node = lineArea.areaNodeChildAt(0);
+ node = lineArea.areaChildAt(0);
assertTrue(node instanceof TextArea);
final TextArea textArea = (TextArea) node;
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/BorderTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/BorderTests.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/BorderTests.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -53,7 +53,7 @@
final AreaTree4a areaTree = creator.buildAreaTree("fo/border-style-001.fo", getLineBreakerFactory());
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
- final AreaNode node = firstNormalFlowArea.areaNodeChildAt(0);
+ final AreaNode node = firstNormalFlowArea.areaChildAt(0);
assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
assertEquals(72000, blockArea.brOriginX());
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/GraphicAreaTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/GraphicAreaTests.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/GraphicAreaTests.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -62,20 +62,20 @@
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* There are two block areas. */
- assertEquals(2, firstNormalFlowArea.qtyAreaNodeChildren());
+ assertEquals(2, firstNormalFlowArea.qtyAreaChildren());
/* The second one contains the graphic. */
- AreaNode node = firstNormalFlowArea.areaNodeChildAt(1);
+ AreaNode node = firstNormalFlowArea.areaChildAt(1);
assertTrue(node instanceof NormalBlockArea4a);
/* It has one child, a LineArea ... */
- assertEquals(1, node.qtyAreaNodeChildren());
- node = node.areaNodeChildAt(0);
+ assertEquals(1, node.qtyAreaChildren());
+ node = node.areaChildAt(0);
assertTrue(node instanceof LineArea4a);
/* ... which has one child, an ExternalGraphicArea. */
- assertEquals(1, node.qtyAreaNodeChildren());
- node = node.areaNodeChildAt(0);
+ assertEquals(1, node.qtyAreaChildren());
+ node = node.areaChildAt(0);
assertTrue(node instanceof ExternalGraphicArea);
/* First test the size of the viewport. */
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/InlineTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/InlineTests.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/InlineTests.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -61,46 +61,46 @@
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree4a areaTree = creator.buildAreaTree("fo/inline-001.fo", getLineBreakerFactory());
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
- assertEquals(1, firstNormalFlowArea.qtyAreaNodeChildren());
+ assertEquals(1, firstNormalFlowArea.qtyAreaChildren());
/* The block area. */
- AreaNode node = firstNormalFlowArea.areaNodeChildAt(0);
+ AreaNode node = firstNormalFlowArea.areaChildAt(0);
assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
- assertEquals(1, blockArea.qtyAreaNodeChildren());
+ assertEquals(1, blockArea.qtyAreaChildren());
/* The only child of the block area is a line area. */
- node = blockArea.areaNodeChildAt(0);
+ node = blockArea.areaChildAt(0);
assertTrue(node instanceof LineArea4a);
final LineArea4a lineArea = (LineArea4a) node;
- assertEquals(3, lineArea.qtyAreaNodeChildren());
+ assertEquals(3, lineArea.qtyAreaChildren());
/* The first child of the line area is a text area. */
- node = lineArea.areaNodeChildAt(0);
+ node = lineArea.areaChildAt(0);
assertTrue(node instanceof TextArea);
final TextArea textArea1 = (TextArea) node;
assertEquals("Lighter(1), ", textArea1.getText().toString());
/* The second child of the line area is the outside inline area. */
- node = lineArea.areaNodeChildAt(1);
+ node = lineArea.areaChildAt(1);
assertTrue(node instanceof InlineArea);
final InlineArea inlineArea1 = (InlineArea) node;
- assertEquals(3, inlineArea1.qtyAreaNodeChildren());
+ assertEquals(3, inlineArea1.qtyAreaChildren());
/* The first child of the outside inline area is a text area. */
- node = inlineArea1.areaNodeChildAt(0);
+ node = inlineArea1.areaChildAt(0);
assertTrue(node instanceof TextArea);
final TextArea textArea2 = (TextArea) node;
assertEquals("Bolder(1), ", textArea2.getText().toString());
/* The second child of the outside inline area is the inside inline area. */
- node = inlineArea1.areaNodeChildAt(1);
+ node = inlineArea1.areaChildAt(1);
assertTrue(node instanceof InlineArea);
final InlineArea inlineArea2 = (InlineArea) node;
- assertEquals(1, inlineArea2.qtyAreaNodeChildren());
+ assertEquals(1, inlineArea2.qtyAreaChildren());
/* The first and only child of the inside inline area is a text area. */
- node = inlineArea2.areaNodeChildAt(0);
+ node = inlineArea2.areaChildAt(0);
assertTrue(node instanceof TextArea);
final TextArea textArea3 = (TextArea) node;
final String textArea3Text = textArea3.getText().toString();
@@ -107,13 +107,13 @@
assertEquals("Lighter(2), ", textArea3Text);
/* The third child of the outside inline area is another text area. */
- node = inlineArea1.areaNodeChildAt(2);
+ node = inlineArea1.areaChildAt(2);
assertTrue(node instanceof TextArea);
final TextArea textArea4 = (TextArea) node;
assertEquals("Bolder(2), ", textArea4.getText().toString());
/* The third child of the line area is another text area. */
- node = lineArea.areaNodeChildAt(2);
+ node = lineArea.areaChildAt(2);
assertTrue(node instanceof TextArea);
final TextArea textArea5 = (TextArea) node;
assertEquals("Lighter(3).", textArea5.getText().toString());
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/VerticalTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/VerticalTests.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/VerticalTests.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -64,7 +64,7 @@
final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* The block area. */
- AreaNode node = firstNormalFlowArea.areaNodeChildAt(0);
+ AreaNode node = firstNormalFlowArea.areaChildAt(0);
assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
final FontUse font = blockArea.traitNominalFont();
@@ -72,13 +72,13 @@
assertEquals(12000, blockArea.traitFontSize());
/* The first child of the block area is a line-area. */
- node = blockArea.areaNodeChildAt(0);
+ node = blockArea.areaChildAt(0);
assertTrue(node instanceof LineArea4a);
final LineArea4a lineArea = (LineArea4a) node;
final int lineY = lineArea.alignmentPointY();
/* The second child of the line area is an inline-area. */
- node = lineArea.areaNodeChildAt(1);
+ node = lineArea.areaChildAt(1);
assertTrue(node instanceof InlineArea);
final InlineArea inlineArea = (InlineArea) node;
final int inlineY = inlineArea.baselineY();
@@ -90,7 +90,7 @@
assertEquals(expectedInlineY, inlineY);
/* The first child of the inline-area is a text area. */
- node = inlineArea.areaNodeChildAt(0);
+ node = inlineArea.areaChildAt(0);
assertTrue(node instanceof TextArea);
final TextArea textArea = (TextArea) node;
final int inlineYTextArea = textArea.baselineY();
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractInlineArea.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -54,7 +54,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return getChildren().get(childIndex);
}
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractTablePartContainer.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -62,7 +62,7 @@
}
@Override
- public TableRowContainer4a areaNodeChildAt(final int childIndex) {
+ public TableRowContainer4a areaChildAt(final int childIndex) {
return getChildren().get(childIndex);
}
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -123,12 +123,12 @@
public abstract List<? extends AreaNode4a> getChildren();
@Override
- public int qtyAreaNodeChildren() {
+ public int qtyAreaChildren() {
return getChildren().size();
}
@Override
- public abstract AreaNode4a areaNodeChildAt(int childIndex);
+ public abstract AreaNode4a areaChildAt(int childIndex);
@Override
public int siblingIndex() {
@@ -646,7 +646,7 @@
@Override
public boolean hasNext() {
- return this.nextIndex < qtyAreaNodeChildren();
+ return this.nextIndex < qtyAreaChildren();
}
@Override
@@ -655,7 +655,7 @@
throw new NoSuchElementException();
}
this.nextIndex ++;
- return areaNodeChildAt(this.nextIndex - 1);
+ return areaChildAt(this.nextIndex - 1);
}
@Override
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -175,7 +175,7 @@
}
@Override
- public PageCollection4a areaNodeChildAt(final int childIndex) {
+ public PageCollection4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
@@ -319,8 +319,8 @@
protected synchronized void processQueue(final boolean force) {
for (int collectionIndex = 0; collectionIndex < this.children.size(); collectionIndex ++) {
final PageCollection4a collection = this.children.get(collectionIndex);
- for (int pageIndex = 0; pageIndex < collection.qtyAreaNodeChildren(); pageIndex ++) {
- final PageRa4a page = collection.areaNodeChildAt(pageIndex);
+ for (int pageIndex = 0; pageIndex < collection.qtyAreaChildren(); pageIndex ++) {
+ final PageRa4a page = collection.areaChildAt(pageIndex);
if (page.isReleasable()) {
releasePage(page);
} else if (force && ! page.isReleased()) {
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BasicLinkArea.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -113,7 +113,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (qtyAreaNodeChildren() < 1) {
+ if (qtyAreaChildren() < 1) {
return true;
}
return false;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BeforeFloatRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BeforeFloatRa4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BeforeFloatRa4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -78,7 +78,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BidiOverrideArea.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -112,7 +112,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (qtyAreaNodeChildren() < 1) {
+ if (qtyAreaChildren() < 1) {
return true;
}
return false;
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockContainerRa.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -95,7 +95,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/FootnoteRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/FootnoteRa4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/FootnoteRa4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -77,7 +77,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/IndexPageCitationListArea.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -114,7 +114,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (qtyAreaNodeChildren() < 1) {
+ if (qtyAreaChildren() < 1) {
return true;
}
return false;
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineArea.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -120,7 +120,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (qtyAreaNodeChildren() < 1) {
+ if (qtyAreaChildren() < 1) {
return true;
}
return false;
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LeaderArea.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -389,7 +389,7 @@
protected boolean optimize() {
this.optimizeChildren();
if (this.traitLeaderPattern() == LeaderPattern.USE_CONTENT
- && qtyAreaNodeChildren() < 1) {
+ && qtyAreaChildren() < 1) {
return true;
}
return false;
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -113,7 +113,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
@@ -158,7 +158,7 @@
/* Optimize in post-traversal order. Allow children to optimize
* themselves before optimizing the line. */
this.optimizeChildren();
- if (this.qtyAreaNodeChildren() < 1) {
+ if (this.qtyAreaChildren() < 1) {
return true;
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/ListBlockArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/ListBlockArea.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/ListBlockArea.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -91,7 +91,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/ListItemArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/ListItemArea.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/ListItemArea.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -85,7 +85,7 @@
}
@Override
- public AbstractListItemContent areaNodeChildAt(final int childIndex) {
+ public AbstractListItemContent areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/ListItemBodyContainer.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/ListItemBodyContainer.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/ListItemBodyContainer.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -65,7 +65,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return getChildren().get(childIndex);
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/ListItemLabelContainer.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/ListItemLabelContainer.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/ListItemLabelContainer.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -65,7 +65,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return getChildren().get(childIndex);
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/MainRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/MainRa4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/MainRa4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -108,7 +108,7 @@
}
@Override
- public SpanRa4a areaNodeChildAt(final int childIndex) {
+ public SpanRa4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -117,7 +117,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
@@ -169,10 +169,10 @@
*/
public LineArea4a getLastChildIfLineArea() {
if (this.getChildren() == null
- || qtyAreaNodeChildren() < 1) {
+ || qtyAreaChildren() < 1) {
return null;
}
- final int lastIndex = qtyAreaNodeChildren() - 1;
+ final int lastIndex = qtyAreaChildren() - 1;
final AreaNode4a lastChild = this.getChildren().get(lastIndex);
if (lastChild instanceof LineArea4a) {
return (LineArea4a) lastChild;
@@ -246,7 +246,7 @@
/* Remove empty block areas only if they are generated by FONodes that
* actually have children. If the FONode has no children, then an empty
* area is needed in the area tree. */
- if (this.qtyAreaNodeChildren() < 1
+ if (this.qtyAreaChildren() < 1
&& this.traitGeneratedBy().qtyFoChildren() != 0) {
return true;
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -91,7 +91,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
@@ -104,7 +104,7 @@
}
final SpanRa4a newSpan = getParent().getOverflowArea(this);
- return newSpan.areaNodeChildAt(0);
+ return newSpan.areaChildAt(0);
// // If my children are overflowed, I must be also.
// final Area4a overflowArea = ancestorArea().getOverflowArea(this);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -111,7 +111,7 @@
}
@Override
- public PageRa4a areaNodeChildAt(final int index) {
+ public PageRa4a areaChildAt(final int index) {
return this.children.get(index);
}
@@ -294,7 +294,7 @@
final PageSequence pageSeq = traitGeneratedBy();
final int lastPageNumber = getCurrentPageNumber();
- final int currentPageCount = qtyAreaNodeChildren();
+ final int currentPageCount = qtyAreaChildren();
/* The XSL-FO Recommendation 1.1, Section 7.27.6 indicates that force-page-count="auto" needs to consider the
* initial-page-number value for the following page-sequence.
* However, we are not sure that has been parsed yet.
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -132,7 +132,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (qtyAreaNodeChildren() < 1) {
+ if (qtyAreaChildren() < 1) {
return true;
}
return false;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -145,7 +145,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (qtyAreaNodeChildren() < 1) {
+ if (qtyAreaChildren() < 1) {
return true;
}
return false;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -145,7 +145,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (this.qtyAreaNodeChildren() < 1) {
+ if (this.qtyAreaChildren() < 1) {
return true;
}
return false;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageRa4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageRa4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -128,7 +128,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
@@ -716,7 +716,7 @@
public boolean isBlank() {
for (int index = 0; index < this.bodies.size(); index ++) {
final RegionBodyRa4a regionBodyRa = this.bodies.get(index);
- if (regionBodyRa.qtyAreaNodeChildren() > 0) {
+ if (regionBodyRa.qtyAreaChildren() > 0) {
return false;
}
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionBodyRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionBodyRa4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionBodyRa4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -109,7 +109,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionOuterRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionOuterRa4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionOuterRa4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -90,7 +90,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/RetrieveMarkerNode4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/RetrieveMarkerNode4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/RetrieveMarkerNode4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -86,7 +86,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/RetrieveTableMarkerNode4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/RetrieveTableMarkerNode4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/RetrieveTableMarkerNode4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -86,7 +86,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/SpanRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/SpanRa4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/SpanRa4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -123,7 +123,7 @@
}
@Override
- public NormalFlowRa4a areaNodeChildAt(final int childIndex) {
+ public NormalFlowRa4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
@@ -215,9 +215,9 @@
/* Since this is overflow, the new span area should have the same number of columns as the one from the
* previous page. */
- final int qtyColumns = nfra.getParent().qtyAreaNodeChildren();
+ final int qtyColumns = nfra.getParent().qtyAreaChildren();
newMainRa.addSpanArea(qtyColumns);
- return newMainRa.areaNodeChildAt(0);
+ return newMainRa.areaChildAt(0);
}
/**
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TableCellRa.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TableCellRa.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TableCellRa.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -116,7 +116,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRa.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -114,7 +114,7 @@
}
@Override
- public AbstractTablePartContainer areaNodeChildAt(final int childIndex) {
+ public AbstractTablePartContainer areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRowContainer4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRowContainer4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TableRowContainer4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -100,7 +100,7 @@
}
@Override
- public TableCellRa areaNodeChildAt(final int childIndex) {
+ public TableCellRa areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/metadata/BookmarkParentNode4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/metadata/BookmarkParentNode4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/metadata/BookmarkParentNode4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -45,7 +45,7 @@
private List<BookmarkNode4a> children = new ArrayList<BookmarkNode4a>();
@Override
- public BookmarkNode4a areaNodeChildAt(final int childIndex) {
+ public BookmarkNode4a areaChildAt(final int childIndex) {
return this.children.get(childIndex);
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/metadata/DocumentMetadata4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/metadata/DocumentMetadata4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/metadata/DocumentMetadata4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -84,7 +84,7 @@
}
@Override
- public AreaNode4a areaNodeChildAt(final int childIndex) {
+ public AreaNode4a areaChildAt(final int childIndex) {
throw new MarkedIndexOutOfBoundsException(childIndex, 0);
}
Modified: trunk/foray/foray-core/src/main/java/org/foray/core/ForayTarget.java
===================================================================
--- trunk/foray/foray-core/src/main/java/org/foray/core/ForayTarget.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-core/src/main/java/org/foray/core/ForayTarget.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -284,7 +284,7 @@
}
getSession().logInfo("Ending layout of page-sequence "
+ this.pageSequenceCount + ": "
- + pageCollection.qtyAreaNodeChildren() + " pages produced.");
+ + pageCollection.qtyAreaChildren() + " pages produced.");
}
}
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FootnoteBodyPnr.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FootnoteBodyPnr.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FootnoteBodyPnr.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -108,7 +108,7 @@
private void layoutFootnoteSeparator(final RegionBodyRa bac, final FootnoteRa footArea) throws AreaTreeException {
/* TODO: It seems like this logic should be done once when the
* PageCollection is first started, and cached there for reuse. */
- if (footArea.qtyAreaNodeChildren() != 0) {
+ if (footArea.qtyAreaChildren() != 0) {
return;
}
final PageSequence pageSeq = bac.getPage().getParent().traitGeneratedBy();
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 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -318,7 +318,7 @@
switch (breakableNode.traitBreakBefore(area)) {
case PAGE: {
// if first ColumnArea, and empty, return OK
- if (colArea.qtyAreaNodeChildren() == 0
+ if (colArea.qtyAreaChildren() == 0
&& (colArea.siblingIndex() == 0)) {
return Status.OK;
}
@@ -327,7 +327,7 @@
case ODD_PAGE: {
// if first ColumnArea, empty, _and_ in odd page,
// return OK
- if (colArea.qtyAreaNodeChildren() == 0
+ if (colArea.qtyAreaChildren() == 0
&& (colArea.siblingIndex() == 0)
&& (colArea.getPage().getNumber() % 2 != 0)) {
return Status.OK;
@@ -337,7 +337,7 @@
case EVEN_PAGE: {
// if first ColumnArea, empty, _and_ in even page,
// return OK
- if (colArea.qtyAreaNodeChildren() == 0
+ if (colArea.qtyAreaChildren() == 0
&& (colArea.siblingIndex() == 0)
&& (colArea.getPage().getNumber() % 2 == 0)) {
return Status.OK;
@@ -346,7 +346,7 @@
}
case COLUMN: {
// if ColumnArea is empty return OK
- if (colArea.qtyAreaNodeChildren() == 0) {
+ if (colArea.qtyAreaChildren() == 0) {
return Status.OK;
}
return Status.FORCE_COLUMN_BREAK;
Modified: trunk/foray/foray-render/src/main/java/org/foray/render/Renderer4a.java
===================================================================
--- trunk/foray/foray-render/src/main/java/org/foray/render/Renderer4a.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-render/src/main/java/org/foray/render/Renderer4a.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -371,8 +371,8 @@
* @throws GalleyVisitorException For errors during rendering.
*/
public Void renderChildren(final AreaNodeG5 area) throws GalleyVisitorException {
- for (int i = 0; i < area.qtyAreaNodeChildren(); i++) {
- final AreaNodeG5 child = area.areaNodeChildAt(i);
+ for (int i = 0; i < area.qtyAreaChildren(); i++) {
+ final AreaNodeG5 child = area.areaChildAt(i);
child.acceptVisitor(this);
}
return null;
@@ -505,8 +505,8 @@
if (bookmarkTree != null) {
render(bookmarkTree);
}
- for (int i = 0; i < this.areaTree.qtyAreaNodeChildren(); i++) {
- final AreaNodeG5 atNode = this.areaTree.areaNodeChildAt(i);
+ for (int i = 0; i < this.areaTree.qtyAreaChildren(); i++) {
+ final AreaNodeG5 atNode = this.areaTree.areaChildAt(i);
if (! (atNode instanceof PageCollectionG5)) {
atNode.acceptVisitor(this);
}
Modified: trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java
===================================================================
--- trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java 2023-01-13 18:29:46 UTC (rev 13063)
+++ trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java 2023-01-13 18:58:54 UTC (rev 13064)
@@ -624,8 +624,8 @@
if (area.isLinkRoot()) {
createBasicLink(area);
}
- for (int i = 0; i < area.qtyAreaNodeChildren(); i++) {
- final AreaNodeG5 child = area.areaNodeChildAt(i);
+ for (int i = 0; i < area.qtyAreaChildren(); i++) {
+ final AreaNodeG5 child = area.areaChildAt(i);
if (! (child instanceof AreaG5)) {
continue;
}
@@ -650,8 +650,8 @@
@Override
public void render(final BookmarkTreeG5 bookmarkTree) throws GalleyVisitorException {
- for (int i = 0; i < bookmarkTree.qtyAreaNodeChildren(); i++) {
- final BookmarkG5 bookmark = bookmarkTree.areaNodeChildAt(i);
+ for (int i = 0; i < bookmarkTree.qtyAreaChildren(); i++) {
+ final BookmarkG5 bookmark = bookmarkTree.areaChildAt(i);
renderBookmark(bookmark, this.pdfDoc.getOutlineRoot());
}
}
@@ -683,8 +683,8 @@
PdfOutlineItem pdfOutline = null;
pdfOutline = parent.createPdfOutlineItem(bookmark.getTitleText(), namedDestination, color, italic, bold);
// Recursively handle child bookmarks
- for (int i = 0; i < bookmark.qtyAreaNodeChildren(); i++) {
- final BookmarkG5 child = bookmark.areaNodeChildAt(i);
+ for (int i = 0; i < bookmark.qtyAreaChildren(); i++) {
+ final BookmarkG5 child = bookmark.areaChildAt(i);
renderBookmark(child, pdfOutline);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-13 18:29:49
|
Revision: 13063
http://sourceforge.net/p/foray/code/13063
Author: victormote
Date: 2023-01-13 18:29:46 +0000 (Fri, 13 Jan 2023)
Log Message:
-----------
Conform to aXSL change: Shorten names of FO tree child iteration methods.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/metadata/BookmarkNode4a.java
trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/DescendantIterator.java
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/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/BlockContainer4a.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/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/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/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/InlineContainer4a.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/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/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/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/SinglePageMasterReference4a.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/test/java/org/foray/fotree/doc/AbstractFoTreeTest.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/CommonFontPropertiesTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/InlineLevelFoTests.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/BlockContainerPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockPnr.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/FootnoteBodyPnr.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/RetrieveMarkerPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/StaticContentPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/TableCellPnr.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
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -237,9 +237,8 @@
}
this.bookmarkTreeArea = BookmarkTreeNode4a.makeBookmarkTreeArea(
bookmarkTree, this);
- for (int i = 0; i < bookmarkTree.qtyFormattingObjectChildren(); i++) {
- final Bookmark bookmark = (Bookmark)
- bookmarkTree.formattingObjectChildAt(i);
+ for (int i = 0; i < bookmarkTree.qtyFoChildren(); i++) {
+ final Bookmark bookmark = (Bookmark) bookmarkTree.foChildAt(i);
this.bookmarkTreeArea.makeBookmarkArea(bookmark);
}
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -247,7 +247,7 @@
* actually have children. If the FONode has no children, then an empty
* area is needed in the area tree. */
if (this.qtyAreaNodeChildren() < 1
- && this.traitGeneratedBy().qtyFormattingObjectChildren() != 0) {
+ && this.traitGeneratedBy().qtyFoChildren() != 0) {
return true;
}
return false;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/metadata/BookmarkNode4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/metadata/BookmarkNode4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/metadata/BookmarkNode4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -112,8 +112,8 @@
* @param bookmark The "generated-by" Bookmark.
*/
public void makeChildren(final Bookmark bookmark) {
- for (int i = 0; i < bookmark.qtyFormattingObjectChildren(); i++) {
- final Fo child = bookmark.formattingObjectChildAt(i);
+ for (int i = 0; i < bookmark.qtyFoChildren(); i++) {
+ final Fo child = bookmark.foChildAt(i);
if (child instanceof Bookmark) {
this.makeBookmarkArea((Bookmark) child);
} else if (child instanceof BookmarkTitle) {
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -81,8 +81,8 @@
* @param context The area-tree context for {@code fo} and descendants.
*/
private void processChildren(final Fo fo, final Area context) {
- for (int index = 0; index < fo.qtyFormattingObjectChildren(); index ++) {
- final Fo child = fo.formattingObjectChildAt(index);
+ for (int index = 0; index < fo.qtyFoChildren(); index ++) {
+ final Fo child = fo.foChildAt(index);
processChild(child, context.traitNominalFont(), context);
}
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/DescendantIterator.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/DescendantIterator.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/DescendantIterator.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -87,7 +87,7 @@
*/
private FoObj nextPreOrderBoundedNode(final FoObj node, final FoObj rootNode) {
// Any children?
- if (node.qtyFormattingObjectChildren() > 0) {
+ if (node.qtyFoChildren() > 0) {
return node.getChildren().get(0);
}
FoObj currentNode = node;
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -245,12 +245,12 @@
public abstract List<? extends FoObj> getChildren();
@Override
- public int qtyFormattingObjectChildren() {
+ public int qtyFoChildren() {
return this.getOtnChildCount();
}
@Override
- public FoObj formattingObjectChildAt(final int childIndex) {
+ public FoObj foChildAt(final int childIndex) {
return getChildren().get(childIndex);
}
@@ -527,7 +527,7 @@
* @throws FoTreeException If this has any children.
*/
public void validateEmptyContent() throws FoTreeException {
- if (qtyFormattingObjectChildren() > 0) {
+ if (qtyFoChildren() > 0) {
throwException(this.getFullName() + " has NO content.");
}
}
@@ -537,7 +537,7 @@
* @throws FoTreeException If this has no children.
*/
public void validateAtLeastOneChild() throws FoTreeException {
- if (qtyFormattingObjectChildren() < 1) {
+ if (qtyFoChildren() < 1) {
throwException(this.getFullName() + " must have at least one child.");
}
}
@@ -3070,7 +3070,7 @@
if (this.getChildren() == null) {
return null;
}
- for (int i = 0; i < qtyFormattingObjectChildren(); i++) {
+ for (int i = 0; i < qtyFoChildren(); i++) {
final Object child = this.getChildren().get(i);
if (child instanceof FoTextCharacters) {
return (FoTextCharacters) child;
@@ -3307,7 +3307,7 @@
@Override
public boolean hasNext() {
- return this.nextIndex < qtyFormattingObjectChildren();
+ return this.nextIndex < qtyFoChildren();
}
@Override
@@ -3316,7 +3316,7 @@
throw new NoSuchElementException();
}
this.nextIndex ++;
- return formattingObjectChildAt(this.nextIndex - 1);
+ return foChildAt(this.nextIndex - 1);
}
@Override
@@ -3577,8 +3577,8 @@
* @return True if and only if this object has at least one descendant block-level item.
*/
public boolean hasDescendantBlocks() {
- for (int index = 0; index < qtyFormattingObjectChildren(); index ++) {
- final FoObj foobj = this.formattingObjectChildAt(index);
+ for (int index = 0; index < qtyFoChildren(); index ++) {
+ final FoObj foobj = foChildAt(index);
if (foobj.isAlwaysBlockContent()) {
return true;
} else if (foobj.hasDescendantBlocks()) {
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -104,7 +104,7 @@
@Override
protected void validateDescendants() throws FoTreeException {
if (this.getChildren().size() != 1
- || ! (this.formattingObjectChildAt(0) instanceof FoText4a)) {
+ || ! (this.foChildAt(0) instanceof FoText4a)) {
throwException("The content model for " + this.getFullName()
+ " is: (#PCDATA).");
}
@@ -146,7 +146,7 @@
@Override
public String getMetadataValue() {
/* Existence and casting verified at validateDescendants(). */
- final FoText4a text = (FoText4a) this.formattingObjectChildAt(0);
+ final FoText4a text = (FoText4a) this.foChildAt(0);
return text.toString();
}
@@ -211,7 +211,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -106,7 +106,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
Modified: 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/AbstractFlow.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFlow.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -125,7 +125,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -123,7 +123,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -121,7 +121,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageMaster.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -106,7 +106,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -88,7 +88,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractTablePart.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -116,13 +116,13 @@
* overlap. Such overlap could be due to the same column-number being
* assigned to two different cells in the same row, or due to column
* or row spanning causing an overlap." */
- final int qtyRows = qtyFormattingObjectChildren();
+ final int qtyRows = qtyFoChildren();
final int qtyColumns = this.parent.numberOfColumns();
final TableCell4a[][] cellArray = new TableCell4a[qtyRows][qtyColumns];
for (int startingRow = 0; startingRow < qtyRows; startingRow++) {
- final TableRow4a tableRow = formattingObjectChildAt(startingRow);
- for (int i = 0; i < tableRow.qtyFormattingObjectChildren(); i++) {
- final TableCell4a tableCell = (TableCell4a) tableRow.formattingObjectChildAt(i);
+ final TableRow4a tableRow = foChildAt(startingRow);
+ for (int i = 0; i < tableRow.qtyFoChildren(); i++) {
+ final TableCell4a tableCell = (TableCell4a) tableRow.foChildAt(i);
if (tableCell != null) {
validateOverlapCell(cellArray, startingRow, tableCell);
}
@@ -257,7 +257,7 @@
}
@Override
- public TableRow4a formattingObjectChildAt(final int index) {
+ public TableRow4a foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -143,7 +143,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -187,7 +187,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTitle4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -179,7 +179,7 @@
}
@Override
- public AbstractCharacterSequence formattingObjectChildAt(final int index) {
+ public AbstractCharacterSequence foChildAt(final int index) {
return this.children.get(index);
}
@@ -188,7 +188,7 @@
if (this.children.size() < 1) {
return StringUtils.EMPTY_STRING;
}
- final AbstractCharacterSequence child = this.formattingObjectChildAt(0);
+ final AbstractCharacterSequence child = foChildAt(0);
final CharSequence text = child.getRefinedText(null);
return text.toString();
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTree4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -141,7 +141,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -134,7 +134,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -134,7 +134,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -265,7 +265,7 @@
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -129,7 +129,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -283,7 +283,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Declarations4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -198,7 +198,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -120,7 +120,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Float4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -130,7 +130,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowAssignment4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -161,7 +161,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowMap4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -152,7 +152,7 @@
}
@Override
- public FlowAssignment4a formattingObjectChildAt(final int index) {
+ public FlowAssignment4a foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -129,7 +129,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowSourceList4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -155,7 +155,7 @@
}
@Override
- public FlowNameSpecifier4a formattingObjectChildAt(final int index) {
+ public FlowNameSpecifier4a foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowTargetList4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -141,7 +141,7 @@
public List<String> childrenAsStrings() {
/* TODO: This is a bit ugly to build this each time. Consider caching
* the list. */
- final int size = qtyFormattingObjectChildren();
+ final int size = qtyFoChildren();
final List<String> theList = new ArrayList<String>(size);
for (int i = 0; i < size; i++) {
final RegionNameSpecifier4a specifier = this.children.get(i);
@@ -156,7 +156,7 @@
}
@Override
- public RegionNameSpecifier4a formattingObjectChildAt(final int index) {
+ public RegionNameSpecifier4a foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -152,7 +152,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FootnoteBody4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -131,7 +131,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexKeyReference4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -133,7 +133,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -133,7 +133,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -133,7 +133,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -132,7 +132,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InitialPropertySet4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -131,7 +131,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -138,7 +138,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/LayoutMasterSet4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -413,7 +413,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -135,7 +135,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -82,11 +82,11 @@
@Override
protected void validateDescendants() throws FoTreeException {
- if (this.qtyFormattingObjectChildren() < 1) {
+ if (this.qtyFoChildren() < 1) {
this.throwException("fo:list-block must have at least one child.");
}
for (int i = 0; i < this.getChildren().size(); i++) {
- final FoObj fobj = this.formattingObjectChildAt(i);
+ final FoObj fobj = this.foChildAt(i);
if (! (fobj instanceof ListItem4a)) {
this.throwException("Child of fo:list-block must be "
+ "fo:list-item");
@@ -140,7 +140,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItem4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -161,7 +161,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemBody4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -143,7 +143,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemLabel4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -143,7 +143,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiCase4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -132,7 +132,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiProperties4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -131,7 +131,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
Modified: 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/MultiPropertySet4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiPropertySet4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -128,7 +128,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiSwitch4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -131,7 +131,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiToggle4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -132,7 +132,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
Modified: 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/PageMasterResolver4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageMasterResolver4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -130,8 +130,8 @@
final PageSequenceMaster4a psm) {
this.currentSubSequenceNumber++;
if (this.currentSubSequenceNumber >= 0
- && this.currentSubSequenceNumber < psm.qtyFormattingObjectChildren()) {
- final SubSequenceSpecifier specifier = psm.formattingObjectChildAt(
+ && this.currentSubSequenceNumber < psm.qtyFoChildren()) {
+ final SubSequenceSpecifier specifier = psm.foChildAt(
this.currentSubSequenceNumber);
return makeWrapper(specifier);
}
@@ -288,9 +288,9 @@
return null;
}
- for (int i = 0; i < this.wrapped.qtyFormattingObjectChildren(); i++) {
+ for (int i = 0; i < this.wrapped.qtyFoChildren(); i++) {
final ConditionalPageMasterReference4a cpmr =
- this.wrapped.formattingObjectChildAt(i);
+ this.wrapped.foChildAt(i);
if (cpmr.matchesCriteria(isFirstPage, isLastPage, isOddPage,
isEmptyPage)) {
return cpmr.traitMasterReference();
Modified: 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/PageSequence4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -336,7 +336,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
Modified: 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/PageSequenceMaster4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceMaster4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -153,8 +153,8 @@
* page-sequence-master has not been defined.
*/
public void validatePageExistence() throws FoTreeException {
- for (int i = 0; i < qtyFormattingObjectChildren(); i++) {
- final SubSequenceSpecifier specifier = formattingObjectChildAt(i);
+ for (int i = 0; i < qtyFoChildren(); i++) {
+ final SubSequenceSpecifier specifier = foChildAt(i);
specifier.validatePageExistence();
}
}
@@ -204,7 +204,7 @@
}
@Override
- public SubSequenceSpecifier formattingObjectChildAt(final int index) {
+ public SubSequenceSpecifier foChildAt(final int index) {
return this.children.get(index);
}
Modified: 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/PageSequenceWrapper4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceWrapper4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -141,7 +141,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
Modified: 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/Region4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Region4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -214,7 +214,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
Modified: 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/RegionNameSpecifier4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionNameSpecifier4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -130,7 +130,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
Modified: 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/RepeatablePmAlternatives4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmAlternatives4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -105,8 +105,8 @@
@Override
public void validatePageExistence() throws FoTreeException {
- for (int i = 0; i < this.qtyFormattingObjectChildren(); i++) {
- final ConditionalPageMasterReference4a child = this.formattingObjectChildAt(i);
+ for (int i = 0; i < this.qtyFoChildren(); i++) {
+ final ConditionalPageMasterReference4a child = this.foChildAt(i);
child.validatePageExistence();
}
}
@@ -127,7 +127,7 @@
}
@Override
- public ConditionalPageMasterReference4a formattingObjectChildAt(final int index) {
+ public ConditionalPageMasterReference4a foChildAt(final int index) {
return this.children.get(index);
}
Modified: 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/RepeatablePmReference4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmReference4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -121,7 +121,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -187,7 +187,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
Modified: 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/RetrieveTableMarker4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveTableMarker4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -130,7 +130,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
Modified: 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/Root4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Root4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -469,7 +469,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
Modified: 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/SinglePageMasterReference4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/SinglePageMasterReference4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -119,7 +119,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Table4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -378,7 +378,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableAndCaption4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -131,7 +131,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
Modified: 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/TableCaption4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableCaption4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -138,7 +138,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableCell4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -143,10 +143,10 @@
} else {
/* "this" has not yet been added to the children of the parent.
* Therefore, the previous cell is the last child of the parent. */
- previousCellIndex = row.qtyFormattingObjectChildren() - 1;
+ previousCellIndex = row.qtyFoChildren() - 1;
}
if (previousCellIndex > -1) {
- final FoObj previous = row.formattingObjectChildAt(previousCellIndex);
+ final FoObj previous = row.foChildAt(previousCellIndex);
/* Existing children could be markers as well as table-cells. */
if (previous instanceof TableCell4a) {
return (TableCell4a) previous;
@@ -253,7 +253,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
Modified: 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/TableColumn4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableColumn4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -191,7 +191,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return null;
}
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 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableRow4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -147,7 +147,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
Modified: 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/Title4a.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Title4a.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -177,7 +177,7 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
+ public FoObj foChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/AbstractFoTreeTest.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/AbstractFoTreeTest.java 2023-01-13 17:17:51 UTC (rev 13062)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/doc/AbstractFoTreeTest.java 2023-01-13 18:29:46 UTC (rev 13063)
@@ -111,10 +111,10 @@
*/
protected Flow4a getFlow(final FoTree4a foTree) {
final Root4a root = foTree.getRootFo();
- FoObj node = root.formattingObjectChildAt(1);
+ FoObj node = root.foChildAt(1);
assertTrue(node instanceof PageSequence4a);
final PageSequence4a sequence = (PageSequence4a) node;
- node = sequence.formattingObjec...
[truncated message content] |
|
From: <vic...@us...> - 2023-01-13 17:17:54
|
Revision: 13062
http://sourceforge.net/p/foray/code/13062
Author: victormote
Date: 2023-01-13 17:17:51 +0000 (Fri, 13 Jan 2023)
Log Message:
-----------
Handle case where 0x0000 char is being sought in the tree.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/data/TernaryNodes.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/data/TernaryNodes.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/data/TernaryNodes.java 2023-01-13 17:17:11 UTC (rev 13061)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/data/TernaryNodes.java 2023-01-13 17:17:51 UTC (rev 13062)
@@ -362,8 +362,15 @@
if (startingIndex < 1) {
/* We are at index 0, which points nowhere. */
- returnValue = -1;
- } else if (isCompressedValueNode(startingIndex)) {
+ return -1;
+ }
+
+ if (theChar < 1) {
+ /* Character 0x0000 cannot be retrieved from this tree. */
+ return -1;
+ }
+
+ if (isCompressedValueNode(startingIndex)) {
/* If the character at startingIndex marks a compressed branch, return it.
* A compressed branch is terminal, a leaf node, unable to point anywhere else. */
returnValue = startingIndex;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-13 17:17:13
|
Revision: 13061
http://sourceforge.net/p/foray/code/13061
Author: victormote
Date: 2023-01-13 17:17:11 +0000 (Fri, 13 Jan 2023)
Log Message:
-----------
Fix numerous cases where ShortArrayBuilder was being used as an array, but had been set up as a list.
Modified Paths:
--------------
trunk/foray/foray-font/src/main/java/org/foray/font/FontUse4a.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/type1/Type1MetricsParserPfm.java
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 2023-01-13 16:18:35 UTC (rev 13060)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontUse4a.java 2023-01-13 17:17:11 UTC (rev 13061)
@@ -445,6 +445,7 @@
final int lastIndex = encoding.getLastIndex();
final int size = lastIndex - firstIndex + 1;
final ShortArrayBuilder widthsByFontIndex = new ShortArrayBuilder(size);
+ widthsByFontIndex.setLength(size);
for (int i = firstIndex; i <= lastIndex; i++) {
// Decode the character for this index
final int codePoint = encoding.decode(i);
@@ -469,6 +470,7 @@
final Subset subset = getSubset();
final ShortSequence originalWidths = getFreeStandingFont().getWidths();
final ShortArrayBuilder tmpWidth = new ShortArrayBuilder(subset.numGlyphsUsed());
+ tmpWidth.setLength(subset.numGlyphsUsed());
for (int i = 0; i < subset.numGlyphsUsed(); i++) {
final int originalIndex = subset.decodeSubsetIndex(i);
tmpWidth.setShortAt(i, originalWidths.shortAt(originalIndex));
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 2023-01-13 16:18:35 UTC (rev 13060)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TrueTypeFont.java 2023-01-13 17:17:11 UTC (rev 13061)
@@ -686,6 +686,7 @@
*/
public ShortSequence getWidths() {
final ShortArrayBuilder wx = new ShortArrayBuilder(this.hmtxTable.numMtxEntries());
+ wx.setLength(this.hmtxTable.numMtxEntries());
for (int i = 0; i < wx.length(); i++) {
wx.setShortAt(i, convertFunitsToMillipoints(this.hmtxTable.getMtxEntry(i).getWidth()));
}
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1MetricsParserPfm.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1MetricsParserPfm.java 2023-01-13 16:18:35 UTC (rev 13060)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1MetricsParserPfm.java 2023-01-13 17:17:11 UTC (rev 13061)
@@ -351,6 +351,7 @@
return;
}
final ShortArrayBuilder extentTable = new ShortArrayBuilder(charSet.size());
+ extentTable.setLength(charSet.size());
this.metrics.setMinWidth(this.metrics.getMaxWidth());
for (int i = this.dfFirstChar; i <= this.dfLastChar; i++) {
final short width = (short) this.input.readUnsignedShortLoHi();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-13 16:18:37
|
Revision: 13060
http://sourceforge.net/p/foray/code/13060
Author: victormote
Date: 2023-01-13 16:18:35 +0000 (Fri, 13 Jan 2023)
Log Message:
-----------
Simplify test code.
Modified Paths:
--------------
trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2023-01-13 16:14:18 UTC (rev 13059)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2023-01-13 16:18:35 UTC (rev 13060)
@@ -29,9 +29,6 @@
package org.foray.app.area;
import org.foray.area.AreaNode4a;
-import org.foray.area.AreaTree4a;
-import org.foray.area.PageCollection4a;
-import org.foray.area.PageRa4a;
import org.foray.area.TextArea;
import org.foray.common.data.OrderedTreeNode;
import org.foray.font.ConsumerFont4a;
@@ -53,7 +50,6 @@
import org.axsl.linebreak.LineBreakerFactory;
import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.Iterator;
@@ -107,43 +103,6 @@
}
/**
- * Returns the first page collection in a given area tree.
- * @param areaTree The area tree being tested.
- * @param collectionNum The ordinal number of the page collection to be
- * extracted, that is, "1" for the first collection, "2" for the second,
- * etc.
- * @return The requested page collection, or null if it does not exist.
- */
- protected PageCollection4a getPageCollection(final AreaTree4a areaTree,
- final int collectionNum) {
- final AreaNode4a node = areaTree.areaNodeChildAt(0);
- assertTrue(node instanceof PageCollection4a);
- final PageCollection4a pageCollection = (PageCollection4a) node;
- return pageCollection;
- }
-
- /**
- * Returns a given ordinal page from a page collection.
- * @param pageCollection The page collection from which the page should be
- * extracted.
- * @param pageNum The ordinal page number of the page to be extracted, that
- * is, "1" for the first page in the collection, "2" for the second, etc.
- * @return The requested page, or null if it does not exist.
- */
- protected PageRa4a getPage(final PageCollection4a pageCollection,
- final int pageNum) {
- assertNotNull(pageCollection);
- /* Convert the ordinal page number to an index into the children. */
- final int index = pageNum - 1;
- assertTrue(index >= 0);
- assertTrue(index < pageCollection.qtyAreaNodeChildren());
- final AreaNode4a node = pageCollection.areaNodeChildAt(index);
- assertTrue(node instanceof PageRa4a);
- final PageRa4a page = (PageRa4a) node;
- return page;
- }
-
- /**
* For the given AreaTree node, concatenates all descendant text items into
* one string and returns that string, removing hyphens that have been added
* for line-breaking purposes.
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java 2023-01-13 16:14:18 UTC (rev 13059)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java 2023-01-13 16:18:35 UTC (rev 13060)
@@ -162,7 +162,7 @@
public void testBlock002() {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree4a areaTree = creator.buildAreaTree("fo/block-002.fo", getLineBreakerFactory());
- final PageCollection4a pageCollection = getPageCollection(areaTree, 1);
+ final PageCollection4a pageCollection = areaTree.getChildren().get(0);
final int numPages = pageCollection.qtyAreaNodeChildren();
assertEquals(2, numPages);
final String actual = getText(areaTree);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-13 16:14:21
|
Revision: 13059
http://sourceforge.net/p/foray/code/13059
Author: victormote
Date: 2023-01-13 16:14:18 +0000 (Fri, 13 Jan 2023)
Log Message:
-----------
Make test code less dependent on FOray classes.
Modified Paths:
--------------
trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/BorderTests.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/GraphicAreaTests.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/InlineTests.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/VerticalTests.java
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2023-01-12 19:22:37 UTC (rev 13058)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2023-01-13 16:14:18 UTC (rev 13059)
@@ -30,12 +30,8 @@
import org.foray.area.AreaNode4a;
import org.foray.area.AreaTree4a;
-import org.foray.area.MainRa4a;
-import org.foray.area.NormalFlowRa4a;
import org.foray.area.PageCollection4a;
import org.foray.area.PageRa4a;
-import org.foray.area.RegionBodyRa4a;
-import org.foray.area.SpanRa4a;
import org.foray.area.TextArea;
import org.foray.common.data.OrderedTreeNode;
import org.foray.font.ConsumerFont4a;
@@ -46,6 +42,13 @@
import org.foray.font.FreeStandingFont;
import org.foray.font.config.RegisteredFontContent;
+import org.axsl.area.AreaTree;
+import org.axsl.area.MainRa;
+import org.axsl.area.NormalFlowRa;
+import org.axsl.area.PageCollection;
+import org.axsl.area.PageRa;
+import org.axsl.area.RegionBodyRa;
+import org.axsl.area.SpanRa;
import org.axsl.font.FontException;
import org.axsl.linebreak.LineBreakerFactory;
@@ -93,18 +96,13 @@
* @param areaTree The area tree being tested.
* @return The first normal-flow reference area in {@code areaTree}.
*/
- protected NormalFlowRa4a getFirstNormalFlowArea(final AreaTree4a areaTree) {
- final PageCollection4a pageCollection = getPageCollection(areaTree, 1);
- final PageRa4a firstPage = getPage(pageCollection, 1);
- final RegionBodyRa4a regionBody = firstPage.getRegionBody(
- "xsl-region-body");
- final MainRa4a main = regionBody.getMainRefArea();
- AreaNode4a node = main.areaNodeChildAt(0);
- assertTrue(node instanceof SpanRa4a);
- final SpanRa4a span = (SpanRa4a) node;
- node = span.areaNodeChildAt(0);
- assertTrue(node instanceof NormalFlowRa4a);
- final NormalFlowRa4a nfa = (NormalFlowRa4a) node;
+ protected NormalFlowRa getFirstNormalFlowArea(final AreaTree areaTree) {
+ final PageCollection pageCollection = areaTree.areaNodeChildAt(0);
+ final PageRa firstPage = pageCollection.areaNodeChildAt(0);
+ final RegionBodyRa regionBody = firstPage.getRegionBody("xsl-region-body");
+ final MainRa main = regionBody.getMainRefArea();
+ final SpanRa span = main.areaNodeChildAt(0);
+ final NormalFlowRa nfa = span.areaNodeChildAt(0);
return nfa;
}
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java 2023-01-12 19:22:37 UTC (rev 13058)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/BlockTests.java 2023-01-13 16:14:18 UTC (rev 13059)
@@ -30,14 +30,15 @@
import org.foray.app.AreaTreeCreator;
-import org.foray.area.AreaNode4a;
import org.foray.area.AreaTree4a;
import org.foray.area.LineArea4a;
import org.foray.area.NormalBlockArea4a;
-import org.foray.area.NormalFlowRa4a;
import org.foray.area.PageCollection4a;
import org.foray.area.TextArea;
+import org.axsl.area.AreaNode;
+import org.axsl.area.AreaTree;
+import org.axsl.area.NormalFlowRa;
import org.axsl.font.FontException;
import org.axsl.font.FontUse;
import org.axsl.font.zzz.FontContextMdo;
@@ -71,11 +72,11 @@
@Test
public void testBlock001() {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
- final AreaTree4a areaTree = creator.buildAreaTree("fo/block-001.fo", getLineBreakerFactory());
- final NormalFlowRa4a firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
+ final AreaTree areaTree = creator.buildAreaTree("fo/block-001.fo", getLineBreakerFactory());
+ final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* The outer block area. */
- AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(0);
+ AreaNode node = firstNormalFlowArea.areaNodeChildAt(0);
assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a outerBlockArea = (NormalBlockArea4a) node;
/* 1 inch left margin. */
@@ -238,10 +239,10 @@
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree4a areaTree = creator.buildAreaTree("fo/block-003.fo", getLineBreakerFactory());
- final NormalFlowRa4a firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
+ final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* Test location and dimensions of the block area. */
- AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(0);
+ AreaNode node = firstNormalFlowArea.areaNodeChildAt(0);
assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
/* 1 inch left margin. */
@@ -299,11 +300,10 @@
public void testBlock004() throws FontException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree4a areaTree = creator.buildAreaTree("fo/block-004.fo", getLineBreakerFactory());
- final NormalFlowRa4a firstNormalFlowArea = this.getFirstNormalFlowArea(
- areaTree);
+ final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* Test location and dimensions of the block area. */
- AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(0);
+ AreaNode node = firstNormalFlowArea.areaNodeChildAt(0);
assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
/* 1 inch left margin. */
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/BorderTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/BorderTests.java 2023-01-12 19:22:37 UTC (rev 13058)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/BorderTests.java 2023-01-13 16:14:18 UTC (rev 13059)
@@ -29,11 +29,12 @@
package org.foray.app.area;
import org.foray.app.AreaTreeCreator;
-import org.foray.area.AreaNode4a;
import org.foray.area.AreaTree4a;
import org.foray.area.NormalBlockArea4a;
-import org.foray.area.NormalFlowRa4a;
+import org.axsl.area.AreaNode;
+import org.axsl.area.NormalFlowRa;
+
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
@@ -50,9 +51,9 @@
public void testBorderStyle001() {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree4a areaTree = creator.buildAreaTree("fo/border-style-001.fo", getLineBreakerFactory());
- final NormalFlowRa4a firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
+ final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
- final AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(0);
+ final AreaNode node = firstNormalFlowArea.areaNodeChildAt(0);
assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
assertEquals(72000, blockArea.brOriginX());
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/GraphicAreaTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/GraphicAreaTests.java 2023-01-12 19:22:37 UTC (rev 13058)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/GraphicAreaTests.java 2023-01-13 16:14:18 UTC (rev 13059)
@@ -29,14 +29,15 @@
package org.foray.app.area;
import org.foray.app.AreaTreeCreator;
-import org.foray.area.AreaNode4a;
import org.foray.area.AreaTree4a;
import org.foray.area.ExternalGraphicArea;
import org.foray.area.LineArea4a;
import org.foray.area.NormalBlockArea4a;
-import org.foray.area.NormalFlowRa4a;
import org.foray.core.ForayException;
+import org.axsl.area.AreaNode;
+import org.axsl.area.NormalFlowRa;
+
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Disabled;
@@ -58,13 +59,13 @@
public void testGraphic002() throws ForayException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree4a areaTree = creator.buildAreaTree("fo/graphic-002.fo", getLineBreakerFactory());
- final NormalFlowRa4a firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
+ final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* There are two block areas. */
assertEquals(2, firstNormalFlowArea.qtyAreaNodeChildren());
/* The second one contains the graphic. */
- AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(1);
+ AreaNode node = firstNormalFlowArea.areaNodeChildAt(1);
assertTrue(node instanceof NormalBlockArea4a);
/* It has one child, a LineArea ... */
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/InlineTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/InlineTests.java 2023-01-12 19:22:37 UTC (rev 13058)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/InlineTests.java 2023-01-13 16:14:18 UTC (rev 13059)
@@ -29,15 +29,16 @@
package org.foray.app.area;
import org.foray.app.AreaTreeCreator;
-import org.foray.area.AreaNode4a;
import org.foray.area.AreaTree4a;
import org.foray.area.InlineArea;
import org.foray.area.LineArea4a;
import org.foray.area.NormalBlockArea4a;
-import org.foray.area.NormalFlowRa4a;
import org.foray.area.TextArea;
import org.foray.core.ForayException;
+import org.axsl.area.AreaNode;
+import org.axsl.area.NormalFlowRa;
+
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Disabled;
@@ -59,11 +60,11 @@
public void testInline001() throws ForayException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree4a areaTree = creator.buildAreaTree("fo/inline-001.fo", getLineBreakerFactory());
- final NormalFlowRa4a firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
+ final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
assertEquals(1, firstNormalFlowArea.qtyAreaNodeChildren());
/* The block area. */
- AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(0);
+ AreaNode node = firstNormalFlowArea.areaNodeChildAt(0);
assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
assertEquals(1, blockArea.qtyAreaNodeChildren());
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/VerticalTests.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/VerticalTests.java 2023-01-12 19:22:37 UTC (rev 13058)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/VerticalTests.java 2023-01-13 16:14:18 UTC (rev 13059)
@@ -29,16 +29,16 @@
package org.foray.app.area;
import org.foray.app.AreaTreeCreator;
-import org.foray.area.AreaNode4a;
import org.foray.area.AreaTree4a;
import org.foray.area.InlineArea;
import org.foray.area.LineArea4a;
import org.foray.area.NormalBlockArea4a;
-import org.foray.area.NormalFlowRa4a;
import org.foray.area.TextArea;
import org.foray.core.ForayException;
+import org.axsl.area.AreaNode;
import org.axsl.area.AreaTreeException;
+import org.axsl.area.NormalFlowRa;
import org.axsl.font.FontUse;
import org.axsl.fotree.FoTreeException;
@@ -61,10 +61,10 @@
public void testVertical001() throws FoTreeException, AreaTreeException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree4a areaTree = creator.buildAreaTree("fo/vertical-001.fo", getLineBreakerFactory());
- final NormalFlowRa4a firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
+ final NormalFlowRa firstNormalFlowArea = this.getFirstNormalFlowArea(areaTree);
/* The block area. */
- AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(0);
+ AreaNode node = firstNormalFlowArea.areaNodeChildAt(0);
assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
final FontUse font = blockArea.traitNominalFont();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-12 19:22:40
|
Revision: 13058
http://sourceforge.net/p/foray/code/13058
Author: victormote
Date: 2023-01-12 19:22:37 +0000 (Thu, 12 Jan 2023)
Log Message:
-----------
Allow foreign namespace to do some post-parse processing.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/ForeignNamespaceHandler.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceMath.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceSvg.java
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 2023-01-12 18:14:40 UTC (rev 13057)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2023-01-12 19:22:37 UTC (rev 13058)
@@ -387,7 +387,9 @@
throw new IllegalStateException("Unexpected document type:" + document.getClass().getName());
}
- parent.setForeignXml(document);
+ this.proxyHandler.finalizeParsing();
+ /* The document instance can change during finalizeParsing, so get it again. */
+ parent.setForeignXml(this.proxyHandler.getDocument());
this.proxyHandler = null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java 2023-01-12 18:14:40 UTC (rev 13057)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java 2023-01-12 19:22:37 UTC (rev 13058)
@@ -82,4 +82,13 @@
*/
public abstract ForeignNamespaceHandler getHandler();
+ /**
+ * Gives subclasses an opportunity to do any post-parsing finalization work.
+ * CAVEAT: The subclass may replace the object returned by {@link ForeignNamespaceHandler#getDocument()} as part of
+ * this process.
+ * Always use the value returned after running this method for any downstream processing.
+ * @param handler The handler containing the parsed document and content handler.
+ */
+ public abstract void finalizeHandler(ForeignNamespaceHandler handler);
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/ForeignNamespaceHandler.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/ForeignNamespaceHandler.java 2023-01-12 18:14:40 UTC (rev 13057)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/ForeignNamespaceHandler.java 2023-01-12 19:22:37 UTC (rev 13058)
@@ -28,6 +28,8 @@
package org.foray.fotree.foreign;
+import org.foray.fotree.NamespaceForeign;
+
import org.w3c.dom.Document;
import org.xml.sax.ContentHandler;
@@ -44,7 +46,18 @@
/** The content handler to be used to parse the foreign XML. */
private ContentHandler contentHandler;
+ /** The foreign namespace that created this handler. */
+ private NamespaceForeign namespace;
+
/**
+ * Constructor.
+ * @param namespace The foreign namespace that created this handler.
+ */
+ public ForeignNamespaceHandler(final NamespaceForeign namespace) {
+ this.namespace = namespace;
+ }
+
+ /**
* Returns the document.
* @return The document.
*/
@@ -62,7 +75,7 @@
/**
* Returns the content handler to be used to parse the foreign XML.
- * @return the content handler to be used to parse the foreign XML..
+ * @return the content handler to be used to parse the foreign XML.
*/
public ContentHandler getContentHandler() {
return contentHandler;
@@ -76,5 +89,11 @@
this.contentHandler = contentHandler;
}
+ /**
+ * Allow the namespace to do any specific post-parse processing that is needed.
+ */
+ public void finalizeParsing() {
+ this.namespace.finalizeHandler(this);
+ }
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceMath.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceMath.java 2023-01-12 18:14:40 UTC (rev 13057)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceMath.java 2023-01-12 19:22:37 UTC (rev 13058)
@@ -72,7 +72,7 @@
final ContentHandler contentHandler = new Sax2DomParser(document);
- final ForeignNamespaceHandler handler = new ForeignNamespaceHandler();
+ final ForeignNamespaceHandler handler = new ForeignNamespaceHandler(this);
handler.setDocument(document);
handler.setContentHandler(contentHandler);
@@ -79,4 +79,9 @@
return handler;
}
+ @Override
+ public void finalizeHandler(final ForeignNamespaceHandler handler) {
+ /* Nothing to do here. */
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceSvg.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceSvg.java 2023-01-12 18:14:40 UTC (rev 13057)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceSvg.java 2023-01-12 19:22:37 UTC (rev 13058)
@@ -29,15 +29,25 @@
package org.foray.fotree.foreign;
import org.foray.fotree.NamespaceForeign;
+import org.foray.primitive.StringUtils;
+import org.foray.xml.DomUtil;
import org.foray.xml.Sax2DomParser;
import org.axsl.constants.XmlConstants;
+import org.apache.batik.anim.dom.SAXSVGDocumentFactory;
import org.apache.batik.anim.dom.SVGDOMImplementation;
+import org.apache.batik.util.XMLResourceDescriptor;
import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.ls.LSOutput;
+import org.w3c.dom.ls.LSSerializer;
import org.w3c.dom.svg.SVGDocument;
import org.xml.sax.ContentHandler;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
/**
* This class manages the namespace that is used for SVG.
*/
@@ -77,7 +87,7 @@
// return new SAXSVGDocumentFactory(SaxParser.getParserClassName());
final ContentHandler contentHandler = new Sax2DomParser(document);
- final ForeignNamespaceHandler handler = new ForeignNamespaceHandler();
+ final ForeignNamespaceHandler handler = new ForeignNamespaceHandler(this);
handler.setDocument(document);
handler.setContentHandler(contentHandler);
@@ -84,4 +94,26 @@
return handler;
}
+ @Override
+ public void finalizeHandler(final ForeignNamespaceHandler handler) {
+ /* Reparse the SVG document using the standard Batik approach. */
+ final LSSerializer lss = DomUtil.createLSSerializer();
+ final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ final LSOutput lso = DomUtil.createLSOutput(baos, StringUtils.EMPTY_STRING);
+ lso.setByteStream(baos);
+ lss.write(handler.getDocument(), lso);
+ final byte[] bytes = baos.toByteArray();
+ final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+
+ final String parser = XMLResourceDescriptor.getXMLParserClassName();
+ final SAXSVGDocumentFactory factory = new SAXSVGDocumentFactory(parser);
+ try {
+ final SVGDocument document = factory.createSVGDocument("", bais);
+ handler.setDocument(document);
+ } catch (final IOException e) {
+ /* This shouldn't happen. We aren't actually doing IO. */
+ throw new IllegalStateException(e);
+ }
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-12 18:14:41
|
Revision: 13057
http://sourceforge.net/p/foray/code/13057
Author: victormote
Date: 2023-01-12 18:14:40 +0000 (Thu, 12 Jan 2023)
Log Message:
-----------
Add more LS methods, so far used only for testing and experimentation.
Modified Paths:
--------------
trunk/foray/foray-xml/src/main/java/org/foray/xml/DomUtil.java
Modified: trunk/foray/foray-xml/src/main/java/org/foray/xml/DomUtil.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/DomUtil.java 2023-01-11 22:12:29 UTC (rev 13056)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/DomUtil.java 2023-01-12 18:14:40 UTC (rev 13057)
@@ -34,11 +34,14 @@
import org.w3c.dom.bootstrap.DOMImplementationRegistry;
import org.w3c.dom.ls.DOMImplementationLS;
import org.w3c.dom.ls.LSInput;
+import org.w3c.dom.ls.LSOutput;
import org.w3c.dom.ls.LSParser;
import org.w3c.dom.ls.LSResourceResolver;
+import org.w3c.dom.ls.LSSerializer;
import java.io.IOException;
import java.io.InputStream;
+import java.io.OutputStream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -138,9 +141,9 @@
/**
* Converts an input stream into an LSInput.
+ * @param inputStream The input stream to attach to the input.
* @param publicId The public ID to attache to the input.
* @param systemId The system ID to attach to the input.
- * @param inputStream The input stream to attach to the input.
* @return The new input.
*/
public static LSInput createLSInput(final InputStream inputStream, final String publicId, final String systemId) {
@@ -157,4 +160,37 @@
return input;
}
+ /**
+ * Converts an output stream into an LSInput.
+ * @param outputStream The output stream to attach to the output.
+ * @param systemId The system ID to attach to the output.
+ * @return The new output.
+ */
+ public static LSOutput createLSOutput(final OutputStream outputStream, final String systemId) {
+ final DOMImplementationLS implementation;
+ try {
+ implementation = DomUtil.getDOMImplementationLS();
+ } catch (final IOException e) {
+ return null;
+ }
+ final LSOutput output = implementation.createLSOutput();
+ output.setByteStream(outputStream);
+ output.setSystemId(systemId);
+ return output;
+ }
+
+ /**
+ * Creates an LS Serializer instance.
+ * @return The new LS Serializer.
+ */
+ public static LSSerializer createLSSerializer() {
+ final DOMImplementationLS implementation;
+ try {
+ implementation = DomUtil.getDOMImplementationLS();
+ } catch (final IOException e) {
+ return null;
+ }
+ return implementation.createLSSerializer();
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-11 22:12:32
|
Revision: 13056
http://sourceforge.net/p/foray/code/13056
Author: victormote
Date: 2023-01-11 22:12:29 +0000 (Wed, 11 Jan 2023)
Log Message:
-----------
Fire startDocument() and endDocument() events manually.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
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 2023-01-11 20:19:55 UTC (rev 13055)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2023-01-11 22:12:29 UTC (rev 13056)
@@ -286,6 +286,7 @@
if (this.currentFObj instanceof InstreamForeignObject) {
final NamespaceForeign foreignNamespace = (NamespaceForeign) namespace;
this.proxyHandler = foreignNamespace.getHandler();
+ this.proxyHandler.getContentHandler().startDocument();
this.proxyHandler.getContentHandler().startElement(namespaceURI, localName, rawName, attlist);
return;
} else {
@@ -377,6 +378,8 @@
&& "instream-foreign-object".equals(localName)) {
final InstreamForeignObject4a parent = (InstreamForeignObject4a) this.currentFObj;
+ this.proxyHandler.getContentHandler().endDocument();
+
final Document document = this.proxyHandler.getDocument();
if (document instanceof SVGDocument) {
} else if (document instanceof MathMLDocument) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-11 20:19:58
|
Revision: 13055
http://sourceforge.net/p/foray/code/13055
Author: victormote
Date: 2023-01-11 20:19:55 +0000 (Wed, 11 Jan 2023)
Log Message:
-----------
Put the document and content handler into a single logical object so that they can be created and managed together as needed.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceMath.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceSvg.java
Added Paths:
-----------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/ForeignNamespaceHandler.java
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 2023-01-11 17:24:53 UTC (rev 13054)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2023-01-11 20:19:55 UTC (rev 13055)
@@ -35,6 +35,7 @@
import org.foray.fotree.fo.obj.InstreamForeignObject4a;
import org.foray.fotree.fo.obj.PageSequence4a;
import org.foray.fotree.fo.obj.Root4a;
+import org.foray.fotree.foreign.ForeignNamespaceHandler;
import org.foray.primitive.StringUtils;
import org.foray.xml.SaxParser;
@@ -96,14 +97,10 @@
/** Collection of objects that have registered to be notified about FOTreeEvent firings. */
private List<FoTreeListener> foTreeListeners = new ArrayList<FoTreeListener>();
- /** The current proxy parser, if any. This will be null during normal FO document parsing, but will contain a parser
- * when instream-foreign-object content is being parsed. */
- private ContentHandler proxyParser = null;
+ /** The current proxy handler/parser, if any. This will be null during normal FO document parsing, but will contain
+ * a handler/parser when instream-foreign-object content is being parsed. */
+ private ForeignNamespaceHandler proxyHandler = null;
- /** The current foreign document, if any. This will be null during normal FO document parsing, but will contain the
- * document being parsed by {@link #proxyParser} when instream-foreign-object content is being parsed. */
- private Document foreignDocument;
-
/** The parent server. */
private FoTreeServer4a server;
@@ -179,9 +176,9 @@
return;
}
- if (this.proxyParser != null) {
+ if (this.proxyHandler != null) {
// If inside foreign XML, let the ForeignXml instance handle it.
- this.proxyParser.characters(data, start, length);
+ this.proxyHandler.getContentHandler().characters(data, start, length);
return;
}
@@ -273,9 +270,9 @@
@Override
public void startElement(final String namespaceURI, final String localName, final String rawName,
final Attributes attlist) throws SAXException {
- if (this.proxyParser != null) {
+ if (this.proxyHandler != null) {
// If inside foreign XML, let the ForeignXml instance handle it.
- this.proxyParser.startElement(namespaceURI, localName, rawName, attlist);
+ this.proxyHandler.getContentHandler().startElement(namespaceURI, localName, rawName, attlist);
return;
}
final Namespace namespace = Namespace.getNamespace(namespaceURI);
@@ -288,9 +285,8 @@
if (namespace instanceof NamespaceForeign) {
if (this.currentFObj instanceof InstreamForeignObject) {
final NamespaceForeign foreignNamespace = (NamespaceForeign) namespace;
- this.foreignDocument = foreignNamespace.createDomDocument();
- this.proxyParser = foreignNamespace.createSaxParser(this.foreignDocument);
- this.proxyParser.startElement(namespaceURI, localName, rawName, attlist);
+ this.proxyHandler = foreignNamespace.getHandler();
+ this.proxyHandler.getContentHandler().startElement(namespaceURI, localName, rawName, attlist);
return;
} else {
try {
@@ -381,21 +377,20 @@
&& "instream-foreign-object".equals(localName)) {
final InstreamForeignObject4a parent = (InstreamForeignObject4a) this.currentFObj;
- if (this.foreignDocument instanceof SVGDocument) {
- } else if (this.foreignDocument instanceof MathMLDocument) {
+ final Document document = this.proxyHandler.getDocument();
+ if (document instanceof SVGDocument) {
+ } else if (document instanceof MathMLDocument) {
} else {
- throw new IllegalStateException(
- "Unexpected document type:" + this.foreignDocument.getClass().getName());
+ throw new IllegalStateException("Unexpected document type:" + document.getClass().getName());
}
- parent.setForeignXml(this.foreignDocument);
- this.proxyParser = null;
- this.foreignDocument = null;
+ parent.setForeignXml(document);
+ this.proxyHandler = null;
}
- if (this.proxyParser != null) {
+ if (this.proxyHandler != null) {
// If inside foreign XML, let the ForeignXml instance handle it.
- this.proxyParser.endElement(uri, localName, rawName);
+ this.proxyHandler.getContentHandler().endElement(uri, localName, rawName);
return;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java 2023-01-11 17:24:53 UTC (rev 13054)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java 2023-01-11 20:19:55 UTC (rev 13055)
@@ -28,6 +28,7 @@
package org.foray.fotree;
+import org.foray.fotree.foreign.ForeignNamespaceHandler;
import org.foray.fotree.foreign.NamespaceMath;
import org.foray.fotree.foreign.NamespaceSvg;
@@ -34,8 +35,6 @@
import org.axsl.constants.XmlConstants;
import org.apache.commons.logging.LogFactory;
-import org.w3c.dom.Document;
-import org.xml.sax.ContentHandler;
import java.util.HashMap;
import java.util.Map;
@@ -64,22 +63,6 @@
}
/**
- * Create a DOM {@link Document} instance.
- * @return The newly-created {@link Document} instance for this namespace.
- */
- protected abstract Document createDomDocument();
-
- /**
- * Create a SAX parser suitable for parsing a document created in this namespace.
- * The parser should be ready to build {@code document} from SAX events that are fed to it.
- * This parser will be interposed in the process of parsing the FO document, and will serve as a proxy parser to
- * parse the foreign XML.
- * @param document The document which is to be built by the parser.
- * @return The parser.
- */
- public abstract ContentHandler createSaxParser(Document document);
-
- /**
* Registers a foreign namespace for use by the FO tree parser.
* @param namespaceUri The URI of the namespace to be registered.
* @param namespace The namespace instance to be used to process elements and attributes in the {@code namespaceUri}
@@ -93,4 +76,10 @@
namespaceMap.put(namespaceUri, namespace);
}
+ /**
+ * Returns a new handler for foreign content in this namespace.
+ * @return A new handler for foreign content in this namespace.
+ */
+ public abstract ForeignNamespaceHandler getHandler();
+
}
Added: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/ForeignNamespaceHandler.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/ForeignNamespaceHandler.java (rev 0)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/ForeignNamespaceHandler.java 2023-01-11 20:19:55 UTC (rev 13055)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2023 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.foreign;
+
+import org.w3c.dom.Document;
+import org.xml.sax.ContentHandler;
+
+/**
+ * Provides namespace-specific information to the FO parser for purposes of parsing foreign XML content.
+ * The {@link #getDocument()} and the {@link #getContentHandler()} must be related to each other.
+ * In other words, when the content handler is handling content, it needs to be updating the document.
+ */
+public class ForeignNamespaceHandler {
+
+ /** The foreign XML document being parsed. */
+ private Document document;
+
+ /** The content handler to be used to parse the foreign XML. */
+ private ContentHandler contentHandler;
+
+ /**
+ * Returns the document.
+ * @return The document.
+ */
+ public Document getDocument() {
+ return document;
+ }
+
+ /**
+ * Sets the document.
+ * @param document The document to set.
+ */
+ public void setDocument(final Document document) {
+ this.document = document;
+ }
+
+ /**
+ * Returns the content handler to be used to parse the foreign XML.
+ * @return the content handler to be used to parse the foreign XML..
+ */
+ public ContentHandler getContentHandler() {
+ return contentHandler;
+ }
+
+ /**
+ * Sets the content handler.
+ * @param contentHandler The content handler to set.
+ */
+ public void setContentHandler(final ContentHandler contentHandler) {
+ this.contentHandler = contentHandler;
+ }
+
+
+}
Property changes on: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/ForeignNamespaceHandler.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/foreign/NamespaceMath.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceMath.java 2023-01-11 17:24:53 UTC (rev 13054)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceMath.java 2023-01-11 20:19:55 UTC (rev 13055)
@@ -34,7 +34,7 @@
import org.axsl.constants.XmlConstants;
-import org.w3c.dom.Document;
+import org.xml.sax.ContentHandler;
/**
* This class manages the namespace that is used for the Math Markup Language
@@ -67,13 +67,16 @@
}
@Override
- protected MathMlDocument4a createDomDocument() {
- return new MathMlDocument4a(null, null, null);
- }
+ public ForeignNamespaceHandler getHandler() {
+ final MathMlDocument4a document = new MathMlDocument4a(null, null, null);
- @Override
- public Sax2DomParser createSaxParser(final Document document) {
- return new Sax2DomParser(document);
+ final ContentHandler contentHandler = new Sax2DomParser(document);
+
+ final ForeignNamespaceHandler handler = new ForeignNamespaceHandler();
+ handler.setDocument(document);
+ handler.setContentHandler(contentHandler);
+
+ return handler;
}
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceSvg.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceSvg.java 2023-01-11 17:24:53 UTC (rev 13054)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceSvg.java 2023-01-11 20:19:55 UTC (rev 13055)
@@ -35,9 +35,8 @@
import org.apache.batik.anim.dom.SVGDOMImplementation;
import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
import org.w3c.dom.svg.SVGDocument;
-import org.xml.sax.helpers.DefaultHandler;
+import org.xml.sax.ContentHandler;
/**
* This class manages the namespace that is used for SVG.
@@ -70,16 +69,19 @@
}
@Override
- protected SVGDocument createDomDocument() {
+ public ForeignNamespaceHandler getHandler() {
final DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
- return (SVGDocument) impl.createDocument(XmlConstants.SVG_NS_URI, "svg", null);
- }
+ final SVGDocument document = (SVGDocument) impl.createDocument(XmlConstants.SVG_NS_URI, "svg", null);
- @Override
- public DefaultHandler createSaxParser(final Document document) {
/* TODO: Get the SVG-specific SAX DefaultHandler working here. */
// return new SAXSVGDocumentFactory(SaxParser.getParserClassName());
- return new Sax2DomParser(document);
+ final ContentHandler contentHandler = new Sax2DomParser(document);
+
+ final ForeignNamespaceHandler handler = new ForeignNamespaceHandler();
+ handler.setDocument(document);
+ handler.setContentHandler(contentHandler);
+
+ return handler;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-11 17:24:56
|
Revision: 13054
http://sourceforge.net/p/foray/code/13054
Author: victormote
Date: 2023-01-11 17:24:53 +0000 (Wed, 11 Jan 2023)
Log Message:
-----------
Move ErrorHandler interface from Namespace to NamespaceNative as it is only used by native namespaces.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/Namespace.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
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 2023-01-11 17:08:11 UTC (rev 13053)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2023-01-11 17:24:53 UTC (rev 13054)
@@ -71,7 +71,7 @@
/**
* SAX Handler that builds the formatting object tree.
*/
-public class FoTreeParser4a extends SaxParser<FoTree4a> implements FoTreeParser, Namespace.ErrorHandler {
+public class FoTreeParser4a extends SaxParser<FoTree4a> implements FoTreeParser, NamespaceNative.ErrorHandler {
/** The initial size of the text buffer for accumulating text. */
private static final int INITIAL_TEXT_BUFFER_SIZE = 4096;
@@ -113,14 +113,13 @@
/** The text buffer used to accumulate the text portion of the mixed content. */
private StringBuilder textBuffer = new StringBuilder(INITIAL_TEXT_BUFFER_SIZE);
- /* TODO: This should possibly be configurable. */
/** The strategy to use for storing text. Defaults to {@link TextStrategy#WORD}, but can be changed by
* {@link #setTextStrategy(TextStrategy)}. */
private TextStrategy textStrategy = TextStrategy.WORD;
- /** Map whose key is a {@link Namespace} instance, and whose value is the set of elements that were parsed in that
- * namespace that could not be converted to FO Objects. */
- private Map<Namespace, Set<String>> invalidElementsMap = new HashMap<Namespace, Set<String>>();
+ /** Map whose key is a {@link NamespaceNative} instance, and whose value is the set of elements that were parsed in
+ * that namespace that could not be converted to FO Objects. */
+ private Map<NamespaceNative, Set<String>> invalidElementsMap = new HashMap<NamespaceNative, Set<String>>();
/** List of base URLs to be used when resolving relative locations as they are parsed. */
private List<URL> resourceSearchPath;
@@ -512,7 +511,7 @@
}
@Override
- public void processUnknownElement(final Namespace namespace, final String unknownElementName) {
+ public void processUnknownElement(final NamespaceNative namespace, final String unknownElementName) {
Set<String> unknownElements = this.invalidElementsMap.get(namespace);
if (unknownElements == null) {
unknownElements = new HashSet<String>();
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/Namespace.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/Namespace.java 2023-01-11 17:08:11 UTC (rev 13053)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/Namespace.java 2023-01-11 17:24:53 UTC (rev 13054)
@@ -42,20 +42,6 @@
public abstract class Namespace {
/**
- * Implementations (usually FO Tree parsers) receive events when the {@link Namespace} instance encounters errors.
- */
- public interface ErrorHandler {
-
- /**
- * Process an unknown element that was encountered in this namespace.
- * @param namespace The Namespace instance that encountered the error.
- * @param unknownElementName The name of the unknown element encountered by {@code namespace}.
- */
- void processUnknownElement(Namespace namespace, String unknownElementName);
-
- }
-
- /**
* Finds the {@link Namespace} instance for a given namespace URI.
* @param namespaceUri The URI for which a namespace is needed.
* @return The namespace matching {@code namespaceUri}, or null if none is found.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2023-01-11 17:08:11 UTC (rev 13053)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2023-01-11 17:24:53 UTC (rev 13054)
@@ -45,6 +45,20 @@
public abstract class NamespaceNative extends Namespace {
/**
+ * Implementations (usually FO Tree parsers) receive events when the {@link Namespace} instance encounters errors.
+ */
+ public interface ErrorHandler {
+
+ /**
+ * Process an unknown element that was encountered in this namespace.
+ * @param namespace The Namespace instance that encountered the error.
+ * @param unknownElementName The name of the unknown element encountered by {@code namespace}.
+ */
+ void processUnknownElement(NamespaceNative namespace, String unknownElementName);
+
+ }
+
+ /**
* Finds the {@link NamespaceNative} instance for a given namespace URI.
* @param namespaceUri The URI for which a native namespace is needed.
* @return The native namespace matching {@code namespaceUri}, or null if none is found.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-11 17:08:13
|
Revision: 13053
http://sourceforge.net/p/foray/code/13053
Author: victormote
Date: 2023-01-11 17:08:11 +0000 (Wed, 11 Jan 2023)
Log Message:
-----------
Remove duplicate method. Rename remaining one.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java
trunk/foray/foray-xml/src/main/java/org/foray/xml/DomUtil.java
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java 2023-01-10 22:01:34 UTC (rev 13052)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java 2023-01-11 17:08:11 UTC (rev 13053)
@@ -115,7 +115,7 @@
final InputStream theStream = MathFactory.getMathMLDtdAsInputStream(fileName);
final DOMImplementationLS implementation;
try {
- implementation = DomUtil.getDOMImplementation();
+ implementation = DomUtil.getDOMImplementationLS();
} catch (final IOException e) {
return null;
}
Modified: trunk/foray/foray-xml/src/main/java/org/foray/xml/DomUtil.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/DomUtil.java 2023-01-10 22:01:34 UTC (rev 13052)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/DomUtil.java 2023-01-11 17:08:11 UTC (rev 13053)
@@ -104,7 +104,7 @@
* @return The DOM Implementation.
* @throws IOException For errors obtaining an instance of the DOM Implementation registry.
*/
- public static DOMImplementationLS procureDOMImplementation() throws IOException {
+ public static DOMImplementationLS getDOMImplementationLS() throws IOException {
final DOMImplementationRegistry registry = DomUtil.getDOMRegistry();
final DOMImplementationLS impl = (DOMImplementationLS) registry.getDOMImplementation("LS");
@@ -112,18 +112,6 @@
}
/**
- * Returns the DOM Implementation.
- * @return The DOM Implementation.
- * @throws IOException For errors obtaining an instance of the DOM Implementation registry.
- */
- public static DOMImplementationLS getDOMImplementation() throws IOException {
- final DOMImplementationRegistry registry = DomUtil.getDOMRegistry();
-
- final DOMImplementationLS impl = (DOMImplementationLS) registry.getDOMImplementation("LS");
- return impl;
- }
-
- /**
* Converts an input stream to a generic DOM Document.
* @param inputStream The stream to be parsed to a DOM document.
* @param resourceResolver The resource resolver to use, which can be null.
@@ -133,7 +121,7 @@
*/
public static Document streamToDom(final InputStream inputStream, final LSResourceResolver resourceResolver)
throws IOException {
- final DOMImplementationLS impl = DomUtil.getDOMImplementation();
+ final DOMImplementationLS impl = DomUtil.getDOMImplementationLS();
final LSParser builder = impl.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null);
final DOMConfiguration domConfiguration = builder.getDomConfig();
if (resourceResolver != null
@@ -158,7 +146,7 @@
public static LSInput createLSInput(final InputStream inputStream, final String publicId, final String systemId) {
final DOMImplementationLS implementation;
try {
- implementation = DomUtil.getDOMImplementation();
+ implementation = DomUtil.getDOMImplementationLS();
} catch (final IOException e) {
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-10 22:01:36
|
Revision: 13052
http://sourceforge.net/p/foray/code/13052
Author: victormote
Date: 2023-01-10 22:01:34 +0000 (Tue, 10 Jan 2023)
Log Message:
-----------
Change proxy parser type from DefaultHandler to ContentHandler.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java
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 2023-01-10 12:41:18 UTC (rev 13051)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2023-01-10 22:01:34 UTC (rev 13052)
@@ -55,7 +55,6 @@
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
import java.io.IOException;
import java.net.URL;
@@ -99,7 +98,7 @@
/** The current proxy parser, if any. This will be null during normal FO document parsing, but will contain a parser
* when instream-foreign-object content is being parsed. */
- private DefaultHandler proxyParser = null;
+ private ContentHandler proxyParser = null;
/** The current foreign document, if any. This will be null during normal FO document parsing, but will contain the
* document being parsed by {@link #proxyParser} when instream-foreign-object content is being parsed. */
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java 2023-01-10 12:41:18 UTC (rev 13051)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java 2023-01-10 22:01:34 UTC (rev 13052)
@@ -35,7 +35,7 @@
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
-import org.xml.sax.helpers.DefaultHandler;
+import org.xml.sax.ContentHandler;
import java.util.HashMap;
import java.util.Map;
@@ -77,7 +77,7 @@
* @param document The document which is to be built by the parser.
* @return The parser.
*/
- public abstract DefaultHandler createSaxParser(Document document);
+ public abstract ContentHandler createSaxParser(Document document);
/**
* Registers a foreign namespace for use by the FO tree parser.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-01-10 12:41:21
|
Revision: 13051
http://sourceforge.net/p/foray/code/13051
Author: victormote
Date: 2023-01-10 12:41:18 +0000 (Tue, 10 Jan 2023)
Log Message:
-----------
1. Allow any DefaultHandler when parsing instream-foreign-object. 2. Make createSaxParser in ForeignNamespace abstract so that each namespace can choose its own implementation.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceMath.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceSvg.java
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 2023-01-10 11:34:08 UTC (rev 13050)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2023-01-10 12:41:18 UTC (rev 13051)
@@ -36,7 +36,6 @@
import org.foray.fotree.fo.obj.PageSequence4a;
import org.foray.fotree.fo.obj.Root4a;
import org.foray.primitive.StringUtils;
-import org.foray.xml.Sax2DomParser;
import org.foray.xml.SaxParser;
import org.axsl.constants.XmlConstants;
@@ -56,6 +55,7 @@
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.DefaultHandler;
import java.io.IOException;
import java.net.URL;
@@ -99,7 +99,7 @@
/** The current proxy parser, if any. This will be null during normal FO document parsing, but will contain a parser
* when instream-foreign-object content is being parsed. */
- private Sax2DomParser proxyParser = null;
+ private DefaultHandler proxyParser = null;
/** The current foreign document, if any. This will be null during normal FO document parsing, but will contain the
* document being parsed by {@link #proxyParser} when instream-foreign-object content is being parsed. */
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java 2023-01-10 11:34:08 UTC (rev 13050)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceForeign.java 2023-01-10 12:41:18 UTC (rev 13051)
@@ -30,12 +30,12 @@
import org.foray.fotree.foreign.NamespaceMath;
import org.foray.fotree.foreign.NamespaceSvg;
-import org.foray.xml.Sax2DomParser;
import org.axsl.constants.XmlConstants;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
+import org.xml.sax.helpers.DefaultHandler;
import java.util.HashMap;
import java.util.Map;
@@ -77,10 +77,7 @@
* @param document The document which is to be built by the parser.
* @return The parser.
*/
- public Sax2DomParser createSaxParser(final Document document) {
- final Sax2DomParser parser = new Sax2DomParser(document);
- return parser;
- }
+ public abstract DefaultHandler createSaxParser(Document document);
/**
* Registers a foreign namespace for use by the FO tree parser.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceMath.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceMath.java 2023-01-10 11:34:08 UTC (rev 13050)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceMath.java 2023-01-10 12:41:18 UTC (rev 13051)
@@ -29,10 +29,13 @@
package org.foray.fotree.foreign;
import org.foray.fotree.NamespaceForeign;
+import org.foray.xml.Sax2DomParser;
import org.foray.xml.domImpl.MathMlDocument4a;
import org.axsl.constants.XmlConstants;
+import org.w3c.dom.Document;
+
/**
* This class manages the namespace that is used for the Math Markup Language
* (MathML).
@@ -68,4 +71,9 @@
return new MathMlDocument4a(null, null, null);
}
+ @Override
+ public Sax2DomParser createSaxParser(final Document document) {
+ return new Sax2DomParser(document);
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceSvg.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceSvg.java 2023-01-10 11:34:08 UTC (rev 13050)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foreign/NamespaceSvg.java 2023-01-10 12:41:18 UTC (rev 13051)
@@ -29,12 +29,15 @@
package org.foray.fotree.foreign;
import org.foray.fotree.NamespaceForeign;
+import org.foray.xml.Sax2DomParser;
import org.axsl.constants.XmlConstants;
import org.apache.batik.anim.dom.SVGDOMImplementation;
import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
import org.w3c.dom.svg.SVGDocument;
+import org.xml.sax.helpers.DefaultHandler;
/**
* This class manages the namespace that is used for SVG.
@@ -72,4 +75,11 @@
return (SVGDocument) impl.createDocument(XmlConstants.SVG_NS_URI, "svg", null);
}
+ @Override
+ public DefaultHandler createSaxParser(final Document document) {
+ /* TODO: Get the SVG-specific SAX DefaultHandler working here. */
+// return new SAXSVGDocumentFactory(SaxParser.getParserClassName());
+ return new Sax2DomParser(document);
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|