void Paragraph::collectWords()
{
pos_type n = size();
- WordLangTuple wl;
- docstring_list suggestions;
for (pos_type pos = 0; pos < n; ++pos) {
if (isWordSeparator(pos))
continue;
docstring word = asString(from, pos, AS_STR_NONE);
d->words_.insert(word);
}
- if (lyxrc.spellcheck_continuously
- && spellCheck(from, pos, wl, suggestions)) {
- for (size_t i = 0; i != suggestions.size(); ++i)
- d->words_.insert(suggestions[i]);
- }
}
}
#include "Text.h"
#include "TextClass.h"
#include "VSpace.h"
+#include "WordLangTuple.h"
#include "insets/InsetText.h"
#include "frontends/Painter.h"
#include "support/debug.h"
-#include <cstdlib>
+#include "support/docstring_list.h"
#include "support/lassert.h"
+#include <cstdlib>
+
using namespace std;
row.setCrc(pm.computeRowSignature(row, bparams));
bool row_has_changed = row.changed();
+ // Take this opportunity to spellcheck the row contents.
+ if (row_has_changed && lyxrc.spellcheck_continuously) {
+ WordLangTuple wl;
+ // dummy variable, not used.
+ static docstring_list suggestions;
+ pos_type from = row.pos();
+ pos_type to = row.endpos();
+ text_->getPar(pit).spellCheck(from, to, wl, suggestions, false);
+ }
+
// Don't paint the row if a full repaint has not been requested
// and if it has not changed.
if (!pi.full_repaint && !row_has_changed) {