From 91f5d7491ddce2454e1ed224c1ab23564d59bd36 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 26 Jan 2005 14:54:52 +0000 Subject: [PATCH] toString() work git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198320 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/FOText.java | 8 ++++++-- src/java/org/apache/fop/layoutmgr/BreakPoss.java | 3 +++ src/java/org/apache/fop/layoutmgr/LeafPosition.java | 10 +++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/fop/fo/FOText.java b/src/java/org/apache/fop/fo/FOText.java index 793a7b8bd..0beca3791 100644 --- a/src/java/org/apache/fop/fo/FOText.java +++ b/src/java/org/apache/fop/fo/FOText.java @@ -19,7 +19,6 @@ package org.apache.fop.fo; // Java -import java.util.List; import java.util.NoSuchElementException; // FOP @@ -32,7 +31,6 @@ import org.apache.fop.fo.properties.CommonHyphenation; import org.apache.fop.fo.properties.CommonTextDecoration; import org.apache.fop.fo.properties.Property; import org.apache.fop.fo.properties.SpaceProperty; -import org.apache.fop.layoutmgr.TextLayoutManager; /** * A text node (PCDATA) in the formatting object tree. @@ -577,5 +575,11 @@ public class FOText extends FONode { public CommonTextDecoration getTextDecoration() { return textDecoration; } + + public String toString() { + StringBuffer sb = new StringBuffer(super.toString()); + sb.append(" (").append(ca).append(")"); + return sb.toString(); + } } \ No newline at end of file diff --git a/src/java/org/apache/fop/layoutmgr/BreakPoss.java b/src/java/org/apache/fop/layoutmgr/BreakPoss.java index 0ac769624..03a613f89 100644 --- a/src/java/org/apache/fop/layoutmgr/BreakPoss.java +++ b/src/java/org/apache/fop/layoutmgr/BreakPoss.java @@ -272,6 +272,9 @@ public class BreakPoss { if (isForcedBreak()) { sb.append(", forced break"); } + if (nextBreakOverflows()) { + sb.append(", next break overflows"); + } sb.append(", stackSize={"); sb.append(stackSize); sb.append("}, pos="); diff --git a/src/java/org/apache/fop/layoutmgr/LeafPosition.java b/src/java/org/apache/fop/layoutmgr/LeafPosition.java index 5dac0a062..d4375501f 100644 --- a/src/java/org/apache/fop/layoutmgr/LeafPosition.java +++ b/src/java/org/apache/fop/layoutmgr/LeafPosition.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,5 +30,13 @@ public class LeafPosition extends Position { public int getLeafPos() { return iLeafPos; } + + /** @see java.lang.Object#toString()*/ + public String toString() { + StringBuffer sb = new StringBuffer(super.toString()); + sb.append(" {pos=").append(getLeafPos()); + sb.append(", lm=").append(getLM()).append("}"); + return sb.toString(); + } } -- 2.39.5