namespace lyx {
-ParagraphMetrics::ParagraphMetrics(Paragraph const & par)
- : position_(-1), par_(&par)
+ParagraphMetrics::ParagraphMetrics(Paragraph const & par) :
+ position_(-1), par_(&par)
{}
int ParagraphMetrics::rightMargin(BufferView const & bv) const
{
BufferParams const & params = bv.buffer().params();
- TextClass const & tclass = params.textClass();
+ DocumentClass const & tclass = params.documentClass();
frontend::FontMetrics const & fm = theFontMetrics(params.getFont());
int const r_margin =
bv.rightMargin()
+ fm.signedWidth(tclass.rightmargin())
- + fm.signedWidth(par_->layout()->rightmargin)
+ + fm.signedWidth(par_->layout().rightmargin)
* 4 / (par_->getDepth() + 4);
return r_margin;
}
// do not expand in some labels
- if (par_->layout()->margintype != MARGIN_MANUAL && pos < par_->beginOfBody())
+ if (par_->layout().margintype != MARGIN_MANUAL && pos < par_->beginOfBody())
return false;
// if there is anything between the first char of the row and