From 07396ab2445720b21dc8195816eb1aee1f2ae3a7 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 6 Mar 2021 16:53:33 +0100 Subject: [PATCH] Meet per-document spelling dictionaries (fixes #86 [sic!]) Now who can beat that? ;-) --- lib/RELEASE-NOTES | 3 + lib/lyx2lyx/lyx_2_4.py | 15 ++- src/AppleSpellChecker.cpp | 12 +- src/AppleSpellChecker.h | 3 +- src/AspellChecker.cpp | 10 +- src/AspellChecker.h | 3 +- src/Buffer.cpp | 1 + src/BufferParams.cpp | 30 +++++ src/BufferParams.h | 6 + src/EnchantChecker.cpp | 11 +- src/EnchantChecker.h | 6 +- src/FuncCode.h | 2 + src/HunspellChecker.cpp | 18 ++- src/HunspellChecker.h | 3 +- src/LyXAction.cpp | 13 ++ src/Paragraph.cpp | 11 +- src/SpellChecker.h | 4 +- src/Text3.cpp | 43 +++++++ src/frontends/qt/GuiSpellchecker.cpp | 30 ++++- src/frontends/qt/GuiSpellchecker.h | 2 + src/frontends/qt/Menus.cpp | 6 +- src/frontends/qt/ui/SpellcheckerUi.ui | 178 ++++++++++++++------------ src/version.h | 4 +- 23 files changed, 311 insertions(+), 103 deletions(-) diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES index 3496575d15..638d5a9219 100644 --- a/lib/RELEASE-NOTES +++ b/lib/RELEASE-NOTES @@ -116,6 +116,9 @@ cursor in the search cache that is used by word-find[-backward|-forward] if no argument is given to those. +* spelling-add-local adds words for a given language to the document's local spelling + dictionary. + * inset-split is a new convenience function that splits an inset into two at the given cursor position. This is only implemented for text insets currently. diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py index 2ea050e6ee..8d1c4d6e6b 100644 --- a/lib/lyx2lyx/lyx_2_4.py +++ b/lib/lyx2lyx/lyx_2_4.py @@ -4396,6 +4396,15 @@ def revert_koma_frontispiece(document): document.append_local_layout(frontispiece_def) +def revert_spellchecker_ignore(document): + """Revert document spellchecker disctionary""" + i = 0 + while True: + i = find_token(document.header, "\\spellchecker_ignore") + if i == -1: + return + del document.header[i] + ## # Conversion hub # @@ -4463,10 +4472,12 @@ convert = [ [603, []], [604, []], [605, [convert_vcolumns2]], - [606, [convert_koma_frontispiece]] + [606, [convert_koma_frontispiece]], + [607, []] ] -revert = [[605, [revert_koma_frontispiece]], +revert = [[606, [revert_spellchecker_ignore]], + [605, [revert_koma_frontispiece]], [604, [revert_vcolumns2]], [603, [revert_branch_darkcols]], [602, [revert_darkmode_graphics]], diff --git a/src/AppleSpellChecker.cpp b/src/AppleSpellChecker.cpp index 3ba1250b2d..1975121328 100644 --- a/src/AppleSpellChecker.cpp +++ b/src/AppleSpellChecker.cpp @@ -78,13 +78,23 @@ string AppleSpellChecker::Private::toString(SpellCheckResult status) } -SpellChecker::Result AppleSpellChecker::check(WordLangTuple const & word) +SpellChecker::Result AppleSpellChecker::check(WordLangTuple const & word, + std::vector docdict) { if (!hasDictionary(word.lang())) return NO_DICTIONARY; string const word_str = to_utf8(word.word()); string const lang = d->languageMap[word.lang()->lang()]; + + vector::const_iterator it = docdict.begin(); + for (; it != docdict.end(); ++it) { + if (it->lang()->code() != word.lang()->code()) + continue; + if (it->word() == word.word()) + return LEARNED_WORD; + } + SpellCheckResult result = AppleSpeller_check(d->speller, word_str.c_str(), lang.c_str()); diff --git a/src/AppleSpellChecker.h b/src/AppleSpellChecker.h index d779777245..8921fbe027 100644 --- a/src/AppleSpellChecker.h +++ b/src/AppleSpellChecker.h @@ -24,7 +24,8 @@ public: /// \name SpellChecker inherited methods //@{ - enum Result check(WordLangTuple const &) override; + enum Result check(WordLangTuple const &, + std::vector const &) override; void suggest(WordLangTuple const &, docstring_list &) override; void stem(WordLangTuple const &, docstring_list &) override {} void insert(WordLangTuple const &) override; diff --git a/src/AspellChecker.cpp b/src/AspellChecker.cpp index 8e41765e3d..d7392d2a5c 100644 --- a/src/AspellChecker.cpp +++ b/src/AspellChecker.cpp @@ -428,7 +428,8 @@ AspellChecker::~AspellChecker() } -SpellChecker::Result AspellChecker::check(WordLangTuple const & word) +SpellChecker::Result AspellChecker::check(WordLangTuple const & word, + vector const & docdict) { AspellSpeller * m = d->speller(word.lang()); @@ -439,6 +440,13 @@ SpellChecker::Result AspellChecker::check(WordLangTuple const & word) // MSVC compiled Aspell doesn't like it. return WORD_OK; + vector::const_iterator it = docdict.begin(); + for (; it != docdict.end(); ++it) { + if (it->lang()->code() != word.lang()->code()) + continue; + if (it->word() == word.word()) + return LEARNED_WORD; + } SpellChecker::Result rc = d->check(m, word); return (rc == WORD_OK && d->learned(word)) ? LEARNED_WORD : rc; } diff --git a/src/AspellChecker.h b/src/AspellChecker.h index d3d744ff95..18aafed052 100644 --- a/src/AspellChecker.h +++ b/src/AspellChecker.h @@ -25,7 +25,8 @@ public: /// \name SpellChecker inherited methods //@{ - enum Result check(WordLangTuple const &) override; + enum Result check(WordLangTuple const &, + std::vector const &) override; void suggest(WordLangTuple const &, docstring_list &) override; void stem(WordLangTuple const &, docstring_list &) override {} void insert(WordLangTuple const &) override; diff --git a/src/Buffer.cpp b/src/Buffer.cpp index d87578dfc3..fdce444aef 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -961,6 +961,7 @@ int Buffer::readHeader(Lexer & lex) params().biblatex_citestyle.erase(); params().multibib.erase(); params().lineno_opts.clear(); + params().spellignore().clear(); for (int i = 0; i < 4; ++i) { params().user_defined_bullet(i) = ITEMIZE_DEFAULTS[i]; diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 7004a9211f..4927741e50 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -341,6 +341,7 @@ public: AuthorList authorlist; BranchList branchlist; + IgnoreList spellignore; Bullet temp_bullets[4]; Bullet user_defined_bullets[4]; IndicesList indiceslist; @@ -600,6 +601,21 @@ IndicesList const & BufferParams::indiceslist() const } +typedef std::vector IgnoreList; + + +IgnoreList & BufferParams::spellignore() +{ + return pimpl_->spellignore; +} + + +IgnoreList const & BufferParams::spellignore() const +{ + return pimpl_->spellignore; +} + + Bullet & BufferParams::temp_bullet(lyx::size_type const index) { LASSERT(index < 4, return pimpl_->temp_bullets[0]); @@ -1032,6 +1048,14 @@ string BufferParams::readToken(Lexer & lex, string const & token, lcolor.setColor(to_utf8(shortcut)+ "@" + filename.absFileName(), color); } } + } else if (token == "\\spellchecker_ignore") { + lex.eatLine(); + docstring wl = lex.getDocString(); + docstring langcode; + docstring word = split(wl, langcode, ' '); + Language const * lang = languages.getFromCode(to_ascii(langcode)); + if (lang) + spellignore().push_back(WordLangTuple(word, lang)); } else if (token == "\\author") { lex.eatLine(); istringstream ss(lex.getString()); @@ -1408,6 +1432,12 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const << "\n"; } + for (auto const & si : spellignore()) { + os << "\\spellchecker_ignore " << si.lang()->code() + << " " << to_utf8(si.word()) + << "\n"; + } + if (!paperwidth.empty()) os << "\\paperwidth " << VSpace(paperwidth).asLyXCommand() << '\n'; diff --git a/src/BufferParams.h b/src/BufferParams.h index ff5604eb52..10233e69f8 100644 --- a/src/BufferParams.h +++ b/src/BufferParams.h @@ -21,6 +21,7 @@ #include "DocumentClassPtr.h" #include "LayoutModuleList.h" #include "paper.h" +#include "WordLangTuple.h" #include "support/copied_ptr.h" #include "support/types.h" @@ -335,6 +336,11 @@ public: /// IndicesList: IndicesList & indiceslist(); IndicesList const & indiceslist() const; + /// + typedef std::vector IgnoreList; + /// + IgnoreList & spellignore(); + IgnoreList const & spellignore() const; /** * The LyX name of the input encoding for LaTeX. This can be one of * - \c auto: find out the input encoding from the used languages diff --git a/src/EnchantChecker.cpp b/src/EnchantChecker.cpp index 66931fa07b..1dcae5538c 100644 --- a/src/EnchantChecker.cpp +++ b/src/EnchantChecker.cpp @@ -118,7 +118,8 @@ EnchantChecker::~EnchantChecker() } -SpellChecker::Result EnchantChecker::check(WordLangTuple const & word) +SpellChecker::Result EnchantChecker::check(WordLangTuple const & word, + std::vector docdict) { enchant::Dict * m = d->speller(word.lang()->code()); @@ -133,6 +134,14 @@ SpellChecker::Result EnchantChecker::check(WordLangTuple const & word) if (m->check(utf8word)) return WORD_OK; + vector::const_iterator it = docdict.begin(); + for (; it != docdict.end(); ++it) { + if (it->lang()->code() != word.lang()->code()) + continue; + if (it->word() == word.word()) + return LEARNED_WORD; + } + return UNKNOWN_WORD; } diff --git a/src/EnchantChecker.h b/src/EnchantChecker.h index 22ec9bc3dd..a79714eb30 100644 --- a/src/EnchantChecker.h +++ b/src/EnchantChecker.h @@ -15,8 +15,9 @@ #include "SpellChecker.h" + namespace enchant { - class Dict; + class Dict; } namespace lyx { @@ -31,7 +32,8 @@ public: /// SpellChecker inherited methods. ///@{ - enum Result check(WordLangTuple const &) override; + enum Result check(WordLangTuple const &, + std::vector const &) override; void suggest(WordLangTuple const &, docstring_list &) override; void stem(WordLangTuple const &, docstring_list &) override {} void insert(WordLangTuple const &) override; diff --git a/src/FuncCode.h b/src/FuncCode.h index 9976a1dfc7..4fceed8017 100644 --- a/src/FuncCode.h +++ b/src/FuncCode.h @@ -497,6 +497,8 @@ enum FuncCode LFUN_LYXFILES_OPEN, // jspitzm 20210210 LFUN_SEARCH_STRING_SET, // stwitt/jspitzm 20210212 LFUN_FONT_NO_SPELLCHECK, // jspitzm 20210305 + LFUN_SPELLING_ADD_LOCAL, // jspitzm 20210306 + // 390 LFUN_LASTACTION // end of the table }; diff --git a/src/HunspellChecker.cpp b/src/HunspellChecker.cpp index 918d4f8f38..06349c65d0 100644 --- a/src/HunspellChecker.cpp +++ b/src/HunspellChecker.cpp @@ -70,7 +70,8 @@ struct HunspellChecker::Private Hunspell * speller(Language const * lang); Hunspell * lookup(Language const * lang); /// ignored words - bool isIgnored(WordLangTuple const & wl) const; + bool isIgnored(WordLangTuple const & wl, + std::vector const & docdict) const; /// personal word list interface void remove(WordLangTuple const & wl); void insert(WordLangTuple const & wl); @@ -281,7 +282,8 @@ int HunspellChecker::Private::numDictionaries() const } -bool HunspellChecker::Private::isIgnored(WordLangTuple const & wl) const +bool HunspellChecker::Private::isIgnored(WordLangTuple const & wl, + vector const & docdict) const { IgnoreList::const_iterator it = ignored_.begin(); for (; it != ignored_.end(); ++it) { @@ -290,6 +292,13 @@ bool HunspellChecker::Private::isIgnored(WordLangTuple const & wl) const if (it->word() == wl.word()) return true; } + it = docdict.begin(); + for (; it != docdict.end(); ++it) { + if (it->lang()->code() != wl.lang()->code()) + continue; + if (it->word() == wl.word()) + return true; + } return false; } @@ -344,9 +353,10 @@ HunspellChecker::~HunspellChecker() } -SpellChecker::Result HunspellChecker::check(WordLangTuple const & wl) +SpellChecker::Result HunspellChecker::check(WordLangTuple const & wl, + vector const & docdict) { - if (d->isIgnored(wl)) + if (d->isIgnored(wl, docdict)) return WORD_OK; Hunspell * h = d->speller(wl.lang()); diff --git a/src/HunspellChecker.h b/src/HunspellChecker.h index a7225d9ebf..e3299def3d 100644 --- a/src/HunspellChecker.h +++ b/src/HunspellChecker.h @@ -25,7 +25,8 @@ public: /// \name SpellChecker inherited methods. ///@{ - enum Result check(WordLangTuple const &) override; + enum Result check(WordLangTuple const &, + std::vector const &) override; void suggest(WordLangTuple const &, docstring_list &) override; void stem(WordLangTuple const &, docstring_list &) override; void insert(WordLangTuple const &) override; diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index efabfff21b..5badfc9cbd 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -3793,6 +3793,19 @@ void LyXAction::init() */ { LFUN_SPELLING_ADD, "spelling-add", ReadOnly, Edit }, +/*! + * \var lyx::FuncCode lyx::LFUN_SPELLING_ADD_LOCAL + * \li Action: Add the word under the cursor to the document's local + * spell checker dictionary. + * The default for the language is retrieved from the cursor position. + * \li Syntax: spelling-add-local [] [] + * \li Params: : word to add + : language name (see file languages) + * \li Origin: spitz, 6 Mar 2021 + * \endvar + */ + { LFUN_SPELLING_ADD_LOCAL, "spelling-add-local", Noop, Edit }, + /*! * \var lyx::FuncCode lyx::LFUN_SPELLING_CONTINUOUSLY * \li Action: Toggle continuous spell checking. diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index cd61bb5d24..008ed0e461 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -4860,7 +4860,9 @@ SpellChecker::Result Paragraph::spellCheck(pos_type & from, pos_type & to, docstring word = asString(from, to, AS_STR_INSETS | AS_STR_SKIPDELETE); Language * lang = d->getSpellLanguage(from); - if (getFontSettings(d->inset_owner_->buffer().params(), from).fontInfo().nospellcheck() == FONT_ON) + BufferParams const & bparams = d->inset_owner_->buffer().params(); + + if (getFontSettings(bparams, from).fontInfo().nospellcheck() == FONT_ON) return result; wl = WordLangTuple(word, lang); @@ -4872,10 +4874,10 @@ SpellChecker::Result Paragraph::spellCheck(pos_type & from, pos_type & to, pos_type end = to; if (!d->ignoreWord(word)) { bool const trailing_dot = to < size() && d->text_[to] == '.'; - result = speller->check(wl); + result = speller->check(wl, bparams.spellignore()); if (SpellChecker::misspelled(result) && trailing_dot) { wl = WordLangTuple(word.append(from_ascii(".")), lang); - result = speller->check(wl); + result = speller->check(wl, bparams.spellignore()); if (!SpellChecker::misspelled(result)) { LYXERR(Debug::GUI, "misspelled word is correct with dot: \"" << word << "\" [" << @@ -4987,8 +4989,9 @@ void Paragraph::spellCheck() const // start the spell checker on the unit of meaning docstring word = asString(first, last, AS_STR_INSETS + AS_STR_SKIPDELETE); WordLangTuple wl = WordLangTuple(word, lang); + BufferParams const & bparams = d->inset_owner_->buffer().params(); SpellChecker::Result result = !word.empty() ? - speller->check(wl) : SpellChecker::WORD_OK; + speller->check(wl, bparams.spellignore()) : SpellChecker::WORD_OK; d->markMisspelledWords(first, last, result, word, skips); first = ++last; } diff --git a/src/SpellChecker.h b/src/SpellChecker.h index dd13a76da7..7a5dbacbc5 100644 --- a/src/SpellChecker.h +++ b/src/SpellChecker.h @@ -14,6 +14,7 @@ #define SPELL_BASE_H #include "support/strfwd.h" +#include namespace lyx { @@ -59,7 +60,8 @@ public: && res != LEARNED_WORD; } /// check the given word of the given lang code and return the result - virtual enum Result check(WordLangTuple const &) = 0; + virtual enum Result check(WordLangTuple const &, + std::vector const &) = 0; /// Gives suggestions. virtual void suggest(WordLangTuple const &, docstring_list & suggestions) = 0; diff --git a/src/Text3.cpp b/src/Text3.cpp index b34dbff2df..5c623fec9e 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -67,6 +67,7 @@ #include "support/convert.h" #include "support/debug.h" +#include "support/docstring_list.h" #include "support/filetools.h" #include "support/gettext.h" #include "support/lassert.h" @@ -2730,6 +2731,47 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) break; } + case LFUN_SPELLING_ADD_LOCAL: { + Language const * language = getLanguage(cur, cmd.getArg(1)); + docstring word = from_utf8(cmd.getArg(0)); + if (word.empty()) { + word = cur.selectionAsString(false); + if (word.size() > 100) + break; + if (word.empty()) { + // Get word or selection + selectWordWhenUnderCursor(cur, WHOLE_WORD); + word = cur.selectionAsString(false); + } + } + WordLangTuple wl(word, language); + bool has_item = false; + vector il = bv->buffer().params().spellignore(); + vector::const_iterator it = il.begin(); + for (; it != il.end(); ++it) { + if (it->lang()->code() != wl.lang()->code()) + continue; + if (it->word() == wl.word()) { + has_item = true; + break; + } + } + if (!has_item) { + cur.recordUndoBufferParams(); + bv->buffer().params().spellignore().push_back(wl); + cur.recordUndo(); + // trigger re-check + WordLangTuple wl; + docstring_list suggestions; + Paragraph const & par = cur.paragraph(); + pos_type from = cur.pos(); + pos_type to = from; + par.spellCheck(from, to, wl, suggestions, true, true); + } + break; + } + + case LFUN_SPELLING_IGNORE: { Language const * language = getLanguage(cur, cmd.getArg(1)); docstring word = from_utf8(cmd.getArg(0)); @@ -3459,6 +3501,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, break; case LFUN_SPELLING_ADD: + case LFUN_SPELLING_ADD_LOCAL: case LFUN_SPELLING_IGNORE: case LFUN_SPELLING_REMOVE: enable = theSpellChecker() != nullptr; diff --git a/src/frontends/qt/GuiSpellchecker.cpp b/src/frontends/qt/GuiSpellchecker.cpp index 684e7c747b..7e4c3d757b 100644 --- a/src/frontends/qt/GuiSpellchecker.cpp +++ b/src/frontends/qt/GuiSpellchecker.cpp @@ -428,7 +428,7 @@ bool SpellcheckerWidget::initialiseParams(std::string const &) } -void SpellcheckerWidget::on_ignoreAllPB_clicked() +void SpellcheckerWidget::on_skipAllPB_clicked() { /// ignore all occurrences of word if (d->disabled()) @@ -442,6 +442,21 @@ void SpellcheckerWidget::on_ignoreAllPB_clicked() } +void SpellcheckerWidget::on_ignoreAllPB_clicked() +{ + /// ignore all occurrences of word + if (d->disabled()) + return; + LYXERR(Debug::GUI, "Spellchecker: ignore all button"); + if (d->word_.lang() && !d->word_.word().empty()) + dispatch(FuncRequest(LFUN_SPELLING_ADD_LOCAL, + d->word_.word() + " " + from_ascii(d->word_.lang()->lang()))); + d->forward(); + d->check(); + d->canCheck(); +} + + void SpellcheckerWidget::on_addPB_clicked() { /// insert word in personal dictionary @@ -455,12 +470,25 @@ void SpellcheckerWidget::on_addPB_clicked() } +void SpellcheckerWidget::on_skipPB_clicked() +{ + /// ignore this occurrence of word + if (d->disabled()) + return; + LYXERR(Debug::GUI, "Spellchecker: skip button"); + d->forward(); + d->check(); + d->canCheck(); +} + + void SpellcheckerWidget::on_ignorePB_clicked() { /// ignore this occurrence of word if (d->disabled()) return; LYXERR(Debug::GUI, "Spellchecker: ignore button"); + dispatch(FuncRequest(LFUN_FONT_NO_SPELLCHECK)); d->forward(); d->check(); d->canCheck(); diff --git a/src/frontends/qt/GuiSpellchecker.h b/src/frontends/qt/GuiSpellchecker.h index 237446d7b2..dd60eed823 100644 --- a/src/frontends/qt/GuiSpellchecker.h +++ b/src/frontends/qt/GuiSpellchecker.h @@ -42,7 +42,9 @@ private Q_SLOTS: void on_replaceCO_highlighted(const QString & str); void on_languageCO_activated(int index); void on_ignoreAllPB_clicked(); + void on_skipAllPB_clicked(); void on_addPB_clicked(); + void on_skipPB_clicked(); void on_ignorePB_clicked(); void on_replacePB_clicked(); diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp index 8f5ae7c281..df5586ee26 100644 --- a/src/frontends/qt/Menus.cpp +++ b/src/frontends/qt/Menus.cpp @@ -862,10 +862,12 @@ void MenuDefinition::expandSpellingSuggestions(BufferView const * bv) docstring const arg = wl.word() + " " + from_ascii(wl.lang()->lang()); add(MenuItem(MenuItem::Command, qt_("Add to personal dictionary|n"), FuncRequest(LFUN_SPELLING_ADD, arg))); - add(MenuItem(MenuItem::Command, qt_("Ignore|g"), + add(MenuItem(MenuItem::Command, qt_("Ignore this occurrence|g"), FuncRequest(LFUN_FONT_NO_SPELLCHECK, arg))); - add(MenuItem(MenuItem::Command, qt_("Ignore all|I"), + add(MenuItem(MenuItem::Command, qt_("Ignore all for this session|I"), FuncRequest(LFUN_SPELLING_IGNORE, arg))); + add(MenuItem(MenuItem::Command, qt_("Ignore all in this document|d"), + FuncRequest(LFUN_SPELLING_ADD_LOCAL, arg))); } } break; diff --git a/src/frontends/qt/ui/SpellcheckerUi.ui b/src/frontends/qt/ui/SpellcheckerUi.ui index c22ae0ae5c..d51d3eeecf 100644 --- a/src/frontends/qt/ui/SpellcheckerUi.ui +++ b/src/frontends/qt/ui/SpellcheckerUi.ui @@ -6,8 +6,8 @@ 0 0 - 300 - 380 + 477 + 488 @@ -19,7 +19,78 @@ Spell Checker - + + + + + + + &Language: + + + languageCO + + + + + + + + 100 + 32 + + + + The checked language. Switching this alters the language of the checked word. + + + + + + + + + Qt::Horizontal + + + + + + + Unknown &word: + + + wordED + + + + + + + Current word + + + + + + + Skip this match and go to next misspelling + + + S&kip + + + + + + + Repla&cement: + + + replaceCO + + + @@ -49,60 +120,6 @@ - - - - - - &Language: - - - languageCO - - - - - - - - 100 - 32 - - - - The checked language. Switching this alters the language of the checked word. - - - - - - - - - Unknown &word: - - - wordED - - - - - - - Current word - - - - - - - Repla&cement: - - - replaceCO - - - @@ -122,24 +139,37 @@ - + Replace all occurrences of the word in the document with current choice Re&place All - - - - Qt::Horizontal + + + + + + + Ignore this occurrence of the word permanently + + + Ign&ore - - - + + + Ignore all occurrences of this word within this document. This is perdurant beyond the current session. + + + I&gnore All + + + + Add the word to your personal dictionary @@ -149,7 +179,7 @@ - + Qt::Vertical @@ -165,23 +195,13 @@ - - - - Ignore this word - - - Ign&ore - - - - + - Ignore this word throughout this session + Skips all occurrences of this word within the current session. - I&gnore All + Skip A&ll diff --git a/src/version.h b/src/version.h index c8c3c49baf..cc1f2a249d 100644 --- a/src/version.h +++ b/src/version.h @@ -32,8 +32,8 @@ extern char const * const lyx_version_info; // Do not remove the comment below, so we get merge conflict in // independent branches. Instead add your own. -#define LYX_FORMAT_LYX 606 // spitz: frontispiece KOMA layout -#define LYX_FORMAT_TEX2LYX 606 +#define LYX_FORMAT_LYX 607 // spitz: \\spellchecker_ignore buffer param +#define LYX_FORMAT_TEX2LYX 607 #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX #ifndef _MSC_VER