Jürgen Spitzmüller wrote: > Thinking a bit more about it, I clearly lean towards the latter. > > This stuff can only be done properly with a file format change. Who knows > how people have been using the dialog, so we need to assure the output is > identical. > > I'll post a patch for branch in a few minutes.
Here's the patch. I propose to put this to branch _and_ trunk. I think the intended UI change needs more discussion. Also, a file format change is a prerequisite. Objections? Jürgen PS. I guess the caption thing is still correct?
Index: src/insets/InsetTabular.cpp =================================================================== --- src/insets/InsetTabular.cpp (Revision 29691) +++ src/insets/InsetTabular.cpp (Arbeitskopie) @@ -2091,7 +2091,7 @@ } // output first header info // first header must be output before the header, otherwise the - // correct caption placement becomes really wierd + // correct caption placement becomes really weird if (haveLTFirstHead()) { if (endfirsthead.topDL) { os << "\\hline\n"; @@ -3777,7 +3777,7 @@ return true; case Tabular::MULTICOLUMN: - // When a row is set as longtable caption, it must not be allowed + // If a row is set as longtable caption, it must not be allowed // to unset that this row is a multicolumn. status.setEnabled(sel_row_start == sel_row_end && !tabular.ltCaption(tabular.cellRow(cur.idx()))); @@ -3886,13 +3886,8 @@ status.setOnOff(convert<int>(argument) == tabular.getUsebox(cur.idx())); break; - // every row can only be one thing: - // either a footer or header or caption - case Tabular::SET_LTFIRSTHEAD: + case Tabular::SET_LTFIRSTHEAD: status.setEnabled(sel_row_start == sel_row_end - && !tabular.getRowOfLTHead(sel_row_start, dummyltt) - && !tabular.getRowOfLTFoot(sel_row_start, dummyltt) - && !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt) && !tabular.ltCaption(sel_row_start)); status.setOnOff(tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)); break; @@ -3903,9 +3898,6 @@ case Tabular::SET_LTHEAD: status.setEnabled(sel_row_start == sel_row_end - && !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt) - && !tabular.getRowOfLTFoot(sel_row_start, dummyltt) - && !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt) && !tabular.ltCaption(sel_row_start)); status.setOnOff(tabular.getRowOfLTHead(sel_row_start, dummyltt)); break; @@ -3916,9 +3908,6 @@ case Tabular::SET_LTFOOT: status.setEnabled(sel_row_start == sel_row_end - && !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt) - && !tabular.getRowOfLTHead(sel_row_start, dummyltt) - && !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt) && !tabular.ltCaption(sel_row_start)); status.setOnOff(tabular.getRowOfLTFoot(sel_row_start, dummyltt)); break; @@ -3929,9 +3918,6 @@ case Tabular::SET_LTLASTFOOT: status.setEnabled(sel_row_start == sel_row_end - && !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt) - && !tabular.getRowOfLTHead(sel_row_start, dummyltt) - && !tabular.getRowOfLTFoot(sel_row_start, dummyltt) && !tabular.ltCaption(sel_row_start)); status.setOnOff(tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)); break;