/trunk/Scribus/scribus/gtfont.cpp |
---|
661,18 → 661,12 |
int gtFont::find(const QString& where, const QString& what) |
{ |
QString realWhat = " " + what; |
int index = where.find(realWhat); // f.e. Demi Bold |
int index = where.findRev(realWhat); // f.e. Demi Bold |
if (index != -1) |
{ |
if (index + realWhat.length() != where.length()) |
if (where[index + realWhat.length() + 1] != " ") |
{ |
int secIndex = where.find(" ", index + 1); |
if (secIndex == -1) |
index = -1; |
else |
index = find(where.right(where.length() - secIndex), what); |
} |
index = -1; |
} |
return index; |
} |
/trunk/Scribus/scribus/scribus.cpp |
---|
1642,12 → 1642,12 |
} |
} |
} |
if (b->CPos == static_cast<int>(b->Ptext.count())) |
if ((b->CPos > 0) && (b->CPos == static_cast<int>(b->Ptext.count()))) |
{ |
if (b->Ptext.at(b->CPos-1)->cstyle & 256) |
{ |
b->CPos -= 1; |
while (b->Ptext.at(b->CPos)->cstyle & 256) |
while ((b->CPos > 0) && (b->Ptext.at(b->CPos)->cstyle & 256)) |
{ |
b->CPos--; |
if (b->CPos == 0) |
1657,7 → 1657,7 |
} |
else |
{ |
while ((b->Ptext.at(b->CPos)->cstyle & 256) && (b->CPos > 0)) |
while ((b->CPos > 0) && (b->Ptext.at(b->CPos)->cstyle & 256)) |
{ |
b->CPos--; |
if (b->CPos == 0) |
/trunk/Scribus/scribus/plugins/gettext/csvim/csvim.cpp |
---|
124,13 → 124,11 |
{ |
if (line == NULL) |
return; |
int start = 0, end = line.length(); |
int fdindex = line.find(fieldDelimiter); |
int vdindex = -1; |
if (useVDelim) |
vdindex = line.find(valueDelimiter); |
if ((vdindex == -1) && (fdindex != -1)) |
{ |
QStringList l = QStringList::split(fieldDelimiter, line); |
162,6 → 160,15 |
data += "\t" + tmp.stripWhiteSpace(); |
++colIndex; |
} |
else if (end == line.length() - 1) |
{ |
QString tmp = line.mid(start, end - 1); |
if (isHeader) |
header += "\t" + tmp; |
else |
data += "\t" + tmp; |
++colIndex; |
} |
else |
{ |
QString tmp = line.mid(start, end - start); |
171,7 → 178,7 |
data += "\t" + tmp; |
++colIndex; |
QString next = line; |
next = next.remove(0, line.find(fieldDelimiter, end) + 1); |
next = next.right(next.length() - end); |
parseLine(next, isHeader); |
} |
} |
/trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftemplate.cpp |
---|
56,7 → 56,7 |
Carrier->LadeDoc(nftdia->currentTemplate->file); |
Carrier->doc->hasName = false; |
Carrier->doc->DocName = nftdia->currentTemplate->name; |
Carrier->ActWin->setCaption("Template: " + nftdia->currentTemplate->name); |
Carrier->ActWin->setCaption(QObject::tr("Template: ") + nftdia->currentTemplate->name); |
QDir::setCurrent(Carrier->Prefs.DocDir); |
Carrier->RemoveRecent(nftdia->currentTemplate->file); |
qApp->restoreOverrideCursor(); |