]> git.lyx.org Git - lyx.git/blobdiff - src/text.C
and this
[lyx.git] / src / text.C
index 399b3fd3f70ed4d80989735f8b8fccbf863fa827..6dcc706c3d6d9aa0dfa602261b9714c7ecd03951 100644 (file)
@@ -324,14 +324,14 @@ void readParToken(Buffer const & buf, Paragraph & par, LyXLex & lex,
                        par.cleanChanges();
                change = Change(Change::UNCHANGED);
        } else if (token == "\\change_inserted") {
-               lex.nextToken();
+               lex.eatLine();
                std::istringstream is(lex.getString());
                int aid;
                lyx::time_type ct;
                is >> aid >> ct;
                change = Change(Change::INSERTED, bp.author_map[aid], ct);
        } else if (token == "\\change_deleted") {
-               lex.nextToken();
+               lex.eatLine();
                std::istringstream is(lex.getString());
                int aid;
                lyx::time_type ct;
@@ -625,12 +625,11 @@ int LyXText::leftMargin(par_type const pit, pos_type const pos) const
 
 int LyXText::rightMargin(Paragraph const & par) const
 {
-       LyXTextClass const & tclass = bv()->buffer()->params().getLyXTextClass();
-
        // We do not want rightmargins on inner texts.
        if (bv()->text() != this)
                return 0;
 
+       LyXTextClass const & tclass = bv()->buffer()->params().getLyXTextClass();
        int const r_margin =
                ::rightMargin()
                + font_metrics::signedWidth(tclass.rightmargin(),
@@ -640,7 +639,6 @@ int LyXText::rightMargin(Paragraph const & par) const
                * 4 / (par.getDepth() + 4);
 
        return r_margin;
-
 }
 
 
@@ -2113,9 +2111,9 @@ int LyXText::dist(int x, int y) const
        else if (y > yo_ + descent())
                yy = y - yo_ - descent();
 
-       lyxerr << " xo_=" << xo_ << "  yo_=" << yo_ 
+       lyxerr << " xo_=" << xo_ << "  yo_=" << yo_
               << " width_=" << width_ << " ascent=" << ascent()
-              << " descent=" << descent() 
+              << " descent=" << descent()
               << " dist=" << xx+yy <<endl;
        return xx + yy;
 }