X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FFontList.cpp;h=923986f11af7c3899b0fde29966dcdfc751f7517;hb=b6846bdace3bb9e8619faeea2a0921d7664c3a61;hp=afa7894ce9639067ad02a4dd3a51f4d570f42040;hpb=f1cba8ff64b369792fd49f5ddf90e8126ab476ac;p=lyx.git diff --git a/src/FontList.cpp b/src/FontList.cpp index afa7894ce9..923986f11a 100644 --- a/src/FontList.cpp +++ b/src/FontList.cpp @@ -181,6 +181,21 @@ void FontList::set(pos_type pos, Font const & font) } +void FontList::setMisspelled(pos_type startpos, pos_type endpos, + bool misspelled) +{ + List::iterator start = fontIterator(startpos); + if (misspelled && start->font().isMisspelled()) + return; + if (!misspelled && !start->font().isMisspelled()) + return; + + Font f = start->font(); + f.setMisspelled(misspelled); + setRange(startpos, endpos, f); +} + + FontSize FontList::highestInRange(pos_type startpos, pos_type endpos, FontSize def_size) const {