]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.cpp
lil' cleanup
[lyx.git] / src / insets / InsetTabular.cpp
index 1ffd6094a697e2cc24c7936f5734ec3ddc030c1f..9321f8250a19118b18a1bb021131883a7e8772a7 100644 (file)
@@ -893,19 +893,19 @@ int Tabular::columnWidth(idx_type cell) const
 
 int Tabular::rowHeight(idx_type cell) const
 {
-       row_type const span = rowSpan(cell);
-       row_type const row = cellRow(cell);
-       int h = rowAscent(row) + rowDescent(row);
+       row_type const span = rowSpan(cell);
+       row_type const row = cellRow(cell);
+       int h = rowAscent(row) + rowDescent(row);
 
-       for(row_type r = row; r < row + span ; ++r) {
-               if (r > row) {
-                       h += rowAscent(r);
-                       h += interRowSpace(r);
-               }
-               if (r < row + span - 1)
-                       h += rowDescent(r);
-       }
-       return h;
+       for(row_type r = row; r < row + span ; ++r) {
+               if (r > row) {
+                       h += rowAscent(r);
+                       h += interRowSpace(r);
+               }
+               if (r < row + span - 1)
+                       h += rowDescent(r);
+       }
+       return h;
 }
 
 
@@ -3180,7 +3180,7 @@ int InsetTabular::rowFromY(Cursor & cur, int y) const
        // top y coordinate of tabular
        int h = yo(cur.bv()) - tabular.rowAscent(0);
        row_type r = 0;
-       for (; r < nrows() && y > h; ++r)
+       for (; r < tabular.nrows() && y > h; ++r)
                h += tabular.rowAscent(r) + tabular.rowDescent(r)
                + tabular.interRowSpace(r);