瀏覽代碼

Changed signature for static handleWhiteSpaceFor(), and used internally to make the code a bit more compact

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@670344 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-1_0
Andreas L. Delmelle 16 年之前
父節點
當前提交
ebee3981d4

+ 5
- 6
src/java/org/apache/fop/fo/FObjMixed.java 查看文件

@@ -68,8 +68,7 @@ public abstract class FObjMixed extends FObj {
flushText();
if (!inMarker()
|| getNameId() == FO_MARKER) {
getBuilderContext().whiteSpaceHandler
.handleWhiteSpace(this, currentTextNode);
handleWhiteSpaceFor(this, null);
}
super.endOfNode();
}
@@ -81,10 +80,11 @@ public abstract class FObjMixed extends FObj {
* to trigger 'end-of-node' white-space handling)
*
* @param fobj the node for which to handle white-space
* @param nextChild the next child to be added
*/
protected static void handleWhiteSpaceFor(FObjMixed fobj) {
protected static void handleWhiteSpaceFor(FObjMixed fobj, FONode nextChild) {
fobj.getBuilderContext().getXMLWhiteSpaceHandler()
.handleWhiteSpace(fobj, fobj.currentTextNode);
.handleWhiteSpace(fobj, fobj.currentTextNode, nextChild);
}
/**
@@ -159,8 +159,7 @@ public abstract class FObjMixed extends FObj {
}
} else {
// handle white-space for all text up to here
getBuilderContext().whiteSpaceHandler
.handleWhiteSpace(this, currentTextNode, child);
handleWhiteSpaceFor(this, child);
currentTextNode = null;
}
}

+ 4
- 3
src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java 查看文件

@@ -111,7 +111,7 @@ public abstract class AbstractRetrieveMarker extends FObjMixed {
addChildTo(newChild, (FObj) newParent);
if (newChild.getNameId() == FO_TABLE) {
Table t = (Table) child;
cloneSubtree(t.getColumns().listIterator(),
cloneSubtree(t.getColumns().iterator(),
newChild, marker, newPropertyList);
cloneSingleNode(t.getTableHeader(),
newChild, marker, newPropertyList);
@@ -129,8 +129,9 @@ public abstract class AbstractRetrieveMarker extends FObjMixed {
ft.bind(parentPropertyList);
addChildTo(newChild, (FObj) newParent);
}
// trigger 'end-of-node' white-space handling
if (newChild instanceof FObjMixed) {
handleWhiteSpaceFor((FObjMixed) newChild);
handleWhiteSpaceFor((FObjMixed) newChild, null);
}
}
}
@@ -169,7 +170,7 @@ public abstract class AbstractRetrieveMarker extends FObjMixed {
}
cloneSubtree(marker.getChildNodes(), this,
marker, propertyList);
handleWhiteSpaceFor(this);
handleWhiteSpaceFor(this, null);
}

/**

Loading…
取消
儲存