You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2006/10/11 00:18:37 UTC

svn commit: r462605 [8/8] - in /incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java: java/text/ org/apache/harmony/text/ org/apache/harmony/text/internal/nls/

Modified: incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java/org/apache/harmony/text/BidiWrapper.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java/org/apache/harmony/text/BidiWrapper.java?view=diff&rev=462605&r1=462604&r2=462605
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java/org/apache/harmony/text/BidiWrapper.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java/org/apache/harmony/text/BidiWrapper.java Tue Oct 10 15:18:35 2006
@@ -17,73 +17,71 @@
 
 package org.apache.harmony.text;
 
-
-
 /**
  * TODO: type description
  */
 
 public final class BidiWrapper {
 
-	public static final int UBIDI_DEFAULT_LTR = 0xfe;
+    public static final int UBIDI_DEFAULT_LTR = 0xfe;
 
-	public static final int UBIDI_DEFAULT_RTL = 0xff;
+    public static final int UBIDI_DEFAULT_RTL = 0xff;
 
-	public static final int UBIDI_MAX_EXPLICIT_LEVEL = 61;
+    public static final int UBIDI_MAX_EXPLICIT_LEVEL = 61;
 
-	public static final int UBIDI_LEVEL_OVERRIDE = 0x80;
+    public static final int UBIDI_LEVEL_OVERRIDE = 0x80;
 
-	public static final int UBIDI_KEEP_BASE_COMBINING = 1;
+    public static final int UBIDI_KEEP_BASE_COMBINING = 1;
 
-	public static final int UBIDI_DO_MIRRORING = 2;
+    public static final int UBIDI_DO_MIRRORING = 2;
 
-	public static final int UBIDI_INSERT_LRM_FOR_NUMERIC = 4;
+    public static final int UBIDI_INSERT_LRM_FOR_NUMERIC = 4;
 
-	public static final int UBIDI_REMOVE_BIDI_CONTROLS = 8;
+    public static final int UBIDI_REMOVE_BIDI_CONTROLS = 8;
 
-	public static final int UBIDI_OUTPUT_REVERSE = 16;
+    public static final int UBIDI_OUTPUT_REVERSE = 16;
 
-	public static final int UBiDiDirection_UBIDI_LTR = 0;
+    public static final int UBiDiDirection_UBIDI_LTR = 0;
 
-	public static final int UBiDiDirection_UBIDI_RTL = 1;
+    public static final int UBiDiDirection_UBIDI_RTL = 1;
 
-	public static final int UBiDiDirection_UBIDI_MIXED = 2;
+    public static final int UBiDiDirection_UBIDI_MIXED = 2;
 
-	// Allocate a UBiDi structure.
-	public static native long ubidi_open();
+    // Allocate a UBiDi structure.
+    public static native long ubidi_open();
 
-	// ubidi_close() must be called to free the memory associated with a
-	// UBiDi object.
-	public static native void ubidi_close(long pBiDi);
+    // ubidi_close() must be called to free the memory associated with a
+    // UBiDi object.
+    public static native void ubidi_close(long pBiDi);
 
-	// Perform the Unicode BiDi algorithm.
-	public static native void ubidi_setPara(long pBiDi, char[] text,
-			int length, byte paraLevel, byte[] embeddingLevels);
+    // Perform the Unicode BiDi algorithm.
+    public static native void ubidi_setPara(long pBiDi, char[] text,
+            int length, byte paraLevel, byte[] embeddingLevels);
 
-	// ubidi_setLine() sets a UBiDi to contain the reordering information,
-	// especially the resolved levels, for all the characters in a line of
-	// text.
-	public static native long ubidi_setLine(final long pParaBiDi, int start,
-			int limit);
+    // ubidi_setLine() sets a UBiDi to contain the reordering information,
+    // especially the resolved levels, for all the characters in a line of
+    // text.
+    public static native long ubidi_setLine(final long pParaBiDi, int start,
+            int limit);
 
-	// Get the directionality of the text.
-	public static native int ubidi_getDirection(final long pBiDi);
+    // Get the directionality of the text.
+    public static native int ubidi_getDirection(final long pBiDi);
 
-	// Get the length of the text.
-	public static native int ubidi_getLength(final long pBiDi);
+    // Get the length of the text.
+    public static native int ubidi_getLength(final long pBiDi);
 
-	// Get the paragraph level of the text.
-	public static native byte ubidi_getParaLevel(final long pBiDi);
+    // Get the paragraph level of the text.
+    public static native byte ubidi_getParaLevel(final long pBiDi);
 
-	// Get an array of levels for each character.
-	public static native byte[] ubidi_getLevels(long pBiDi);
+    // Get an array of levels for each character.
+    public static native byte[] ubidi_getLevels(long pBiDi);
 
-	// Get the number of runs.
-	public static native int ubidi_countRuns(long pBiDi);
+    // Get the number of runs.
+    public static native int ubidi_countRuns(long pBiDi);
 
-	// Get the BidiRuns
-	public static native BidiRun[] ubidi_getRuns(long pBidi);
+    // Get the BidiRuns
+    public static native BidiRun[] ubidi_getRuns(long pBidi);
 
-	// This is a convenience function that does not use a UBiDi object
-	public static native int[] ubidi_reorderVisual(byte[] levels, int length);
+    // This is a convenience function that does not use a UBiDi object
+    public static native int[] ubidi_reorderVisual(byte[] levels, int length);
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java/org/apache/harmony/text/internal/nls/Messages.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java/org/apache/harmony/text/internal/nls/Messages.java?view=diff&rev=462605&r1=462604&r2=462605
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java/org/apache/harmony/text/internal/nls/Messages.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java/org/apache/harmony/text/internal/nls/Messages.java Tue Oct 10 15:18:35 2006
@@ -23,7 +23,6 @@
 
 package org.apache.harmony.text.internal.nls;
 
-
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Locale;
@@ -143,7 +142,7 @@
 
         return format(format, args);
     }
-    
+
     /**
      * Generates a formatted text string given a source string containing
      * "argument markers" of the form "{argNum}" where each argNum must be in
@@ -166,7 +165,7 @@
         String[] argStrings = new String[args.length];
         for (int i = 0; i < args.length; ++i) {
             if (args[i] == null)
-                argStrings[i] = "<null>";	//$NON-NLS-1$
+                argStrings[i] = "<null>"; //$NON-NLS-1$
             else
                 argStrings[i] = args[i].toString();
         }
@@ -190,16 +189,16 @@
                             10);
                     if (argnum < 0 || format.charAt(i + 2) != '}') {
                         // Bad format, just print and loop.
-						answer.append(format.substring(lastI, i + 1));
-						lastI = i + 1;
+                        answer.append(format.substring(lastI, i + 1));
+                        lastI = i + 1;
                     } else {
                         // Got a good one!
                         answer.append(format.substring(lastI, i));
                         if (argnum >= argStrings.length)
-                            answer.append("<missing argument>");	//$NON-NLS-1$
+                            answer.append("<missing argument>"); //$NON-NLS-1$
                         else
                             answer.append(argStrings[argnum]);
-						lastI = i + 3;
+                        lastI = i + 3;
                     }
                 }
             }
@@ -223,7 +222,8 @@
                     .doPrivileged(new PrivilegedAction<Object>() {
                         public Object run() {
                             return ResourceBundle.getBundle(resource, locale,
-                                    loader != null ? loader : ClassLoader.getSystemClassLoader());
+                                    loader != null ? loader : ClassLoader
+                                            .getSystemClassLoader());
                         }
                     });
         } catch (MissingResourceException e) {