Browse Source

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
tags/fop-0_94
Andreas L. Delmelle 17 years ago
parent
commit
d673a10b74

+ 2
- 6
src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java View File

// the LM which created the paragraph // the LM which created the paragraph
private LineLayoutManager layoutManager; private LineLayoutManager layoutManager;


public Paragraph(LineLayoutManager llm, int alignment, int alignmentLast,
Paragraph(LineLayoutManager llm, int alignment, int alignmentLast,
int indent, int endIndent) { int indent, int endIndent) {
super(); super();
layoutManager = llm; layoutManager = llm;
lastLineEndIndent = endIndent; lastLineEndIndent = endIndent;
} }


public void startParagraph() {
startSequence();
}

public void startSequence() { public void startSequence() {
// set the minimum amount of empty space at the end of the // set the minimum amount of empty space at the end of the
// last line // last line
textAlignment, textAlignmentLast, textAlignment, textAlignmentLast,
textIndent.getValue(this), textIndent.getValue(this),
lastLineEndIndent.getValue(this)); lastLineEndIndent.getValue(this));
lastPar.startParagraph();
lastPar.startSequence();
if (log.isTraceEnabled()) { if (log.isTraceEnabled()) {
trace.append(" ["); trace.append(" [");
} }

+ 3
- 10
src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java View File

import org.apache.fop.area.inline.TextArea; import org.apache.fop.area.inline.TextArea;
import org.apache.fop.fo.Constants; import org.apache.fop.fo.Constants;
import org.apache.fop.fo.FOText; import org.apache.fop.fo.FOText;
import org.apache.fop.fo.flow.Inline;
import org.apache.fop.fonts.Font; import org.apache.fop.fonts.Font;
import org.apache.fop.layoutmgr.InlineKnuthSequence; import org.apache.fop.layoutmgr.InlineKnuthSequence;
import org.apache.fop.layoutmgr.KnuthBox; import org.apache.fop.layoutmgr.KnuthBox;
letterSpaceIPD = ls.getSpace(); letterSpaceIPD = ls.getSpace();
wordSpaceIPD = MinOptMax.add(new MinOptMax(spaceCharIPD), ws.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();
}
} }


/** /**
|| CharUtilities.isFixedWidthSpace(ch); || 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) */ /** @see org.apache.fop.layoutmgr.LayoutManager#getNextKnuthElements(LayoutContext, int) */
public LinkedList getNextKnuthElements(LayoutContext context, int alignment) { public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
lineStartBAP = context.getLineStartBorderAndPaddingWidth(); lineStartBAP = context.getLineStartBorderAndPaddingWidth();
} }
} }
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: // preserved space or non-breaking space:
// create the AreaInfo object // create the AreaInfo object
ai = new AreaInfo(iNextStart, (short) (iNextStart + 1), ai = new AreaInfo(iNextStart, (short) (iNextStart + 1),

Loading…
Cancel
Save