]> git.lyx.org Git - lyx.git/blobdiff - src/rowpainter.C
do not create invalid .lyx files when importing \i{}, \j{}, \l{} or \L{}.
[lyx.git] / src / rowpainter.C
index 1c2f53bb2313d93cebcbaf73c48c1af7bc1fa677..5b83338af96882b38422430198f471fa20605688 100644 (file)
@@ -48,7 +48,6 @@ using frontend::FontMetrics;
 
 using std::endl;
 using std::max;
-using std::min;
 using std::string;
 
 
@@ -644,9 +643,9 @@ void RowPainter::paintLast()
                int const length = fm.maxAscent() / 2;
                LColor::color col = par_.isInserted(par_.size()) ? LColor::newtext : LColor::strikeout;
                
-               pain_.line(x_ + 1, yo_ + 2, x_ + 1, yo_ + 2 - length, col,
+               pain_.line(int(x_) + 1, yo_ + 2, int(x_) + 1, yo_ + 2 - length, col,
                           Painter::line_solid, Painter::line_thick);
-               pain_.line(x_ + 1 - length, yo_ + 2, x_ + 1, yo_ + 2, col,
+               pain_.line(int(x_) + 1 - length, yo_ + 2, int(x_) + 1, yo_ + 2, col,
                           Painter::line_solid, Painter::line_thick);
        }
 
@@ -950,7 +949,7 @@ void paintPar
                        rp.paintChangeBar();
                        if (rit == rb)
                                rp.paintFirst();
-                       rp.paintText();
+                       rp.paintText();
                        if (rit + 1 == re)
                                rp.paintLast();
                }
@@ -1001,22 +1000,6 @@ void paintText(BufferView & bv,
                yy += par.descent();
        }
 
-       // Cache one paragraph above and one below
-       // Note MV: this cannot be suppressed even for singlepar.
-       // Try viewing the User Guide Mobius figure
-
-       if (vi.p1 > 0) {
-               text.redoParagraph(bv, vi.p1 - 1);
-               bv.coordCache().parPos()[&text][vi.p1 - 1] =
-                       Point(0, vi.y1 - text.getPar(vi.p1 - 1).descent());
-       }
-
-       if (vi.p2 < pit_type(text.paragraphs().size()) - 1) {
-               text.redoParagraph(bv, vi.p2 + 1);
-               bv.coordCache().parPos()[&text][vi.p2 + 1] =
-                       Point(0, vi.y2 + text.getPar(vi.p2 + 1).ascent());
-       }
-
        // and grey out above (should not happen later)
 //     lyxerr << "par ascent: " << text.getPar(vi.p1).ascent() << endl;
        if (vi.y1 > 0 && !vi.singlepar)