]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2308: text-transform="capitalize" assumes input text is lowercase
authorLuis Bernardo <lbernardo@apache.org>
Tue, 29 Oct 2013 22:51:53 +0000 (22:51 +0000)
committerLuis Bernardo <lbernardo@apache.org>
Tue, 29 Oct 2013 22:51:53 +0000 (22:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1536924 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/FOText.java
test/layoutengine/standard-testcases/wrapper_text-transform_1.xml
test/layoutengine/standard-testcases/wrapper_text-transform_2.xml

index 2fc998c63f465123b6999952d65bedd79af7c4a2..2b707637c08e3cbad244f981ffb2b487aea7fa8d 100644 (file)
@@ -297,7 +297,7 @@ public class FOText extends FONode implements CharSequence {
                         */
                         tmp.put(Character.toTitleCase(c));
                     } else {
-                        tmp.put(c);
+                        tmp.put(Character.toLowerCase(c));
                     }
                     break;
                 default:
index 886d94c7b535daec22cc8783300d7177074f0806..e5607d12c19fc43112cbae1ef5a4098213447baf 100644 (file)
@@ -41,7 +41,7 @@
   </fo>
   <checks>
     <eval expected="none: This tExT is left as-IS." xpath="//flow/block[1]"/>
-    <eval expected="capitalize: This TExT Is Capitalized." xpath="//flow/block[2]"/>
+    <eval expected="capitalize: This Text Is Capitalized." xpath="//flow/block[2]"/>
     <!-- spaces are discarded when around a line break -->
     <eval expected="uppercase: THIS TEXT IS CONVERTED TO UPPERCASE.LIBERTÉ, ÉGALITÉ, FRATERNITÉ UND KÄSE." xpath="//flow/block[3]"/>
     <eval expected="lowercase: this text is converted to lowercase. liberté, égalité,fraternité und käse." xpath="//flow/block[4]"/>
index e296ef1831364b2961d282170c1bb1db3ced52a4..8a081333783475cfe364e7b8fbceee9d513cfae4 100644 (file)
@@ -42,7 +42,7 @@
     </fo:root>
   </fo>
   <checks>
-    <eval expected="1: This TExT Is Capitalized." xpath="//flow/block[1]"/>
-    <eval expected="2: This TExT Is CapitAliZed." xpath="//flow/block[2]"/>
+    <eval expected="1: This Text Is Capitalized." xpath="//flow/block[1]"/>
+    <eval expected="2: This Text Is Capitalized." xpath="//flow/block[2]"/>
   </checks>
 </testcase>