View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016288 | Scribus | Story Editor / Text Frames | public | 2020-10-28 08:03 | 2020-11-07 14:52 |
Reporter | sreerajp | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | 10 | OS Version | 1909 |
Product Version | 1.5.6.svn | ||||
Fixed in Version | 1.5.6.svn | ||||
Summary | 0016288: For some CTL script languages spellcheck word correction is wrong | ||||
Description | I checked the issue in Malayalam language and found that the first character of the wrong word is replaced by selected word in the suggestion list, if the word is having Malayalam symbols. I changed word function in storytext.cpp and then it is working fine by adding the following condition in the if clause Function => QString StoryText::word(int pos) Changed Line => if (text(eoWord).isLetterOrNumber() || SpecialChars::isIgnorableCodePoint(text(eoWord).unicode()) || (text(eoWord).unicode() >= 0x0d00 && text(eoWord).unicode() <= 0x0d7F)) I don't know this is right. Just sharing the information. | ||||
Tags | No tags attached. | ||||
Patch | No | ||||
|
Would that work for you if StoryText::word() is changed that way: QString StoryText::word(int pos) { BreakIterator* it = getWordIterator(); if (!it) return pos; it->setText((const UChar*) plainText().utf16()); int start = it->preceding(pos + 1); int end = it->next(); return text(pos, end - pos); } Small note: the fact that 'start' is not used in the text() call at the end is intended as callers are supposed to pass the first character of the word in this function. |
|
Sorry: QString StoryText::word(int pos) { BreakIterator* it = getWordIterator(); if (!it) return QString(); it->setText((const UChar*) plainText().utf16()); int start = it->preceding(pos + 1); int end = it->next(); return text(pos, end - pos); } |
|
>> Small note: the fact that 'start' is not used in the text() call at the end is intended as callers are supposed to pass the first character of the word in this function. Sorry but I didn't understood the above statement . The issue happens when we use the Scribus Spellcheck interface for checking spelling I am testing the code given by you. Will revert soon |
|
The given code is working OK |
|
Thanks for testing! I applied the fix. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-10-28 08:03 | sreerajp | New Issue | |
2020-10-28 14:50 | jghali | Note Added: 0048242 | |
2020-10-28 14:50 | jghali | Note Added: 0048243 | |
2020-10-29 06:49 | sreerajp | Note Added: 0048245 | |
2020-10-29 08:04 | sreerajp | Note Added: 0048246 | |
2020-10-29 10:26 | jghali | Assigned To | => jghali |
2020-10-29 10:26 | jghali | Status | new => resolved |
2020-10-29 10:26 | jghali | Resolution | open => fixed |
2020-10-29 10:26 | jghali | Fixed in Version | => 1.5.6.svn |
2020-10-29 10:26 | jghali | Note Added: 0048248 | |
2020-11-07 14:52 | cbradney | Status | resolved => closed |