mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
remove old "logic"
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33620 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9b93ec0732
commit
f365532e35
@ -1302,17 +1302,6 @@ Tabular::col_type Tabular::cellColumn(idx_type cell) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Tabular::col_type Tabular::cellRightColumn(idx_type cell) const
|
|
||||||
{
|
|
||||||
row_type const row = cellRow(cell);
|
|
||||||
col_type column = cellColumn(cell);
|
|
||||||
while (column < column_info.size() - 1 &&
|
|
||||||
cell_info[row][column + 1].multicolumn == CELL_PART_OF_MULTICOLUMN)
|
|
||||||
++column;
|
|
||||||
return column;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Tabular::write(ostream & os) const
|
void Tabular::write(ostream & os) const
|
||||||
{
|
{
|
||||||
// header line
|
// header line
|
||||||
@ -1529,12 +1518,6 @@ bool Tabular::isMultiColumn(idx_type cell) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Tabular::isMultiColumnReal(idx_type cell) const
|
|
||||||
{
|
|
||||||
return cellColumn(cell) != cellRightColumn(cell) && isMultiColumn(cell);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Tabular::CellData & Tabular::cellInfo(idx_type cell) const
|
Tabular::CellData & Tabular::cellInfo(idx_type cell) const
|
||||||
{
|
{
|
||||||
return cell_info[cellRow(cell)][cellColumn(cell)];
|
return cell_info[cellRow(cell)][cellColumn(cell)];
|
||||||
@ -2957,12 +2940,12 @@ void Tabular::plaintext(odocstream & os,
|
|||||||
vector<unsigned int> clen(column_info.size());
|
vector<unsigned int> clen(column_info.size());
|
||||||
|
|
||||||
if (!onlydata) {
|
if (!onlydata) {
|
||||||
// first all non (real) multicolumn cells!
|
// first all non multicolumn cells!
|
||||||
for (col_type j = 0; j < column_info.size(); ++j) {
|
for (col_type j = 0; j < column_info.size(); ++j) {
|
||||||
clen[j] = 0;
|
clen[j] = 0;
|
||||||
for (row_type i = 0; i < row_info.size(); ++i) {
|
for (row_type i = 0; i < row_info.size(); ++i) {
|
||||||
idx_type cell = cellIndex(i, j);
|
idx_type cell = cellIndex(i, j);
|
||||||
if (isMultiColumnReal(cell))
|
if (isMultiColumn(cell))
|
||||||
continue;
|
continue;
|
||||||
odocstringstream sstr;
|
odocstringstream sstr;
|
||||||
cellInset(cell)->plaintext(sstr, runparams);
|
cellInset(cell)->plaintext(sstr, runparams);
|
||||||
@ -2970,11 +2953,11 @@ void Tabular::plaintext(odocstream & os,
|
|||||||
clen[j] = sstr.str().length();
|
clen[j] = sstr.str().length();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// then all (real) multicolumn cells!
|
// then all multicolumn cells!
|
||||||
for (col_type j = 0; j < column_info.size(); ++j) {
|
for (col_type j = 0; j < column_info.size(); ++j) {
|
||||||
for (row_type i = 0; i < row_info.size(); ++i) {
|
for (row_type i = 0; i < row_info.size(); ++i) {
|
||||||
idx_type cell = cellIndex(i, j);
|
idx_type cell = cellIndex(i, j);
|
||||||
if (!isMultiColumnReal(cell) || isPartOfMultiColumn(i, j))
|
if (cell_info[i][j].multicolumn != CELL_BEGIN_OF_MULTICOLUMN)
|
||||||
continue;
|
continue;
|
||||||
odocstringstream sstr;
|
odocstringstream sstr;
|
||||||
cellInset(cell)->plaintext(sstr, runparams);
|
cellInset(cell)->plaintext(sstr, runparams);
|
||||||
@ -5436,12 +5419,8 @@ void InsetTabular::getSelection(Cursor & cur,
|
|||||||
CursorSlice const & end = cur.selEnd();
|
CursorSlice const & end = cur.selEnd();
|
||||||
cs = tabular.cellColumn(beg.idx());
|
cs = tabular.cellColumn(beg.idx());
|
||||||
ce = tabular.cellColumn(end.idx());
|
ce = tabular.cellColumn(end.idx());
|
||||||
if (cs > ce) {
|
if (cs > ce)
|
||||||
ce = cs;
|
swap(cs, ce);
|
||||||
cs = tabular.cellColumn(end.idx());
|
|
||||||
} else {
|
|
||||||
ce = tabular.cellRightColumn(end.idx());
|
|
||||||
}
|
|
||||||
|
|
||||||
rs = tabular.cellRow(beg.idx());
|
rs = tabular.cellRow(beg.idx());
|
||||||
re = tabular.cellRow(end.idx());
|
re = tabular.cellRow(end.idx());
|
||||||
|
@ -375,8 +375,6 @@ public:
|
|||||||
///
|
///
|
||||||
bool isMultiColumn(idx_type cell) const;
|
bool isMultiColumn(idx_type cell) const;
|
||||||
///
|
///
|
||||||
bool isMultiColumnReal(idx_type cell) const;
|
|
||||||
///
|
|
||||||
void setMultiColumn(idx_type cell, idx_type number);
|
void setMultiColumn(idx_type cell, idx_type number);
|
||||||
///
|
///
|
||||||
void unsetMultiColumn(idx_type cell);
|
void unsetMultiColumn(idx_type cell);
|
||||||
@ -395,8 +393,6 @@ public:
|
|||||||
///
|
///
|
||||||
col_type cellColumn(idx_type cell) const;
|
col_type cellColumn(idx_type cell) const;
|
||||||
///
|
///
|
||||||
col_type cellRightColumn(idx_type cell) const;
|
|
||||||
///
|
|
||||||
void setRotateCell(idx_type cell, bool);
|
void setRotateCell(idx_type cell, bool);
|
||||||
///
|
///
|
||||||
bool getRotateCell(idx_type cell) const;
|
bool getRotateCell(idx_type cell) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user