diff options
| author | craig <craig@11d20701-8431-0410-a711-e3c959e3b870> | 2012-05-04 14:26:58 +0000 |
|---|---|---|
| committer | craig <craig@11d20701-8431-0410-a711-e3c959e3b870> | 2012-05-04 14:26:58 +0000 |
| commit | 1601800e7d74c192af89ee85c6110bd80a02453a (patch) | |
| tree | e0c473e40bac26e8e56ce3d5a8e0b5c1dfda623d /scribus/text | |
| parent | 551faae07c1a1dc272fd61a93ebffb901e382a07 (diff) | |
| download | scribus-1601800e7d74c192af89ee85c6110bd80a02453a.tar.gz scribus-1601800e7d74c192af89ee85c6110bd80a02453a.tar.xz scribus-1601800e7d74c192af89ee85c6110bd80a02453a.zip | |
Bump hunspell plugin, simplify a little. Allow the LibreOffice dict finder use the dict dirs properly
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17494 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'scribus/text')
| -rw-r--r-- | scribus/text/storytext.cpp | 14 | ||||
| -rw-r--r-- | scribus/text/storytext.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/scribus/text/storytext.cpp b/scribus/text/storytext.cpp index 531744a..d85eee5 100644 --- a/scribus/text/storytext.cpp +++ b/scribus/text/storytext.cpp @@ -1154,6 +1154,20 @@ int StoryText::prevWord(int pos) --pos; return wordBoundaries.indexOf(text(pos)) < 0 ? pos + 1 : pos; } + +int StoryText::endOfWord(int pos) const +{ + int len = length(); + while (pos < len) + { + if(text(pos).isLetter()) + ++pos; + else + break; + } + return pos; +} + int StoryText::nextSentence(int pos) { int len = length(); diff --git a/scribus/text/storytext.h b/scribus/text/storytext.h index 381e96c..b7757be 100644 --- a/scribus/text/storytext.h +++ b/scribus/text/storytext.h @@ -202,6 +202,7 @@ class SCRIBUS_API StoryText : public QObject, public SaxIO int prevChar(int pos); int nextWord(int pos); int prevWord(int pos); + int endOfWord(int pos) const; int nextSentence(int pos); int prevSentence(int pos); int nextParagraph(int pos); |
