diff options
| author | craig <craig@11d20701-8431-0410-a711-e3c959e3b870> | 2012-05-03 16:21:18 +0000 |
|---|---|---|
| committer | craig <craig@11d20701-8431-0410-a711-e3c959e3b870> | 2012-05-03 16:21:18 +0000 |
| commit | 87819d60bf3e5b5de4ff1486c4c07011a069347e (patch) | |
| tree | b5f2c55223e072eb914cc07d6dc9f10cfb77e20f /scribus/text/storytext.cpp | |
| parent | 020a92a1d225b2a84feb5dfbb8aa126801571d26 (diff) | |
| download | scribus-87819d60bf3e5b5de4ff1486c4c07011a069347e.tar.gz scribus-87819d60bf3e5b5de4ff1486c4c07011a069347e.tar.xz scribus-87819d60bf3e5b5de4ff1486c4c07011a069347e.zip | |
Bump hunspell some more. Word language now recorded from the char style and the words are checked against that dictionary if it exists. Fix (or break?) StoryText::nextWord.
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17491 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'scribus/text/storytext.cpp')
| -rw-r--r-- | scribus/text/storytext.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/scribus/text/storytext.cpp b/scribus/text/storytext.cpp index dc4cace..531744a 100644 --- a/scribus/text/storytext.cpp +++ b/scribus/text/storytext.cpp @@ -1125,14 +1125,28 @@ int StoryText::prevChar(int pos) else return 0; } + int StoryText::nextWord(int pos) { int len = length(); - pos = qMin(len, pos+1); - while (pos < len && wordBoundaries.indexOf(text(pos)) < 0) - ++pos; + if (text(pos).isLetter()) + pos = qMin(len, pos+1); + else + pos = qMin(len, pos); + + // while (pos < len && wordBoundaries.indexOf(text(pos)) < 0) + // ++pos; + + while (pos < len) + { + if(text(pos).isLetter()) + ++pos; + else + break; + } return pos < len ? pos + 1 : pos; } + int StoryText::prevWord(int pos) { pos = qMax(0, pos-1); |
