From: Finn Bock Date: Thu, 5 Feb 2004 17:59:30 +0000 (+0000) Subject: Support for text-indent. X-Git-Tag: Root_Temp_KnuthStylePageBreaking~856 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=457f4f97766f4d93574cf66ef15f732d88da9483;p=xmlgraphics-fop.git Support for text-indent. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197332 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java index a9a4a860b..b86627052 100644 --- a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java @@ -178,6 +178,10 @@ public class LineLayoutManager extends InlineStackingLayoutManager { clearPrevIPD(); int iPrevLineEnd = vecInlineBreaks.size(); + // Adjust available line length by text-indent. + if (iPrevLineEnd == 0 && bTextAlignment == TextAlign.START) { + availIPD.subtract(new MinOptMax(iTextIndent)); + } prevBP = null; while ((curLM = getChildLM()) != null) { @@ -618,7 +622,9 @@ public class LineLayoutManager extends InlineStackingLayoutManager { } break; case TextAlign.START: - //indent = 0; + if (prevLineEnd == 0) { + indent = iTextIndent; + } break; case TextAlign.CENTER: indent = (targetWith - realWidth) / 2;