"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Misc/HTMLSpellCheckML.cpp" between
Sigil-1.4.1.tar.gz and Sigil-1.4.2.tar.gz

About: Sigil is a multi-platform EPUB ebook editor that supports both WYSIWYG and code-based editing of EPUB files, as well as the import of HTML and plain text files.

HTMLSpellCheckML.cpp  (Sigil-1.4.1):HTMLSpellCheckML.cpp  (Sigil-1.4.2)
skipping to change at line 157 skipping to change at line 157
} }
QString HTMLSpellCheckML::langOf(const QString& word) QString HTMLSpellCheckML::langOf(const QString& word)
{ {
int p = word.indexOf(":",0); int p = word.indexOf(":",0);
if (p != -1) return word.mid(0,p); if (p != -1) return word.mid(0,p);
SettingsStore ss; SettingsStore ss;
return ss.defaultMetadataLang().replace("_","-"); return ss.defaultMetadataLang().replace("_","-");
} }
int HTMLSpellCheckML::WordPosition(QString text, QString word, int start_pos) int HTMLSpellCheckML::WordPosition(QString text, QString word, int start_pos, co nst QString &default_lang)
{ {
SettingsStore ss; SettingsStore ss;
QList<HTMLSpellCheckML::AWord> words = GetWordList(text, ss.defaultMetadataL ang().replace("_","-")); QList<HTMLSpellCheckML::AWord> words = GetWordList(text, default_lang);
foreach (HTMLSpellCheckML::AWord w, words) { foreach (HTMLSpellCheckML::AWord w, words) {
if (w.offset < start_pos) { if (w.offset < start_pos) {
continue; continue;
} }
if ((textOf(w.text) == textOf(word)) && (langOf(w.text) == langOf(word)) ) { if ((textOf(w.text) == textOf(word)) && (langOf(w.text) == langOf(word)) ) {
return w.offset; return w.offset;
} }
} }
return -1; return -1;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)