Long tables fixed in docbook.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3581 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2002-02-21 15:55:49 +00:00
parent e6fe0de052
commit 5539328a35
2 changed files with 30 additions and 30 deletions

View File

@ -1,3 +1,7 @@
2002-02-21 José Matos <jamatos@fep.up.pt>
* tabular.C (docBook): fixed support for long tables.
2002-02-20 Juergen Vigna <jug@sad.it>
* text2.C (getFont): get the drawing font of the Inset if this

View File

@ -2357,48 +2357,44 @@ int LyXTabular::docBook(Buffer const * buf, ostream & os) const
//+ Long Tabular case +
//+---------------------------------------------------------------------
#warning Jose please have a look here I changed the longtable header/footer
#warning ---- options so I had to disable the docbook code (Jug 20011219)
#if 0
if (IsLongTabular()) {
// Header
if (endhead.row || endfirsthead.row) {
os << "<thead>\n";
if (endfirsthead.row) {
docbookRow(buf, os, endfirsthead.row - 1);
// output header info
if (haveLTHead() || haveLTFirstHead()) {
os << "<thead>\n";
++ret;
for (int i = 0; i < rows_; ++i) {
if (row_info[i].endhead || row_info[i].endfirsthead) {
ret += docbookRow(buf, os, i);
}
if (endhead.row && endhead.row != endfirsthead.row) {
docbookRow(buf, os, endhead.row - 1);
}
os << "</thead>\n";
}
// Footer
if (endfoot.row || endlastfoot.row) {
os << "<tfoot>\n";
if (endfoot.row) {
docbookRow(buf, os, endfoot.row - 1);
}
if (endlastfoot.row && endlastfoot.row != endfoot.row) {
docbookRow(buf, os, endlastfoot.row - 1);
}
os << "</tfoot>\n";
}
os << "<thead>\n";
++ret;
}
#endif
// output footer info
if (haveLTFoot() || haveLTLastFoot()) {
os << "<tfoot>\n";
++ret;
for (int i = 0; i < rows_; ++i) {
if (row_info[i].endfoot || row_info[i].endlastfoot) {
ret += docbookRow(buf, os, i);
}
}
os << "</tfoot>\n";
++ret;
}
//+---------------------------------------------------------------------
//+ the single row and columns (cells) +
//+---------------------------------------------------------------------
os << "<tbody>\n";
++ret;
for (int i = 0; i < rows_; ++i) {
if (!IsLongTabular() || (
!row_info[i].endhead && !row_info[i].endfirsthead &&
!row_info[i].endfoot && !row_info[i].endlastfoot)) {
docbookRow(buf, os, i);
if (isValidRow(i)) {
ret += docbookRow(buf, os, i);
}
}
os << "</tbody>\n";
++ret;
//+---------------------------------------------------------------------
//+ the closing of the tabular +
//+---------------------------------------------------------------------