]> git.lyx.org Git - features.git/commitdiff
Cosmetics and cleanup.
authorAbdelrazak Younes <younes@lyx.org>
Fri, 16 Nov 2007 23:00:57 +0000 (23:00 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 16 Nov 2007 23:00:57 +0000 (23:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21649 a592a061-630c-0410-9148-cb99ea01b6c8

src/TextMetrics.cpp

index b7cb0d67f09a50ffaeb6552dab8c913f7777499e..9b576e2a92c5e8310842b3fbd8b6abe5a04854eb 100644 (file)
@@ -1888,29 +1888,24 @@ void TextMetrics::draw(PainterInfo & pi, int x, int y) const
 
 void TextMetrics::drawParagraph(PainterInfo & pi, pit_type pit, int x, int y) const
 {
-//     lyxerr << "  paintPar: pit: " << pit << " at y: " << y << endl;
-       int const ww = bv_->workHeight();
-
        ParagraphMetrics const & pm = par_metrics_[pit];
        if (pm.rows().empty())
                return;
 
-       RowList::const_iterator const rb = pm.rows().begin();
-       RowList::const_iterator const re = pm.rows().end();
-
        Bidi bidi;
-
        bool const original_drawing_state = pi.pain.isDrawingEnabled();
+       int const ww = bv_->workHeight();
+       size_t const nrows = pm.rows().size();
 
-       size_t nrows = pm.rows().size();
        for (size_t i = 0; i != nrows; ++i) {
+
                Row const & row = pm.rows()[i];
                if (i)
                        y += row.ascent();
 
                bool const inside = (y + row.descent() >= 0
                        && y - row.ascent() < ww);
-               // it is not needed to draw on screen if we are not inside.
+               // It is not needed to draw on screen if we are not inside.
                pi.pain.setDrawingEnabled(inside && original_drawing_state);
                RowPainter rp(pi, *text_, pit, row, bidi, x, y);