You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ad...@apache.org on 2007/07/12 18:17:33 UTC
svn commit: r555680 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
Author: adelmelle
Date: Thu Jul 12 09:17:32 2007
New Revision: 555680
URL: http://svn.apache.org/viewvc?view=rev&rev=555680
Log:
TODO removed: use LayoutContext's stackLimit instead of the availIPD parameter
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?view=diff&rev=555680&r1=555679&r2=555680
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java Thu Jul 12 09:17:32 2007
@@ -84,7 +84,7 @@
private Block fobj;
private boolean isFirstInBlock;
- /** @see org.apache.fop.layoutmgr.LayoutManager#initialize() */
+ /** @see org.apache.fop.layoutmgr.LayoutManager#initialize() */
public void initialize() {
textAlignment = fobj.getTextAlign();
textAlignmentLast = fobj.getTextAlignLast();
@@ -214,7 +214,6 @@
private int textAlignmentLast;
private int textIndent;
private int lastLineEndIndent;
- private int lineWidth;
// the LM which created the paragraph
private LineLayoutManager layoutManager;
@@ -228,8 +227,7 @@
lastLineEndIndent = endIndent;
}
- public void startParagraph(int lw) {
- lineWidth = lw;
+ public void startParagraph() {
startSequence();
}
@@ -239,7 +237,9 @@
if (textAlignment == EN_CENTER) {
lineFiller = new MinOptMax(lastLineEndIndent);
} else {
- lineFiller = new MinOptMax(lastLineEndIndent, lastLineEndIndent, lineWidth);
+ lineFiller = new MinOptMax(lastLineEndIndent,
+ lastLineEndIndent,
+ layoutManager.iLineWidth);
}
// add auxiliary elements at the beginning of the paragraph
@@ -593,7 +593,7 @@
// here starts Knuth's algorithm
//TODO availIPD should not really be used here, so we can later support custom line
//widths for for each line (side-floats, differing available IPD after page break)
- collectInlineKnuthElements(context, availIPD);
+ collectInlineKnuthElements(context);
} else {
// this method has been called before
// all line breaks are already calculated
@@ -642,13 +642,13 @@
* @param context the LayoutContext
* @param availIPD available IPD for line (should be removed!)
*/
- private void collectInlineKnuthElements(LayoutContext context, MinOptMax availIPD) {
+ private void collectInlineKnuthElements(LayoutContext context) {
LayoutContext inlineLC = new LayoutContext(context);
InlineLevelLayoutManager curLM;
LinkedList returnedList = null;
iLineWidth = context.getStackLimit().opt;
-
+
// convert all the text in a sequence of paragraphs made
// of KnuthBox, KnuthGlue and KnuthPenalty objects
boolean bPrevWasKnuthBox = false;
@@ -718,7 +718,7 @@
textAlignment, textAlignmentLast,
textIndent.getValue(this),
lastLineEndIndent.getValue(this));
- lastPar.startParagraph(availIPD.opt);
+ lastPar.startParagraph();
if (log.isTraceEnabled()) {
trace.append(" [");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org
Re: svn commit: r555680 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jul 12, 2007, at 18:17, adelmelle@apache.org wrote:
Hi all
> New Revision: 555680
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=555680
> Log:
> TODO removed: use LayoutContext's stackLimit instead of the
> availIPD parameter
Maybe one of the layout-experts should have a look at this to see if
I have not made a mistake here. It seemed correct to use the
LayoutContext's optimum stack-limit, and all the tests passed, so I
committed it anyway...
Cheers,
Andreas