View Issue Details

IDProjectCategoryView StatusLast Update
0016288ScribusStory Editor / Text Framespublic2020-11-07 14:52
Reportersreerajp Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWindowsOS10OS Version1909
Product Version1.5.6.svn 
Target VersionFixed in Version1.5.6.svn 
Summary0016288: For some CTL script languages spellcheck word correction is wrong
DescriptionI 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.
TagsNo tags attached.
PatchNo

Activities

jghali

2020-10-28 14:50

administrator   ~0048242

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.

jghali

2020-10-28 14:50

administrator   ~0048243

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);
}

sreerajp

2020-10-29 06:49

reporter   ~0048245

>> 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

sreerajp

2020-10-29 08:04

reporter   ~0048246

The given code is working OK

jghali

2020-10-29 10:26

administrator   ~0048248

Thanks for testing! I applied the fix.

Issue History

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