diff options
author | Manuel Mall <manuel@apache.org> | 2005-10-31 11:17:34 +0000 |
---|---|---|
committer | Manuel Mall <manuel@apache.org> | 2005-10-31 11:17:34 +0000 |
commit | 1aa81a2b26cd702ec88d87a7d8540ed659ac93be (patch) | |
tree | 32e68032437efa8b786d8b432cd50c520873e297 | |
parent | d0becd061162e5f7fbfc79682b278243e99f63e0 (diff) | |
download | xmlgraphics-fop-1aa81a2b26cd702ec88d87a7d8540ed659ac93be.tar.gz xmlgraphics-fop-1aa81a2b26cd702ec88d87a7d8540ed659ac93be.zip |
Fix for bug 37306 - for text-align="start" ipd was incorrectly adjusted with text-indent value
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@329797 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java | 3 | ||||
-rw-r--r-- | test/layoutengine/testcases/block_text-indent.xml | 23 |
2 files changed, 21 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java index 396851b67..cc76a4572 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java @@ -618,9 +618,6 @@ public class LineLayoutManager extends InlineStackingLayoutManager MinOptMax availIPD = context.getStackLimit(); clearPrevIPD(); - if (textAlignment == EN_START) { - availIPD.subtract(new MinOptMax(textIndent.getValue(this))); - } //PHASE 1: Create Knuth elements if (knuthParagraphs == null) { diff --git a/test/layoutengine/testcases/block_text-indent.xml b/test/layoutengine/testcases/block_text-indent.xml index 87009ee82..1f1eaceb1 100644 --- a/test/layoutengine/testcases/block_text-indent.xml +++ b/test/layoutengine/testcases/block_text-indent.xml @@ -63,10 +63,29 @@ the nested block should be indented as well. <checks> <eval expected="20000" xpath="//flow/block[1]/lineArea[1]/@start-indent"/> <true xpath="boolean(not(//flow/block[1]/lineArea[2]/@start-indent))"/> - <true xpath="boolean(not(//flow/block[1]/lineArea[10]/@start-indent))"/> + <eval expected="11" xpath="count(//flow/block[1]/lineArea[1]/text/word)"/> + <eval expected="10" xpath="count(//flow/block[1]/lineArea[2]/text/word)"/> + <eval expected="12" xpath="count(//flow/block[1]/lineArea[3]/text/word)"/> + <eval expected="12" xpath="count(//flow/block[1]/lineArea[4]/text/word)"/> + <eval expected="14" xpath="count(//flow/block[1]/lineArea[5]/text/word)"/> + <eval expected="14" xpath="count(//flow/block[1]/lineArea[6]/text/word)"/> + <eval expected="14" xpath="count(//flow/block[1]/lineArea[7]/text/word)"/> + <eval expected="15" xpath="count(//flow/block[1]/lineArea[8]/text/word)"/> + <eval expected="10" xpath="count(//flow/block[1]/lineArea[9]/text/word)"/> + <true xpath="boolean(not(//flow/block[1]/lineArea[9]/@start-indent))"/> + <eval expected="20000" xpath="//flow/block[2]/lineArea[1]/@start-indent"/> <true xpath="boolean(not(//flow/block[2]/lineArea[2]/@start-indent))"/> - <true xpath="boolean(not(//flow/block[2]/lineArea[10]/@start-indent))"/> + <eval expected="11" xpath="count(//flow/block[2]/lineArea[1]/text/word)"/> + <eval expected="11" xpath="count(//flow/block[2]/lineArea[2]/text/word)"/> + <eval expected="12" xpath="count(//flow/block[2]/lineArea[3]/text/word)"/> + <eval expected="14" xpath="count(//flow/block[2]/lineArea[4]/text/word)"/> + <eval expected="14" xpath="count(//flow/block[2]/lineArea[5]/text/word)"/> + <eval expected="14" xpath="count(//flow/block[2]/lineArea[6]/text/word)"/> + <eval expected="14" xpath="count(//flow/block[2]/lineArea[7]/text/word)"/> + <eval expected="15" xpath="count(//flow/block[2]/lineArea[8]/text/word)"/> + <eval expected="7" xpath="count(//flow/block[2]/lineArea[9]/text/word)"/> + <true xpath="boolean(not(//flow/block[2]/lineArea[9]/@start-indent))"/> <eval expected="20000" xpath="//flow/block[3]/child::*[1]/@start-indent"/> <eval expected="20000" xpath="//flow/block[3]/child::*[2]/lineArea[1]/@start-indent"/> |