X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FParagraphMetrics.cpp;h=fc71943377ce0f76c7d9140e50ecec7bfaa22a12;hb=6c977615633e5e132494b9a7fa778588210f9c95;hp=09631228b919197dac0f8f5b66788cb08653dcc2;hpb=2e7d1199dfa7ec7b7d963c374a014f2a2227ae7c;p=lyx.git diff --git a/src/ParagraphMetrics.cpp b/src/ParagraphMetrics.cpp index 09631228b9..fc71943377 100644 --- a/src/ParagraphMetrics.cpp +++ b/src/ParagraphMetrics.cpp @@ -62,9 +62,9 @@ using namespace lyx::support; namespace lyx { -ParagraphMetrics::ParagraphMetrics(Paragraph const & par): position_(-1), par_(&par) -{ -} +ParagraphMetrics::ParagraphMetrics(Paragraph const & par) : + position_(-1), par_(&par) +{} ParagraphMetrics & ParagraphMetrics::operator=( @@ -198,12 +198,12 @@ void ParagraphMetrics::dump() const int ParagraphMetrics::rightMargin(BufferView const & bv) const { BufferParams const & params = bv.buffer().params(); - TextClass const & tclass = params.getTextClass(); + 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; @@ -260,7 +260,7 @@ bool ParagraphMetrics::hfillExpansion(Row const & row, pos_type pos) const } // 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