]> git.lyx.org Git - lyx.git/blobdiff - src/text.C
Fix #1736
[lyx.git] / src / text.C
index 5d9aa6f0578d9087a255eb7dd7959b52f1770024..fc41964fa042ec897b7990e1125bc025d088175c 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;
@@ -378,7 +378,6 @@ void readParagraph(Buffer const & buf, Paragraph & par, LyXLex & lex)
                               << "Missing \\end_layout.\n";
                        break;
                }
-               lyxerr << "Paragraph token unknown: `" << token << '\'' << endl;
        }
 }
 
@@ -610,9 +609,10 @@ int LyXText::leftMargin(par_type const pit, pos_type const pos) const
                   && !isFirstInSequence(pit, pars_)))
            && align == LYX_ALIGN_BLOCK
            && !par.params().noindent()
-           // in tabulars and ert paragraphs are never indented!
+           // in charstyles, tabulars and ert paragraphs are never indented!
            && (par.ownerCode() != InsetBase::TEXT_CODE
-                   && par.ownerCode() != InsetBase::ERT_CODE)
+                   && par.ownerCode() != InsetBase::ERT_CODE
+                   && par.ownerCode() != InsetBase::CHARSTYLE_CODE)
            && (par.layout() != tclass.defaultLayout()
                || bv()->buffer()->params().paragraph_separation ==
                   BufferParams::PARSEP_INDENT))
@@ -626,12 +626,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(),
@@ -641,7 +640,6 @@ int LyXText::rightMargin(Paragraph const & par) const
                * 4 / (par.getDepth() + 4);
 
        return r_margin;
-
 }
 
 
@@ -2114,9 +2112,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;
 }