logo       

extragear/graphics/kst/kst: msg#00055

kde.kst

Subject: extragear/graphics/kst/kst

SVN commit 432623 by staikos:

separate linebreaks in the parser to make rendering easier


M +6 -3 labelparser.cpp
M +1 -0 labelparser.h


--- trunk/extragear/graphics/kst/kst/labelparser.cpp #432622:432623
@@ -25,7 +25,7 @@
using namespace Label;

Chunk::Chunk(Chunk *parent, VOffset dir, bool group)
-: next(0L), prev(0L), up(0L), down(0L), symbol(false), scalar(false),
group(group), vOffset(dir) {
+: next(0L), prev(0L), up(0L), down(0L), symbol(false), scalar(false),
group(group), linebreak(false), vOffset(dir) {
assert(parent || vOffset == None);
if (parent) { // attach and inherit
switch (vOffset) {
@@ -70,7 +70,7 @@


bool Chunk::locked() const {
- return scalar || group;
+ return scalar || group || linebreak;
}


@@ -163,7 +163,10 @@
return true;
} else {
*skip = 1;
- setNormalChar('\n', tail);
+ if (!*tail || !(*tail)->text.isEmpty() || (*tail)->locked() ||
(*tail)->symbol) {
+ *tail = new Chunk(*tail);
+ }
+ (*tail)->linebreak = true;
return true;
}
break;
--- trunk/extragear/graphics/kst/kst/labelparser.h #432622:432623
@@ -50,6 +50,7 @@
bool symbol : 1;
bool scalar : 1;
bool group : 1;
+ bool linebreak : 1;
VOffset vOffset : 2;
QString text;
};


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise