mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Use a central typedef for vectors of WordLangTuple.
This commit is contained in:
parent
39caab265d
commit
4716b1f91a
@ -341,7 +341,7 @@ public:
|
|||||||
|
|
||||||
AuthorList authorlist;
|
AuthorList authorlist;
|
||||||
BranchList branchlist;
|
BranchList branchlist;
|
||||||
IgnoreList spellignore;
|
WordLangTable spellignore;
|
||||||
Bullet temp_bullets[4];
|
Bullet temp_bullets[4];
|
||||||
Bullet user_defined_bullets[4];
|
Bullet user_defined_bullets[4];
|
||||||
IndicesList indiceslist;
|
IndicesList indiceslist;
|
||||||
@ -602,16 +602,13 @@ IndicesList const & BufferParams::indiceslist() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
typedef std::vector<WordLangTuple> IgnoreList;
|
WordLangTable & BufferParams::spellignore()
|
||||||
|
|
||||||
|
|
||||||
IgnoreList & BufferParams::spellignore()
|
|
||||||
{
|
{
|
||||||
return pimpl_->spellignore;
|
return pimpl_->spellignore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IgnoreList const & BufferParams::spellignore() const
|
WordLangTable const & BufferParams::spellignore() const
|
||||||
{
|
{
|
||||||
return pimpl_->spellignore;
|
return pimpl_->spellignore;
|
||||||
}
|
}
|
||||||
|
@ -337,10 +337,8 @@ public:
|
|||||||
IndicesList & indiceslist();
|
IndicesList & indiceslist();
|
||||||
IndicesList const & indiceslist() const;
|
IndicesList const & indiceslist() const;
|
||||||
///
|
///
|
||||||
typedef std::vector<WordLangTuple> IgnoreList;
|
WordLangTable & spellignore();
|
||||||
///
|
WordLangTable const & spellignore() const;
|
||||||
IgnoreList & spellignore();
|
|
||||||
IgnoreList const & spellignore() const;
|
|
||||||
bool spellignored(WordLangTuple const & wl) const;
|
bool spellignored(WordLangTuple const & wl) const;
|
||||||
/**
|
/**
|
||||||
* The LyX name of the input encoding for LaTeX. This can be one of
|
* The LyX name of the input encoding for LaTeX. This can be one of
|
||||||
|
@ -41,8 +41,6 @@ namespace {
|
|||||||
typedef map<std::string, Hunspell *> Spellers;
|
typedef map<std::string, Hunspell *> Spellers;
|
||||||
typedef map<std::string, PersonalWordList *> LangPersonalWordList;
|
typedef map<std::string, PersonalWordList *> LangPersonalWordList;
|
||||||
|
|
||||||
typedef vector<WordLangTuple> IgnoreList;
|
|
||||||
|
|
||||||
docstring remap_result(docstring const & s)
|
docstring remap_result(docstring const & s)
|
||||||
{
|
{
|
||||||
// substitute RIGHT SINGLE QUOTATION MARK
|
// substitute RIGHT SINGLE QUOTATION MARK
|
||||||
@ -78,7 +76,7 @@ struct HunspellChecker::Private
|
|||||||
/// the spellers
|
/// the spellers
|
||||||
Spellers spellers_;
|
Spellers spellers_;
|
||||||
///
|
///
|
||||||
IgnoreList ignored_;
|
WordLangTable ignored_;
|
||||||
///
|
///
|
||||||
LangPersonalWordList personal_;
|
LangPersonalWordList personal_;
|
||||||
///
|
///
|
||||||
@ -283,7 +281,7 @@ int HunspellChecker::Private::numDictionaries() const
|
|||||||
|
|
||||||
bool HunspellChecker::Private::isIgnored(WordLangTuple const & wl) const
|
bool HunspellChecker::Private::isIgnored(WordLangTuple const & wl) const
|
||||||
{
|
{
|
||||||
IgnoreList::const_iterator it = ignored_.begin();
|
WordLangTable::const_iterator it = ignored_.begin();
|
||||||
for (; it != ignored_.end(); ++it) {
|
for (; it != ignored_.end(); ++it) {
|
||||||
if (it->lang()->code() != wl.lang()->code())
|
if (it->lang()->code() != wl.lang()->code())
|
||||||
continue;
|
continue;
|
||||||
@ -350,7 +348,7 @@ SpellChecker::Result HunspellChecker::check(WordLangTuple const & wl,
|
|||||||
if (d->isIgnored(wl))
|
if (d->isIgnored(wl))
|
||||||
return WORD_OK;
|
return WORD_OK;
|
||||||
|
|
||||||
IgnoreList::const_iterator it = docdict.begin();
|
WordLangTable::const_iterator it = docdict.begin();
|
||||||
for (; it != docdict.end(); ++it) {
|
for (; it != docdict.end(); ++it) {
|
||||||
if (it->lang()->code() != wl.lang()->code())
|
if (it->lang()->code() != wl.lang()->code())
|
||||||
continue;
|
continue;
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
#include "support/docstring.h"
|
#include "support/docstring.h"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
namespace lyx {
|
namespace lyx {
|
||||||
|
|
||||||
@ -51,6 +53,9 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
typedef std::vector<WordLangTuple> WordLangTable;
|
||||||
|
|
||||||
|
|
||||||
} // namespace lyx
|
} // namespace lyx
|
||||||
|
|
||||||
#endif // WORD_LANG_TUPLE_H
|
#endif // WORD_LANG_TUPLE_H
|
||||||
|
Loading…
Reference in New Issue
Block a user