From d673a10b7460177bb652b313adb6bca1bbff5516 Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Sat, 14 Jul 2007 08:48:04 +0000 Subject: [PATCH] Some cleanup and removal of unused methods git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@556244 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/layoutmgr/inline/LineLayoutManager.java | 8 ++------ .../fop/layoutmgr/inline/TextLayoutManager.java | 13 +++---------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java index 1827d3379..9686cf840 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java @@ -217,7 +217,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager // the LM which created the paragraph private LineLayoutManager layoutManager; - public Paragraph(LineLayoutManager llm, int alignment, int alignmentLast, + Paragraph(LineLayoutManager llm, int alignment, int alignmentLast, int indent, int endIndent) { super(); layoutManager = llm; @@ -227,10 +227,6 @@ public class LineLayoutManager extends InlineStackingLayoutManager lastLineEndIndent = endIndent; } - public void startParagraph() { - startSequence(); - } - public void startSequence() { // set the minimum amount of empty space at the end of the // last line @@ -715,7 +711,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager textAlignment, textAlignmentLast, textIndent.getValue(this), lastLineEndIndent.getValue(this)); - lastPar.startParagraph(); + lastPar.startSequence(); if (log.isTraceEnabled()) { trace.append(" ["); } diff --git a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java index 8d6c13670..8539bcbe3 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java @@ -30,7 +30,6 @@ import org.apache.fop.area.Trait; import org.apache.fop.area.inline.TextArea; import org.apache.fop.fo.Constants; import org.apache.fop.fo.FOText; -import org.apache.fop.fo.flow.Inline; import org.apache.fop.fonts.Font; import org.apache.fop.layoutmgr.InlineKnuthSequence; import org.apache.fop.layoutmgr.KnuthBox; @@ -215,10 +214,6 @@ public class TextLayoutManager extends LeafNodeLayoutManager { letterSpaceIPD = ls.getSpace(); wordSpaceIPD = MinOptMax.add(new MinOptMax(spaceCharIPD), ws.getSpace()); - // if the text node is son of an inline, set vertical align - if (foText.getParent() instanceof Inline) { - Inline fobj = (Inline)foText.getParent(); - } } /** @@ -547,10 +542,6 @@ public class TextLayoutManager extends LeafNodeLayoutManager { || CharUtilities.isFixedWidthSpace(ch); } - private static boolean isBreakChar(final char ch) { - return (BREAK_CHARS.indexOf(ch) >= 0); - } - /** @see org.apache.fop.layoutmgr.LayoutManager#getNextKnuthElements(LayoutContext, int) */ public LinkedList getNextKnuthElements(LayoutContext context, int alignment) { lineStartBAP = context.getLineStartBorderAndPaddingWidth(); @@ -689,7 +680,9 @@ public class TextLayoutManager extends LeafNodeLayoutManager { } } - if (ch == CharUtilities.SPACE && foText.getWhitespaceTreatment() == Constants.EN_PRESERVE || ch == CharUtilities.NBSPACE) { + if ((ch == CharUtilities.SPACE + && foText.getWhitespaceTreatment() == Constants.EN_PRESERVE) + || ch == CharUtilities.NBSPACE) { // preserved space or non-breaking space: // create the AreaInfo object ai = new AreaInfo(iNextStart, (short) (iNextStart + 1), -- 2.39.5