mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
InsetTabular.cpp: partly reverting r28437, because I was wrong: it is totally valid to have several rows to be the header and also several rows can have a caption, my own EmebeddedObjects manual has examples for this - stupid me!
Bug 5752 is nevertheless still fixed. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28442 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8bbd9f254d
commit
b9df3d88c9
@ -3900,22 +3900,19 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
status.setOnOff(convert<int>(argument) == tabular.getUsebox(cur.idx()));
|
status.setOnOff(convert<int>(argument) == tabular.getUsebox(cur.idx()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// when a header/footer/caption is set, no other row can be the same
|
// every row can only be one thing:
|
||||||
// furthermore, every row can only be one thing:
|
// either a footer or header or caption
|
||||||
// either a footer or header or caption
|
|
||||||
case Tabular::SET_LTFIRSTHEAD:
|
case Tabular::SET_LTFIRSTHEAD:
|
||||||
status.setEnabled(sel_row_start == sel_row_end
|
status.setEnabled(sel_row_start == sel_row_end
|
||||||
&& !tabular.getRowOfLTHead(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTHead(sel_row_start, dummyltt)
|
||||||
&& !tabular.getRowOfLTFoot(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTFoot(sel_row_start, dummyltt)
|
||||||
&& !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)
|
||||||
&& !tabular.ltCaption(sel_row_start)
|
&& !tabular.ltCaption(sel_row_start));
|
||||||
&& (!tabular.haveLTFirstHead()
|
status.setOnOff(tabular.getRowOfLTFirstHead(sel_row_start, dummyltt));
|
||||||
|| tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)));
|
|
||||||
status.setOnOff(tabular.getRowOfLTHead(sel_row_start, dummyltt));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Tabular::UNSET_LTFIRSTHEAD:
|
case Tabular::UNSET_LTFIRSTHEAD:
|
||||||
status.setOnOff(!tabular.getRowOfLTHead(sel_row_start, dummyltt));
|
status.setOnOff(!tabular.getRowOfLTFirstHead(sel_row_start, dummyltt));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Tabular::SET_LTHEAD:
|
case Tabular::SET_LTHEAD:
|
||||||
@ -3923,9 +3920,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
&& !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)
|
||||||
&& !tabular.getRowOfLTFoot(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTFoot(sel_row_start, dummyltt)
|
||||||
&& !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)
|
||||||
&& !tabular.ltCaption(sel_row_start)
|
&& !tabular.ltCaption(sel_row_start));
|
||||||
&& (!tabular.haveLTHead()
|
|
||||||
|| tabular.getRowOfLTHead(sel_row_start, dummyltt)));
|
|
||||||
status.setOnOff(tabular.getRowOfLTHead(sel_row_start, dummyltt));
|
status.setOnOff(tabular.getRowOfLTHead(sel_row_start, dummyltt));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3938,9 +3933,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
&& !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)
|
||||||
&& !tabular.getRowOfLTHead(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTHead(sel_row_start, dummyltt)
|
||||||
&& !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)
|
||||||
&& !tabular.ltCaption(sel_row_start)
|
&& !tabular.ltCaption(sel_row_start));
|
||||||
&& (!tabular.haveLTFoot()
|
|
||||||
|| tabular.getRowOfLTFoot(sel_row_start, dummyltt)));
|
|
||||||
status.setOnOff(tabular.getRowOfLTFoot(sel_row_start, dummyltt));
|
status.setOnOff(tabular.getRowOfLTFoot(sel_row_start, dummyltt));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3953,14 +3946,12 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
&& !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)
|
||||||
&& !tabular.getRowOfLTHead(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTHead(sel_row_start, dummyltt)
|
||||||
&& !tabular.getRowOfLTFoot(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTFoot(sel_row_start, dummyltt)
|
||||||
&& !tabular.ltCaption(sel_row_start)
|
&& !tabular.ltCaption(sel_row_start));
|
||||||
&& (!tabular.haveLTLastFoot()
|
status.setOnOff(tabular.getRowOfLTLastFoot(sel_row_start, dummyltt));
|
||||||
|| tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)));
|
|
||||||
status.setOnOff(tabular.getRowOfLTFoot(sel_row_start, dummyltt));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Tabular::UNSET_LTLASTFOOT:
|
case Tabular::UNSET_LTLASTFOOT:
|
||||||
status.setOnOff(!tabular.getRowOfLTFoot(sel_row_start, dummyltt));
|
status.setOnOff(!tabular.getRowOfLTLastFoot(sel_row_start, dummyltt));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Tabular::SET_LTNEWPAGE:
|
case Tabular::SET_LTNEWPAGE:
|
||||||
@ -3972,11 +3963,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
&& !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)
|
||||||
&& !tabular.getRowOfLTHead(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTHead(sel_row_start, dummyltt)
|
||||||
&& !tabular.getRowOfLTFoot(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTFoot(sel_row_start, dummyltt)
|
||||||
&& !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)
|
&& !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt));
|
||||||
// Only the first row can be the caption.
|
|
||||||
&& sel_row_start == 0
|
|
||||||
&& (!tabular.haveLTCaption()
|
|
||||||
|| tabular.ltCaption(sel_row_start)));
|
|
||||||
status.setOnOff(tabular.ltCaption(sel_row_start));
|
status.setOnOff(tabular.ltCaption(sel_row_start));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user