Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 25206 → Rev 25207

/trunk/Scribus/scribus/text/storytext.cpp
989,7 → 989,7
assert(pos + signed(len) <= length());
 
QString result;
for (int i = pos; i < pos+signed(len); ++i)
for (int i = pos; i < pos + signed(len); ++i)
result += d->at(i)->ch;
 
return result;
1474,7 → 1474,8
return;
ScText* itText;
for (uint i=pos; i < pos+len; ++i) {
for (uint i = pos; i < pos + len; ++i)
{
itText = d->at(i);
// FIXME?? see #6165 : should we really erase charstyle of paragraph style??
if (itText->ch == SpecialChars::PARSEP && itText->parstyle != nullptr)
1504,7 → 1505,8
 
if (i < length())
{
if (!d->at(i)->parstyle) {
if (!d->at(i)->parstyle)
{
qDebug("PARSEP without style at pos %i", i);
d->at(i)->parstyle = new ParagraphStyle();
d->at(i)->parstyle->setContext( & d->pstyleContext);
1515,7 → 1517,8
// qDebug() << QString("applying parstyle %2 at %1 for %3").arg(i).arg(paragraphStyle(pos).name()).arg(pos);
d->at(i)->parstyle->applyStyle(style);
}
else {
else
{
// not happy about this but inserting a new PARSEP makes more trouble
// qDebug() << QString("applying parstyle %1 as defaultstyle for %2").arg(paragraphStyle(pos).name()).arg(pos);
d->trailingStyle.applyStyle(style);
1546,7 → 1549,8
 
if (i < length())
{
if (!d->at(i)->parstyle) {
if (!d->at(i)->parstyle)
{
qDebug("PARSEP without style at pos %i", i);
d->at(i)->parstyle = new ParagraphStyle();
d->at(i)->parstyle->setContext( & d->pstyleContext);
1584,7 → 1588,7
return;
ScText* itText;
for (uint i=pos; i < pos+len; ++i)
for (uint i = pos; i < pos + len; ++i)
{
itText = d->at(i);
// #6165 : applying style on last character applies style on whole text on next open
1601,7 → 1605,7
d->defaultStyle.getNamedResources(lists);
d->trailingStyle.getNamedResources(lists);
 
for (int i=0; i < length(); ++i)
for (int i = 0; i < length(); ++i)
{
if (text(i) == SpecialChars::PARSEP)
paragraphStyle(i).getNamedResources(lists);
1630,7 → 1634,7
return;
ScText* itText;
for (int i=0; i < len; ++i)
for (int i = 0; i < len; ++i)
{
itText = d->at(i);
if (itText->parstyle)
1703,7 → 1707,7
uint result = 0;
bool lastWasPARSEP = true;
pos = qMin(pos, length());
for (int i=0; i < pos; ++i)
for (int i = 0; i < pos; ++i)
{
lastWasPARSEP = d->at(i)->ch == SpecialChars::PARSEP;
if (lastWasPARSEP)
1735,7 → 1739,7
if (index == 0)
return 0;
 
for (int i=0; i < length(); ++i)
for (int i = 0; i < length(); ++i)
{
if (d->at(i)->ch == SpecialChars::PARSEP && ! --index)
return i + 1;