New FontList::setMisspelled() method.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29456 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2009-05-01 08:17:23 +00:00
parent 30c70c1670
commit 23fded1fc0
2 changed files with 23 additions and 0 deletions

View File

@ -181,6 +181,23 @@ void FontList::set(pos_type pos, Font const & font)
} }
void FontList::setMisspelled(pos_type startpos, pos_type endpos,
bool misspelled)
{
if (list_.empty())
return;
List::iterator end_it = fontIterator(endpos);
List::iterator const end = list_.end();
if (end_it != end)
++end_it;
List::iterator cit = fontIterator(startpos);
for (; cit != end_it; ++cit)
cit->font_.setMisspelled(misspelled);
}
FontSize FontList::highestInRange(pos_type startpos, pos_type endpos, FontSize FontList::highestInRange(pos_type startpos, pos_type endpos,
FontSize def_size) const FontSize def_size) const
{ {

View File

@ -105,6 +105,12 @@ public:
/// ///
void decreasePosAfterPos(pos_type pos); void decreasePosAfterPos(pos_type pos);
///
void setMisspelled(
pos_type startpos,
pos_type endpos,
bool misspelled);
/// Returns the height of the highest font in range /// Returns the height of the highest font in range
FontSize highestInRange( FontSize highestInRange(
pos_type startpos, pos_type startpos,