mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 14:29:21 +00:00
parent
1a5996f048
commit
6482ddee30
@ -2126,30 +2126,27 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
cur.recordUndo();
|
cur.recordUndo();
|
||||||
FuncRequest cmd2(LFUN_FILE_INSERT, tabstyle.absFileName() + " ignorelang");
|
FuncRequest cmd2(LFUN_FILE_INSERT, tabstyle.absFileName() + " ignorelang");
|
||||||
lyx::dispatch(cmd2);
|
lyx::dispatch(cmd2);
|
||||||
|
// go into table
|
||||||
|
cur.backwardPos();
|
||||||
if (r > 2) {
|
if (r > 2) {
|
||||||
// go into table
|
|
||||||
cur.backwardPos();
|
|
||||||
// move one cell up to middle cell
|
// move one cell up to middle cell
|
||||||
cur.up();
|
cur.up();
|
||||||
// now add the missing rows and columns
|
// add the missing rows
|
||||||
int const addrows = r - 3;
|
int const addrows = r - 3;
|
||||||
int const addcols = c - 1;
|
|
||||||
for (int i = 0 ; i < addrows ; ++i) {
|
for (int i = 0 ; i < addrows ; ++i) {
|
||||||
FuncRequest fr(LFUN_TABULAR_FEATURE, "append-row");
|
FuncRequest fr(LFUN_TABULAR_FEATURE, "append-row");
|
||||||
lyx::dispatch(fr);
|
lyx::dispatch(fr);
|
||||||
}
|
}
|
||||||
for (int i = 0 ; i < addcols ; ++i) {
|
}
|
||||||
FuncRequest fr(LFUN_TABULAR_FEATURE, "append-column");
|
// add the missing columns
|
||||||
lyx::dispatch(fr);
|
int const addcols = c - 1;
|
||||||
}
|
for (int i = 0 ; i < addcols ; ++i) {
|
||||||
|
FuncRequest fr(LFUN_TABULAR_FEATURE, "append-column");
|
||||||
|
lyx::dispatch(fr);
|
||||||
|
}
|
||||||
|
if (r > 1)
|
||||||
// go to first cell
|
// go to first cell
|
||||||
cur.up();
|
cur.up();
|
||||||
} else {
|
|
||||||
// jump over table
|
|
||||||
cur.backwardChar();
|
|
||||||
// go to first cell
|
|
||||||
cur.forwardPos();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user