foray-commit Mailing List for FOray (Page 250)
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...> - 2006-06-15 23:21:06
|
Revision: 7636 Author: victormote Date: 2006-06-15 16:20:58 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7636&view=rev Log Message: ----------- Remove unneeded method parameter. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/MaximumRepeats.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 23:12:40 UTC (rev 7635) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 23:20:58 UTC (rev 7636) @@ -749,8 +749,8 @@ return propertyList.getColumnCount(context); } - public int traitMaximumRepeats(FOContext context) { - return propertyList.getMaximumRepeats(context); + public int traitMaximumRepeats() { + return propertyList.getMaximumRepeats(); } /** Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 23:12:40 UTC (rev 7635) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 23:20:58 UTC (rev 7636) @@ -1005,11 +1005,11 @@ return ColumnCount.getValueNoInstance(); } - public int getMaximumRepeats(FOContext context) { + public int getMaximumRepeats() { MaximumRepeats property = (MaximumRepeats) getProperty(Constants.FOPROP_MAXIMUM_REPEATS); if (property != null) { - return property.getValue(context, fobj); + return property.getValue(fobj); } return MaximumRepeats.getValueNoInstance(); } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-06-15 23:12:40 UTC (rev 7635) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-06-15 23:20:58 UTC (rev 7636) @@ -63,7 +63,7 @@ public String getNextPageMasterName(FOContext context, boolean isOddPage, boolean isFirstPage, boolean isEmptyPage) { - if (numberConsumed < traitMaximumRepeats(context)) { + if (numberConsumed < traitMaximumRepeats()) { numberConsumed++; } else { return null; Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-06-15 23:12:40 UTC (rev 7635) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-06-15 23:20:58 UTC (rev 7636) @@ -72,7 +72,7 @@ public String getNextPageMasterName(FOContext context, boolean isOddPage, boolean isFirstPage, boolean isEmptyPage) { - if (numberConsumed < traitMaximumRepeats(context)) { + if (numberConsumed < traitMaximumRepeats()) { numberConsumed++; } else { return null; Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/MaximumRepeats.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/MaximumRepeats.java 2006-06-15 23:12:40 UTC (rev 7635) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/MaximumRepeats.java 2006-06-15 23:20:58 UTC (rev 7636) @@ -33,9 +33,11 @@ import org.foray.fotree.value.PropertyValue; import org.axsl.common.Constants; -import org.axsl.foR.FOContext; - +/** + * The "maximum-repeats" property in XSL-FO. + * See XSL-FO 1.0, Section 7.25.10. + */ public class MaximumRepeats extends Property { public static final int NO_LIMIT = 2147483647; @@ -67,14 +69,14 @@ propertyList)); } - public int getValue(FOContext context, FObj fobj) { + public int getValue(FObj fobj) { if (this.value instanceof PropertyKeyword) { short keyword = ((PropertyKeyword) this.value).getValue(); switch (keyword) { case Constants.FOVAL_INHERIT: { - FObj parent = fobj.effectiveParent(context); + FObj parent = fobj.realParent(); if (parent != null) { - return parent.traitMaximumRepeats(context); + return parent.traitMaximumRepeats(); } return getValueNoInstance(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 23:12:49
|
Revision: 7635 Author: victormote Date: 2006-06-15 16:12:40 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7635&view=rev Log Message: ----------- Move property validation to the right place. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-06-15 23:09:48 UTC (rev 7634) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-06-15 23:12:40 UTC (rev 7635) @@ -49,13 +49,18 @@ public RepeatablePMReference(FObj parent, PropertyList propertyList, String systemId, int line, int column) throws FOTreeException { super(parent, propertyList, systemId, line, column); + /* Validate ancestry. */ + if (! (parent instanceof PageSequenceMaster)) { + throwException(getFullName() + " must be child of " + + "fo:page-sequence-master."); + } + } + + public void start() { + /* Validate properites. */ String masterReference = traitMasterReference(); - if (! masterReference.equals("")) { - if (! (parent instanceof PageSequenceMaster)) { - throwException(getFullName() + " must be child of " - + "fo:page-sequence-master."); - } - } else { + if (masterReference == null + || masterReference.equals("")) { logWarning(getFullName() + " has no master-reference, and will be " + "ignored."); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 23:10:02
|
Revision: 7634 Author: victormote Date: 2006-06-15 16:09:48 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7634&view=rev Log Message: ----------- Remove unneeded method parameter. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 23:05:06 UTC (rev 7633) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 23:09:48 UTC (rev 7634) @@ -652,8 +652,8 @@ return propertyList.traitKeepWithPreviousWithinPage(context); } - public String traitMasterReference(FOContext context) { - return propertyList.getMasterReference(context); + public String traitMasterReference() { + return propertyList.getMasterReference(); } public short traitPagePosition() { Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 23:05:06 UTC (rev 7633) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 23:09:48 UTC (rev 7634) @@ -827,10 +827,10 @@ return getKeepWithPrevious(context, Keep.WITHIN_PAGE); } - public String getMasterReference(FOContext context) { + public String getMasterReference() { Name property = (Name) getProperty(Constants.FOPROP_MASTER_REFERENCE); if (property != null) { - return property.getValue(context, fobj); + return property.getValue(); } return Name.getValueNoInstance(); } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-06-15 23:05:06 UTC (rev 7633) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-06-15 23:09:48 UTC (rev 7634) @@ -54,7 +54,7 @@ public void start() { /* Validate properties. */ - if (traitMasterReference(null) == null) { + if (traitMasterReference() == null) { logWarning(getFullName() + " has no master-reference, and " + "will be ignored."); } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-06-15 23:05:06 UTC (rev 7633) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-06-15 23:09:48 UTC (rev 7634) @@ -191,16 +191,12 @@ } public SimplePageMaster getSimplePageMaster() { - /* TODO: Handle context better. */ - FOContext context = null; - String masterReference = this.traitMasterReference(context); + String masterReference = this.traitMasterReference(); return getLayoutMasterSet().getSimplePageMaster(masterReference); } public PageSequenceMaster getPageSequenceMaster() { - /* TODO: Handle context better. */ - FOContext context = null; - String masterReference = this.traitMasterReference(context); + String masterReference = this.traitMasterReference(); return getLayoutMasterSet().getPageSequenceMaster(masterReference); } @@ -247,7 +243,7 @@ pageSequenceMaster = getPageSequenceMaster(); if (pageSequenceMaster == null) { throwException("master-reference '" - + traitMasterReference(context) + + traitMasterReference() + "' for fo:page-sequence matches no " + "simple-page-master or page-sequence-master"); } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-06-15 23:05:06 UTC (rev 7633) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-06-15 23:09:48 UTC (rev 7634) @@ -73,7 +73,7 @@ ConditionalPageMasterReference cpmr = (ConditionalPageMasterReference)this.children.get(i); if (cpmr.isValid(isOddPage, isFirstPage, isEmptyPage)) { - return cpmr.traitMasterReference(context); + return cpmr.traitMasterReference(); } } return null; Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-06-15 23:05:06 UTC (rev 7633) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-06-15 23:09:48 UTC (rev 7634) @@ -49,9 +49,7 @@ public RepeatablePMReference(FObj parent, PropertyList propertyList, String systemId, int line, int column) throws FOTreeException { super(parent, propertyList, systemId, line, column); - /* TODO: Handle context better. */ - FOContext context = null; - String masterReference = traitMasterReference(context); + String masterReference = traitMasterReference(); if (! masterReference.equals("")) { if (! (parent instanceof PageSequenceMaster)) { throwException(getFullName() + " must be child of " Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-06-15 23:05:06 UTC (rev 7633) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-06-15 23:09:48 UTC (rev 7634) @@ -55,7 +55,7 @@ } public void start() { - String masterReference = traitMasterReference(null); + String masterReference = traitMasterReference(); if (masterReference.equals("")) { this.logWarning(getFullName() + " has no master-reference, and " + "will be ignored."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 23:05:14
|
Revision: 7633 Author: victormote Date: 2006-06-15 16:05:06 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7633&view=rev Log Message: ----------- Remove unneeded parameter. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 22:58:36 UTC (rev 7632) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 23:05:06 UTC (rev 7633) @@ -692,8 +692,8 @@ return propertyList.getGroupingSize(); } - public short traitLetterValue(FOContext context) { - return propertyList.getLetterValue(context); + public short traitLetterValue() { + return propertyList.getLetterValue(); } /** Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 22:58:36 UTC (rev 7632) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 23:05:06 UTC (rev 7633) @@ -913,14 +913,13 @@ return GroupingSize.getValueNoInstance(); } - public short getLetterValue(FOContext context) { + public short getLetterValue() { Enumerated property = (Enumerated) getProperty(Constants .FOPROP_LETTER_VALUE); if (property != null) { - return property.getValue(context, fobj); + return property.getValue(); } - return Enumerated.getValueNoInstance - (context, Constants.FOPROP_LETTER_VALUE, fobj); + return Enumerated.getValueNoInstance(Constants.FOPROP_LETTER_VALUE); } public short getForcePageCount(FOContext context) { Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-06-15 22:58:36 UTC (rev 7632) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-06-15 23:05:06 UTC (rev 7633) @@ -78,12 +78,10 @@ } public void start() throws FOTreeException { - /* TODO: Handle context better. */ - FOContext context = null; // get the 'format' properties this.pageNumberGenerator = new PageNumberGenerator(this.traitFormat(), this.traitGroupingSeparator(), this.traitGroupingSize(), - this.traitLetterValue(context)); + this.traitLetterValue()); } public void end() throws FOTreeException { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 22:58:41
|
Revision: 7632 Author: victormote Date: 2006-06-15 15:58:36 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7632&view=rev Log Message: ----------- Conform to axsl changes: Rename method and recast it with a boolean return value, mostly to prevent exposing too much detail. Also, remove unneeded context parameter. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-06-15 22:58:27 UTC (rev 7631) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-06-15 22:58:36 UTC (rev 7632) @@ -185,8 +185,7 @@ } int lastPageNumber = previousPageCollection.getCurrentPageNumber() - 1; int computedPageNumber = pageSeq.traitInitialPageNumber(lastPageNumber); - if (pageSeq.getRawInitialPageNumber(this) - == Constants.FOVAL_NOT_A_KEYWORD) { + if (pageSeq.initialPageNumberSetExplicitly()) { /* * If the user set the page number explicitly, there is nothing * else to do but set it and go. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 22:58:33
|
Revision: 7631 Author: victormote Date: 2006-06-15 15:58:27 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7631&view=rev Log Message: ----------- Conform to axsl changes: Rename method and recast it with a boolean return value, mostly to prevent exposing too much detail. Also, remove unneeded context parameter. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/InitialPageNumber.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 22:26:01 UTC (rev 7630) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 22:58:27 UTC (rev 7631) @@ -675,8 +675,9 @@ /** * {@inheritDoc} */ - public short getRawInitialPageNumber(FOContext context) { - return propertyList.getRawInitialPageNumber(context); + public boolean initialPageNumberSetExplicitly() { + short rawInitialPageNumber = propertyList.getRawInitialPageNumber(); + return rawInitialPageNumber == Constants.FOVAL_NOT_A_KEYWORD; } public String traitFormat() { Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 22:26:01 UTC (rev 7630) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 22:58:27 UTC (rev 7631) @@ -876,12 +876,12 @@ return InitialPageNumber.getValueNoInstance(lastPageNumberUsed); } - public short getRawInitialPageNumber(FOContext context) { + public short getRawInitialPageNumber() { InitialPageNumber property = (InitialPageNumber) getProperty(Constants .FOPROP_INITIAL_PAGE_NUMBER); if (property != null) { - return property.getRawValue(context, fobj); + return property.getRawValue(fobj); } return InitialPageNumber.getRawValueNoInstance(); } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/InitialPageNumber.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/InitialPageNumber.java 2006-06-15 22:26:01 UTC (rev 7630) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/InitialPageNumber.java 2006-06-15 22:58:27 UTC (rev 7631) @@ -104,13 +104,14 @@ return getValueNoInstance(lastPageNumberUsed); } - public short getRawValue(FOContext context, FObj fobj) { + public short getRawValue(FObj fobj) { if (this.value instanceof PropertyKeyword) { short keyword = ((PropertyKeyword) this.value).getValue(); if (keyword == Constants.FOVAL_INHERIT) { - FObj parent = fobj.effectiveParent(context); + FObj parent = fobj.realParent(); if (parent != null) { - return parent.getRawInitialPageNumber(context); + PropertyList propertyList = parent.propertyList; + return propertyList.getRawInitialPageNumber(); } return getRawValueNoInstance(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 22:26:08
|
Revision: 7630 Author: victormote Date: 2006-06-15 15:26:01 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7630&view=rev Log Message: ----------- Conform to axsl change: Remove unneeded methods. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 22:19:14 UTC (rev 7629) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 22:26:01 UTC (rev 7630) @@ -702,9 +702,6 @@ return propertyList.getForcePageCount(context); } - /** - * {@inheritDoc} - */ public String traitMasterName(FOContext context) { return propertyList.getMasterName(context); } @@ -751,9 +748,6 @@ return propertyList.getColumnCount(context); } - /** - * {@inheritDoc} - */ public int traitMaximumRepeats(FOContext context) { return propertyList.getMaximumRepeats(context); } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-06-15 22:19:14 UTC (rev 7629) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-06-15 22:26:01 UTC (rev 7630) @@ -33,7 +33,6 @@ import org.axsl.foR.FOTreeException; import org.axsl.foR.ProxyFactory; import org.axsl.foR.fo.Flow; -import org.axsl.foR.fo.SimplePageMaster; import java.util.HashMap; @@ -193,7 +192,7 @@ return this.flow; } - public org.axsl.foR.fo.SimplePageMaster getSimplePageMaster() { + public SimplePageMaster getSimplePageMaster() { /* TODO: Handle context better. */ FOContext context = null; String masterReference = this.traitMasterReference(context); @@ -210,9 +209,9 @@ /** * {@inheritDoc} */ - public SimplePageMaster getPageMaster(int pageNumberInSequence, - int pageNumberInDocument, boolean isLast, boolean isBlank) - throws FOTreeException { + public org.axsl.foR.fo.SimplePageMaster getPageMaster( + int pageNumberInSequence, int pageNumberInDocument, boolean isLast, + boolean isBlank) throws FOTreeException { /* TODO: Handle context better. */ FOContext context = null; /* Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java 2006-06-15 22:19:14 UTC (rev 7629) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java 2006-06-15 22:26:01 UTC (rev 7630) @@ -112,7 +112,7 @@ } } - public org.axsl.foR.fo.SimplePageMaster getNextSimplePageMaster( + public SimplePageMaster getNextSimplePageMaster( boolean oddPage, boolean blankPage) throws FOTreeException { /* TODO: Handle context better. */ FOContext context = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 22:19:19
|
Revision: 7629 Author: victormote Date: 2006-06-15 15:19:14 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7629&view=rev Log Message: ----------- Conform to axsl change: Remove unneeded methods. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 22:12:24 UTC (rev 7628) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 22:19:14 UTC (rev 7629) @@ -679,9 +679,6 @@ return propertyList.getRawInitialPageNumber(context); } - /** - * {@inheritDoc} - */ public String traitFormat() { return propertyList.getFormat(); } @@ -690,16 +687,10 @@ return propertyList.getGroupingSeparator(); } - /** - * {@inheritDoc} - */ public int traitGroupingSize() { return propertyList.getGroupingSize(); } - /** - * {@inheritDoc} - */ public short traitLetterValue(FOContext context) { return propertyList.getLetterValue(context); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 22:12:29
|
Revision: 7628 Author: victormote Date: 2006-06-15 15:12:24 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7628&view=rev Log Message: ----------- Conform to axsl change: Remove unneeded parameter. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-06-15 22:12:15 UTC (rev 7627) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-06-15 22:12:24 UTC (rev 7628) @@ -180,12 +180,11 @@ PageSequence pageSeq = getPageSequence(); PageCollection previousPageCollection = previousPageCollection(); if (previousPageCollection == null) { - currentPageNumber = pageSeq.traitInitialPageNumber(this, 0); + currentPageNumber = pageSeq.traitInitialPageNumber(0); return; } int lastPageNumber = previousPageCollection.getCurrentPageNumber() - 1; - int computedPageNumber = pageSeq.traitInitialPageNumber(this, - lastPageNumber); + int computedPageNumber = pageSeq.traitInitialPageNumber(lastPageNumber); if (pageSeq.getRawInitialPageNumber(this) == Constants.FOVAL_NOT_A_KEYWORD) { /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 22:12:21
|
Revision: 7627 Author: victormote Date: 2006-06-15 15:12:15 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7627&view=rev Log Message: ----------- Conform to axsl change: Remove unneeded parameter. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 21:59:08 UTC (rev 7626) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 22:12:15 UTC (rev 7627) @@ -668,12 +668,8 @@ return propertyList.getBlankOrNotBlank(); } - /** - * {@inheritDoc} - */ - public int traitInitialPageNumber(FOContext context, - int lastPageNumberUsed) { - return propertyList.getInitialPageNumber(context, lastPageNumberUsed); + public int traitInitialPageNumber(int lastPageNumberUsed) { + return propertyList.getInitialPageNumber(lastPageNumberUsed); } /** Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 21:59:08 UTC (rev 7626) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 22:12:15 UTC (rev 7627) @@ -863,11 +863,14 @@ (Constants.FOPROP_BLANK_OR_NOT_BLANK); } - public int getInitialPageNumber(FOContext context, int lastPageNumberUsed) { + public int getInitialPageNumber(int lastPageNumberUsed) { InitialPageNumber property = (InitialPageNumber) getProperty(Constants .FOPROP_INITIAL_PAGE_NUMBER); if (property != null) { + /* Null context is OK here as this trait is not dependent on + * context. */ + FOContext context = null; return property.getValue(context, fobj, lastPageNumberUsed); } return InitialPageNumber.getValueNoInstance(lastPageNumberUsed); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 21:59:16
|
Revision: 7626 Author: victormote Date: 2006-06-15 14:59:08 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7626&view=rev Log Message: ----------- 1. Conform to axsl change: Remove unneeded method. 2. Remove need for FOContext on non-inherited property. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Character.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 21:42:19 UTC (rev 7625) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 21:59:08 UTC (rev 7626) @@ -690,11 +690,8 @@ return propertyList.getFormat(); } - /** - * {@inheritDoc} - */ - public char traitGroupingSeparator(FOContext context) { - return propertyList.getGroupingSeparator(context); + public char traitGroupingSeparator() { + return propertyList.getGroupingSeparator(); } /** Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 21:42:19 UTC (rev 7625) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 21:59:08 UTC (rev 7626) @@ -891,14 +891,14 @@ return Format.getValueNoInstance(); } - public char getGroupingSeparator(FOContext context) { + public char getGroupingSeparator() { Character property = (Character) getProperty(Constants .FOPROP_GROUPING_SEPARATOR); if (property != null) { - return property.getValue(context, fobj); + return property.getValue(); } - return Character.getValueNoInstance(context, - Constants.FOPROP_GROUPING_SEPARATOR, fobj); + return Character.getValueNoInstance( + Constants.FOPROP_GROUPING_SEPARATOR); } public int getGroupingSize() { Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-06-15 21:42:19 UTC (rev 7625) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-06-15 21:59:08 UTC (rev 7626) @@ -83,7 +83,7 @@ FOContext context = null; // get the 'format' properties this.pageNumberGenerator = new PageNumberGenerator(this.traitFormat(), - this.traitGroupingSeparator(context), this.traitGroupingSize(), + this.traitGroupingSeparator(), this.traitGroupingSize(), this.traitLetterValue(context)); } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Character.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Character.java 2006-06-15 21:42:19 UTC (rev 7625) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Character.java 2006-06-15 21:59:08 UTC (rev 7626) @@ -89,7 +89,7 @@ } /* - * For "character" property, which has no inheritance. + * For properties with no inheritance: character, and grouping-separator. */ public char getValue() { if (this.value instanceof DtCharacter) { @@ -118,15 +118,18 @@ return 0; } - /* For properties that have no inheritance, i.e. "character". */ + /* For properties that have no inheritance: character, and + * grouping-separator. */ public static char getValueNoInstance(short propertyType) { switch (propertyType) { case Constants.FOPROP_CHARACTER: { return CHARACTER_NOT_SPECIFIED; } + case Constants.FOPROP_GROUPING_SEPARATOR: { + return CHARACTER_NOT_SPECIFIED; } + } return 0; - } protected short[] getValidKeywords() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 21:42:29
|
Revision: 7625 Author: victormote Date: 2006-06-15 14:42:19 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7625&view=rev Log Message: ----------- Conform to axsl change: Require context to get the ref-id. It can take the "inherit" key word and can be inside an fo:marker. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Leader.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageNumberCitation.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 20:26:07 UTC (rev 7624) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 21:42:19 UTC (rev 7625) @@ -284,7 +284,7 @@ /** * {@inheritDoc} */ - public String refIdNeeded() { + public String refIdNeeded(FOContext context) { return null; } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java 2006-06-15 20:26:07 UTC (rev 7624) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java 2006-06-15 21:42:19 UTC (rev 7625) @@ -118,7 +118,7 @@ /** * {@inheritDoc} */ - public String refIdNeeded() { + public String refIdNeeded(FOContext context) { return traitInternalDestination(); } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java 2006-06-15 20:26:07 UTC (rev 7624) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java 2006-06-15 21:42:19 UTC (rev 7625) @@ -113,7 +113,7 @@ /** * {@inheritDoc} */ - public String refIdNeeded() { + public String refIdNeeded(FOContext context) { return traitInternalDestination(); } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Leader.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Leader.java 2006-06-15 20:26:07 UTC (rev 7624) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Leader.java 2006-06-15 21:42:19 UTC (rev 7625) @@ -50,7 +50,9 @@ } public void start() throws FOTreeException { - /* TODO: Handle context better. */ + /* Using a null context here is OK, because we are not computing + * a length to be used anywhere, only testing the relative values of + * the min, max, and optimum. */ FOContext context = null; final int testConstant = 1000000; if (traitLeaderLengthMin(context, testConstant) Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageNumberCitation.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageNumberCitation.java 2006-06-15 20:26:07 UTC (rev 7624) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageNumberCitation.java 2006-06-15 21:42:19 UTC (rev 7625) @@ -114,9 +114,7 @@ /** * {@inheritDoc} */ - public String refIdNeeded() { - /* TODO: Handle context better. */ - FOContext context = null; + public String refIdNeeded(FOContext context) { return traitRefId(context); } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java 2006-06-15 20:26:07 UTC (rev 7624) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java 2006-06-15 21:42:19 UTC (rev 7625) @@ -195,7 +195,10 @@ } public void checkUnmatchedReference(org.axsl.foR.FObj fobj) { - String refId = fobj.refIdNeeded(); + /* TODO: If a page-number-citation object with ref-id="inherit" is + * inside a marker, the value could inherit from a retrieve-marker's + * ancestors, and the ref-id returned here will be bogus. */ + String refId = fobj.refIdNeeded(null); if (refId == null) { return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 20:26:11
|
Revision: 7624 Author: victormote Date: 2006-06-15 13:26:07 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7624&view=rev Log Message: ----------- Remove no-longer-needed cast. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-06-15 20:25:43 UTC (rev 7623) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-06-15 20:26:07 UTC (rev 7624) @@ -219,9 +219,7 @@ staticPL = new StaticContentPL(staticContent, this); staticContent.setProxy(staticPL); } - /* TODO: Remove the following ugly, ugly cast after moduls are - * settled down. */ - staticPL.layout((Area)area, null); + staticPL.layout(area, null); } public int checkBreakBefore(FObj node, Area area) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 20:25:47
|
Revision: 7623 Author: victormote Date: 2006-06-15 13:25:43 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7623&view=rev Log Message: ----------- Clear javadoc to-do item. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-06-15 20:15:47 UTC (rev 7622) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-06-15 20:25:43 UTC (rev 7623) @@ -132,7 +132,8 @@ * During the layout process, at least one {@link TableCellArea} should be * created, which is then passed to layout for the children of the * {@link TableCell} now being laid out. - * @param retrieveMarker TODO + * @param retrieveMarker The RetrieveMarker instance, if any, into which + * this content will be laid out. * @return An integer representing the status of this layout. * When laying out FOText, this marks the index to the last character that * was successfully laid out plus one, that is, it marks the next character This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 20:15:59
|
Revision: 7622 Author: victormote Date: 2006-06-15 13:15:47 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7622&view=rev Log Message: ----------- Let the no-layout subclass extend FONodePL instead of FObjPL. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java 2006-06-15 20:10:14 UTC (rev 7621) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java 2006-06-15 20:15:47 UTC (rev 7622) @@ -26,15 +26,15 @@ import org.axsl.areaW.Area; import org.axsl.areaW.AreaWException; -import org.axsl.foR.FObj; +import org.axsl.foR.FONode; import org.axsl.foR.fo.RetrieveMarker; /** * Concrete class for FObj instances that do not need layout. */ -public class NoLayoutPL extends FObjPL { +public class NoLayoutPL extends FONodePL { - public NoLayoutPL(FObj realFObj, PioneerLS layout) { + public NoLayoutPL(FONode realFObj, PioneerLS layout) { super(realFObj, layout); } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-06-15 20:10:14 UTC (rev 7621) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-06-15 20:15:47 UTC (rev 7622) @@ -284,9 +284,7 @@ } public FONodeProxy makeProxy(FONode node) { - /* TODO: Remove this cast. NoLayoutPL should probably take an FONode - * instead of FObj. */ - return new NoLayoutPL((FObj) node, this); + return new NoLayoutPL(node, this); } public FONodeProxy makeProxy(ContinuedLabel node) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 20:10:20
|
Revision: 7621 Author: victormote Date: 2006-06-15 13:10:14 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7621&view=rev Log Message: ----------- Whitespace change only. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java 2006-06-15 15:47:42 UTC (rev 7620) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java 2006-06-15 20:10:14 UTC (rev 7621) @@ -72,219 +72,218 @@ + getReal().traitSpaceAfterOptimum(context); } - public void removeLayout(Area area) { - if (areaContainerRef != null) { - area.removeChild((GenericContainer)areaContainerRef.get()); - } - if (getReal().traitSpaceBeforeOptimum(area) != 0) { - area.incrementProgressionDimension(-getReal() - .traitSpaceBeforeOptimum(area)); - } - if (getReal().traitSpaceAfterOptimum(area) != 0) { - area.incrementProgressionDimension(-getReal() - .traitSpaceAfterOptimum(area)); - } - resetProgress(); - } + public void removeLayout(Area area) { + if (areaContainerRef != null) { + area.removeChild((GenericContainer)areaContainerRef.get()); + } + if (getReal().traitSpaceBeforeOptimum(area) != 0) { + area.incrementProgressionDimension(-getReal() + .traitSpaceBeforeOptimum(area)); + } + if (getReal().traitSpaceAfterOptimum(area) != 0) { + area.incrementProgressionDimension(-getReal() + .traitSpaceAfterOptimum(area)); + } + resetProgress(); + } - /** - * Return true if the passed area is on the left edge of its nearest - * absolute AreaContainer (generally a page column). - */ - public boolean startsAC(Area area) { - Area parent=null; + /** + * Return true if the passed area is on the left edge of its nearest + * absolute AreaContainer (generally a page column). + */ + public boolean startsAC(Area area) { + Area parent=null; - while ((parent = area.getWritableParentArea()) != null && - parent.hasChildren() == false) { - // The area will be the first non-space child in its parent - // Note: it's not added yet! - if (parent instanceof BlockContainerRA && - ((BlockContainerRA)parent).traitAbsolutePosition() - == Constants.FOVAL_ABSOLUTE) { - return true; - } - area = parent; - } - return false; - } + while ((parent = area.getWritableParentArea()) != null && + parent.hasChildren() == false) { + // The area will be the first non-space child in its parent + // Note: it's not added yet! + if (parent instanceof BlockContainerRA && + ((BlockContainerRA)parent).traitAbsolutePosition() + == Constants.FOVAL_ABSOLUTE) { + return true; + } + area = parent; + } + return false; + } - AbstractTableBody getReal() { - return (AbstractTableBody) this.getFONode(); - } + AbstractTableBody getReal() { + return (AbstractTableBody) this.getFONode(); + } - public int layout(Area area, RetrieveMarker retrieveMarker) - throws AreaWException { - AbstractTableBody node = getReal(); - TableArea tableArea = (TableArea) area; - Table table = node.getNearestTable(area); - if (getProgress() == FONodePL.BREAK_AFTER) { - return Status.OK; - } + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { + AbstractTableBody node = getReal(); + TableArea tableArea = (TableArea) area; + Table table = node.getNearestTable(area); + if (getProgress() == FONodePL.BREAK_AFTER) { + return Status.OK; + } - if (getProgress() == FONodePL.START) { - if (area instanceof NormalBlockArea) { - layout.completeCurrentLineInBlock((NormalBlockArea) area); - } - - if (rowSpanMgr == null) { - rowSpanMgr = new RowSpanMgr(table.getTableColumns().length); - } - - // if (this.isInListBody) { - // startIndent += bodyIndent + distanceBetweenStarts; - // } - - setProgress(0); - - } - - if ((node.traitSpaceBeforeOptimum(area) != 0) - && (getProgress() == 0)) { - area.incrementProgressionDimension(node - .traitSpaceBeforeOptimum(area)); - } - - /* - * Note: the parent FO must be a Table. The parent Area is the Block - * type area created by the Table, which is also a reference area. - * The content "width" (IPD) of the TableBody is the same as that - * of the containing table area, and its relative position is 0,0. - * Strictly speaking (CR), this FO should generate no areas! - */ - ContainerRA areaContainer = null; - if (node instanceof TableBody) { - areaContainer = tableArea.makeTableBodyContainer( - (TableBody) node, retrieveMarker); - } else if (node instanceof TableHeader) { - areaContainer = tableArea.makeTableHeaderContainer( - (TableHeader) node, retrieveMarker); - } else if (node instanceof TableFooter) { - areaContainer = tableArea.makeTableFooterContainer( - (TableFooter) node, retrieveMarker); - } - areaContainerRef = new WeakReference(areaContainer); - - ArrayList keepWith = new ArrayList(); - int numChildren = node.childrenFO().size(); - TableRow lastRow = null; - boolean endKeepGroup = true; - for (int i = getProgress(); i < numChildren; i++) { - Object child = node.childrenFO().get(i); - if (child instanceof Marker) { - MarkerPL markerPL = (MarkerPL) getLayoutProxy((FONode) child); - markerPL.layout(area, retrieveMarker); - continue; - } - if (!(child instanceof TableRow)) { - throw new AreaWException("Currently only Table Rows are " - + "supported in table body, header and footer"); - } - TableRow row = (TableRow)child; - TableRowPL rowPL = (TableRowPL) getLayoutProxy(row); - - rowPL.setRowSpanMgr(rowSpanMgr); - if (row.traitKeepWithPreviousWithinColumn(area) > 0 - && lastRow != null - && keepWith.indexOf(lastRow) == -1) { - keepWith.add(lastRow); - } else { - /* This row has no keep-with-previous, or it is the first - * row in this area. - */ - if (endKeepGroup && keepWith.size() > 0) { - keepWith = new ArrayList(); - } - /* If we have composed at least one complete row which is not - * part of a keep set, we can take following keeps into - * account again */ - if (endKeepGroup && i > getProgress()) { - rowSpanMgr.setIgnoreKeeps(false); - } - } - - /* Tell the row whether it is at the top of this area: if so, the - * row should not honor keep-together. - */ - boolean bRowStartsArea = (i == getProgress()); - if (bRowStartsArea == false && keepWith.size() > 0) { - if (node.childrenFO().indexOf(keepWith.get(0)) - == getProgress()) { - bRowStartsArea = true; - } - } - rowPL.bIgnoreKeepTogether = (bRowStartsArea && startsAC(area)); - int status = rowPL.layout(areaContainer, retrieveMarker); - if (Status.isIncomplete(status)) { - // BUG!!! don't distinguish between break-before and after! - if (Status.isPageBreak(status)) { - setProgress(i); - // areaContainer.end(); - - area.incrementProgressionDimension(areaContainer.crBPD()); - if (i == numChildren - 1) { - setProgress(FONodePL.BREAK_AFTER); - if (node.traitSpaceAfterOptimum(area) != 0) { - area.incrementProgressionDimension( - node.traitSpaceAfterOptimum(area)); - } - } - return status; - } - if ((keepWith.size() > 0) - && (! rowSpanMgr.ignoreKeeps())) { - // && status.getCode() == Status.AREA_FULL_NONE - // FIXME!!! Handle rows spans!!! - removeTableRowLayout(row, areaContainer); - for (int j = 0; j < keepWith.size(); j++) { - TableRow tr = (TableRow)keepWith.get(j); - removeTableRowLayout(tr, areaContainer); - i--; - } - if (i == 0) { - resetProgress(); - - /* Fix for infinite loop bug if keeps are too big for - * page */ - rowSpanMgr.setIgnoreKeeps(true); - - return Status.AREA_FULL_NONE; - } - } - setProgress(i); - if ((i != 0) && (status == Status.AREA_FULL_NONE)) { - status = Status.AREA_FULL_SOME; - } - if (!((i == 0) && (areaContainer.crBPD() <= 0))) { - area.incrementProgressionDimension(areaContainer.crBPD()); - } - - /* Fix for infinite loop bug if spanned rows are too big for - * page */ - rowSpanMgr.setIgnoreKeeps(true); - - return status; - } else if (status == Status.KEEP_WITH_NEXT - || rowSpanMgr.hasUnfinishedSpans()) { - keepWith.add(row); - endKeepGroup = false; - } else { - endKeepGroup = true; - } - lastRow = row; - } - area.incrementProgressionDimension(areaContainer.crBPD()); - - if (node.traitSpaceAfterOptimum(area) != 0) { - area.incrementProgressionDimension( - node.traitSpaceAfterOptimum(area)); - } - - return Status.OK; - } + if (getProgress() == FONodePL.START) { + if (area instanceof NormalBlockArea) { + layout.completeCurrentLineInBlock((NormalBlockArea) area); + } - public void removeTableRowLayout(TableRow tr, Area area) { - TableRowPL rowPL = (TableRowPL) this.getLayoutProxy(tr); - rowPL.resetProgress(); - } + if (rowSpanMgr == null) { + rowSpanMgr = new RowSpanMgr(table.getTableColumns().length); + } + // if (this.isInListBody) { + // startIndent += bodyIndent + distanceBetweenStarts; + // } + + setProgress(0); + } + + if ((node.traitSpaceBeforeOptimum(area) != 0) + && (getProgress() == 0)) { + area.incrementProgressionDimension(node + .traitSpaceBeforeOptimum(area)); + } + + /* + * Note: the parent FO must be a Table. The parent Area is the Block + * type area created by the Table, which is also a reference area. + * The content "width" (IPD) of the TableBody is the same as that + * of the containing table area, and its relative position is 0,0. + * Strictly speaking (CR), this FO should generate no areas! + */ + ContainerRA areaContainer = null; + if (node instanceof TableBody) { + areaContainer = tableArea.makeTableBodyContainer( + (TableBody) node, retrieveMarker); + } else if (node instanceof TableHeader) { + areaContainer = tableArea.makeTableHeaderContainer( + (TableHeader) node, retrieveMarker); + } else if (node instanceof TableFooter) { + areaContainer = tableArea.makeTableFooterContainer( + (TableFooter) node, retrieveMarker); + } + areaContainerRef = new WeakReference(areaContainer); + + ArrayList keepWith = new ArrayList(); + int numChildren = node.childrenFO().size(); + TableRow lastRow = null; + boolean endKeepGroup = true; + for (int i = getProgress(); i < numChildren; i++) { + Object child = node.childrenFO().get(i); + if (child instanceof Marker) { + MarkerPL markerPL = (MarkerPL) getLayoutProxy((FONode) child); + markerPL.layout(area, retrieveMarker); + continue; + } + if (!(child instanceof TableRow)) { + throw new AreaWException("Currently only Table Rows are " + + "supported in table body, header and footer"); + } + TableRow row = (TableRow)child; + TableRowPL rowPL = (TableRowPL) getLayoutProxy(row); + + rowPL.setRowSpanMgr(rowSpanMgr); + if (row.traitKeepWithPreviousWithinColumn(area) > 0 + && lastRow != null + && keepWith.indexOf(lastRow) == -1) { + keepWith.add(lastRow); + } else { + /* This row has no keep-with-previous, or it is the first + * row in this area. + */ + if (endKeepGroup && keepWith.size() > 0) { + keepWith = new ArrayList(); + } + /* If we have composed at least one complete row which is not + * part of a keep set, we can take following keeps into + * account again */ + if (endKeepGroup && i > getProgress()) { + rowSpanMgr.setIgnoreKeeps(false); + } + } + + /* Tell the row whether it is at the top of this area: if so, the + * row should not honor keep-together. + */ + boolean bRowStartsArea = (i == getProgress()); + if (bRowStartsArea == false && keepWith.size() > 0) { + if (node.childrenFO().indexOf(keepWith.get(0)) + == getProgress()) { + bRowStartsArea = true; + } + } + rowPL.bIgnoreKeepTogether = (bRowStartsArea && startsAC(area)); + int status = rowPL.layout(areaContainer, retrieveMarker); + if (Status.isIncomplete(status)) { + // BUG!!! don't distinguish between break-before and after! + if (Status.isPageBreak(status)) { + setProgress(i); + // areaContainer.end(); + + area.incrementProgressionDimension(areaContainer.crBPD()); + if (i == numChildren - 1) { + setProgress(FONodePL.BREAK_AFTER); + if (node.traitSpaceAfterOptimum(area) != 0) { + area.incrementProgressionDimension( + node.traitSpaceAfterOptimum(area)); + } + } + return status; + } + if ((keepWith.size() > 0) + && (! rowSpanMgr.ignoreKeeps())) { + // && status.getCode() == Status.AREA_FULL_NONE + // FIXME!!! Handle rows spans!!! + removeTableRowLayout(row, areaContainer); + for (int j = 0; j < keepWith.size(); j++) { + TableRow tr = (TableRow)keepWith.get(j); + removeTableRowLayout(tr, areaContainer); + i--; + } + if (i == 0) { + resetProgress(); + + /* Fix for infinite loop bug if keeps are too big for + * page */ + rowSpanMgr.setIgnoreKeeps(true); + + return Status.AREA_FULL_NONE; + } + } + setProgress(i); + if ((i != 0) && (status == Status.AREA_FULL_NONE)) { + status = Status.AREA_FULL_SOME; + } + if (!((i == 0) && (areaContainer.crBPD() <= 0))) { + area.incrementProgressionDimension(areaContainer.crBPD()); + } + + /* Fix for infinite loop bug if spanned rows are too big for + * page */ + rowSpanMgr.setIgnoreKeeps(true); + + return status; + } else if (status == Status.KEEP_WITH_NEXT + || rowSpanMgr.hasUnfinishedSpans()) { + keepWith.add(row); + endKeepGroup = false; + } else { + endKeepGroup = true; + } + lastRow = row; + } + area.incrementProgressionDimension(areaContainer.crBPD()); + + if (node.traitSpaceAfterOptimum(area) != 0) { + area.incrementProgressionDimension( + node.traitSpaceAfterOptimum(area)); + } + + return Status.OK; + } + + public void removeTableRowLayout(TableRow tr, Area area) { + TableRowPL rowPL = (TableRowPL) this.getLayoutProxy(tr); + rowPL.resetProgress(); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 15:47:49
|
Revision: 7620 Author: victormote Date: 2006-06-15 08:47:42 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7620&view=rev Log Message: ----------- Add to-do item re: using FOContext for other trait method parameters. Modified Paths: -------------- trunk/foray/doc/web/dev/fotree/index.html Modified: trunk/foray/doc/web/dev/fotree/index.html =================================================================== --- trunk/foray/doc/web/dev/fotree/index.html 2006-06-15 15:14:25 UTC (rev 7619) +++ trunk/foray/doc/web/dev/fotree/index.html 2006-06-15 15:47:42 UTC (rev 7620) @@ -339,6 +339,10 @@ name. This would significantly reduce parsing time and increase FO document human readability, and may make stylesheet creation more intuitive.</li> <li>FOTrees that cannot fit in memory should be serialized.</li> + <li>Consider replacing some trait method parameters with FOContext, and +adding the method parameters to it instead. +This might make trait processing more efficient by skipping context +computatioins if they are not actually needed.</li> </ul> <h2><a name="resolved"/>Resolved Issues</h2> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 15:14:34
|
Revision: 7619 Author: victormote Date: 2006-06-15 08:14:25 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7619&view=rev Log Message: ----------- Fix bug: Document nodes not using visitor pattern. Modified Paths: -------------- trunk/foray/foray-render/src/java/org/foray/render/Renderer.java Modified: trunk/foray/foray-render/src/java/org/foray/render/Renderer.java =================================================================== --- trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2006-06-15 14:55:19 UTC (rev 7618) +++ trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2006-06-15 15:14:25 UTC (rev 7619) @@ -544,7 +544,7 @@ for (int i = 0; i < children.size(); i++) { AreaNode atNode = (AreaNode) children.get(i); if (! (atNode instanceof PageCollection)) { - render(atNode); + atNode.render(this); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 14:55:25
|
Revision: 7618 Author: victormote Date: 2006-06-15 07:55:19 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7618&view=rev Log Message: ----------- Conform to axsl changes: Remove unnecessary Exception throws. Modified Paths: -------------- trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java =================================================================== --- trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-06-15 14:55:12 UTC (rev 7617) +++ trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-06-15 14:55:19 UTC (rev 7618) @@ -377,13 +377,8 @@ * @param event the FOTreeEvent that was fired */ public void foDocumentComplete(FOTreeEvent event) { + getCreatedAreaTree().createDocumentNodes(); try { - getCreatedAreaTree().createDocumentNodes(); - } catch (AreaWException e1) { - getLogger().error("Error in layout of Document nodes."); - e1.printStackTrace(); - } - try { stopRenderer(); } catch (SAXException e) { e.printStackTrace(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 14:55:17
|
Revision: 7617 Author: victormote Date: 2006-06-15 07:55:12 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7617&view=rev Log Message: ----------- Conform to axsl changes: Remove unnecessary Exception throws. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-15 00:50:36 UTC (rev 7616) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-15 14:55:12 UTC (rev 7617) @@ -28,7 +28,6 @@ import org.axsl.areaW.Area; import org.axsl.areaW.AreaTreeEvent; import org.axsl.areaW.AreaTreeListener; -import org.axsl.areaW.AreaWException; import org.axsl.areaW.PageArea; import org.axsl.foR.FObj; import org.axsl.foR.fo.Bookmark; @@ -110,7 +109,7 @@ /** * {@inheritDoc} */ - public void createDocumentNodes() throws AreaWException { + public void createDocumentNodes() { layoutBookmarkTree(this.getRoot()); } @@ -120,7 +119,7 @@ return (Root) linkage.getFONode(); } - private void layoutBookmarkTree(Root rootFObj) throws AreaWException { + private void layoutBookmarkTree(Root rootFObj) { BookmarkTree bookmarkTree = rootFObj.getBookmarkTree(); if (bookmarkTree == null) { return; @@ -132,8 +131,7 @@ } } - public void layoutBookmark(Bookmark bookmark, AreaNode area) - throws AreaWException { + public void layoutBookmark(Bookmark bookmark, AreaNode area) { BookmarkArea bookmarkArea = new BookmarkArea(bookmark, area); List children = bookmark.getChildren(); for (int i = 0; i < children.size(); i++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 00:50:43
|
Revision: 7616 Author: victormote Date: 2006-06-14 17:50:36 -0700 (Wed, 14 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7616&view=rev Log Message: ----------- 1. Remove no-longer-needed method in FObjMixed. 2. Improve validation and text handling in BookMarkTitle. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjMixed.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTitle.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjMixed.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjMixed.java 2006-06-15 00:34:05 UTC (rev 7615) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjMixed.java 2006-06-15 00:50:36 UTC (rev 7616) @@ -26,7 +26,6 @@ import org.foray.common.XMLCharacter; -import org.axsl.foR.FOContext; import org.axsl.foR.FOTreeException; /** @@ -108,31 +107,6 @@ super.addChild(child); } - /** - * Returns the "area tree construction" text associated with a given child - * of this FObjMixed item. By "area tree construction" text is meant the - * raw text after certain filtering has been done in conformance with the - * traits. - * @see FOText#getAreaTreeText(FOContext) - * @param childIndex The index into the Collection of children that - * tells which child should be returned. - * @return The text associated with childIndex, or null if childIndex is - * not valid. - */ - public char[] getText(int childIndex) { - /* TODO: Handle context better. */ - FOContext context = null; - if (childIndex < 0 || childIndex > getChildren().size() - 1) { - return null; - } - FOText text = null; - if (! (getChildren().get(childIndex) instanceof FOText)) { - return null; - } - text = (FOText) getChildren().get(childIndex); - return text.getAreaTreeText(context); - } - public boolean canContainBlock() { return true; } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTitle.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTitle.java 2006-06-15 00:34:05 UTC (rev 7615) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTitle.java 2006-06-15 00:50:36 UTC (rev 7616) @@ -24,6 +24,7 @@ package org.foray.fotree.fo.obj; +import org.foray.fotree.FOText; import org.foray.fotree.FObj; import org.foray.fotree.FObjMixed; import org.foray.fotree.Namespace; @@ -44,8 +45,26 @@ super(parent, propertyList, systemId, line, column); } + public void end() throws FOTreeException { + super.end(); + /* Validate children. Content Model: (#PCDATA) + * Must have exactly one child, an FOText instance. */ + if (this.children.size() != 1) { + throwException(this.getFullName() + " must have exactly one " + + "child."); + } + if (! (this.children.get(0) instanceof FOText)) { + throwException(this.getFullName() + " child must be #PCDATA."); + } + } + + public FOText getText() { + /* Existence and cast verified in end(). */ + return (FOText) this.children.get(0); + } + public char[] getContent() { - return getText(0); + return getText().getRawText(); } public String getName() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 00:34:10
|
Revision: 7615 Author: victormote Date: 2006-06-14 17:34:05 -0700 (Wed, 14 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7615&view=rev Log Message: ----------- 1. Expose the raw text in a method. 2. If FOText parent is a bookmark-title, don't cook the text at all. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-06-15 00:05:18 UTC (rev 7614) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-06-15 00:34:05 UTC (rev 7615) @@ -25,6 +25,7 @@ package org.foray.fotree; import org.foray.common.XMLCharacter; +import org.foray.fotree.fo.obj.BookmarkTitle; import org.axsl.common.Constants; import org.axsl.foR.FOContext; @@ -93,6 +94,10 @@ * Store the text raw and process it one-the-fly. */ return; } + if (this.parentFO() instanceof BookmarkTitle) { + /* BookmarkTitle keeps its text raw always. */ + return; + } /* Convert the text as far as possible, store it, and set the status. * We cannot filter text-transform yet, because we may need subsequent * FOText instances. */ @@ -1028,4 +1033,8 @@ return null; } + public char[] getRawText() { + return this.ca; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-15 00:05:29
|
Revision: 7614 Author: victormote Date: 2006-06-14 17:05:18 -0700 (Wed, 14 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7614&view=rev Log Message: ----------- Get the context needed for intrinsic measurements. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InstreamForeignObject.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java 2006-06-14 23:57:47 UTC (rev 7613) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java 2006-06-15 00:05:18 UTC (rev 7614) @@ -44,13 +44,13 @@ * @return The width, in millipoints, of the content of this object, as * reported by the content itself. */ - protected abstract int intrinsicContentWidth(); + protected abstract int intrinsicContentWidth(FOContext context); /** * @return The height, in millipoints, of the content of this object, as * reported by the content itself. */ - protected abstract int intrinsicContentHeight(); + protected abstract int intrinsicContentHeight(FOContext context); /** * {@inheritDoc} @@ -65,8 +65,8 @@ return viewportIPD; } float scalingFactor = this.getContentWidth( - context, this.intrinsicContentWidth(), viewportIPD); - return (int) (this.intrinsicContentWidth() * scalingFactor); + context, this.intrinsicContentWidth(context), viewportIPD); + return (int) (this.intrinsicContentWidth(context) * scalingFactor); } /** @@ -82,8 +82,8 @@ return viewportBPD; } float scalingFactor = this.getContentHeight( - context, this.intrinsicContentHeight(), viewportBPD); - return (int) (this.intrinsicContentHeight() * scalingFactor); + context, this.intrinsicContentHeight(context), viewportBPD); + return (int) (this.intrinsicContentHeight(context) * scalingFactor); } /** Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java 2006-06-14 23:57:47 UTC (rev 7613) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java 2006-06-15 00:05:18 UTC (rev 7614) @@ -96,9 +96,7 @@ /** * {@inheritDoc} */ - protected int intrinsicContentWidth() { - /* TODO: Handle context better. */ - FOContext context = null; + protected int intrinsicContentWidth(FOContext context) { if (getGraphic(context) == null) { return Constants.DIMENSION_AUTO; } @@ -117,9 +115,7 @@ /** * {@inheritDoc} */ - protected int intrinsicContentHeight() { - /* TODO: Handle context better. */ - FOContext context = null; + protected int intrinsicContentHeight(FOContext context) { if (getGraphic(context) == null) { return Constants.DIMENSION_AUTO; } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InstreamForeignObject.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InstreamForeignObject.java 2006-06-14 23:57:47 UTC (rev 7613) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InstreamForeignObject.java 2006-06-15 00:05:18 UTC (rev 7614) @@ -78,14 +78,14 @@ /** * {@inheritDoc} */ - protected int intrinsicContentWidth() { + protected int intrinsicContentWidth(FOContext context) { return ((ForeignXML) getForeignXML()).intrinsicContentWidth(); } /** * {@inheritDoc} */ - protected int intrinsicContentHeight() { + protected int intrinsicContentHeight(FOContext context) { return ((ForeignXML) getForeignXML()).intrinsicContentHeight(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-14 23:57:57
|
Revision: 7613 Author: victormote Date: 2006-06-14 16:57:47 -0700 (Wed, 14 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7613&view=rev Log Message: ----------- Remove unneeded parameter. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Enumerated.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-14 23:42:40 UTC (rev 7612) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-14 23:57:47 UTC (rev 7613) @@ -664,8 +664,8 @@ return propertyList.getOddOrEven(); } - public short traitBlankOrNotBlank(FOContext context) { - return propertyList.getBlankOrNotBlank(context); + public short traitBlankOrNotBlank() { + return propertyList.getBlankOrNotBlank(); } /** Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-14 23:42:40 UTC (rev 7612) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-14 23:57:47 UTC (rev 7613) @@ -853,14 +853,14 @@ return Enumerated.getValueNoInstance(Constants.FOPROP_ODD_OR_EVEN); } - public short getBlankOrNotBlank(FOContext context) { + public short getBlankOrNotBlank() { Enumerated property = (Enumerated) getProperty(Constants .FOPROP_BLANK_OR_NOT_BLANK); if (property != null) { - return property.getValue(context, fobj); + return property.getValue(null, fobj); } return Enumerated.getValueNoInstance - (context, Constants.FOPROP_BLANK_OR_NOT_BLANK, fobj); + (Constants.FOPROP_BLANK_OR_NOT_BLANK); } public int getInitialPageNumber(FOContext context, int lastPageNumberUsed) { Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-06-14 23:42:40 UTC (rev 7612) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-06-14 23:57:47 UTC (rev 7613) @@ -31,7 +31,6 @@ import org.foray.fotree.PropertyList; import org.axsl.common.Constants; -import org.axsl.foR.FOContext; import org.axsl.foR.FONodeProxy; import org.axsl.foR.FOTreeException; import org.axsl.foR.ProxyFactory; @@ -76,9 +75,6 @@ protected boolean isValid(boolean isOddPage, boolean isFirstPage, boolean isEmptyPage) { - /* TODO: Handle context better. */ - FOContext context = null; - // page-position int pagePosition = traitPagePosition(); if (isFirstPage) { if (pagePosition == Constants.FOVAL_REST) { @@ -113,11 +109,11 @@ // blank-or-not-blank if (isEmptyPage) { - if (traitBlankOrNotBlank(context) == Constants.FOVAL_NOT_BLANK) { + if (traitBlankOrNotBlank() == Constants.FOVAL_NOT_BLANK) { return false; } } else { - if (traitBlankOrNotBlank(context) == Constants.FOVAL_BLANK) { + if (traitBlankOrNotBlank() == Constants.FOVAL_BLANK) { return false; } } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Enumerated.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Enumerated.java 2006-06-14 23:42:40 UTC (rev 7612) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Enumerated.java 2006-06-14 23:57:47 UTC (rev 7613) @@ -355,7 +355,7 @@ return fobj.traitBackgroundRepeat(context); } case Constants.FOPROP_BLANK_OR_NOT_BLANK: { - return fobj.traitBlankOrNotBlank(context); + return fobj.traitBlankOrNotBlank(); } case Constants.FOPROP_BORDER_COLLAPSE: { return fobj.traitBorderCollapse(context); @@ -393,9 +393,15 @@ case Constants.FOPROP_LINE_STACKING_STRATEGY: { return fobj.traitLineStackingStrategy(context); } + case Constants.FOPROP_ODD_OR_EVEN: { + return fobj.traitOddOrEven(); + } case Constants.FOPROP_OVERFLOW: { return fobj.traitOverflow(context); } + case Constants.FOPROP_PAGE_POSITION: { + return fobj.propertyList.getPagePosition(); + } case Constants.FOPROP_POSITION: { return fobj.propertyList.getPosition(context); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-14 23:42:46
|
Revision: 7612 Author: victormote Date: 2006-06-14 16:42:40 -0700 (Wed, 14 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7612&view=rev Log Message: ----------- Conform to axsl change: Remove unneeded method. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-14 23:34:07 UTC (rev 7611) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-14 23:42:40 UTC (rev 7612) @@ -664,9 +664,6 @@ return propertyList.getOddOrEven(); } - /** - * {@inheritDoc} - */ public short traitBlankOrNotBlank(FOContext context) { return propertyList.getBlankOrNotBlank(context); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |