Author: scottbw
Date: Wed Sep  8 13:55:19 2010
New Revision: 995060

URL: http://svn.apache.org/viewvc?rev=995060&view=rev
Log:
Fixed an error in the algorithm that determines if there is a text direction 
override on a localizable element; it was returning LTR for the root element 
(<widget>) rather than checking it first and returning LTR only if there is 
also no override on the root.

Modified:
    
incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/impl/AbstractLocalizedEntity.java

Modified: 
incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/impl/AbstractLocalizedEntity.java
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/impl/AbstractLocalizedEntity.java?rev=995060&r1=995059&r2=995060&view=diff
==============================================================================
--- 
incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/impl/AbstractLocalizedEntity.java
 (original)
+++ 
incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/impl/AbstractLocalizedEntity.java
 Wed Sep  8 13:55:19 2010
@@ -122,9 +122,9 @@ public abstract class AbstractLocalizedE
         */
        public static String getTextDirection(Element element){
                try {
-                       if (element.isRootElement()) return LEFT_TO_RIGHT;
                        Attribute dir = 
element.getAttribute(IW3CXMLConfiguration.DIR_ATRRIBUTE);
                        if (dir == null){
+                               if (element.isRootElement()) return 
LEFT_TO_RIGHT;
                                return 
getTextDirection(element.getParentElement());
                        } else {
                                String dirValue = 
UnicodeUtils.normalizeSpaces(dir.getValue());


Reply via email to