Abdelrazak Younes wrote:
What about for 1.5.0 a patch with the file format change and a small
logic to tell Lyx
to just skip the cline format, if it finds any
for 1.5.1 the gui and the latex generator
Advice from an ignorant,
This is very sensible IMHO. Is this possible Edwin?
sounds good to me.
unfortunately i don't know python nor the lyx2lyx structure, but for
someone who does (josé?) it should be very easy.
the logic is the following:
1. find next cell
2. if (cell.multicolumn!="1")
discard (if found): topline, bottomline, leftline, rightline
3. goto 1
i addition we would need the attached to avoid writing spurious line
settings at the cell level...
Index: src/insets/InsetTabular.cpp
===================================================================
--- src/insets/InsetTabular.cpp (revision 18539)
+++ src/insets/InsetTabular.cpp (working copy)
@@ -490,9 +490,9 @@
multicolumn(Tabular::CELL_NORMAL),
alignment(LYX_ALIGN_CENTER),
valignment(LYX_VALIGN_TOP),
- top_line(true),
+ top_line(false),
bottom_line(false),
- left_line(true),
+ left_line(false),
right_line(false),
usebox(BOX_NONE),
rotate(false),
@@ -549,7 +549,7 @@
Tabular::rowstruct::rowstruct()
: ascent_of_row(0),
descent_of_row(0),
- top_line(true),
+ top_line(false),
bottom_line(false),
top_space_default(false),
bottom_space_default(false),
@@ -565,7 +565,7 @@
Tabular::columnstruct::columnstruct()
: alignment(LYX_ALIGN_CENTER),
valignment(LYX_VALIGN_TOP),
- left_line(true),
+ left_line(false),
right_line(false),
width_of_column(0)
{
@@ -600,7 +600,9 @@
cell_info.reserve(100);
fixCellNums();
for (row_type i = 0; i < rows_; ++i)
- cell_info[i].back().right_line = true;
+ row_info[i].top_line = true;
+ for (col_type j = 0; j < columns_; ++j)
+ column_info[j].left_line = true;
row_info.back().bottom_line = true;
row_info.front().bottom_line = true;
column_info.back().right_line = true;
@@ -620,7 +622,6 @@
cell_info[i][j].inset->setDrawFrame(false);
cell_info[i][j].cellno = cellno++;
}
- cell_info[i].back().right_line = true;
}
set_row_column_number_info();
@@ -1650,11 +1651,18 @@
idx_type result = 0;
if (cell_info[row][column].multicolumn == CELL_BEGIN_OF_MULTICOLUMN) {
+ // FIXME: clear cell level line settings since they are ignored for normal cells
+ // this should go once we have proper cline support
+ cell_info[row][column].top_line = false;
+ cell_info[row][column].bottom_line = false;
+ cell_info[row][column].right_line = false;
+ cell_info[row][column].left_line = false;
cell_info[row][column].multicolumn = CELL_NORMAL;
++column;
while (column < columns_ &&
cell_info[row][column].multicolumn == CELL_PART_OF_MULTICOLUMN)
{
+
cell_info[row][column].multicolumn = CELL_NORMAL;
++column;
++result;