}
+MathInset * MathGridInset::clone() const
+{
+ return new MathGridInset(*this);
+}
+
+
MathInset::idx_type MathGridInset::index(row_type row, col_type col) const
{
return col + ncols() * row;
}
-bool MathGridInset::idxUp(idx_type & idx, pos_type & pos) const
+bool MathGridInset::idxUp(idx_type & idx) const
{
if (idx < ncols())
return false;
}
-bool MathGridInset::idxDown(idx_type & idx, pos_type & pos) const
+bool MathGridInset::idxDown(idx_type & idx) const
{
if (idx >= ncols() * (nrows() - 1))
return false;
idx = (nrows() - 1) * ncols();
break;
default:
- idx = (nrows() / 2) * ncols();
+ idx = ((nrows() - 1) / 2) * ncols();
}
pos = 0;
return true;
idx = nargs() - 1;
break;
default:
- idx = (nrows() / 2 + 1) * ncols() - 1;
+ idx = ((nrows() - 1) / 2 + 1) * ncols() - 1;
}
pos = cell(idx).size();
return true;