]> git.lyx.org Git - lyx.git/blobdiff - src/tabular.C
Scons: update_po target, part one: language_l10n.pot
[lyx.git] / src / tabular.C
index 7d6f1aabb3bc25bace03dc6d4cd8f29e69218060..1aaff8e3788de6be51ac1064135af0828375a511 100644 (file)
@@ -2136,6 +2136,7 @@ int LyXTabular::TeXRow(odocstream & os, row_type i, Buffer const & buf,
                        os << "\\addlinespace\n";
                else
                        os << "\\noalign{\\vskip\\doublerulesep}\n";
+               ++ret;
        } else if(!row_info[i].top_space.zero()) {
                if (use_booktabs)
                        os << "\\addlinespace["
@@ -2193,6 +2194,7 @@ int LyXTabular::TeXRow(odocstream & os, row_type i, Buffer const & buf,
                        os << "\\addlinespace\n";
                else
                        os << "\\noalign{\\vskip\\doublerulesep}\n";
+               ++ret;
        } else if (!row_info[i].interline_space.zero()) {
                if (use_booktabs)
                        os << "\\addlinespace["
@@ -2453,8 +2455,8 @@ int LyXTabular::docbook(Buffer const & buf, odocstream & os,
 }
 
 
-int LyXTabular::asciiTopHLine(odocstream & os, row_type row,
-                             vector<unsigned int> const & clen) const
+bool LyXTabular::plaintextTopHLine(odocstream & os, row_type row,
+                                   vector<unsigned int> const & clen) const
 {
        idx_type const fcell = getFirstCellInRow(row);
        idx_type const n = numberOfCellsInRow(fcell) + fcell;
@@ -2467,7 +2469,7 @@ int LyXTabular::asciiTopHLine(odocstream & os, row_type row,
                }
        }
        if (!tmp)
-               return 0;
+               return false;
 
        char_type ch;
        for (idx_type i = fcell; i < n; ++i) {
@@ -2497,12 +2499,12 @@ int LyXTabular::asciiTopHLine(odocstream & os, row_type row,
                }
        }
        os << endl;
-       return 1;
+       return true;
 }
 
 
-int LyXTabular::asciiBottomHLine(odocstream & os, row_type row,
-                                vector<unsigned int> const & clen) const
+bool LyXTabular::plaintextBottomHLine(odocstream & os, row_type row,
+                                      vector<unsigned int> const & clen) const
 {
        idx_type const fcell = getFirstCellInRow(row);
        idx_type const n = numberOfCellsInRow(fcell) + fcell;
@@ -2515,7 +2517,7 @@ int LyXTabular::asciiBottomHLine(odocstream & os, row_type row,
                }
        }
        if (!tmp)
-               return 0;
+               return false;
 
        char_type ch;
        for (idx_type i = fcell; i < n; ++i) {
@@ -2545,22 +2547,22 @@ int LyXTabular::asciiBottomHLine(odocstream & os, row_type row,
                }
        }
        os << endl;
-       return 1;
+       return true;
 }
 
 
-int LyXTabular::asciiPrintCell(Buffer const & buf, odocstream & os,
+void LyXTabular::plaintextPrintCell(Buffer const & buf, odocstream & os,
                               OutputParams const & runparams,
                               idx_type cell, row_type row, col_type column,
                               vector<unsigned int> const & clen,
                               bool onlydata) const
 {
        odocstringstream sstr;
-       int const ret = getCellInset(cell)->plaintext(buf, sstr, runparams);
+       getCellInset(cell)->plaintext(buf, sstr, runparams);
 
        if (onlydata) {
                os << sstr.str();
-               return ret;
+               return;
        }
 
        if (leftLine(cell))
@@ -2597,18 +2599,13 @@ int LyXTabular::asciiPrintCell(Buffer const & buf, odocstream & os,
                os << " |";
        else
                os << "  ";
-
-       return ret;
 }
 
 
-int LyXTabular::plaintext(Buffer const & buf, odocstream & os,
-                     OutputParams const & runparams,
-                     int const depth,
-                     bool onlydata, unsigned char delim) const
+void LyXTabular::plaintext(Buffer const & buf, odocstream & os,
+                           OutputParams const & runparams, int const depth,
+                           bool onlydata, unsigned char delim) const
 {
-       int ret = 0;
-
        // first calculate the width of the single columns
        vector<unsigned int> clen(columns_);
 
@@ -2645,25 +2642,24 @@ int LyXTabular::plaintext(Buffer const & buf, odocstream & os,
        }
        idx_type cell = 0;
        for (row_type i = 0; i < rows_; ++i) {
-               if (!onlydata && asciiTopHLine(os, i, clen))
+               if (!onlydata && plaintextTopHLine(os, i, clen))
                        os << docstring(depth * 2, ' ');
                for (col_type j = 0; j < columns_; ++j) {
                        if (isPartOfMultiColumn(i, j))
                                continue;
                        if (onlydata && j > 0)
                                os << delim;
-                       ret += asciiPrintCell(buf, os, runparams,
-                                             cell, i, j, clen, onlydata);
+                       plaintextPrintCell(buf, os, runparams,
+                                          cell, i, j, clen, onlydata);
                        ++cell;
                }
                os << endl;
                if (!onlydata) {
                        os << docstring(depth * 2, ' ');
-                       if (asciiBottomHLine(os, i, clen))
+                       if (plaintextBottomHLine(os, i, clen))
                                os << docstring(depth * 2, ' ');
                }
        }
-       return ret;
 }