Author: lbernardo
Date: Sat Mar 16 00:01:28 2013
New Revision: 1457168
URL: http://svn.apache.org/r1457168
Log:
FOP-2044: Hyphenation of Uppercase Words, Combined with Underlines; applied
second patch by Robert Meyer; expanded the layout test case.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/HyphenationTree.java
xmlgraphics/fop/trunk/test/layoutengine/hyphenation-testcases/block_hyphenation_non_letter_words.xml
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/HyphenationTree.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/HyphenationTree.java?rev=1457168&r1=1457167&r2=1457168&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/HyphenationTree.java
(original)
+++
xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/HyphenationTree.java
Sat Mar 16 00:01:28 2013
@@ -403,7 +403,8 @@ public class HyphenationTree extends Ter
for (int iNonLetterWord = 0; iNonLetterWord < nonLetterWords.size();
iNonLetterWord++) {
char[] nonLetterWord = nonLetterWords.get(iNonLetterWord);
Hyphenation curHyph = hyphenate(nonLetterWord, 0,
nonLetterWord.length,
- remainCharCount, pushCharCount);
+ (iNonLetterWord == 0) ? remainCharCount : 1,
+ (iNonLetterWord == nonLetterWords.size() - 1) ?
pushCharCount : 1);
if (curHyph == null) {
continue;
}
Modified:
xmlgraphics/fop/trunk/test/layoutengine/hyphenation-testcases/block_hyphenation_non_letter_words.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/layoutengine/hyphenation-testcases/block_hyphenation_non_letter_words.xml?rev=1457168&r1=1457167&r2=1457168&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/test/layoutengine/hyphenation-testcases/block_hyphenation_non_letter_words.xml
(original)
+++
xmlgraphics/fop/trunk/test/layoutengine/hyphenation-testcases/block_hyphenation_non_letter_words.xml
Sat Mar 16 00:01:28 2013
@@ -41,14 +41,16 @@
>2. fill fill fill fill fill fill expected</fo:block>
<fo:block border=".5pt dotted gray" space-before=".25em"
>3. fill fill fill fill fill fill _expected_</fo:block>
- <fo:block border=".5pt dotted gray" space-before=".25em"
+ <fo:block border=".5pt dotted gray" space-before=".25em"
>4. fill fill fill fill fill fill SUCCESS</fo:block>
- <fo:block border=".5pt dotted gray" space-before=".25em"
+ <fo:block border=".5pt dotted gray" space-before=".25em"
>5. fill fill fill fill fill fill _SUCCESS_</fo:block>
- <fo:block border=".5pt dotted gray" space-before=".25em"
+ <fo:block border=".5pt dotted gray" space-before=".25em"
>6. fill fill fill fill OCF_SUCCESS</fo:block>
- <fo:block border=".5pt dotted gray" space-before=".25em"
- >6. fill fill fill
TEST_CHICKEN_LONGISH_MULTIPLE_LINE_HYPHEN</fo:block>
+ <fo:block border=".5pt dotted gray" space-before=".25em"
+ >7. fill fill fill
TEST_CHICKEN_LONGISH_MULTIPLE_LINE_HYPHEN</fo:block>
+ <fo:block border=".5pt dotted gray" space-before=".25em"
+ >8. fill fill fill EGOS_EGOS_EGOS_EGOS_EGOS</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
@@ -57,5 +59,6 @@
<eval expected="OCF_SUC-"
xpath="//pageViewport[1]/page[1]/regionViewport[1]/regionBody[1]/mainReference[1]/span[1]/flow[1]/block[6]/lineArea[1]/text[1]/word[6]"/>
<eval expected="TEST_CHICK-"
xpath="//pageViewport[2]/page[1]/regionViewport[1]/regionBody[1]/mainReference[1]/span[1]/flow[1]/block[1]/lineArea[1]/text[1]/word[5]"/>
<eval expected="EN_LONGISH_MULTI-"
xpath="//pageViewport[2]/page[1]/regionViewport[1]/regionBody[1]/mainReference[1]/span[1]/flow[1]/block[1]/lineArea[2]/text[1]/word[1]"/>
+ <eval expected="GOS_EGOS_EGOS_E-"
xpath="//pageViewport[2]/page[1]/regionViewport[1]/regionBody[1]/mainReference[1]/span[1]/flow[1]/block[2]/lineArea[2]/text[1]/word[1]"
/>
</checks>
</testcase>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]