]> git.lyx.org Git - features.git/commitdiff
Unify the parameters of the [append/copy][row/column] family
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 22 Jan 2012 22:15:11 +0000 (22:15 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 22 Jan 2012 22:15:11 +0000 (22:15 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40657 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetTabular.cpp

index 9c79d02e7e9b55510da6aad1ef4c20418c0fecef..fec2fa5c5f22d0d82d038abf2bf6a3ad1289128b 100644 (file)
@@ -700,10 +700,8 @@ void Tabular::init(Buffer * buf, row_type rows_arg,
 }
 
 
-void Tabular::appendRow(idx_type const cell)
+void Tabular::appendRow(row_type row)
 {
-       row_type const row = cellRow(cell);
-
        row_info.insert(row_info.begin() + row + 1, RowData());
        row_info[row + 1] = row_info[row];
 
@@ -793,10 +791,8 @@ void Tabular::copyRow(row_type const row)
 }
 
 
-void Tabular::appendColumn(idx_type const cell)
-{
-       col_type const c = cellColumn(cell);
-       
+void Tabular::appendColumn(col_type c)
+{      
        column_info.insert(column_info.begin() + c + 1, ColumnData());
        column_info[c + 1] = column_info[c];
 
@@ -5334,12 +5330,12 @@ void InsetTabular::tabularFeatures(Cursor & cur,
 
        case Tabular::APPEND_ROW:
                // append the row into the tabular
-               tabular.appendRow(cur.idx());
+               tabular.appendRow(row);
                break;
 
        case Tabular::APPEND_COLUMN:
                // append the column into the tabular
-               tabular.appendColumn(cur.idx());
+               tabular.appendColumn(column);
                cur.idx() = tabular.cellIndex(row, column);
                break;