Hello Steve,
The problem you are running into is known, resolved but not merged into
the cvs tree yet. I've already send a diff script which resolves hypenation
problems within LineArea to fop-dev one week ago. I've attached the diff
script.
Enrico
Am Montag, 27. August 2001 14:14 schrieben Sie:
> ----- Original Message -----
> From: Steve Favez
> To: [EMAIL PROTECTED]
> Sent: Friday, August 24, 2001 9:33 AM
> Subject: hyphenation with table problem
>
>
> Hello,
>
> I'm new on fop, and I've a big problem.
>
> I create a table and ask hyphenate on every columns... with small world, no
> problem, but with big words, no hyphenation is done,,, Why ?? is it a known
> bug ??
>
> in attachement an xml file and the xslt file
>
> Thanks in advance
? LineArea.java.diff
Index: LineArea.java
===================================================================
RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/layout/LineArea.java,v
retrieving revision 1.49
diff -u -r1.49 LineArea.java
--- LineArea.java 2001/08/02 19:38:08 1.49
+++ LineArea.java 2001/08/21 19:58:33
@@ -429,27 +429,42 @@
wordWidth = 0;
return i;
}
- if (wordStart == start) { // if couldn't even fit
- // first word
- overrun = true;
- // if not at start of line, return word start
- // to try again on a new line
- if (finalWidth > 0) {
- return wordStart;
- }
- } else if (this.wrapOption == WrapOption.WRAP) {
+
+ if (this.wrapOption == WrapOption.WRAP) {
+
+ int ret=wordStart;
+
if (hyphProps.hyphenate == Hyphenate.TRUE) {
- return this.doHyphenation(dataCopy, i, wordStart,
- this.getContentWidth()
- - (finalWidth
- + spaceWidth
- + pendingWidth));
- } else {
- return wordStart;
+ ret = this.doHyphenation(dataCopy, i, wordStart,
+ this.getContentWidth()
+ - (finalWidth
+ + spaceWidth
+ + pendingWidth));
+
+ }
+
+
+ if ((ret == wordStart) && // current word couldn't be
+hypenated
+ (wordStart == start) && // couldn't fit first word
+ (finalWidth == 0)) { // I am at the beginning of my
+line
+
+ MessageHandler.error(">");
+
+ addSpacedWord(new String(data, wordStart, wordLength - 1),
+ ls,
+ finalWidth + spaceWidth
+ + embeddedLinkStart,
+ spaceWidth, textState, false);
+
+ finalWidth += wordWidth;
+ wordWidth = 0;
+
+ ret = i;
}
+
+ return ret;
}
}
-
}
} // end of iteration over text
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]