aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorWilliam Victor Mote <vmote@apache.org>2003-05-02 15:56:15 +0000
committerWilliam Victor Mote <vmote@apache.org>2003-05-02 15:56:15 +0000
commitf38f1324a9af2a9faad3b3a810ddbe2a937d5769 (patch)
tree342484bed6f8496f90e0cbbd3021581cf053735b /src/java/org
parent0129d4c43c3f3152a7dc65c4208b8edb420bf8f1 (diff)
downloadxmlgraphics-fop-f38f1324a9af2a9faad3b3a810ddbe2a937d5769.tar.gz
xmlgraphics-fop-f38f1324a9af2a9faad3b3a810ddbe2a937d5769.zip
Refactor: unwind "for" statement in findNearestAncestorGeneratingRAs() for more flexibility.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196390 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/fo/FObj.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java
index a35729774..c008b5ac9 100644
--- a/src/java/org/apache/fop/fo/FObj.java
+++ b/src/java/org/apache/fop/fo/FObj.java
@@ -180,11 +180,11 @@ public class FObj extends FONode {
* @return FObj of the nearest ancestor that generates Reference Areas
*/
private FObj findNearestAncestorGeneratingRAs() {
- FObj p;
- FONode parent;
- for (p = this; !p.generatesReferenceAreas()
- && (parent = p.getParent()) != null
- && (parent instanceof FObj); p = (FObj) parent) {
+ FObj p = this;
+ FObj parent = p.findNearestAncestorFObj();
+ while (parent != null && !p.generatesReferenceAreas()) {
+ p = (FObj) parent;
+ parent = p.findNearestAncestorFObj();
}
return p;
}