[Kst] [Bug 144108] Superscript cannot be used to start a label

Andrew Walker arwalker at sumusltd.com
Fri Apr 13 01:54:58 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=144108         
arwalker sumusltd com changed:

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



------- Additional Comments From arwalker sumusltd com  2007-04-13 01:54 -------
SVN commit 653245 by arwalker:

BUG:144108 handle superscript or subscript at start of label

 M  +8 -12     labelparser.cpp  


--- branches/work/kst/1.5/kst/src/libkstmath/labelparser.cpp #653244:653245
 @ -527,20 +527,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