little things:
- rename method to what it is
- correct parameter
- bit of formatting
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33774
a592a061-630c-0410-9148-
cb99ea01b6c8
// Care about multirow cells
if (row + 1 < nrows() &&
cell_info[row][c].multirow == CELL_BEGIN_OF_MULTIROW &&
// Care about multirow cells
if (row + 1 < nrows() &&
cell_info[row][c].multirow == CELL_BEGIN_OF_MULTIROW &&
- cell_info[row][c + 1].multirow == CELL_PART_OF_MULTIROW) {
- cell_info[row][c + 1].multirow = CELL_BEGIN_OF_MULTIROW;
+ cell_info[row + 1][c].multirow == CELL_PART_OF_MULTIROW) {
+ cell_info[row + 1][c].multirow = CELL_BEGIN_OF_MULTIROW;
}
}
row_info.erase(row_info.begin() + row);
}
}
row_info.erase(row_info.begin() + row);
-int Tabular::rowHeight(idx_type cell) const
+int Tabular::cellHeight(idx_type cell) const
{
row_type const span = rowSpan(cell);
row_type const row = cellRow(cell);
{
row_type const span = rowSpan(cell);
row_type const row = cellRow(cell);
int Tabular::textVOffset(idx_type cell) const
{
int Tabular::textVOffset(idx_type cell) const
{
- int h = rowHeight(cell);
-
row_type const r = cellRow(cell);
row_type const r = cellRow(cell);
- if (rowSpan(cell) > 1)
- h -= rowDescent(r) + rowAscent(r);
-
- int y = 0;
+ int y = cellHeight(cell) - rowDescent(r) - rowAscent(r);
switch (getVAlignment(cell)) {
case LYX_VALIGN_TOP:
switch (getVAlignment(cell)) {
case LYX_VALIGN_TOP:
break;
case LYX_VALIGN_MIDDLE:
break;
case LYX_VALIGN_MIDDLE:
break;
case LYX_VALIGN_BOTTOM:
break;
case LYX_VALIGN_BOTTOM:
int const cx = nx + tabular.textHOffset(idx);
int const cy = y + tabular.textVOffset(idx);
// Cache the Inset position.
int const cx = nx + tabular.textHOffset(idx);
int const cy = y + tabular.textVOffset(idx);
// Cache the Inset position.
- bv->coordCache().insets().add(cell(idx).get(), cx, y);
+ bv->coordCache().insets().add(cell(idx).get(), cx, cy);
cell(idx)->draw(pi, cx, cy);
drawCellLines(pi.pain, nx, y, r, idx, pi.change_);
nx += tabular.columnWidth(idx);
cell(idx)->draw(pi, cx, cy);
drawCellLines(pi.pain, nx, y, r, idx, pi.change_);
nx += tabular.columnWidth(idx);
continue;
}
int const w = tabular.columnWidth(cell);
continue;
}
int const w = tabular.columnWidth(cell);
- int const h = tabular.rowHeight(cell);
+ int const h = tabular.cellHeight(cell);
int const yy = y - tabular.rowAscent(r);
if (isCellSelected(cur, r, c))
pi.pain.fillRectangle(xx, yy, w, h, Color_selection);
int const yy = y - tabular.rowAscent(r);
if (isCellSelected(cur, r, c))
pi.pain.fillRectangle(xx, yy, w, h, Color_selection);
{
y = y - tabular.rowAscent(row);
int const w = tabular.columnWidth(cell);
{
y = y - tabular.rowAscent(row);
int const w = tabular.columnWidth(cell);
- int const h = tabular.rowHeight(cell);
+ int const h = tabular.cellHeight(cell);
bool on_off = false;
Color col = Color_tabularline;
Color onoffcol = Color_tabularonoffline;
bool on_off = false;
Color col = Color_tabularline;
Color onoffcol = Color_tabularonoffline;
row_type const row = tabular.cellRow(cell);
int const ybeg = o.y_ - tabular.rowAscent(row)
- tabular.interRowSpace(row);
row_type const row = tabular.cellRow(cell);
int const ybeg = o.y_ - tabular.rowAscent(row)
- tabular.interRowSpace(row);
- int const yend = ybeg + tabular.rowHeight(cell);
+ int const yend = ybeg + tabular.cellHeight(cell);
if (x < xbeg)
xx = xbeg - x;
if (x < xbeg)
xx = xbeg - x;
///
int columnWidth(idx_type cell) const;
///
///
int columnWidth(idx_type cell) const;
///
- int rowHeight(idx_type cell) const;
+ int cellHeight(idx_type cell) const;
///
int width() const;
///
///
int width() const;
///