if (firstpar->params().lineBottom())
maxdesc += 2 * lyxfont::ascent('x',
getFont(bview->buffer(),
- par, par->size() - 1));
+ par,
+ max(Paragraph::size_type(0), par->size() - 1)));
// and now the pagebreaks
if (firstpar->params().pagebreakBottom())
// This function is only used by the spellchecker for NextWord().
// It doesn't handle LYX_ACCENTs and probably never will.
-string const LyXText::selectNextWord(BufferView * bview,
+string const LyXText::selectNextWordToSpellcheck(BufferView * bview,
float & value) const
{
if (the_locking_inset) {
- string str = the_locking_inset->selectNextWord(bview, value);
+ string str = the_locking_inset->selectNextWordToSpellcheck(bview, value);
if (!str.empty()) {
value += float(cursor.y())/float(height);
return str;
}
#warning Dekel please have a look on this one RTL? (Jug)
+#warning DEKEL!
// we have to go on checking so move cusor to the right
if (cursor.pos() == cursor.par()->size()) {
if (!cursor.par()->next())
!cursor.par()->getInset(cursor.pos())->isTextInset()))
|| (cursor.par()->size() == cursor.pos()
&& cursor.par()->next()))
- {
+ {
if (cursor.pos() == cursor.par()->size()) {
cursor.par(cursor.par()->next());
cursor.pos(0);
// now check if we hit an inset so it has to be a inset containing text!
if (cursor.pos() < cursor.par()->size() &&
- cursor.par()->isInset(cursor.pos()))
+ cursor.par()->isInset(cursor.pos()))
{
// lock the inset!
cursor.par()->getInset(cursor.pos())->edit(bview);
// now call us again to do the above trick
// but obviously we have to start from down below ;)
- return bview->text->selectNextWord(bview, value);
+ return bview->text->selectNextWordToSpellcheck(bview, value);
}
// Update the value if we changed paragraphs
y_bottom -= lyxfont::ascent('x',
getFont(bview->buffer(),
par,
- par->size() - 1));
+ max(Paragraph::size_type(0), par->size() - 1)));
int const w = (inset_owner ?
inset_owner->width(bview, font) : ww);
int const xp = static_cast<int>(inset_owner ? x : 0);
y_bottom -= lyxfont::ascent('x',
getFont(bview->buffer(),
par,
- par->size() - 1));
+ max(Paragraph::size_type(0), par->size() - 1)));
}
// draw an endlabel