From: José Matox Date: Thu, 21 Feb 2002 15:55:49 +0000 (+0000) Subject: Long tables fixed in docbook. X-Git-Tag: 1.6.10~19815 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5539328a350ee2551b9051f37897a9d4bac5179b;p=features.git Long tables fixed in docbook. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3581 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index c9b5ea0b8c..d31da60419 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2002-02-21 José Matos + + * tabular.C (docBook): fixed support for long tables. + 2002-02-20 Juergen Vigna * text2.C (getFont): get the drawing font of the Inset if this diff --git a/src/tabular.C b/src/tabular.C index 83a25fb9eb..38cb304476 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -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 << "\n"; - if (endfirsthead.row) { - docbookRow(buf, os, endfirsthead.row - 1); - } - if (endhead.row && endhead.row != endfirsthead.row) { - docbookRow(buf, os, endhead.row - 1); + // output header info + if (haveLTHead() || haveLTFirstHead()) { + os << "\n"; + ++ret; + for (int i = 0; i < rows_; ++i) { + if (row_info[i].endhead || row_info[i].endfirsthead) { + ret += docbookRow(buf, os, i); } - os << "\n"; } - - // Footer - if (endfoot.row || endlastfoot.row) { - os << "\n"; - if (endfoot.row) { - docbookRow(buf, os, endfoot.row - 1); - } - if (endlastfoot.row && endlastfoot.row != endfoot.row) { - docbookRow(buf, os, endlastfoot.row - 1); + os << "\n"; + ++ret; + } + // output footer info + if (haveLTFoot() || haveLTLastFoot()) { + os << "\n"; + ++ret; + for (int i = 0; i < rows_; ++i) { + if (row_info[i].endfoot || row_info[i].endlastfoot) { + ret += docbookRow(buf, os, i); } - os << "\n"; } + os << "\n"; + ++ret; } -#endif + //+--------------------------------------------------------------------- //+ the single row and columns (cells) + //+--------------------------------------------------------------------- os << "\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 << "\n"; + ++ret; //+--------------------------------------------------------------------- //+ the closing of the tabular + //+---------------------------------------------------------------------