View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009552 | Scribus | Story Editor / Text Frames | public | 2010-12-03 08:45 | 2011-01-04 10:58 |
Reporter | cezaryece | Assigned To | cbradney | ||
Priority | normal | Severity | tweak | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 1.3.8 | ||||
Target Version | 1.4.0svn | Fixed in Version | 1.4.0svn | ||
Summary | 0009552: StoryText::nrOfParagraph take uint parameter and return int type | ||||
Description | Now we have definition: int StoryText::nrOfParagraph(uint index) but this method should take position in text (int) and should return paragraph index (uint), so... it should be uint StoryText::nrOfParagraph(int pos) I attach patch (1.3.9svn) for changing it, as I am using this new definition in some other patches I plan to issue. And please commit it fast. | ||||
Tags | No tags attached. | ||||
Patch | |||||
|
nrOfParagraph.patch (1,279 bytes)
Index: Scribus/scribus/text/storytext.cpp =================================================================== --- Scribus/scribus/text/storytext.cpp (wersja 16036) +++ Scribus/scribus/text/storytext.cpp (kopia robocza) @@ -850,13 +850,13 @@ } -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; Index: Scribus/scribus/text/storytext.h =================================================================== --- Scribus/scribus/text/storytext.h (wersja 15812) +++ Scribus/scribus/text/storytext.h (kopia robocza) @@ -146,7 +146,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; |
|
please review and commit |
|
Reminder sent to: avox, cbradney, fschmid FYI, please review |
|
Seems ok for me. |
|
Committed, thanks. |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-12-03 08:45 | cezaryece | New Issue | |
2010-12-03 08:45 | cezaryece | File Added: nrOfParagraph.patch | |
2010-12-03 12:25 |
|
Note Added: 0024970 | |
2010-12-03 12:25 |
|
Status | new => assigned |
2010-12-03 12:25 |
|
Target Version | => 1.4.0svn |
2010-12-03 12:26 |
|
Note Added: 0024971 | |
2010-12-03 18:54 | fschmid | Note Added: 0024974 | |
2010-12-04 04:22 | christoph_s | Assigned To | => cbradney |
2010-12-05 21:03 | cbradney | Note Added: 0024987 | |
2010-12-05 21:03 | cbradney | Status | assigned => resolved |
2010-12-05 21:03 | cbradney | Fixed in Version | => 1.4.0svn |
2010-12-05 21:03 | cbradney | Resolution | open => fixed |
2011-01-04 10:58 |
|
Status | resolved => closed |
2015-09-17 20:08 | Kunda | Category | Story Editor / Text Frames => Story Ed/Txt Frames |
2015-09-17 20:12 | Kunda | Category | Story Ed/Txt Frames => Story Editor / Text Frames |