This fixes view to model mapping in javax.swing.text according to Intel's testsuite.

2006-08-14  Roman Kennke  <[EMAIL PROTECTED]>

        PR 28028
        * javax/swing/text/Utilities.java
        (getTabbedTextOffset): Don't add p0 here.

/Roman
Index: javax/swing/text/Utilities.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/Utilities.java,v
retrieving revision 1.35
diff -u -1 -2 -r1.35 Utilities.java
--- javax/swing/text/Utilities.java	12 Aug 2006 22:16:12 -0000	1.35
+++ javax/swing/text/Utilities.java	14 Aug 2006 13:54:49 -0000
@@ -260,25 +260,25 @@
             if (currentX + (width>>1) > x)
               break;
           }
         else
           {
             if (currentX + width > x)
               break;
           }
         
         currentX += width;
       }
 
-    return pos + p0;
+    return pos;
   }
 
   /**
    * Provides a facility to map screen coordinates into a model location. For a
    * given text fragment and start location within this fragment, this method
    * determines the model location so that the resulting fragment fits best
    * into the span <code>[x0, x]</code>.
    *
    * This method rounds up to the next location, so that the resulting fragment
    * will be the smallest fragment of the text, that is greater than the
    * specified span.
    *

Reply via email to