Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 16065 → Rev 16069

/trunk/Scribus/scribus/text/storytext.cpp
849,13 → 849,14
}
 
 
int StoryText::nrOfParagraph(uint index) const
uint StoryText::nrOfParagraph(int pos) const
{
int result = 0;
uint result = 0;
StoryText* that = const_cast<StoryText *>(this);
bool lastWasPARSEP = true;
index = qMin(index, (uint) that->length());
for (uint i=0; i < index; ++i) {
pos = qMin(pos, that->length());
for (int i=0; i < pos; ++i)
{
lastWasPARSEP = that->d->at(i)->ch == SpecialChars::PARSEP;
if (lastWasPARSEP)
++result;
868,7 → 869,8
uint result = 0;
StoryText* that = const_cast<StoryText *>(this);
bool lastWasPARSEP = true;
for (int i=0; i < length(); ++i) {
for (int i=0; i < length(); ++i)
{
lastWasPARSEP = that->d->at(i)->ch == SpecialChars::PARSEP;
if (lastWasPARSEP)
++result;
882,7 → 884,8
return 0;
 
StoryText* that = const_cast<StoryText *>(this);
for (int i=0; i < length(); ++i) {
for (int i=0; i < length(); ++i)
{
if (that->d->at(i)->ch == SpecialChars::PARSEP && ! --index)
return i + 1;
}
893,7 → 896,8
{
++index;
StoryText* that = const_cast<StoryText *>(this);
for (int i=0; i < length(); ++i) {
for (int i=0; i < length(); ++i)
{
if (that->d->at(i)->ch == SpecialChars::PARSEP && ! --index)
return i;
}
/trunk/Scribus/scribus/text/storytext.h
147,7 → 147,7
uint nrOfParagraphs() const;
int startOfParagraph(uint index) const;
int endOfParagraph(uint index) const;
int nrOfParagraph(uint index) const;
uint nrOfParagraph(int pos) const;
 
uint nrOfRuns() const;
int startOfRun(uint index) const;