[Kst] [Bug 144890] Ability to add arbitrary Unicode characters to labels.

Andrew Walker arwalker at sumusltd.com
Wed May 2 01:08:26 CEST 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=144890         
arwalker sumusltd com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From arwalker sumusltd com  2007-05-02 01:08 -------
SVN commit 660205 by arwalker:

BUG:144890 Add back support for unichar without removal of earlier bug fix

 M  +11 -15    labelparser.cpp  


--- branches/work/kst/1.5/kst/src/libkstmath/labelparser.cpp #660204:660205
 @ -465,10 +465,10  @
         setNormalChar(QChar(0x3A5+x), tail);
         return true;
       } else if (txt.mid(from + 1).startsWith("nichar{")) {
-        uint charStart = from + 8;
-        uint charEnd = txt.find('}',charStart);
+        int charStart = from + 8;
+        int charEnd = txt.find('}', charStart);
         if (charEnd == -1) {
-                return false;
+          return false;
         }
         setNormalChar(QChar( (txt.mid(charStart,charEnd - charStart)).toInt(0,0)), tail);
         *skip = charEnd - from + 1;
 @ -536,20 +536,16  @
       case 0x5e:   // ^
         dir = Chunk::Up;
       case 0x5f:   // _
-        if (ctail->text.isEmpty() && !ctail->group) {
-          setNormalChar(c, &ctail);
-        } else {
-          if (ctail->vOffset != Chunk::None) {
-            if (ctail->vOffset != dir) {
-              ctail = new Chunk(ctail->prev, dir, false, true);
-            } else if (ctail->group) {
-              ctail = new Chunk(ctail, dir, false, true);
-            } else {
-              return 0L; // parse error - x^y^z etc
-            }
-          } else {
+        if (ctail->vOffset != Chunk::None) {
+          if (ctail->vOffset != dir) {
+            ctail = new Chunk(ctail->prev, dir, false, true);
+          } else if (ctail->group) {
             ctail = new Chunk(ctail, dir, false, true);
+          } else {
+            return 0L; // parse error - x^y^z etc
           }
+        } else {
+          ctail = new Chunk(ctail, dir, false, true);
         }
         break;
       case 0x7b:   // {


More information about the Kst mailing list