-#if 0
- int row = row_of_cell(cell);
- string hline1,hline2;
- bool print_hline = true;
- bool pr_top_hline,flag1,flag2;
- flag1 = IsLongTable() &&
- ((row == endhead) || (row == endfirsthead) ||
- (row == endfoot) || (row == endlastfoot));
- row++;
- flag2 = IsLongTable() &&
- ((row <= endhead) || (row <= endfirsthead) ||
- (row <= endfoot) || (row <= endlastfoot));
- row--;
- // print the bottom hline only if (otherwise it is doubled):
- // - is no LongTable
- // - there IS a first-header
- // - the next row is no special header/footer
- // & this row is no special header/footer
- // - the next row is a special header/footer
- // & this row is a special header/footer
- pr_top_hline = (flag1 && flag2) || (!flag1 && !flag2) ||
- (endfirsthead == endhead);
- file += "\\\\\n";
- ret++;
- tmp = 0;
- fcell = cell;
- while (!IsFirstCell(fcell))
- fcell--;
- for (i=0; i < NumberOfCellsInRow(cell); i++){
- if (BottomLine(fcell+i))
- tmp++;
- }
- if (tmp == NumberOfCellsInRow(cell)){
- file += "\\hline ";
- hline1 = "\\hline ";
- } else {
- tmp = 0;
- for (i=0; i < NumberOfCellsInRow(fcell); i++){
- if (BottomLine(fcell+i)){
- file += "\\cline{";
- file += column_of_cell(fcell+i)+1;
- file += '-';
- file += right_column_of_cell(fcell+i)+1;
- file += "} ";
- hline1 += "\\cline{";
- hline1 += column_of_cell(fcell+i)+1;
- hline1 += '-';
- hline1 += right_column_of_cell(fcell+i)+1;
- hline1 += "} ";
- tmp = 1;
- }
- }
- }
- if (tmp){
- file += '\n';
- ret++;
- }
- if (IsLongTable() && (row == endfoot)) {
- file += "\\endfoot\n";
- ret++;
- print_hline = false; // no double line below footer
- }
- if (IsLongTable() && (row == endlastfoot)) {
- file += "\\endlastfoot\n";
- ret++;
- print_hline = false; // no double line below footer
- }
- if (IsLongTable() && row_info[row].newpage) {
- file += "\\newpage\n";
- ret++;
- print_hline = false; // no line below a \\newpage-command
- }
- tmp = 0;
- if (nvcell < numberofcells && (cell < GetNumberOfCells()-1) &&
- !ShouldBeVeryLastCell(cell)) {
- fcell = nvcell;
- for (i=0; i < NumberOfCellsInRow(fcell); i++){
- if (TopLine(fcell+i))
- tmp++;
- }
- if (tmp == NumberOfCellsInRow(fcell)){
- if (print_hline)
- file += "\\hline ";
- hline2 = "\\hline ";
- }
- else {
- tmp = 0;
- for (i=0; i < NumberOfCellsInRow(fcell); i++){
- if (TopLine(fcell+i)){
- if (print_hline) {
- file += "\\cline{";
- file += column_of_cell(fcell+i)+1;
- file += '-';
- file += right_column_of_cell(fcell+i)+1;
- file += "} ";
- }
- hline2 += "\\cline{";
- hline2 += column_of_cell(fcell+i)+1;
- hline2 += '-';
- hline2 += right_column_of_cell(fcell+i)+1;
- hline2 += "} ";
- tmp = 1;
- }
- }
- }
- if (tmp && print_hline){
- file += '\n';
- ret++;
- }
- }
- // the order here is important as if one defines two
- // or more things in one line only the first entry is
- // displayed the other are set to an empty-row. This
- // is important if I have a footer and want that the
- // lastfooter is NOT displayed!!!
- bool sflag2 = (row == endhead) || (row == endfirsthead) ||
- (row == endfoot) || (row == endlastfoot);
- row--;
-// sflag2 = IsLongTable() && (row >= 0) &&
-// (sflag2 || (row == endhead) || (row == endfirsthead));
- row += 2;
- bool sflag1 = IsLongTable() && (row != endhead) &&
- (row != endfirsthead) &&
- ((row == endfoot) || (row == endlastfoot));
- row--;
- if (IsLongTable() && (row == endhead)) {
- file += "\\endhead\n";
- ret++;
- }
- if (IsLongTable() && (row == endfirsthead)) {
- file += "\\endfirsthead\n";
- ret++;
- }
- if (sflag1) { // add the \hline for next foot row
- if (!hline1.empty()) {
- file += hline1 + '\n';
- ret++;
- }
- }
- // add the \hline for the first row
- if (pr_top_hline && sflag2) {
- if (!hline2.empty()) {
- file += hline2 + '\n';
- ret++;
- }
- }
- if (nvcell < numberofcells && RotateCell(nvcell)) {
- file += "\\begin{sideways}\n";
- ret++;
- }
-#endif