keiron 2002/11/27 06:59:53 Modified: src/org/apache/fop/layoutmgr TextLayoutManager.java Log: convert " " into a Space inline Revision Changes Path 1.17 +13 -9 xml-fop/src/org/apache/fop/layoutmgr/TextLayoutManager.java Index: TextLayoutManager.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/layoutmgr/TextLayoutManager.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- TextLayoutManager.java 13 Nov 2002 10:25:48 -0000 1.16 +++ TextLayoutManager.java 27 Nov 2002 14:59:52 -0000 1.17 @@ -164,8 +164,8 @@ if (prevPos != null) { // ASSERT (prevPos.getLM() == this) if (prevPos.getLM() != this) { - //log.error( - // "TextLayoutManager.resetPosition: " + "LM mismatch!!!"); + getLogger().error( + "TextLayoutManager.resetPosition: " + "LM mismatch!!!"); } LeafPosition tbp = (LeafPosition) prevPos; AreaInfo ai = @@ -477,23 +477,27 @@ // " total=" + iAdjust); // Make an area containing all characters between start and end. - Word word = null; + InlineArea word = null; int adjust = 0; // ingnore newline character if(chars[ai.iBreakIndex - 1] == NEWLINE) { adjust = 1; } String str = new String(chars, iStart, ai.iBreakIndex - iStart - adjust); - //if(!"".equals(str.trim())) { - word = createWord( + if(" ".equals(str)) { + word = new Space(); + word.setWidth(ai.ipdArea.opt + iAdjust); + } else { + Word w = createWord( str, ai.ipdArea.opt + iAdjust, context.getBaseline()); if (iWScount > 0) { - //log.error("Adjustment per word-space= " + + //getLogger().error("Adjustment per word-space= " + // iAdjust / iWScount); - word.setWSadjust(iAdjust / iWScount); + w.setWSadjust(iAdjust / iWScount); } - //} + word = w; + } if ((chars[iStart] == SPACE || chars[iStart] == NBSPACE) && context.getLeadingSpace().hasSpaces()) { context.getLeadingSpace().addSpace(halfWS);
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]