[FOray-commit] SF.net SVN: foray: [9664] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-05-30 16:35:24
|
Revision: 9664
http://svn.sourceforge.net/foray/?rev=9664&view=rev
Author: victormote
Date: 2007-05-30 09:35:17 -0700 (Wed, 30 May 2007)
Log Message:
-----------
Get non-text line content inside the appropriate containing area.
Modified Paths:
--------------
trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java
Modified: trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
===================================================================
--- trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-05-30 15:47:44 UTC (rev 9663)
+++ trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-05-30 16:35:17 UTC (rev 9664)
@@ -175,29 +175,34 @@
graftingPoint = foLineNonText.getGraftingPoint();
nonTextToUse = foLineNonText.getWrapped();
}
+
+ LineContentFactory factory = lineArea;
+ if (this.areaStack.size() > 0) {
+ factory = this.areaStack.peek();
+ }
if (nonTextToUse instanceof InstreamForeignObject) {
final InstreamForeignObject ifo = (InstreamForeignObject)
nonTextToUse;
- lineArea.makeForeignObjectArea(ifo, sizeInline, graftingPoint);
+ factory.makeForeignObjectArea(ifo, sizeInline, graftingPoint);
} else if (nonTextToUse instanceof ExternalGraphic) {
final ExternalGraphic graphic = (ExternalGraphic) nonTextToUse;
- lineArea.makeExternalGraphicArea(graphic, sizeInline,
+ factory.makeExternalGraphicArea(graphic, sizeInline,
graftingPoint);
} else if (nonTextToUse instanceof Leader) {
final Leader leader = (Leader) nonTextToUse;
try {
- lineArea.makeLeaderArea(leader, sizeInline, graftingPoint);
+ factory.makeLeaderArea(leader, sizeInline, graftingPoint);
} catch (final AreaWException e) {
throw new TextException(e);
}
} else if (nonTextToUse instanceof PageNumberCitation) {
final PageNumberCitation citation = (PageNumberCitation)
nonTextToUse;
- lineArea.makePageNumberCitationArea(citation, sizeInline,
+ factory.makePageNumberCitationArea(citation, sizeInline,
graftingPoint);
} else if (nonTextToUse instanceof PageNumber) {
final PageNumber pageNumber = (PageNumber) nonTextToUse;
- lineArea.makePageNumberArea(pageNumber, sizeInline, graftingPoint);
+ factory.makePageNumberArea(pageNumber, sizeInline, graftingPoint);
}
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2007-05-30 15:47:44 UTC (rev 9663)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2007-05-30 16:35:17 UTC (rev 9664)
@@ -78,7 +78,7 @@
* Adds text from this text item to an Area.
* @param lineText The line text item containing the text.
* @param areaNode The parent areaNode into which the text should be placed.
- * @param inputStart The index to the first char in lineText that should
+ * @param start The index to the first char in lineText that should
* be added.
* @param graftingPoint The ancestor grafting point, if any.
* @return The index into the text char array that indicates the next array
@@ -88,9 +88,8 @@
* @throws AreaWException For errors during layout.
*/
private int addText(final FoLineText lineText, final AreaNode areaNode,
- final int inputStart, final GraftingPoint graftingPoint)
+ final int start, final GraftingPoint graftingPoint)
throws AreaWException {
- final int start = inputStart;
final int end = lineText.inlineText().length;
final LineArea la = this.activeLineArea(areaNode);
if (la == null) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|