]> git.lyx.org Git - lyx.git/blobdiff - src/text.C
Painter and scrollbar API patches
[lyx.git] / src / text.C
index 3a655e5b049c99d74899f9f5859e0fec0b6bfb13..6ee09775462a58457e15366198ffa605fd1ef4c3 100644 (file)
@@ -317,8 +317,7 @@ void LyXText::computeBidiTables(Buffer const * buf, Row * row) const
        bool rtl0 = false;
        pos_type const main_body = beginningOfMainBody(buf, row->par());
 
-       for (pos_type lpos = bidi_start;
-            lpos <= bidi_end; ++lpos) {
+       for (pos_type lpos = bidi_start; lpos <= bidi_end; ++lpos) {
                bool is_space = row->par()->isLineSeparator(lpos);
                pos_type const pos =
                        (is_space && lpos + 1 <= bidi_end &&
@@ -434,6 +433,7 @@ bool LyXText::isBoundary(Buffer const * buf, Paragraph * par,
        return rtl != rtl2;
 }
 
+
 void LyXText::drawNewline(DrawRowParams & p, pos_type const pos)
 {
        // Draw end-of-line marker
@@ -697,10 +697,6 @@ bool LyXText::draw(DrawRowParams & p, pos_type & vpos)
 }
 
 
-// Returns the left beginning of the text.
-// This information cannot be taken from the layouts-objekt, because in
-// LaTeX the beginning of the text fits in some cases (for example sections)
-// exactly the label-width.
 int LyXText::leftMargin(BufferView * bview, Row const * row) const
 {
        Inset * ins;
@@ -998,8 +994,7 @@ LyXText::nextBreakPoint(BufferView * bview, Row const * row, int width) const
                }
        } else {
                // Last position is an invariant
-               pos_type const last =
-                       par->size();
+               pos_type const last = par->size();
                // this is the usual handling
                int x = leftMargin(bview, row);
                bool doitonetime = true;
@@ -3039,7 +3034,7 @@ bool LyXText::paintRowBackground(DrawRowParams & p)
 
        pos_type const last = rowLastPrintable(p.row);
 
-       if (!p.bv->screen()->forceClear() && last == p.row->pos()
+       if (!p.bv->screen().forceClear() && last == p.row->pos()
                && p.row->par()->isInset(p.row->pos())) {
                inset = p.row->par()->getInset(p.row->pos());
                if (inset) {