Paragraph::Paragraph()
- : y(0), pimpl_(new Paragraph::Pimpl(this))
+ : y(0), height(0), pimpl_(new Paragraph::Pimpl(this))
{
itemdepth = 0;
params().clear();
Paragraph::Paragraph(Paragraph const & lp)
- : y(0), text_(lp.text_), pimpl_(new Paragraph::Pimpl(*lp.pimpl_, this))
+ : y(0), height(0), text_(lp.text_), pimpl_(new Paragraph::Pimpl(*lp.pimpl_, this))
{
itemdepth = 0;
// this is because of the dummy layout of the paragraphs that
else
layoutfont = lout->font;
- LyXFont tmpfont = getFontSettings(bparams, pos);
- tmpfont.realize(layoutfont);
- tmpfont.realize(outerfont);
- tmpfont.realize(bparams.getLyXTextClass().defaultfont());
+ LyXFont font = getFontSettings(bparams, pos);
+ font.realize(layoutfont);
+ font.realize(outerfont);
+ font.realize(bparams.getLyXTextClass().defaultfont());
- return tmpfont;
+ return font;
}
// Unroll the first two cycles of the loop
// and remember the previous character to
- // remove unnecessary GetChar() calls
+ // remove unnecessary getChar() calls
pos_type i = 0;
if (i < size() && !isNewline(i)) {
++i;
return pimpl_->inset_owner->owner()->lyxCode() == InsetOld::ERT_CODE;
return false;
}
+
+
+RowList::iterator Paragraph::getRow(pos_type pos)
+{
+ RowList::iterator rit = rows.end();
+ RowList::iterator const begin = rows.begin();
+
+ for (--rit; rit != begin && rit->pos() > pos; --rit)
+ ;
+
+ return rit;
+}