]> git.lyx.org Git - features.git/commitdiff
Changes to the longtable support.
authorJürgen Vigna <jug@sad.it>
Wed, 24 Oct 2001 15:07:39 +0000 (15:07 +0000)
committerJürgen Vigna <jug@sad.it>
Wed, 24 Oct 2001 15:07:39 +0000 (15:07 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2934 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormTabular.C
src/insets/ChangeLog
src/insets/insettabular.C
src/tabular-old.C
src/tabular.C
src/tabular.h

index 310fad902f3baf890459932f1dc5d0b78ff96261..5f7934dbc42cea054444a28bd703bda6eccd32d6 100644 (file)
@@ -1,3 +1,11 @@
+2001-10-24  Juergen Vigna  <jug@sad.it>
+
+       * tabular-old.C (ReadOld): below variable changes reflected.
+
+       * tabular.[Ch]: added ltType struct for longtable header/footer
+       defines and changed all instances where they are used. Added
+       future support for double top/bottom rows.
+
 2001-10-24  José Matos  <jamatos@fep.up.pt>
 
        * buffer.h (docbookHandleCaption):
index 9e90310c2b8d7fe306901d7e45c6281966da648a..1d2d64b797ac7b2e2e9ac96035aa5e4708dbd02b 100644 (file)
@@ -1,3 +1,7 @@
+2001-10-24  Juergen Vigna  <jug@sad.it>
+
+       * FormTabular.C: changed calls for footer/headers of longtabulars.
+
 2001-10-23  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * forms/form_tabular.fd: Add value choices
index 428de22351c2d25974a60d3edbbe137d23846ed4..40098e95a50f044fd256443c9e6def5368e3c78e 100644 (file)
@@ -358,17 +358,17 @@ void FormTabular::update()
        setEnabled(longtable_options_->radio_lt_newpage,   enable);
 
        if (enable) {
-               int dummy;
+               LyXTabular::ltType dummyltt;
                fl_set_button(longtable_options_->radio_lt_firsthead,
-                             tabular->GetRowOfLTFirstHead(cell, dummy));
+                             tabular->GetRowOfLTFirstHead(row-1, dummyltt));
                fl_set_button(longtable_options_->radio_lt_head,
-                             tabular->GetRowOfLTHead(cell, dummy));
+                             tabular->GetRowOfLTHead(row-1, dummyltt));
                fl_set_button(longtable_options_->radio_lt_foot,
-                             tabular->GetRowOfLTFoot(cell, dummy));
+                             tabular->GetRowOfLTFoot(row-1, dummyltt));
                fl_set_button(longtable_options_->radio_lt_lastfoot,
-                             tabular->GetRowOfLTLastFoot(cell, dummy));
+                             tabular->GetRowOfLTLastFoot(row-1, dummyltt));
                fl_set_button(longtable_options_->radio_lt_newpage,
-                             tabular->GetLTNewPage(cell));
+                             tabular->GetLTNewPage(cell));
        } else {
                fl_set_button(longtable_options_->radio_lt_firsthead,0);
                fl_set_button(longtable_options_->radio_lt_head,0);
@@ -392,6 +392,8 @@ bool FormTabular::input(FL_OBJECT * ob, long)
     string special;;
 
     int cell = inset_->getActCell();
+       int row = tabular->row_of_cell(cell);
+       
     if (actCell_ != cell) {
         update();
         fl_set_object_label(dialog_->text_warning,
@@ -468,15 +470,15 @@ bool FormTabular::input(FL_OBJECT * ob, long)
 
            if (enable) {
                    num = LyXTabular::SET_LONGTABULAR;
-                   int dummy;
+                   LyXTabular::ltType dummyltt;
                    fl_set_button(longtable_options_->radio_lt_firsthead,
-                                 tabular->GetRowOfLTFirstHead(cell, dummy));
+                                 tabular->GetRowOfLTFirstHead(row, dummyltt));
                    fl_set_button(longtable_options_->radio_lt_head,
-                                 tabular->GetRowOfLTHead(cell, dummy));
+                                 tabular->GetRowOfLTHead(row, dummyltt));
                    fl_set_button(longtable_options_->radio_lt_foot,
-                                 tabular->GetRowOfLTFoot(cell, dummy));
+                                 tabular->GetRowOfLTFoot(row, dummyltt));
                    fl_set_button(longtable_options_->radio_lt_lastfoot,
-                                 tabular->GetRowOfLTLastFoot(cell, dummy));
+                                 tabular->GetRowOfLTLastFoot(row, dummyltt));
                    fl_set_button(longtable_options_->radio_lt_firsthead,
                                  tabular->GetLTNewPage(cell));
            } else {
@@ -503,13 +505,25 @@ bool FormTabular::input(FL_OBJECT * ob, long)
         num = LyXTabular::SET_USEBOX;
        special = "2";
     } else if (ob == longtable_options_->radio_lt_firsthead) {
-        num = LyXTabular::SET_LTFIRSTHEAD;
+               if (fl_get_button(ob))
+                       num = LyXTabular::SET_LTFIRSTHEAD;
+               else
+                       num = LyXTabular::UNSET_LTFIRSTHEAD;
     } else if (ob == longtable_options_->radio_lt_head) {
-        num = LyXTabular::SET_LTHEAD;
+               if (fl_get_button(ob))
+                       num = LyXTabular::SET_LTHEAD;
+               else
+                       num = LyXTabular::UNSET_LTHEAD;
     } else if (ob == longtable_options_->radio_lt_foot) {
-        num = LyXTabular::SET_LTFOOT;
+               if (fl_get_button(ob))
+                       num = LyXTabular::SET_LTFOOT;
+               else
+                       num = LyXTabular::UNSET_LTFOOT;
     } else if (ob == longtable_options_->radio_lt_lastfoot) {
-        num = LyXTabular::SET_LTLASTFOOT;
+               if (fl_get_button(ob))
+                       num = LyXTabular::SET_LTLASTFOOT;
+               else
+                       num = LyXTabular::UNSET_LTLASTFOOT;
     } else if (ob == longtable_options_->radio_lt_newpage) {
         num = LyXTabular::SET_LTNEWPAGE;
     } else if (ob == column_options_->input_special_alignment) {
index ca43d81826d140213467200a31012f3b47f0af7e..161b91e941eeb513e1bf83ee12dc468e0fce033a 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-24  Juergen Vigna  <jug@sad.it>
+
+       * insettabular.C: use new ltType struct for setting longtable
+       header and footers also new UNSET enums.
+
 2001-10-24  José Matos  <jamatos@fep.up.pt>
 
        * insettabular.C (linuxdoc): Now exports the ascii's table version.
index 01ec393b5b7d28dff08af50dcb148b991720f358..2d482028e2c36e121cf68abeb97bbb4444e3e038 100644 (file)
@@ -1662,10 +1662,11 @@ void InsetTabular::tabularFeatures(BufferView * bv,
                bv->text->cursor.par(),
                bv->text->cursor.par()->next());
 
-       int row = tabular->row_of_cell(actcell);
+       LyXTabular::ltType ltt;
+       int row = ltt.row = tabular->row_of_cell(actcell);
        int column = tabular->column_of_cell(actcell);
        bool flag = true;
-       
+
        switch (feature) {
        case LyXTabular::SET_PWIDTH:
        {
@@ -1906,17 +1907,25 @@ void InsetTabular::tabularFeatures(BufferView * bv,
                                        tabular->GetCellNumber(i, j), val);
                break;
        }
+       case LyXTabular::UNSET_LTFIRSTHEAD:
+               ltt.row = 0;
        case LyXTabular::SET_LTFIRSTHEAD:
-               tabular->SetLTHead(actcell, true);
+               tabular->SetLTHead(ltt, true);
                break;
+       case LyXTabular::UNSET_LTHEAD:
+               ltt.row = 0;
        case LyXTabular::SET_LTHEAD:
-               tabular->SetLTHead(actcell, false);
+               tabular->SetLTHead(ltt, false);
                break;
+       case LyXTabular::UNSET_LTFOOT:
+               ltt.row = 0;
        case LyXTabular::SET_LTFOOT:
-               tabular->SetLTFoot(actcell, false);
+               tabular->SetLTFoot(ltt, false);
                break;
+       case LyXTabular::UNSET_LTLASTFOOT:
+               ltt.row = 0;
        case LyXTabular::SET_LTLASTFOOT:
-               tabular->SetLTFoot(actcell, true);
+               tabular->SetLTFoot(ltt, true);
                break;
        case LyXTabular::SET_LTNEWPAGE:
        {
@@ -2108,6 +2117,7 @@ func_status::value_type InsetTabular::getStatus(string const & what) const
        int sel_row_start;
        int sel_row_end;
        int dummy;
+       LyXTabular::ltType dummyltt;
        bool flag = true;
 
        if (hasSelection()) {
@@ -2262,25 +2272,25 @@ func_status::value_type InsetTabular::getStatus(string const & what) const
                        status |= func_status::ToggleOff;
                break;
        case LyXTabular::SET_LTFIRSTHEAD:
-               if (tabular->GetRowOfLTHead(actcell, dummy))
+               if (tabular->GetRowOfLTHead(actcell, dummyltt))
                        status |= func_status::ToggleOn;
                else
                        status |= func_status::ToggleOff;
                break;
        case LyXTabular::SET_LTHEAD:
-               if (tabular->GetRowOfLTHead(actcell, dummy))
+               if (tabular->GetRowOfLTHead(actcell, dummyltt))
                        status |= func_status::ToggleOn;
                else
                        status |= func_status::ToggleOff;
                break;
        case LyXTabular::SET_LTFOOT:
-               if (tabular->GetRowOfLTFoot(actcell, dummy))
+               if (tabular->GetRowOfLTFoot(actcell, dummyltt))
                        status |= func_status::ToggleOn;
                else
                        status |= func_status::ToggleOff;
                break;
        case LyXTabular::SET_LTLASTFOOT:
-               if (tabular->GetRowOfLTFoot(actcell, dummy))
+               if (tabular->GetRowOfLTFoot(actcell, dummyltt))
                        status |= func_status::ToggleOn;
                else
                        status |= func_status::ToggleOff;
index 782d8e71d46fa6488635495ff0bba8bbb55d59eb..5dbccf0e5642b35e62cf00ec61707f52cae6a307 100644 (file)
@@ -157,10 +157,10 @@ void LyXTabular::ReadOld(Buffer const * buf, istream & is,
        return;
     }
     getTokenValue(line, "islongtable", is_long_tabular);
-    getTokenValue(line, "endhead", endhead);
-    getTokenValue(line, "endfirsthead", endfirsthead);
-    getTokenValue(line, "endfoot", endfoot);
-    getTokenValue(line, "endlastfoot", endlastfoot);
+    getTokenValue(line, "endhead", endhead.row);
+    getTokenValue(line, "endfirsthead", endfirsthead.row);
+    getTokenValue(line, "endfoot", endfoot.row);
+    getTokenValue(line, "endlastfoot", endlastfoot.row);
 
     for (int i = 0; i < rows_; ++i) {
        l_getline(is, line);
index 6448ae4dce5a3845a8e1e9cd83d604a5930b953c..0c201c501ac683d896a3486532a13cda2c518e75 100644 (file)
@@ -93,6 +93,14 @@ LyXTabular::columnstruct::columnstruct()
 }
 
 
+LyXTabular::lttype::lttype()
+{
+       row = 0;
+       topDL = false;
+       bottomDL = false;
+}
+
+
 /* konstruktor */
 LyXTabular::LyXTabular(InsetTabular * inset, int rows_arg, int columns_arg)
 {
@@ -211,10 +219,10 @@ void LyXTabular::Init(int rows_arg, int columns_arg, LyXTabular const * lt)
        set_row_column_number_info();
        is_long_tabular = false;
        rotate = false;
-       endhead = 0;
-       endfirsthead = 0;
-       endfoot = 0;
-       endlastfoot = 0;
+       endhead.row = 0;
+       endfirsthead.row = 0;
+       endfoot.row = 0;
+       endlastfoot.row = 0;
 }
 
 
@@ -1089,10 +1097,10 @@ void LyXTabular::Write(Buffer const * buf, ostream & os) const
        os << "<features"
           << write_attribute("rotate", tostr(rotate))
           << write_attribute("islongtable", tostr(is_long_tabular))
-          << write_attribute("endhead", endhead)
-          << write_attribute("endfirsthead", endfirsthead)
-          << write_attribute("endfoot", endfoot)
-          << write_attribute("endlastfoot", endlastfoot)
+          << write_attribute("endhead", endhead.row)
+          << write_attribute("endfirsthead", endfirsthead.row)
+          << write_attribute("endfoot", endfoot.row)
+          << write_attribute("endlastfoot", endlastfoot.row)
           << ">\n";
        for (int j = 0; j < columns_; ++j) {
                os << "<column"
@@ -1328,11 +1336,14 @@ void LyXTabular::ReadNew(Buffer const * buf, istream & is,
        }
        getTokenValue(line, "rotate", rotate);
        getTokenValue(line, "islongtable", is_long_tabular);
-       getTokenValue(line, "endhead", endhead);
-       getTokenValue(line, "endfirsthead", endfirsthead);
-       getTokenValue(line, "endfoot", endfoot);
-       getTokenValue(line, "endlastfoot", endlastfoot);
-
+       getTokenValue(line, "endhead", endhead.row);
+       getTokenValue(line, "endfirsthead", endfirsthead.row);
+       getTokenValue(line, "endfoot", endfoot.row);
+       getTokenValue(line, "endlastfoot", endlastfoot.row);
+       endhead.row = abs(endhead.row);
+       endfirsthead.row = abs(endfirsthead.row);
+       endfoot.row = abs(endfoot.row);
+       endlastfoot.row = abs(endlastfoot.row);
        for (int j = 0; j < columns_; ++j) {
                l_getline(is,line);
                if (!prefixIs(line,"<column")) {
@@ -1463,10 +1474,10 @@ void LyXTabular::OldFormatRead(LyXLex & lex, string const & fl)
                cont_row_info = vector<int>(rows_arg);
                SetLongTabular(is_long_tabular_arg);
                SetRotateTabular(rotate_arg);
-               endhead = a + 1;
-               endfirsthead = b + 1;
-               endfoot = c + 1;
-               endlastfoot = d + 1;
+               endhead.row = a + 1;
+               endfirsthead.row = b + 1;
+               endfoot.row = c + 1;
+               endlastfoot.row = d + 1;
                for (i = 0; i < rows_; ++i) {
                        a = b = c = d = e = f = g = 0;
                        is >> a >> b >> c >> d;
@@ -1812,78 +1823,59 @@ LyXTabular::BoxType LyXTabular::GetUsebox(int cell) const
        return UseParbox(cell);
 }
 
-
-void LyXTabular::SetLTHead(int cell, bool first)
+bool LyXTabular::checkLTType(int row, ltType const & ltt) const
 {
-       int const row = row_of_cell(cell);
-       int const val = (row + 1) * (column_of_cell(cell) ? 1 : -1);
+       if (!ltt.row || (ltt.row > rows_))
+               return false;
+       return (row == (ltt.row - 1));
+}
+
 
+void LyXTabular::SetLTHead(ltType const & hd, bool first)
+{
        if (first) {
-               if (endfirsthead == val)
-                       endfirsthead = 0;
-               else
-                       endfirsthead = val;
+               endfirsthead = hd;
        } else {
-               if (endhead == val)
-                       endhead = 0;
-               else
-                       endhead = val;
+               endhead = hd;
        }
 }
 
 
-bool LyXTabular::GetRowOfLTHead(int cell, int & row) const
+bool LyXTabular::GetRowOfLTHead(int row, ltType & hd) const
 {
-       row = endhead;
-       if (abs(endhead) > rows_)
-               return false;
-       return (row_of_cell(cell) == abs(endhead) - 1);
+       hd = endhead;
+       return checkLTType(row, hd);
 }
 
 
-bool LyXTabular::GetRowOfLTFirstHead(int cell, int & row) const
+bool LyXTabular::GetRowOfLTFirstHead(int row, ltType & hd) const
 {
-       row = endfirsthead;
-       if (abs(endfirsthead) > rows_)
-               return false;
-       return (row_of_cell(cell) == abs(endfirsthead) - 1);
+       hd = endfirsthead;
+       return checkLTType(row, hd);
 }
 
 
-void LyXTabular::SetLTFoot(int cell, bool last)
+void LyXTabular::SetLTFoot(ltType const & fd, bool last)
 {
-       int const row = row_of_cell(cell);
-       int const val = (row + 1) * (column_of_cell(cell) ? 1 : -1);
-
        if (last) {
-               if (endlastfoot == val)
-                       endlastfoot = 0;
-               else
-                       endlastfoot = val;
+               endlastfoot = fd;
        } else {
-               if (endfoot == val)
-                       endfoot = 0;
-               else
-                       endfoot = val;
+               endfoot = fd;
        }
 }
 
 
-bool LyXTabular::GetRowOfLTFoot(int cell, int & row) const
+bool LyXTabular::GetRowOfLTFoot(int row, ltType & fd) const
 {
-       row = endfoot;
-       if ((endfoot + 1) > rows_)
-               return false;
-       return (row_of_cell(cell) == abs(endfoot) - 1);
+       fd = endfoot;
+       return checkLTType(row, fd);
 }
 
 
-bool LyXTabular::GetRowOfLTLastFoot(int cell, int & row) const
+bool LyXTabular::GetRowOfLTLastFoot(int row, ltType & fd) const
 {
-       row = endlastfoot;
-       if (abs(endlastfoot) > rows_)
-               return false;
-       return (row_of_cell(cell) == (abs(endlastfoot)-1));
+       fd = endlastfoot;
+       return checkLTType(row, fd);
 }
 
 
@@ -2193,29 +2185,13 @@ int LyXTabular::Latex(Buffer const * buf,
 
        for (int i = 0; i < rows_; ++i) {
                ret += TeXTopHLine(os, i);
-               int bret = ret;
-               if (IsLongTabular()) {
-                       if ((endhead < 0) && (i == (abs(endhead)-1))) {
-                               os << "\\endhead\n";
-                               ++ret;
-                       }
-                       if ((endfirsthead < 0) && (i == (abs(endfirsthead)-1))) {
-                               os << "\\endfirsthead\n";
-                               ++ret;
-                       }
-                       if ((endfoot < 0) && (i == (abs(endfoot)-1))) {
-                               os << "\\endfoot\n";
-                               ++ret;
-                       }
-                       if ((endlastfoot < 0) && (i == (abs(endlastfoot)-1))) {
-                               os << "\\endlastfoot\n";
-                               ++ret;
-                       }
-               }
+#warning Implement top double lines for LT Header/Footers
+#if 0
                if (ret > bret) {
                        ret += TeXBottomHLine(os, i-1);
                        ret += TeXTopHLine(os, i);
                }
+#endif
                for (int j = 0; j < columns_; ++j) {
                        if (IsPartOfMultiColumn(i,j))
                                continue;
@@ -2240,26 +2216,31 @@ int LyXTabular::Latex(Buffer const * buf,
                }
                os << "\\\\\n";
                ret += TeXBottomHLine(os, i);
-               bret = ret;
                if (IsLongTabular()) {
-                       if ((endhead > 0) && (i == (endhead - 1))) {
+                       if (i == (endhead.row - 1)) {
+                               if (endhead.bottomDL)
+                                       ret += TeXBottomHLine(os, i);
                                os << "\\endhead\n";
                                ++ret;
                        }
-                       if ((endfirsthead > 0) && (i == (endfirsthead - 1))) {
+                       if (i == (endfirsthead.row - 1)) {
+                               if (endfirsthead.bottomDL)
+                                       ret += TeXBottomHLine(os, i);
                                os << "\\endfirsthead\n";
                                ++ret;
                        }
-                       if ((endfoot > 0) && (i == (endfoot - 1))) {
+                       if (i == (endfoot.row - 1)) {
+                               if (endfoot.bottomDL)
+                                       ret += TeXBottomHLine(os, i);
                                os << "\\endfoot\n";
                                ++ret;
                        }
-                       if ((endlastfoot > 0) && (i == (endlastfoot - 1))) {
+                       if (i == (endlastfoot.row - 1)) {
+                               if (endlastfoot.bottomDL)
+                                       ret += TeXBottomHLine(os, i);
                                os << "\\endlastfoot\n";
                                ++ret;
                        }
-//         if (ret > bret)
-//             ret += TeXBottomHLine(os, i);
                        if (row_info[i].newpage) {
                                os << "\\newpage\n";
                                ++ret;
@@ -2369,25 +2350,25 @@ int LyXTabular::DocBook(Buffer const * buf, ostream & os) const
 
        if ( IsLongTabular() ) {
                // Header
-               if( endhead || endfirsthead ) {
+               if( endhead.row || endfirsthead.row ) {
                        os << "<thead>\n";
-                       if( endfirsthead ) {
-                               docbookRow( buf, os, abs( endfirsthead) - 1);
+                       if( endfirsthead.row ) {
+                               docbookRow( buf, os, endfirsthead.row - 1);
                        }
-                       if( endhead && abs( endhead) != abs( endfirsthead)) {
-                               docbookRow( buf, os, abs( endhead) - 1);
+                       if( endhead.row && endhead.row != endfirsthead.row) {
+                               docbookRow(buf, os, endhead.row - 1);
                        }
                        os << "</thead>\n";
                }
 
                // Footer
-               if( endfoot || endlastfoot ) {
+               if( endfoot.row || endlastfoot.row ) {
                        os << "<tfoot>\n";
-                       if( endfoot ) {
-                               docbookRow( buf, os, abs( endfoot) - 1);
+                       if( endfoot.row ) {
+                               docbookRow( buf, os, endfoot.row - 1);
                        }
-                       if( endlastfoot && abs( endlastfoot) != endfoot) {
-                               docbookRow( buf, os, abs( endlastfoot) - 1);
+                       if( endlastfoot.row && endlastfoot.row != endfoot.row) {
+                               docbookRow( buf, os, endlastfoot.row - 1);
                        }
                        os << "</tfoot>\n";
                }
@@ -2399,8 +2380,8 @@ int LyXTabular::DocBook(Buffer const * buf, ostream & os) const
        os << "<tbody>\n";
        for (int i = 0; i < rows_; ++i) {
                if(!IsLongTabular() || (
-                  i != abs(endhead) - 1 && i != abs(endfirsthead) - 1 &&
-                  i != abs(endfoot) - 1 && i != abs(endlastfoot) - 1)) {
+                  i != endhead.row - 1 && i != endfirsthead.row - 1 &&
+                  i != endfoot.row - 1 && i != endlastfoot.row - 1)) {
                        docbookRow( buf, os, i);
                }
        }
index fc458deaaff240dffa40adec369ad33f0768f15d..b434ab4a9538b067232f4ff15816ace4a53e33f6 100644 (file)
@@ -108,12 +108,16 @@ public:
                SET_USEBOX,
                ///
                SET_LTHEAD,
+               UNSET_LTHEAD,
                ///
                SET_LTFIRSTHEAD,
+               UNSET_LTFIRSTHEAD,
                ///
                SET_LTFOOT,
+               UNSET_LTFOOT,
                ///
                SET_LTLASTFOOT,
+               UNSET_LTLASTFOOT,
                ///
                SET_LTNEWPAGE,
                ///
@@ -152,6 +156,19 @@ public:
                BOX_MINIPAGE = 2
        };
 
+       struct lttype {
+               // constructor
+               lttype();
+               // row of the header/footer type end definition
+               int row;
+               // double borders on top
+               bool topDL;
+               // double borders on bottom
+               bool bottomDL;
+       };
+       ///
+       typedef struct lttype ltType;
+       
        /* konstruktor */
        ///
        LyXTabular(InsetTabular *, int columns_arg, int rows_arg);
@@ -344,17 +361,19 @@ public:
        //
        // Long Tabular Options
        ///
-       void SetLTHead(int cell, bool first);
+       bool checkLTType(int row, ltType const &) const;
+       ///
+       void SetLTHead(ltType const &, bool first);
        ///
-       bool GetRowOfLTHead(int cell, int & row) const;
+       bool GetRowOfLTHead(int row, ltType &) const;
        ///
-       bool GetRowOfLTFirstHead(int cell, int & row) const;
+       bool GetRowOfLTFirstHead(int row, ltType &) const;
        ///
-       void SetLTFoot(int cell, bool last);
+       void SetLTFoot(ltType const &, bool last);
        ///
-       bool GetRowOfLTFoot(int cell, int & row) const;
+       bool GetRowOfLTFoot(int row, ltType &) const;
        ///
-       bool GetRowOfLTLastFoot(int cell, int & row) const;
+       bool GetRowOfLTLastFoot(int row, ltType &) const;
        ///
        void SetLTNewPage(int cell, bool what);
        ///
@@ -485,13 +504,13 @@ private:
        ///
        bool is_long_tabular;
        /// row of endhead
-       int endhead;
+       ltType endhead;
        /// row of endfirsthead
-       int endfirsthead;
+       ltType endfirsthead;
        /// row of endfoot
-       int endfoot;
+       ltType endfoot;
        /// row of endlastfoot
-       int endlastfoot;
+       ltType endlastfoot;
        ///
        InsetTabular * owner_;