X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FPersonalWordList.cpp;h=ca61d8a17106f5577c9d66de2308eb52b4a7355e;hb=26ba2a65838731ce639a09539f617cb0f0be3b22;hp=5e32e204f99fe35ba8c58160acf9c515a63c7f90;hpb=ef1561665ca2ddb8930797b44330ee97c4f6064d;p=lyx.git diff --git a/src/PersonalWordList.cpp b/src/PersonalWordList.cpp index 5e32e204f9..ca61d8a171 100644 --- a/src/PersonalWordList.cpp +++ b/src/PersonalWordList.cpp @@ -17,15 +17,12 @@ #include "support/filetools.h" #include "support/Package.h" #include "support/FileName.h" -#include "support/lstrings.h" -#include "support/os.h" #include #include using namespace std; using namespace lyx::support; -using namespace lyx::support::os; namespace lyx { @@ -54,14 +51,14 @@ void PersonalWordList::load() LYXERR(Debug::FILES, "load personal dictionary from: " << fn); ifstream ifs(fn.toFilesystemEncoding().c_str()); - dirty(words_.size() > 0); + dirty(!words_.empty()); words_.clear(); string line; getline(ifs, line); if (line == header()) { while (ifs) { getline(ifs, line); - if (!line.empty()) { + if (!line.empty() && !(line[0] == '#')) { docstring const word = from_utf8(line); insert(word); } @@ -92,6 +89,7 @@ void PersonalWordList::save() LYXERR(Debug::FILES, "count of saved items: " << words_.size()); } + bool PersonalWordList::equalwords(docstring const & w1, docstring const & w2) const { return w1 == w2;