]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Support for text-indent.
authorFinn Bock <bckfnn@apache.org>
Thu, 5 Feb 2004 17:59:30 +0000 (17:59 +0000)
committerFinn Bock <bckfnn@apache.org>
Thu, 5 Feb 2004 17:59:30 +0000 (17:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197332 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/LineLayoutManager.java

index a9a4a860bccaab4b10edf993bc62f6d187b9be0a..b86627052687091f8bc072a428b3425506108945 100644 (file)
@@ -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;