mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 16:50:39 +00:00
InsetTabular.cpp: backport #7000 to branch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@36572 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
508be8e88d
commit
ca9f73e94e
@ -1526,21 +1526,22 @@ Tabular::idx_type Tabular::columnSpan(idx_type cell) const
|
||||
|
||||
Tabular::idx_type Tabular::unsetMultiColumn(idx_type cell)
|
||||
{
|
||||
row_type const row = cellRow(cell);
|
||||
col_type column = cellColumn(cell);
|
||||
|
||||
idx_type result = 0;
|
||||
|
||||
if (cell_info[row][column].multicolumn == CELL_BEGIN_OF_MULTICOLUMN) {
|
||||
cell_info[row][column].multicolumn = CELL_NORMAL;
|
||||
++column;
|
||||
while (column < column_info.size() &&
|
||||
cell_info[row][column].multicolumn == CELL_PART_OF_MULTICOLUMN)
|
||||
{
|
||||
cell_info[row][column].multicolumn = CELL_NORMAL;
|
||||
++column;
|
||||
++result;
|
||||
}
|
||||
row_type const row = cellRow(cell);
|
||||
col_type const col = cellColumn(cell);
|
||||
row_type const span = columnSpan(cell);
|
||||
for (col_type c = 0; c < span; ++c) {
|
||||
// in the table dialog the lines are set in every case
|
||||
// when unsetting a multicolumn this leads to an additional right
|
||||
// line for every cell that was part of the former multicolumn cell,
|
||||
// except if the cell is in the last column
|
||||
// therefore remove this line
|
||||
if (cell_info[row][col + c].multicolumn == CELL_BEGIN_OF_MULTICOLUMN
|
||||
&& (col + c) < (col + span - 1))
|
||||
cell_info[row][col + c].right_line = false;
|
||||
cell_info[row][col + c].multicolumn = CELL_NORMAL;
|
||||
++result;
|
||||
}
|
||||
updateIndexes();
|
||||
return result;
|
||||
|
@ -66,6 +66,9 @@ What's new
|
||||
- Make the modules description in Document > Settings fully translatable
|
||||
(bug 6987).
|
||||
|
||||
- Fix table line bug when unsetting a multicolumn cell via the table dialog
|
||||
(bug 7000).
|
||||
|
||||
- Fix the display of table cell alignment in the context menu (bug 7053).
|
||||
|
||||
- Correct the Denomination of norsk and nynorsk languages.
|
||||
@ -73,7 +76,7 @@ What's new
|
||||
|
||||
* DOCUMENTATION AND LOCALIZATION
|
||||
|
||||
- Make the modernCV.lyx example file compilable with recent version of
|
||||
- Make the modernCV.lyx example file compilable with recent versions of
|
||||
the LaTeX-package modernCV
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user