mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
InsetTabular.cpp: fix http://bugzilla.lyx.org/show_bug.cgi?id=5772
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28461 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
248e769c76
commit
21cab38549
@ -2089,29 +2089,18 @@ int Tabular::TeXLongtableHeaderFooter(odocstream & os,
|
||||
return 0;
|
||||
|
||||
int ret = 0;
|
||||
// output header info
|
||||
if (haveLTHead()) {
|
||||
if (endhead.topDL) {
|
||||
os << "\\hline\n";
|
||||
++ret;
|
||||
}
|
||||
// caption handling
|
||||
// the caption must be output befrore the headers
|
||||
if (haveLTCaption()) {
|
||||
for (row_type i = 0; i < row_info.size(); ++i) {
|
||||
if (row_info[i].endhead) {
|
||||
if (row_info[i].caption) {
|
||||
ret += TeXRow(os, i, runparams);
|
||||
}
|
||||
}
|
||||
if (endhead.bottomDL) {
|
||||
os << "\\hline\n";
|
||||
++ret;
|
||||
}
|
||||
os << "\\endhead\n";
|
||||
++ret;
|
||||
if (endfirsthead.empty) {
|
||||
os << "\\endfirsthead\n";
|
||||
++ret;
|
||||
}
|
||||
}
|
||||
// output firstheader info
|
||||
// output first header info
|
||||
// first header must be output before the header, otherwise the
|
||||
// correct caption placement becomes really wierd
|
||||
if (haveLTFirstHead()) {
|
||||
if (endfirsthead.topDL) {
|
||||
os << "\\hline\n";
|
||||
@ -2129,6 +2118,28 @@ int Tabular::TeXLongtableHeaderFooter(odocstream & os,
|
||||
os << "\\endfirsthead\n";
|
||||
++ret;
|
||||
}
|
||||
// output header info
|
||||
if (haveLTHead()) {
|
||||
if (!haveLTFirstHead()) {
|
||||
os << "\\endfirsthead\n";
|
||||
++ret;
|
||||
}
|
||||
if (endhead.topDL) {
|
||||
os << "\\hline\n";
|
||||
++ret;
|
||||
}
|
||||
for (row_type i = 0; i < row_info.size(); ++i) {
|
||||
if (row_info[i].endhead) {
|
||||
ret += TeXRow(os, i, runparams);
|
||||
}
|
||||
}
|
||||
if (endhead.bottomDL) {
|
||||
os << "\\hline\n";
|
||||
++ret;
|
||||
}
|
||||
os << "\\endhead\n";
|
||||
++ret;
|
||||
}
|
||||
// output footer info
|
||||
if (haveLTFoot()) {
|
||||
if (endfoot.topDL) {
|
||||
@ -2146,7 +2157,7 @@ int Tabular::TeXLongtableHeaderFooter(odocstream & os,
|
||||
}
|
||||
os << "\\endfoot\n";
|
||||
++ret;
|
||||
if (endlastfoot.empty) {
|
||||
if (!haveLTLastFoot()) {
|
||||
os << "\\endlastfoot\n";
|
||||
++ret;
|
||||
}
|
||||
@ -2177,8 +2188,9 @@ bool Tabular::isValidRow(row_type row) const
|
||||
{
|
||||
if (!is_long_tabular)
|
||||
return true;
|
||||
return !row_info[row].endhead && !row_info[row].endfirsthead &&
|
||||
!row_info[row].endfoot && !row_info[row].endlastfoot;
|
||||
return !row_info[row].endhead && !row_info[row].endfirsthead
|
||||
&& !row_info[row].endfoot && !row_info[row].endlastfoot
|
||||
&& !row_info[row].caption;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user