]> git.lyx.org Git - lyx.git/blobdiff - src/text.C
Fix working of the spellchecker dialog with ispell when there are no
[lyx.git] / src / text.C
index 3e8400867af817e380c358e1d875aa2d05b4a971..6ad71787f855a3821ac3757f1348fa97d89957db 100644 (file)
@@ -2271,16 +2271,17 @@ bool LyXText::selectWordWhenUnderCursor(BufferView * bview,
 
 // This function is only used by the spellchecker for NextWord().
 // It doesn't handle LYX_ACCENTs and probably never will.
-string const LyXText::selectNextWord(BufferView * bview,
+string const LyXText::selectNextWordToSpellcheck(BufferView * bview,
                                      float & value) const
 {
        if (the_locking_inset) {
-               string str = the_locking_inset->selectNextWord(bview, value);
+               string str = the_locking_inset->selectNextWordToSpellcheck(bview, value);
                if (!str.empty()) {
                        value += float(cursor.y())/float(height);
                        return str;
                }
 #warning Dekel please have a look on this one RTL? (Jug)
+#warning DEKEL!
                // we have to go on checking so move cusor to the right
                if (cursor.pos() == cursor.par()->size()) {
                        if (!cursor.par()->next())
@@ -2308,7 +2309,7 @@ string const LyXText::selectNextWord(BufferView * bview,
                   !cursor.par()->getInset(cursor.pos())->isTextInset()))
               || (cursor.par()->size() == cursor.pos()
                   && cursor.par()->next()))
-       {
+       {      
                if (cursor.pos() == cursor.par()->size()) {
                        cursor.par(cursor.par()->next());
                        cursor.pos(0);
@@ -2318,13 +2319,13 @@ string const LyXText::selectNextWord(BufferView * bview,
 
        // now check if we hit an inset so it has to be a inset containing text!
        if (cursor.pos() < cursor.par()->size() &&
-               cursor.par()->isInset(cursor.pos()))
+           cursor.par()->isInset(cursor.pos()))
        {
                // lock the inset!
                cursor.par()->getInset(cursor.pos())->edit(bview);
                // now call us again to do the above trick
                // but obviously we have to start from down below ;)
-               return bview->text->selectNextWord(bview, value);
+               return bview->text->selectNextWordToSpellcheck(bview, value);
        }               
   
        // Update the value if we changed paragraphs