Paragraph::updateWord() and collectWords(): Remove unneeded CursorSlice argument.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29466 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2009-05-01 09:56:20 +00:00
parent ea54380e13
commit 1b168bbc69
4 changed files with 8 additions and 9 deletions

View File

@ -2088,7 +2088,7 @@ bool notifyCursorLeavesOrEnters(Cursor const & old, Cursor & cur)
&& !cur.buffer()->isClean()
&& cur.inTexted() && old.inTexted()
&& cur.pit() != old.pit()) {
old.paragraph().updateWords(old.top());
old.paragraph().updateWords();
}
// notify everything on top of the common part in old cursor,

View File

@ -2905,7 +2905,7 @@ void Paragraph::locateWord(pos_type & from, pos_type & to,
}
void Paragraph::collectWords(CursorSlice const & sl)
void Paragraph::collectWords()
{
SpellChecker * speller = theSpellChecker();
@ -2955,11 +2955,10 @@ void Paragraph::registerWords()
}
void Paragraph::updateWords(CursorSlice const & sl)
void Paragraph::updateWords()
{
LASSERT(&sl.paragraph() == this, /**/);
deregisterWords();
collectWords(sl);
collectWords();
registerWords();
}

View File

@ -404,13 +404,13 @@ public:
void locateWord(pos_type & from, pos_type & to,
word_location const loc) const;
///
void updateWords(CursorSlice const & sl);
void updateWords();
private:
///
void deregisterWords();
///
void collectWords(CursorSlice const & sl);
void collectWords();
///
void registerWords();

View File

@ -569,7 +569,7 @@ void Text::charInserted(Cursor & cur)
&& !par.isLetter(cur.pos() - 1)) {
// get the word in front of cursor
LASSERT(this == cur.text(), /**/);
cur.paragraph().updateWords(cur.top());
cur.paragraph().updateWords();
}
}
@ -1308,7 +1308,7 @@ bool Text::read(Buffer const & buf, Lexer & lex,
// register the words in the global word list
CursorSlice sl = CursorSlice(*insetPtr);
sl.pit() = pars_.size() - 1;
pars_.back().updateWords(sl);
pars_.back().updateWords();
} else if (token == "\\begin_deeper") {
++depth;
} else if (token == "\\end_deeper") {