On Feb 2, 2006, at 12:10, Jeremias Maerki wrote:
Hi guys,
Weird. The test in question passes w/o problems on my side... Just
made a diff of the complete sources, and stumbled upon this:
Index: src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
===================================================================
--- src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
(revision 374438)
+++ src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java (working
copy)
@@ -363,9 +363,11 @@
// index of the first KnuthBox in the sequence
int firstBoxIndex = startIndex;
- while (alignment != org.apache.fop.fo.Constants.EN_CENTER
- && ! ((KnuthElement) par.get(firstBoxIndex)).isBox()) {
- firstBoxIndex++;
+ if (alignment != org.apache.fop.fo.Constants.EN_CENTER) {
+ while (par.size() > firstBoxIndex
+ && ! ((KnuthElement) par.get
(firstBoxIndex)).isBox()) {
+ firstBoxIndex++;
+ }
}
I'm clueless as to where this comes from, since I don't remember
having altered this myself (so, I have absolutely no idea *why* I
would have altered it)... maybe I've just had too much on my mind the
last few weeks :-/
If this change makes sense/looks OK to you, then I'll commit it ASAP.
(If none of you beat me to it, that is...)
Cheers,
Andreas
I don't know, either. It looks like the line breaker is stumbling
over a
Knuth sequence without a single box due to an FOText with only
whitespace (IndexOutOfBoundsException in BreakingAlgorithm, line
367). I
guess it must have something to do with the recent changes in
whitespace
handling.
On 02.02.2006 11:28:50 Manuel Mall wrote:
After just upgrading to the latest svn version I get a test case
failure. As I haven't updated for a few days I am not sure which
patch
caused this.
Manuel
[junit] Testcase:
table_width.xml(org.apache.fop.layoutengine.LayoutEngineTestSuite$1):
Caused an ERROR
[junit] Expected XPath expression to evaluate to '360000', but
got
'' (XPath: //flow/block[1]/@ipd)
[junit] java.lang.RuntimeException: Expected XPath expression to
evaluate to '360000', but got '' (XPath: //flow/block[1]/@ipd)
Jeremias Maerki